/*! For license information please see main.76e15e36.js.LICENSE.txt */ (()=>{var e={35513:(e,t,r)=>{"use strict";r.d(t,{A:()=>ie});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?c(b,--y):0,m--,10===x&&(m=1,v--),x}function T(){return x=y2||E(x)>3?"":" "}function I(e,t){for(;--t&&T()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return S(e,M()+(t<6&&32==A()&&32==T()))}function R(e){for(;T();)switch(x){case e:return y;case 34:case 39:34!==e&&39!==e&&R(x);break;case 40:41===e&&R(e);break;case 92:T()}return y}function D(e,t){for(;T()&&e+x!==57&&(e+x!==84||47!==A()););return"/*"+S(t,y-1)+"*"+a(47===e?e:T())}function z(e){for(;!E(A());)T();return S(e,y)}var F="-ms-",N="-moz-",B="-webkit-",j="comm",U="rule",q="decl",V="@keyframes";function H(e,t){for(var r="",n=h(e),i=0;i0&&d(N)-g&&p(x>32?K(N+";",n,r,g-1):K(l(N," ","")+";",n,r,g-2),h);break;case 59:N+=";";default:if(p(F=Z(N,t,r,v,m,i,f,C,L=[],R=[],g),o),123===E)if(0===m)Y(N,t,F,F,L,o,g,f,R);else switch(99===y&&110===c(N,3)?100:y){case 100:case 108:case 109:case 115:Y(e,F,F,n&&p(Z(e,F,F,0,0,i,f,C,i,L=[],g),R),i,R,g,f,n?L:R);break;default:Y(N,F,F,F,[""],R,0,f,R)}}v=m=x=0,_=S=1,C=N="",g=s;break;case 58:g=1+d(N),x=b;default:if(_<1)if(123==E)--_;else if(125==E&&0==_++&&125==k())continue;switch(N+=a(E),E*_){case 38:S=m>0?1:(N+="\f",-1);break;case 44:f[v++]=(d(N)-1)*S,S=1;break;case 64:45===A()&&(N+=P(T())),y=A(),m=g=d(C=N+=z(M())),E++;break;case 45:45===b&&2==d(N)&&(_=0)}}return o}function Z(e,t,r,n,a,o,u,c,d,p,v){for(var m=a-1,g=0===a?o:[""],y=h(g),x=0,b=0,w=0;x0?g[k]+" "+T:l(T,/&\f/g,g[k])))&&(d[w++]=A);return _(e,t,r,0===a?U:c,d,p,v)}function X(e,t,r){return _(e,t,r,j,a(x),f(e,2,-2),0)}function K(e,t,r,n){return _(e,t,r,q,f(e,0,n),f(e,n+1,-1),n)}var J=function(e,t,r){for(var n=0,i=0;n=i,i=A(),38===n&&12===i&&(t[r]=1),!E(i);)T();return S(e,y)},$=function(e,t){return L(function(e,t){var r=-1,n=44;do{switch(E(n)){case 0:38===n&&12===A()&&(t[r]=1),e[r]+=J(y-1,t,r);break;case 2:e[r]+=P(n);break;case 4:if(44===n){e[++r]=58===A()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=a(n)}}while(n=T());return e}(C(e),t))},Q=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(r))&&!n){Q.set(e,!0);for(var i=[],a=$(t,i),o=r.props,s=0,l=0;s6)switch(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+N+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?re(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,d(e)-3-(~u(e,"!important")&&10))){case 107:return l(e,":",":"+B)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===c(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+F+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return B+e+F+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+F+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+F+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+F+e+e}return e}var ne=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case q:e.return=re(e.value,e.length);break;case V:return H([w(e,{value:l(e.value,"@","@"+B)})],n);case U:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([w(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return H([w(e,{props:[l(t,/:(plac\w+)/,":"+B+"input-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,F+"input-$1")]})],n)}return""}))}}],ie=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||ne;var a,o,s={},l=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r{"use strict";function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}r.d(t,{A:()=>n})},55756:(e,t,r)=>{"use strict";r.d(t,{C:()=>s,T:()=>u,i:()=>a,w:()=>l});var n=r(65043),i=r(35513),a=(r(12830),r(69436),!0),o=n.createContext("undefined"!==typeof HTMLElement?(0,i.A)({key:"css"}):null);var s=o.Provider,l=function(e){return(0,n.forwardRef)((function(t,r){var i=(0,n.useContext)(o);return e(t,i,r)}))};a||(l=function(e){return function(t){var r=(0,n.useContext)(o);return null===r?(r=(0,i.A)({key:"css"}),n.createElement(o.Provider,{value:r},e(t,r))):e(t,r)}});var u=n.createContext({})},83290:(e,t,r)=>{"use strict";r.d(t,{AH:()=>u,i7:()=>c,mL:()=>l});var n=r(55756),i=r(65043),a=r(81722),o=r(69436),s=r(12830),l=(r(35513),r(80219),(0,n.w)((function(e,t){var r=e.styles,l=(0,s.J)([r],void 0,i.useContext(n.T));if(!n.i){for(var u,c=l.name,f=l.styles,d=l.next;void 0!==d;)c+=" "+d.name,f+=d.styles,d=d.next;var h=!0===t.compat,p=t.insert("",{name:c,styles:f},t.sheet,h);return h?null:i.createElement("style",((u={})["data-emotion"]=t.key+"-global "+c,u.dangerouslySetInnerHTML={__html:p},u.nonce=t.sheet.nonce,u))}var v=i.useRef();return(0,o.i)((function(){var e=t.key+"-global",r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),n=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(r.before=t.sheet.tags[0]),null!==i&&(n=!0,i.setAttribute("data-emotion",e),r.hydrate([i])),v.current=[r,n],function(){r.flush()}}),[t]),(0,o.i)((function(){var e=v.current,r=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,a.sk)(t,l.next,!0),r.tags.length){var n=r.tags[r.tags.length-1].nextElementSibling;r.before=n,r.flush()}t.insert("",l,r,!1)}}),[t,l.name]),null})));function u(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";r.d(t,{J:()=>p});var n={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=r(30918),a=/[A-Z]|^ms/g,o=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!==typeof e},u=(0,i.A)((function(e){return s(e)?e:e.replace(a,"-$&").toLowerCase()})),c=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(o,(function(e,t,r){return d={name:t,styles:r,next:d},t}))}return 1===n[e]||s(e)||"number"!==typeof t||0===t?t:t+"px"};function f(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return d={name:r.name,styles:r.styles,next:d},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)d={name:n.name,styles:n.styles,next:d},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i=4;++n,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:d}}},69436:(e,t,r)=>{"use strict";var n;r.d(t,{i:()=>s,s:()=>o});var i=r(65043),a=!!(n||(n=r.t(i,2))).useInsertionEffect&&(n||(n=r.t(i,2))).useInsertionEffect,o=a||function(e){return e()},s=a||i.useLayoutEffect},81722:(e,t,r)=>{"use strict";r.d(t,{Rk:()=>n,SF:()=>i,sk:()=>a});function n(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n}var i=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},a=function(e,t,r){i(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+n:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}}},74802:(e,t,r)=>{"use strict";var n=r(24994);t.A=void 0;var i=n(r(40039)),a=r(70579);t.A=(0,i.default)((0,a.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},40039:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=r(41100)},6431:(e,t,r)=>{"use strict";r.d(t,{b:()=>s});var n=r(65043),i=r(13030);r(70579);const a=n.createContext(void 0);function o(e){let{props:t,name:r}=e;return function(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const a=t.components[r];return a.defaultProps?(0,i.A)(a.defaultProps,n):a.styleOverrides||a.variants?n:(0,i.A)(a,n)}({props:t,name:r,theme:{components:n.useContext(a)}})}function s(e){return o(e)}},25881:(e,t)=>{"use strict";var r,n=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case a:case s:case o:case d:case h:return e;default:switch(e=e&&e.$$typeof){case c:case u:case f:case v:case p:case l:return e;default:return t}}case i:return t}}}r=Symbol.for("react.module.reference")},30805:(e,t,r)=>{"use strict";r(25881)},17200:(e,t,r)=>{"use strict";r.d(t,{A:()=>B});var n=r(58168),i=r(98587),a=r(17868),o=r(19172),s=r(37758),l=r(58812),u=r(18280);var c=r(67266);const f={black:"#000",white:"#fff"},d={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},h={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},p={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},v={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},m={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},g={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},y={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},x=["mode","contrastThreshold","tonalOffset"],b={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:f.white,default:f.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_={text:{primary:f.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:f.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function w(e,t,r,n){const i=n.light||n,a=n.dark||1.5*n;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=(0,c.a)(e.main,i):"dark"===t&&(e.dark=(0,c.e$)(e.main,a)))}function k(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:s=.2}=e,l=(0,i.A)(e,x),u=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[200],light:m[50],dark:m[400]}:{main:m[700],light:m[400],dark:m[800]}}(t),k=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h[200],light:h[50],dark:h[400]}:{main:h[500],light:h[300],dark:h[700]}}(t),T=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p[500],light:p[300],dark:p[700]}:{main:p[700],light:p[400],dark:p[800]}}(t),A=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[400],light:g[300],dark:g[700]}:{main:g[700],light:g[500],dark:g[900]}}(t),M=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[400],light:y[300],dark:y[700]}:{main:y[800],light:y[500],dark:y[900]}}(t),S=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:"#ed6c02",light:v[500],dark:v[900]}}(t);function E(e){return(0,c.eM)(e,_.text.primary)>=r?_.text.primary:b.text.primary}const C=e=>{let{color:t,name:r,mainShade:i=500,lightShade:o=300,darkShade:l=700}=e;if(t=(0,n.A)({},t),!t.main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw new Error((0,a.A)(11,r?" (".concat(r,")"):"",i));if("string"!==typeof t.main)throw new Error((0,a.A)(12,r?" (".concat(r,")"):"",JSON.stringify(t.main)));return w(t,"light",o,s),w(t,"dark",l,s),t.contrastText||(t.contrastText=E(t.main)),t},L={dark:_,light:b};return(0,o.A)((0,n.A)({common:(0,n.A)({},f),mode:t,primary:C({color:u,name:"primary"}),secondary:C({color:k,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:C({color:T,name:"error"}),warning:C({color:S,name:"warning"}),info:C({color:A,name:"info"}),success:C({color:M,name:"success"}),grey:d,contrastThreshold:r,getContrastText:E,augmentColor:C,tonalOffset:s},L[t]),l)}const T=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const A={textTransform:"uppercase"},M='"Roboto", "Helvetica", "Arial", sans-serif';function S(e,t){const r="function"===typeof t?t(e):t,{fontFamily:a=M,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:u=400,fontWeightMedium:c=500,fontWeightBold:f=700,htmlFontSize:d=16,allVariants:h,pxToRem:p}=r,v=(0,i.A)(r,T);const m=s/14,g=p||(e=>"".concat(e/d*m,"rem")),y=(e,t,r,i,o)=>{return(0,n.A)({fontFamily:a,fontWeight:e,fontSize:g(t),lineHeight:r},a===M?{letterSpacing:"".concat((s=i/t,Math.round(1e5*s)/1e5),"em")}:{},o,h);var s},x={h1:y(l,96,1.167,-1.5),h2:y(l,60,1.2,-.5),h3:y(u,48,1.167,0),h4:y(u,34,1.235,.25),h5:y(u,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(u,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(u,16,1.5,.15),body2:y(u,14,1.43,.15),button:y(c,14,1.75,.4,A),caption:y(u,12,1.66,.4),overline:y(u,12,2.66,1,A),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,o.A)((0,n.A)({htmlFontSize:d,pxToRem:g,fontFamily:a,fontSize:s,fontWeightLight:l,fontWeightRegular:u,fontWeightMedium:c,fontWeightBold:f},x),v,{clone:!1})}function E(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const C=["none",E(0,2,1,-1,0,1,1,0,0,1,3,0),E(0,3,1,-2,0,2,2,0,0,1,5,0),E(0,3,3,-2,0,3,4,0,0,1,8,0),E(0,2,4,-1,0,4,5,0,0,1,10,0),E(0,3,5,-1,0,5,8,0,0,1,14,0),E(0,3,5,-1,0,6,10,0,0,1,18,0),E(0,4,5,-2,0,7,10,1,0,2,16,1),E(0,5,5,-3,0,8,10,1,0,3,14,2),E(0,5,6,-3,0,9,12,1,0,3,16,2),E(0,6,6,-3,0,10,14,1,0,4,18,3),E(0,6,7,-4,0,11,15,1,0,4,20,3),E(0,7,8,-4,0,12,17,2,0,5,22,4),E(0,7,8,-4,0,13,19,2,0,5,24,4),E(0,7,9,-4,0,14,21,2,0,5,26,4),E(0,8,9,-5,0,15,22,2,0,6,28,5),E(0,8,10,-5,0,16,24,2,0,6,30,5),E(0,8,11,-5,0,17,26,2,0,6,32,5),E(0,9,11,-5,0,18,28,2,0,7,34,6),E(0,9,12,-6,0,19,29,2,0,7,36,6),E(0,10,13,-6,0,20,31,3,0,8,38,7),E(0,10,13,-6,0,21,33,3,0,8,40,7),E(0,10,14,-6,0,22,35,3,0,8,42,7),E(0,11,14,-7,0,23,36,3,0,9,44,8),E(0,11,15,-7,0,24,38,3,0,9,46,8)],L=["duration","easing","delay"],P={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},O={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function I(e){return"".concat(Math.round(e),"ms")}function R(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function D(e){const t=(0,n.A)({},P,e.easing),r=(0,n.A)({},O,e.duration);return(0,n.A)({getAutoHeightDuration:R,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:a=r.standard,easing:o=t.easeInOut,delay:s=0}=n;(0,i.A)(n,L);return(Array.isArray(e)?e:[e]).map((e=>"".concat(e," ").concat("string"===typeof a?a:I(a)," ").concat(o," ").concat("string"===typeof s?s:I(s)))).join(",")}},e,{easing:t,duration:r})}const z={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},F=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:r={},transitions:c={},typography:f={}}=e,d=(0,i.A)(e,F);if(e.vars)throw new Error((0,a.A)(18));const h=k(r),p=(0,u.A)(e);let v=(0,o.A)(p,{mixins:(m=p.breakpoints,g=t,(0,n.A)({toolbar:{minHeight:56,[m.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[m.up("sm")]:{minHeight:64}}},g)),palette:h,shadows:C.slice(),typography:S(h,f),transitions:D(c),zIndex:(0,n.A)({},z)});var m,g;v=(0,o.A)(v,d);for(var y=arguments.length,x=new Array(y>1?y-1:0),b=1;b(0,o.A)(e,t)),v),v.unstable_sxConfig=(0,n.A)({},s.A,null==d?void 0:d.unstable_sxConfig),v.unstable_sx=function(e){return(0,l.A)({sx:e,theme:this})},v}const B=N()},13375:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n="$$material"},61475:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(47123);const i=e=>(0,n.A)(e)&&"classes"!==e},47123:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},34535:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>s});var n=r(38052),i=r(17200),a=r(13375),o=r(61475);const s=(0,n.Ay)({themeId:a.A,defaultTheme:i.A,rootShouldForwardProp:o.A})},6803:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(67598).A},59662:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r(58168),i=r(65043),a=r(98587),o=r(58387),s=r(98610),l=r(6803),u=r(6431),c=r(34535),f=r(92532),d=r(72372);function h(e){return(0,d.Ay)("MuiSvgIcon",e)}(0,f.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=r(70579);const v=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],m=(0,c.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"inherit"!==r.color&&t["color".concat((0,l.A)(r.color))],t["fontSize".concat((0,l.A)(r.fontSize))]]}})((e=>{let{theme:t,ownerState:r}=e;var n,i,a,o,s,l,u,c,f,d,h,p,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:r.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=t.transitions)||null==(i=n.create)?void 0:i.call(n,"fill",{duration:null==(a=t.transitions)||null==(a=a.duration)?void 0:a.shorter}),fontSize:{inherit:"inherit",small:(null==(o=t.typography)||null==(s=o.pxToRem)?void 0:s.call(o,20))||"1.25rem",medium:(null==(l=t.typography)||null==(u=l.pxToRem)?void 0:u.call(l,24))||"1.5rem",large:(null==(c=t.typography)||null==(f=c.pxToRem)?void 0:f.call(c,35))||"2.1875rem"}[r.fontSize],color:null!=(d=null==(h=(t.vars||t).palette)||null==(h=h[r.color])?void 0:h.main)?d:{action:null==(p=(t.vars||t).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(v=(t.vars||t).palette)||null==(v=v.action)?void 0:v.disabled,inherit:void 0}[r.color]}})),g=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiSvgIcon"}),{children:c,className:f,color:d="inherit",component:g="svg",fontSize:y="medium",htmlColor:x,inheritViewBox:b=!1,titleAccess:_,viewBox:w="0 0 24 24"}=r,k=(0,a.A)(r,v),T=i.isValidElement(c)&&"svg"===c.type,A=(0,n.A)({},r,{color:d,component:g,fontSize:y,instanceFontSize:e.fontSize,inheritViewBox:b,viewBox:w,hasSvgAsChild:T}),M={};b||(M.viewBox=w);const S=(e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root","inherit"!==t&&"color".concat((0,l.A)(t)),"fontSize".concat((0,l.A)(r))]};return(0,s.A)(i,h,n)})(A);return(0,p.jsxs)(m,(0,n.A)({as:g,className:(0,o.A)(S.root,f),focusable:"false",color:x,"aria-hidden":!_||void 0,role:_?"img":void 0,ref:t},M,k,T&&c.props,{ownerState:A,children:[T?c.props.children:c,_?(0,p.jsx)("title",{children:_}):null]}))}));g.muiName="SvgIcon";const y=g;function x(e,t){function r(r,i){return(0,p.jsx)(y,(0,n.A)({"data-testid":"".concat(t,"Icon"),ref:i},r,{children:e}))}return r.muiName=y.muiName,i.memo(i.forwardRef(r))}},80950:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(83468).A},41100:(e,t,r)=>{"use strict";r.r(t),r.d(t,{capitalize:()=>i.A,createChainedFunction:()=>a,createSvgIcon:()=>o.A,debounce:()=>s.A,deprecatedPropType:()=>l,isMuiElement:()=>u.A,ownerDocument:()=>c.A,ownerWindow:()=>f.A,requirePropFactory:()=>d,setRef:()=>h,unstable_ClassNameGenerator:()=>_,unstable_useEnhancedEffect:()=>p.A,unstable_useId:()=>v,unsupportedProp:()=>m,useControlled:()=>g.A,useEventCallback:()=>y.A,useForkRef:()=>x.A,useIsFocusVisible:()=>b.A});var n=r(79386),i=r(6803);const a=r(42456).A;var o=r(59662),s=r(80950);const l=function(e,t){return()=>null};var u=r(27328),c=r(22427),f=r(36078);r(58168);const d=function(e,t){return()=>null};const h=r(26564).A;var p=r(55013);const v=r(5844).A;const m=function(e,t,r,n,i){return null};var g=r(15420),y=r(93319),x=r(95849),b=r(13574);const _={configure:e=>{n.A.configure(e)}}},27328:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(65043);const i=function(e,t){var r,i;return n.isValidElement(e)&&-1!==t.indexOf(null!=(r=e.type.muiName)?r:null==(i=e.type)||null==(i=i._payload)||null==(i=i.value)?void 0:i.muiName)}},22427:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(31668).A},36078:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(63940).A},15420:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(65043);const i=function(e){let{controlled:t,default:r,name:i,state:a="value"}=e;const{current:o}=n.useRef(void 0!==t),[s,l]=n.useState(r);return[o?t:s,n.useCallback((e=>{o||l(e)}),[])]}},55013:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(84440).A},93319:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(31782).A},95849:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(63462).A},13574:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(65043),i=r(99303);let a=!0,o=!1;const s=new i.E,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function u(e){e.metaKey||e.altKey||e.ctrlKey||(a=!0)}function c(){a=!1}function f(){"hidden"===this.visibilityState&&o&&(a=!0)}function d(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(r){}return a||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!l[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}const h=function(){const e=n.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",u,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",f,!0))}),[]),t=n.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!d(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(o=!0,s.start(100,(()=>{o=!1})),t.current=!1,!0)},ref:e}}},70869:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});r(65043);var n=r(83290),i=r(70579);function a(e){const{styles:t,defaultTheme:r={}}=e,a="function"===typeof t?e=>{return t(void 0===(n=e)||null===n||0===Object.keys(n).length?r:e);var n}:t;return(0,i.jsx)(n.mL,{styles:a})}},13174:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalStyles:()=>k.A,StyledEngineProvider:()=>w,ThemeContext:()=>l.T,css:()=>y.AH,default:()=>T,internal_processStyles:()=>A,keyframes:()=>y.i7});var n=r(58168),i=r(65043),a=r(30918),o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=(0,a.A)((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=r(55756),u=r(81722),c=r(12830),f=r(69436),d=s,h=function(e){return"theme"!==e},p=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?d:h},v=function(e,t,r){var n;if(t){var i=t.shouldForwardProp;n=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof n&&r&&(n=e.__emotion_forwardProp),n},m=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,u.SF)(t,r,n),(0,f.s)((function(){return(0,u.sk)(t,r,n)})),null},g=function e(t,r){var a,o,s=t.__emotion_real===t,f=s&&t.__emotion_base||t;void 0!==r&&(a=r.label,o=r.target);var d=v(t,r,s),h=d||p(f),g=!h("as");return function(){var y=arguments,x=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&x.push("label:"+a+";"),null==y[0]||void 0===y[0].raw)x.push.apply(x,y);else{0,x.push(y[0][0]);for(var b=y.length,_=1;_{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},67266:(e,t,r)=>{"use strict";var n=r(24994);t.X4=h,t.e$=p,t.eM=function(e,t){const r=d(e),n=d(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)},t.a=v;var i=n(r(10457)),a=n(r(29214));function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,a.default)(e,t,r)}function s(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map((e=>e+e))),r?"rgb".concat(4===r.length?"a":"","(").concat(r.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", "),")"):""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(s(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error((0,i.default)(9,e));let n,a=e.substring(t+1,e.length-1);if("color"===r){if(a=a.split(" "),n=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw new Error((0,i.default)(10,n))}else a=a.split(",");return a=a.map((e=>parseFloat(e))),{type:r,values:a,colorSpace:n}}const u=e=>{const t=l(e);return t.values.slice(0,3).map(((e,r)=>-1!==t.type.indexOf("hsl")&&0!==r?"".concat(e,"%"):e)).join(" ")};function c(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),n=-1!==t.indexOf("color")?"".concat(r," ").concat(n.join(" ")):"".concat(n.join(", ")),"".concat(t,"(").concat(n,")")}function f(e){e=l(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return i-a*Math.max(Math.min(t-3,9-t,1),-1)};let s="rgb";const u=[Math.round(255*o(0)),Math.round(255*o(8)),Math.round(255*o(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),c({type:s,values:u})}function d(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(f(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function h(e,t){return e=l(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,c(e)}function p(e,t){if(e=l(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return c(e)}function v(e,t){if(e=l(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return c(e)}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return d(e)>.5?p(e,t):v(e,t)}},38052:(e,t,r)=>{"use strict";var n=r(24994);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:r=v,rootShouldForwardProp:n=p,slotShouldForwardProp:l=p}=e,c=e=>(0,u.default)((0,i.default)({},e,{theme:g((0,i.default)({},e,{defaultTheme:r,themeId:t}))}));return c.__mui_systemSx=!0,function(e){let u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:f,slot:h,skipVariantsResolver:v,skipSx:b,overridesResolver:_=y(m(h))}=u,w=(0,a.default)(u,d),k=void 0!==v?v:h&&"Root"!==h&&"root"!==h||!1,T=b||!1;let A=p;"Root"===h||"root"===h?A=n:h?A=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(A=void 0);const M=(0,o.default)(e,(0,i.default)({shouldForwardProp:A,label:undefined},w)),S=e=>"function"===typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?n=>x(e,(0,i.default)({},n,{theme:g({theme:n.theme,defaultTheme:r,themeId:t})})):e,E=function(n){let a=S(n);for(var o=arguments.length,s=new Array(o>1?o-1:0),l=1;l{const n=g((0,i.default)({},e,{defaultTheme:r,themeId:t}));if(!n.components||!n.components[f]||!n.components[f].styleOverrides)return null;const a=n.components[f].styleOverrides,o={};return Object.entries(a).forEach((t=>{let[r,a]=t;o[r]=x(a,(0,i.default)({},e,{theme:n}))})),_(e,o)})),f&&!k&&u.push((e=>{var n;const a=g((0,i.default)({},e,{defaultTheme:r,themeId:t}));return x({variants:null==a||null==(n=a.components)||null==(n=n[f])?void 0:n.variants},(0,i.default)({},e,{theme:a}))})),T||u.push(c);const d=u.length-s.length;if(Array.isArray(n)&&d>0){const e=new Array(d).fill("");a=[...n,...e],a.raw=[...n.raw,...e]}const h=M(a,...u);return e.muiName&&(h.muiName=e.muiName),h};return M.withConfig&&(E.withConfig=M.withConfig),E}};var i=n(r(94634)),a=n(r(54893)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=h(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}(r(13174)),s=r(19482),l=(n(r(87918)),n(r(83382)),n(r(24989))),u=n(r(73234));const c=["ownerState"],f=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(h=function(e){return e?r:t})(e)}function p(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const v=(0,l.default)(),m=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function g(e){let{defaultTheme:t,theme:r,themeId:n}=e;return i=r,0===Object.keys(i).length?t:r[n]||r;var i}function y(e){return e?(t,r)=>r[e]:null}function x(e,t){let{ownerState:r}=t,n=(0,a.default)(t,c);const o="function"===typeof e?e((0,i.default)({ownerState:r},n)):e;if(Array.isArray(o))return o.flatMap((e=>x(e,(0,i.default)({ownerState:r},n))));if(o&&"object"===typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,a.default)(o,f);return e.forEach((e=>{let a=!0;"function"===typeof e.props?a=e.props((0,i.default)({ownerState:r},n,r)):Object.keys(e.props).forEach((t=>{(null==r?void 0:r[t])!==e.props[t]&&n[t]!==e.props[t]&&(a=!1)})),a&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,i.default)({ownerState:r},n,r)):e.style))})),t}return o}},89751:(e,t,r)=>{"use strict";r.d(t,{EU:()=>o,NI:()=>a,kW:()=>l,vf:()=>s,zu:()=>n});const n={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(n[e],"px)")};function a(e,t,r){const a=e.theme||{};if(Array.isArray(t)){const e=a.breakpoints||i;return t.reduce(((n,i,a)=>(n[e.up(e.keys[a])]=r(t[a]),n)),{})}if("object"===typeof t){const e=a.breakpoints||i;return Object.keys(t).reduce(((i,a)=>{if(-1!==Object.keys(e.values||n).indexOf(a)){i[e.up(a)]=r(t[a],a)}else{const e=a;i[e]=t[e]}return i}),{})}return r(t)}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,r)=>(t[e.up(r)]={},t)),{}))||{}}function s(e,t){return e.reduce(((e,t)=>{const r=e[t];return(!r||0===Object.keys(r).length)&&delete e[t],e}),t)}function l(e){let{values:t,breakpoints:r,base:n}=e;const i=n||function(e,t){if("object"!==typeof e)return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach(((t,n)=>{n{null!=e[t]&&(r[t]=!0)})),r}(t,r),a=Object.keys(i);if(0===a.length)return t;let o;return a.reduce(((e,r,n)=>(Array.isArray(t)?(e[r]=null!=t[n]?t[n]:t[o],o=n):"object"===typeof t?(e[r]=null!=t[r]?t[r]:t[o],o=r):e[r]=t,e)),{})}},89703:(e,t,r)=>{"use strict";function n(e,t){const r=this;if(r.vars&&"function"===typeof r.getColorSchemeSelector){const n=r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[n]:t}}return r.palette.mode===e?t:{}}r.d(t,{A:()=>n})},34853:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(98587),i=r(58168);const a=["values","unit","step"],o=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,i.A)({},e,{[t.key]:t.val})),{})};function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:s=5}=e,l=(0,n.A)(e,a),u=o(t),c=Object.keys(u);function f(e){const n="number"===typeof t[e]?t[e]:e;return"@media (min-width:".concat(n).concat(r,")")}function d(e){const n="number"===typeof t[e]?t[e]:e;return"@media (max-width:".concat(n-s/100).concat(r,")")}function h(e,n){const i=c.indexOf(n);return"@media (min-width:".concat("number"===typeof t[e]?t[e]:e).concat(r,") and ")+"(max-width:".concat((-1!==i&&"number"===typeof t[c[i]]?t[c[i]]:n)-s/100).concat(r,")")}return(0,i.A)({keys:c,values:u,up:f,down:d,between:h,only:function(e){return c.indexOf(e)+1{"use strict";r.d(t,{A:()=>h});var n=r(58168),i=r(98587),a=r(19172),o=r(34853);const s={borderRadius:4};var l=r(28604);var u=r(58812),c=r(37758),f=r(89703);const d=["breakpoints","palette","spacing","shape"];const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:r={},spacing:h,shape:p={}}=e,v=(0,i.A)(e,d),m=(0,o.A)(t),g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),r=function(){for(var e=arguments.length,r=new Array(e),n=0;n{const r=t(e);return"number"===typeof r?"".concat(r,"px"):r})).join(" ")};return r.mui=!0,r}(h);let y=(0,a.A)({breakpoints:m,direction:"ltr",components:{},palette:(0,n.A)({mode:"light"},r),spacing:g,shape:(0,n.A)({},s,p)},v);y.applyStyles=f.A;for(var x=arguments.length,b=new Array(x>1?x-1:0),_=1;_(0,a.A)(e,t)),y),y.unstable_sxConfig=(0,n.A)({},c.A,null==v?void 0:v.unstable_sxConfig),y.unstable_sx=function(e){return(0,u.A)({sx:e,theme:this})},y}},24989:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,private_createBreakpoints:()=>i.A,unstable_applyStyles:()=>a.A});var n=r(18280),i=r(34853),a=r(89703)},13815:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(19172);const i=function(e,t){return t?(0,n.A)(e,t,{clone:!1}):e}},28604:(e,t,r)=>{"use strict";r.d(t,{LX:()=>p,MA:()=>h,_W:()=>v,Lc:()=>y,Ms:()=>x});var n=r(89751),i=r(17162),a=r(13815);const o={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},u=function(e){const t={};return r=>(void 0===t[r]&&(t[r]=e(r)),t[r])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,r]=e.split(""),n=o[t],i=s[r]||"";return Array.isArray(i)?i.map((e=>n+e)):[n+i]})),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],f=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...c,...f];function h(e,t,r,n){var a;const o=null!=(a=(0,i.Yn)(e,t,!1))?a:r;return"number"===typeof o?e=>"string"===typeof e?e:o*e:Array.isArray(o)?e=>"string"===typeof e?e:o[e]:"function"===typeof o?o:()=>{}}function p(e){return h(e,"spacing",8)}function v(e,t){if("string"===typeof t||null==t)return t;const r=e(Math.abs(t));return t>=0?r:"number"===typeof r?-r:"-".concat(r)}function m(e,t,r,i){if(-1===t.indexOf(r))return null;const a=function(e,t){return r=>e.reduce(((e,n)=>(e[n]=v(t,r),e)),{})}(u(r),i),o=e[r];return(0,n.NI)(e,o,a)}function g(e,t){const r=p(e.theme);return Object.keys(e).map((n=>m(e,t,n,r))).reduce(a.A,{})}function y(e){return g(e,c)}function x(e){return g(e,f)}function b(e){return g(e,d)}y.propTypes={},y.filterProps=c,x.propTypes={},x.filterProps=f,b.propTypes={},b.filterProps=d},17162:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>s,BO:()=>o,Yn:()=>a});var n=r(67598),i=r(89751);function a(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&r){const r="vars.".concat(t).split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=r)return r}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function o(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r;return n="function"===typeof e?e(r):Array.isArray(e)?e[r]||i:a(e,r)||i,t&&(n=t(n,i,e)),n}const s=function(e){const{prop:t,cssProperty:r=e.prop,themeKey:s,transform:l}=e,u=e=>{if(null==e[t])return null;const u=e[t],c=a(e.theme,s)||{};return(0,i.NI)(e,u,(e=>{let i=o(c,l,e);return e===i&&"string"===typeof e&&(i=o(c,l,"".concat(t).concat("default"===e?"":(0,n.A)(e)),e)),!1===r?i:{[r]:i}}))};return u.propTypes={},u.filterProps=[t],u}},37758:(e,t,r)=>{"use strict";r.d(t,{A:()=>R});var n=r(28604),i=r(17162),a=r(13815);const o=function(){for(var e=arguments.length,t=new Array(e),r=0;r(t.filterProps.forEach((r=>{e[r]=t})),e)),{}),i=e=>Object.keys(e).reduce(((t,r)=>n[r]?(0,a.A)(t,n[r](e)):t),{});return i.propTypes={},i.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),i};var s=r(89751);function l(e){return"number"!==typeof e?e:"".concat(e,"px solid")}function u(e,t){return(0,i.Ay)({prop:e,themeKey:"borders",transform:t})}const c=u("border",l),f=u("borderTop",l),d=u("borderRight",l),h=u("borderBottom",l),p=u("borderLeft",l),v=u("borderColor"),m=u("borderTopColor"),g=u("borderRightColor"),y=u("borderBottomColor"),x=u("borderLeftColor"),b=u("outline",l),_=u("outlineColor"),w=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,n.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:(0,n._W)(t,e)});return(0,s.NI)(e,e.borderRadius,r)}return null};w.propTypes={},w.filterProps=["borderRadius"];o(c,f,d,h,p,v,m,g,y,x,w,b,_);const k=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,n.MA)(e.theme,"spacing",8,"gap"),r=e=>({gap:(0,n._W)(t,e)});return(0,s.NI)(e,e.gap,r)}return null};k.propTypes={},k.filterProps=["gap"];const T=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,n.MA)(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:(0,n._W)(t,e)});return(0,s.NI)(e,e.columnGap,r)}return null};T.propTypes={},T.filterProps=["columnGap"];const A=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,n.MA)(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:(0,n._W)(t,e)});return(0,s.NI)(e,e.rowGap,r)}return null};A.propTypes={},A.filterProps=["rowGap"];o(k,T,A,(0,i.Ay)({prop:"gridColumn"}),(0,i.Ay)({prop:"gridRow"}),(0,i.Ay)({prop:"gridAutoFlow"}),(0,i.Ay)({prop:"gridAutoColumns"}),(0,i.Ay)({prop:"gridAutoRows"}),(0,i.Ay)({prop:"gridTemplateColumns"}),(0,i.Ay)({prop:"gridTemplateRows"}),(0,i.Ay)({prop:"gridTemplateAreas"}),(0,i.Ay)({prop:"gridArea"}));function M(e,t){return"grey"===t?t:e}o((0,i.Ay)({prop:"color",themeKey:"palette",transform:M}),(0,i.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:M}),(0,i.Ay)({prop:"backgroundColor",themeKey:"palette",transform:M}));function S(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const E=(0,i.Ay)({prop:"width",transform:S}),C=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var r,n;const i=(null==(r=e.theme)||null==(r=r.breakpoints)||null==(r=r.values)?void 0:r[t])||s.zu[t];return i?"px"!==(null==(n=e.theme)||null==(n=n.breakpoints)?void 0:n.unit)?{maxWidth:"".concat(i).concat(e.theme.breakpoints.unit)}:{maxWidth:i}:{maxWidth:S(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};C.filterProps=["maxWidth"];const L=(0,i.Ay)({prop:"minWidth",transform:S}),P=(0,i.Ay)({prop:"height",transform:S}),O=(0,i.Ay)({prop:"maxHeight",transform:S}),I=(0,i.Ay)({prop:"minHeight",transform:S}),R=((0,i.Ay)({prop:"size",cssProperty:"width",transform:S}),(0,i.Ay)({prop:"size",cssProperty:"height",transform:S}),o(E,C,L,P,O,I,(0,i.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:w},color:{themeKey:"palette",transform:M},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:M},backgroundColor:{themeKey:"palette",transform:M},p:{style:n.Ms},pt:{style:n.Ms},pr:{style:n.Ms},pb:{style:n.Ms},pl:{style:n.Ms},px:{style:n.Ms},py:{style:n.Ms},padding:{style:n.Ms},paddingTop:{style:n.Ms},paddingRight:{style:n.Ms},paddingBottom:{style:n.Ms},paddingLeft:{style:n.Ms},paddingX:{style:n.Ms},paddingY:{style:n.Ms},paddingInline:{style:n.Ms},paddingInlineStart:{style:n.Ms},paddingInlineEnd:{style:n.Ms},paddingBlock:{style:n.Ms},paddingBlockStart:{style:n.Ms},paddingBlockEnd:{style:n.Ms},m:{style:n.Lc},mt:{style:n.Lc},mr:{style:n.Lc},mb:{style:n.Lc},ml:{style:n.Lc},mx:{style:n.Lc},my:{style:n.Lc},margin:{style:n.Lc},marginTop:{style:n.Lc},marginRight:{style:n.Lc},marginBottom:{style:n.Lc},marginLeft:{style:n.Lc},marginX:{style:n.Lc},marginY:{style:n.Lc},marginInline:{style:n.Lc},marginInlineStart:{style:n.Lc},marginInlineEnd:{style:n.Lc},marginBlock:{style:n.Lc},marginBlockStart:{style:n.Lc},marginBlockEnd:{style:n.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:k},rowGap:{style:A},columnGap:{style:T},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:S},maxWidth:{style:C},minWidth:{transform:S},height:{transform:S},maxHeight:{transform:S},minHeight:{transform:S},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},18698:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(58168),i=r(98587),a=r(19172),o=r(37758);const s=["sx"],l=e=>{var t,r;const n={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(r=e.theme)?void 0:r.unstable_sxConfig)?t:o.A;return Object.keys(e).forEach((t=>{i[t]?n.systemProps[t]=e[t]:n.otherProps[t]=e[t]})),n};function u(e){const{sx:t}=e,r=(0,i.A)(e,s),{systemProps:o,otherProps:u}=l(r);let c;return c=Array.isArray(t)?[o,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,a.Q)(e)?(0,n.A)({},o,e):o}:(0,n.A)({},o,t),(0,n.A)({},u,{sx:c})}},73234:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,extendSxProp:()=>i.A,unstable_createStyleFunctionSx:()=>n.k,unstable_defaultSxConfig:()=>a.A});var n=r(58812),i=r(18698),a=r(37758)},58812:(e,t,r)=>{"use strict";r.d(t,{A:()=>c,k:()=>l});var n=r(67598),i=r(13815),a=r(17162),o=r(89751),s=r(37758);function l(){function e(e,t,r,i){const s={[e]:t,theme:r},l=i[e];if(!l)return{[e]:t};const{cssProperty:u=e,themeKey:c,transform:f,style:d}=l;if(null==t)return null;if("typography"===c&&"inherit"===t)return{[e]:t};const h=(0,a.Yn)(r,c)||{};if(d)return d(s);return(0,o.NI)(s,t,(t=>{let r=(0,a.BO)(h,f,t);return t===r&&"string"===typeof t&&(r=(0,a.BO)(h,f,"".concat(e).concat("default"===t?"":(0,n.A)(t)),t)),!1===u?r:{[u]:r}}))}return function t(r){var n;const{sx:a,theme:l={}}=r||{};if(!a)return null;const u=null!=(n=l.unstable_sxConfig)?n:s.A;function c(r){let n=r;if("function"===typeof r)n=r(l);else if("object"!==typeof r)return r;if(!n)return null;const a=(0,o.EU)(l.breakpoints),s=Object.keys(a);let c=a;return Object.keys(n).forEach((r=>{const a=(s=n[r],f=l,"function"===typeof s?s(f):s);var s,f;if(null!==a&&void 0!==a)if("object"===typeof a)if(u[r])c=(0,i.A)(c,e(r,a,l,u));else{const e=(0,o.NI)({theme:l},a,(e=>({[r]:e})));!function(){for(var e=arguments.length,t=new Array(e),r=0;re.concat(Object.keys(t))),[]),i=new Set(n);return t.every((e=>i.size===Object.keys(e).length))}(e,a)?c=(0,i.A)(c,e):c[r]=t({sx:a,theme:l})}else c=(0,i.A)(c,e(r,a,l,u))})),(0,o.vf)(s,c)}return Array.isArray(a)?a.map(c):c(a)}}const u=l();u.filterProps=["sx"];const c=u},79386:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});const n=e=>e,i=(()=>{let e=n;return{configure(t){e=t},generate:t=>e(t),reset(){e=n}}})()},67598:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(17868);function i(e){if("string"!==typeof e)throw new Error((0,n.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},87918:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A});var n=r(67598)},29214:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,r))}},98610:(e,t,r)=>{"use strict";function n(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const n={};return Object.keys(e).forEach((i=>{n[i]=e[i].reduce(((e,n)=>{if(n){const i=t(n);""!==i&&e.push(i),r&&r[n]&&e.push(r[n])}return e}),[]).join(" ")})),n}r.d(t,{A:()=>n})},42456:(e,t,r)=>{"use strict";function n(){for(var e=arguments.length,t=new Array(e),r=0;rnull==t?e:function(){for(var r=arguments.length,n=new Array(r),i=0;i{}))}r.d(t,{A:()=>n})},83468:(e,t,r)=>{"use strict";function n(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function n(){for(var n=arguments.length,i=new Array(n),a=0;a{e.apply(this,i)}),r)}return n.clear=()=>{clearTimeout(t)},n}r.d(t,{A:()=>n})},19172:(e,t,r)=>{"use strict";r.d(t,{A:()=>o,Q:()=>i});var n=r(58168);function i(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function a(e){if(!i(e))return e;const t={};return Object.keys(e).forEach((r=>{t[r]=a(e[r])})),t}function o(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const s=r.clone?(0,n.A)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((n=>{i(t[n])&&Object.prototype.hasOwnProperty.call(e,n)&&i(e[n])?s[n]=o(e[n],t[n],r):r.clone?s[n]=i(t[n])?a(t[n]):t[n]:s[n]=t[n]})),s}},19482:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,isPlainObject:()=>n.Q});var n=r(19172)},17868:(e,t,r)=>{"use strict";function n(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;rn})},10457:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A});var n=r(17868)},72372:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>a});var n=r(79386);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function a(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const a=i[t];return a?"".concat(r,"-").concat(a):"".concat(n.A.generate(e),"-").concat(t)}},92532:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(72372);function i(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i={};return t.forEach((t=>{i[t]=(0,n.Ay)(e,t,r)})),i}},83382:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l,getFunctionName:()=>a});var n=r(19565);const i=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function a(e){const t="".concat(e).match(i);return t&&t[1]||""}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||a(e)||t}function s(e,t,r){const n=o(t);return e.displayName||(""!==n?"".concat(r,"(").concat(n,")"):r)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return o(e,"Component");if("object"===typeof e)switch(e.$$typeof){case n.ForwardRef:return s(e,e.render,"ForwardRef");case n.Memo:return s(e,e.type,"memo");default:return}}}},31668:(e,t,r)=>{"use strict";function n(e){return e&&e.ownerDocument||document}r.d(t,{A:()=>n})},63940:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(31668);function i(e){return(0,n.A)(e).defaultView||window}},13030:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(58168);function i(e,t){const r=(0,n.A)({},t);return Object.keys(e).forEach((a=>{if(a.toString().match(/^(components|slots)$/))r[a]=(0,n.A)({},e[a],r[a]);else if(a.toString().match(/^(componentsProps|slotProps)$/)){const o=e[a]||{},s=t[a];r[a]={},s&&Object.keys(s)?o&&Object.keys(o)?(r[a]=(0,n.A)({},s),Object.keys(o).forEach((e=>{r[a][e]=i(o[e],s[e])}))):r[a]=s:r[a]=o}else void 0===r[a]&&(r[a]=e[a])})),r}},26564:(e,t,r)=>{"use strict";function n(e,t){"function"===typeof e?e(t):e&&(e.current=t)}r.d(t,{A:()=>n})},84440:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(65043);const i="undefined"!==typeof window?n.useLayoutEffect:n.useEffect},31782:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(65043),i=r(84440);const a=function(e){const t=n.useRef(e);return(0,i.A)((()=>{t.current=e})),n.useRef((function(){return(0,t.current)(...arguments)})).current}},63462:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(65043),i=r(26564);function a(){for(var e=arguments.length,t=new Array(e),r=0;rt.every((e=>null==e))?null:e=>{t.forEach((t=>{(0,i.A)(t,e)}))}),t)}},5844:(e,t,r)=>{"use strict";var n;r.d(t,{A:()=>s});var i=r(65043);let a=0;const o=(n||(n=r.t(i,2)))["useId".toString()];function s(e){if(void 0!==o){const t=o();return null!=e?e:t}return function(e){const[t,r]=i.useState(e),n=e||t;return i.useEffect((()=>{null==t&&(a+=1,r("mui-".concat(a)))}),[t]),n}(e)}},99303:(e,t,r)=>{"use strict";r.d(t,{E:()=>o,A:()=>s});var n=r(65043);const i={};const a=[];class o{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new o}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function s(){const e=function(e,t){const r=n.useRef(i);return r.current===i&&(r.current=e(t)),r}(o.create).current;var t;return t=e.disposeEffect,n.useEffect(t,a),e}},58609:(e,t)=>{"use strict";var r,n=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case a:case s:case o:case d:case h:return e;default:switch(e=e&&e.$$typeof){case c:case u:case f:case v:case p:case l:return e;default:return t}}case i:return t}}}r=Symbol.for("react.module.reference"),t.ForwardRef=f,t.Memo=p},19565:(e,t,r)=>{"use strict";e.exports=r(58609)},41871:(e,t,r)=>{var n,i;(function(){var a={version:"3.8.2"},o=[].slice,s=function(e){return o.call(e)},l=self.document;function u(e){return e&&(e.ownerDocument||e.document||e).documentElement}function c(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(ga){s=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}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(ya){var f=this.Element.prototype,d=f.setAttribute,h=f.setAttributeNS,p=this.CSSStyleDeclaration.prototype,v=p.setProperty;f.setAttribute=function(e,t){d.call(this,e,t+"")},f.setAttributeNS=function(e,t,r){h.call(this,e,t,r+"")},p.setProperty=function(e,t,r){v.call(this,e,t+"",r)}}function m(e,t){return et?1:e>=t?0:NaN}function g(e){return null===e?NaN:+e}function y(e){return!isNaN(e)}function x(e){return{left:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[a],r)<0?n=a+1:i=a}return n},right:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[a],r)>0?i=a:n=a+1}return n}}}a.ascending=m,a.descending=function(e,t){return te?1:t>=e?0:NaN},a.min=function(e,t){var r,n,i=-1,a=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},a.max=function(e,t){var r,n,i=-1,a=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},a.extent=function(e,t){var r,n,i,a=-1,o=e.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return o/(l-1)},a.deviation=function(){var e=a.variance.apply(this,arguments);return e?Math.sqrt(e):e};var b=x(m);function _(e){return e.length}a.bisectLeft=b.left,a.bisect=a.bisectRight=b.right,a.bisector=function(e){return x(1===e.length?function(t,r){return m(e(t),r)}:e)},a.shuffle=function(e,t,r){(a=arguments.length)<3&&(r=e.length,a<2&&(t=0));for(var n,i,a=r-t;a;)i=Math.random()*a--|0,n=e[a+t],e[a+t]=e[i+t],e[i+t]=n;return e},a.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},a.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],i=new Array(r<0?0:r);t=0;)for(t=(n=e[i]).length;--t>=0;)r[--o]=n[t];return r};var w=Math.abs;function k(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function T(){this._=Object.create(null)}a.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,i=[],a=function(e){var t=1;for(;e*t%1;)t*=10;return t}(w(r)),o=-1;if(e*=a,t*=a,(r*=a)<0)for(;(n=e+r*++o)>t;)i.push(n/a);else for(;(n=e+r*++o)=n.length)return t?t.call(r,a):e?a.sort(e):a;for(var l,u,c,f,d=-1,h=a.length,p=n[s++],v=new T;++d=n.length)return e;var r=[],a=i[t++];return e.forEach((function(e,n){r.push({key:e,values:s(n,t)})})),a?r.sort((function(e,t){return a(e.key,t.key)})):r}return r.map=function(e,t){return o(t,e,0)},r.entries=function(e){return s(o(a.map,e,0),0)},r.key=function(e){return n.push(e),r},r.sortKeys=function(e){return i[n.length-1]=e,r},r.sortValues=function(t){return e=t,r},r.rollup=function(e){return t=e,r},r},a.set=function(e){var t=new R;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}},a.event=null,a.requote=function(e){return e.replace(G,"\\$&")};var G=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,W={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function Y(e){return W(e,J),e}var Z=function(e,t){return t.querySelector(e)},X=function(e,t){return t.querySelectorAll(e)},K=function(e,t){var r=e.matches||e[F(e,"matchesSelector")];return K=function(e,t){return r.call(e,t)},K(e,t)};"function"===typeof Sizzle&&(Z=function(e,t){return Sizzle(e,t)[0]||null},X=Sizzle,K=Sizzle.matchesSelector),a.selection=function(){return a.select(l.documentElement)};var J=a.selection.prototype=[];function $(e){return"function"===typeof e?e:function(){return Z(e,this)}}function Q(e){return"function"===typeof e?e:function(){return X(e,this)}}J.select=function(e){var t,r,n,i,a=[];e=$(e);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),te.hasOwnProperty(r)?{space:te[r],local:e}:e}},J.attr=function(e,t){if(arguments.length<2){if("string"===typeof e){var r=this.node();return(e=a.ns.qualify(e)).local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}for(t in e)this.each(re(t,e[t]));return this}return this.each(re(e,t))},J.classed=function(e,t){if(arguments.length<2){if("string"===typeof e){var r=this.node(),n=(e=ae(e)).length,i=-1;if(t=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},J.sort=function(e){e=pe.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(e=e.slice(0,i));var l=xe.get(e);function u(){var t=this[n];t&&(this.removeEventListener(e,t,t.$),delete this[n])}return l&&(e=l,o=_e),i?t?function(){var i=o(t,s(arguments));u.call(this),this.addEventListener(e,this[n]=i,i.$=r),i._=t}:u:t?B:function(){var t,r=new RegExp("^__on([^.]+)"+a.requote(e)+"$");for(var n in this)if(t=n.match(r)){var i=this[n];this.removeEventListener(t[1],i,i.$),delete this[n]}}}a.selection.enter=me,a.selection.enter.prototype=ge,ge.append=J.append,ge.empty=J.empty,ge.node=J.node,ge.call=J.call,ge.size=J.size,ge.select=function(e){for(var t,r,n,i,a,o=[],s=-1,l=this.length;++s=t&&(t=i+1);!(o=s[t])&&++t1?Ie:e<-1?-Ie:Math.asin(e)}function Fe(e){return((e=Math.exp(e))+1/e)/2}var Ne=Math.SQRT2;a.interpolateZoom=function(e,t){var r,n,i=e[0],a=e[1],o=e[2],s=t[0],l=t[1],u=t[2],c=s-i,f=l-a,d=c*c+f*f;if(d0&&(e=e.transition().duration(v)),e.call(w.event)}function S(){s&&s.domain(o.range().map((function(e){return(e-d.x)/d.k})).map(o.invert)),f&&f.domain(u.range().map((function(e){return(e-d.y)/d.k})).map(u.invert))}function E(e){m++||e({type:"zoomstart"})}function C(e){S(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function L(e){--m||(e({type:"zoomend"}),t=null)}function P(){var e=this,t=_.of(e,arguments),r=0,n=a.select(c(e)).on(y,(function(){r=1,A(a.mouse(e),i),C(t)})).on(x,(function(){n.on(y,null).on(x,null),o(r),L(t)})),i=k(a.mouse(e)),o=Te(e);$i.call(e),E(t)}function O(){var e,t=this,r=_.of(t,arguments),n={},o=0,s=".zoom-"+a.event.changedTouches[0].identifier,l="touchmove"+s,u="touchend"+s,c=[],f=a.select(t),h=Te(t);function p(){var r=a.touches(t);return e=d.k,r.forEach((function(e){e.identifier in n&&(n[e.identifier]=k(e))})),r}function v(){var e=a.event.target;a.select(e).on(l,m).on(u,y),c.push(e);for(var r=a.event.changedTouches,s=0,f=r.length;s1){g=h[0];var x=h[1],b=g[0]-x[0],_=g[1]-x[1];o=b*b+_*_}}function m(){var s,l,u,c,f=a.touches(t);$i.call(t);for(var d=0,h=f.length;d360?e-=360:e<0&&(e+=360),e<60?n+(i-n)*e/60:e<180?i:e<240?n+(i-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)-(i=r<=.5?r*(1+t):r+t-r*t),new ot(a(e+120),a(e),a(e-120))}function We(e,t,r){return this instanceof We?(this.h=+e,this.c=+t,void(this.l=+r)):arguments.length<2?e instanceof We?new We(e.h,e.c,e.l):rt(e instanceof Xe?e.l:(e=ht((e=a.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new We(e,t,r)}He.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ve(this.h,this.s,this.l/e)},He.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ve(this.h,this.s,e*this.l)},He.rgb=function(){return Ge(this.h,this.s,this.l)},a.hcl=We;var Ye=We.prototype=new qe;function Ze(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Xe(r,Math.cos(e*=Re)*t,Math.sin(e)*t)}function Xe(e,t,r){return this instanceof Xe?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Xe?new Xe(e.l,e.a,e.b):e instanceof We?Ze(e.h,e.c,e.l):ht((e=ot(e)).r,e.g,e.b):new Xe(e,t,r)}Ye.brighter=function(e){return new We(this.h,this.c,Math.min(100,this.l+Ke*(arguments.length?e:1)))},Ye.darker=function(e){return new We(this.h,this.c,Math.max(0,this.l-Ke*(arguments.length?e:1)))},Ye.rgb=function(){return Ze(this.h,this.c,this.l).rgb()},a.lab=Xe;var Ke=18,Je=.95047,$e=1,Qe=1.08883,et=Xe.prototype=new qe;function tt(e,t,r){var n=(e+16)/116,i=n+t/500,a=n-r/200;return new ot(at(3.2404542*(i=nt(i)*Je)-1.5371385*(n=nt(n)*$e)-.4985314*(a=nt(a)*Qe)),at(-.969266*i+1.8760108*n+.041556*a),at(.0556434*i-.2040259*n+1.0572252*a))}function rt(e,t,r){return e>0?new We(Math.atan2(r,t)*De,Math.sqrt(t*t+r*r),e):new We(NaN,NaN,e)}function nt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function it(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function at(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ot(e,t,r){return this instanceof ot?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof ot?new ot(e.r,e.g,e.b):ft(""+e,ot,Ge):new ot(e,t,r)}function st(e){return new ot(e>>16,e>>8&255,255&e)}function lt(e){return st(e)+""}et.brighter=function(e){return new Xe(Math.min(100,this.l+Ke*(arguments.length?e:1)),this.a,this.b)},et.darker=function(e){return new Xe(Math.max(0,this.l-Ke*(arguments.length?e:1)),this.a,this.b)},et.rgb=function(){return tt(this.l,this.a,this.b)},a.rgb=ot;var ut=ot.prototype=new qe;function ct(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ft(e,t,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(vt(i[0]),vt(i[1]),vt(i[2]))}return(a=mt.get(e))?t(a.r,a.g,a.b):(null==e||"#"!==e.charAt(0)||isNaN(a=parseInt(e.slice(1),16))||(4===e.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===e.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),t(o,s,l))}function dt(e,t,r){var n,i,a=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=e==o?(t-r)/s+(t0&&l<1?0:n),new Ve(n,i,l)}function ht(e,t,r){var n=it((.4124564*(e=pt(e))+.3575761*(t=pt(t))+.1804375*(r=pt(r)))/Je),i=it((.2126729*e+.7151522*t+.072175*r)/$e);return Xe(116*i-16,500*(n-i),200*(i-it((.0193339*e+.119192*t+.9503041*r)/Qe)))}function pt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}ut.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,i=30;return t||r||n?(t&&t=200&&t<300||304===t){try{e=r.call(i,u)}catch(ga){return void o.error.call(i,ga)}o.load.call(i,e)}else o.error.call(i,u)}return self.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(e)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=f:u.onreadystatechange=function(){u.readyState>3&&f()},u.onprogress=function(e){var t=a.event;a.event=e;try{o.progress.call(i,u)}finally{a.event=t}},i.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",i)},i.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",i):t},i.responseType=function(e){return arguments.length?(c=e,i):c},i.response=function(e){return r=e,i},["get","post"].forEach((function(e){i[e]=function(){return i.send.apply(i,[e].concat(s(arguments)))}})),i.send=function(r,n,a){if(2===arguments.length&&"function"===typeof n&&(a=n,n=null),u.open(r,e,!0),null==t||"accept"in l||(l.accept=t+",*/*"),u.setRequestHeader)for(var s in l)u.setRequestHeader(s,l[s]);return null!=t&&u.overrideMimeType&&u.overrideMimeType(t),null!=c&&(u.responseType=c),null!=a&&i.on("error",a).on("load",(function(e){a(null,e)})),o.beforesend.call(i,u),u.send(null==n?null:n),i},i.abort=function(){return u.abort(),i},a.rebind(i,o,"on"),null==n?i:i.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(n))}mt.forEach((function(e,t){mt.set(e,st(t))})),a.functor=gt,a.xhr=yt(D),a.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function i(e,r,n){arguments.length<3&&(n=r,r=null);var i=xt(e,t,null==r?a:o(r),n);return i.row=function(e){return arguments.length?i.response(null==(r=e)?a:o(e)):r},i}function a(e){return i.parse(e.responseText)}function o(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var r;return i.parseRows(e,(function(e,n){if(r)return r(e,n-1);var i=function(t){for(var r={},n=e.length,i=0;i=l)return o;if(i)return i=!1,a;var t=u;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(kt),kt=setTimeout(Mt,t)),wt=0):(wt=1,Tt(Mt))}function St(){for(var e=Date.now(),t=bt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Et(){for(var e,t=bt,r=1/0;t;)t.c?(t.t1&&(t=e[a[o-2]],r=e[a[o-1]],n=e[s],(r[0]-t[0])*(n[1]-t[1])-(r[1]-t[1])*(n[0]-t[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}function Ot(e,t){return e[0]-t[0]||e[1]-t[1]}a.timer=function(){At.apply(this,arguments)},a.timer.flush=function(){St(),Et()},a.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},a.geom={},a.geom.hull=function(e){var t=Ct,r=Lt;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,i=gt(t),a=gt(r),o=e.length,s=[],l=[];for(n=0;n=0;--n)h.push(e[s[u[n]][2]]);for(n=+f;nEe)s=s.L;else{if(!((i=a-Kt(s,o))>Ee)){n>-Ee?(t=s.P,r=s):i>-Ee?(t=s,r=s.N):t=r=s;break}if(!s.R){t=s;break}s=s.R}var l=Gt(e);if(Bt.insert(t,l),t||r){if(t===r)return tr(t),r=Gt(t.site),Bt.insert(l,r),l.edge=r.edge=ir(t.site,l.site),er(t),void er(r);if(r){tr(t),tr(r);var u=t.site,c=u.x,f=u.y,d=e.x-c,h=e.y-f,p=r.site,v=p.x-c,m=p.y-f,g=2*(d*m-h*v),y=d*d+h*h,x=v*v+m*m,b={x:(m*y-h*x)/g+c,y:(d*x-v*y)/g+f};or(r.edge,u,p,b),l.edge=ir(u,e,null,b),r.edge=ir(e,p,null,b),er(t),er(r)}else l.edge=ir(t.site,l.site)}}function Xt(e,t){var r=e.site,n=r.x,i=r.y,a=i-t;if(!a)return n;var o=e.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,u=l-t;if(!u)return s;var c=s-n,f=1/a-1/u,d=c/u;return f?(-d+Math.sqrt(d*d-2*f*(c*c/(-2*u)-l+u/2+i-a/2)))/f+n:(n+s)/2}function Kt(e,t){var r=e.N;if(r)return Xt(r,t);var n=e.site;return n.y===t?n.x:1/0}function Jt(e){this.site=e,this.edges=[]}function $t(e,t){return t.angle-e.angle}function Qt(){ur(this),this.x=this.y=this.arc=this.site=this.cy=null}function er(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,i=e.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,u=n.y-s,c=a.x-o,f=2*(l*(m=a.y-s)-u*c);if(!(f>=-Ce)){var d=l*l+u*u,h=c*c+m*m,p=(m*d-u*h)/f,v=(l*h-c*d)/f,m=v+s,g=Vt.pop()||new Qt;g.arc=e,g.site=i,g.x=p+o,g.y=m+Math.sqrt(p*p+v*v),g.cy=m,e.circle=g;for(var y=null,x=Ut._;x;)if(g.y=s)return;if(d>p){if(a){if(a.y>=u)return}else a={x:m,y:l};r={x:m,y:u}}else{if(a){if(a.y1)if(d>p){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x0)){if(t/=d,d<0){if(t0){if(t>f)return;t>c&&(c=t)}if(t=i-l,d||!(t<0)){if(t/=d,d<0){if(t>f)return;t>c&&(c=t)}else if(d>0){if(t0)){if(t/=h,h<0){if(t0){if(t>f)return;t>c&&(c=t)}if(t=a-u,h||!(t<0)){if(t/=h,h<0){if(t>f)return;t>c&&(c=t)}else if(h>0){if(t0&&(e.a={x:l+c*d,y:u+c*h}),f<1&&(e.b={x:l+f*d,y:u+f*h}),e}}}}}),l=o.length;l--;)(!rr(t=o[l],e)||!s(t)||w(t.a.x-t.b.x)Ee||w(i-r)>Ee)&&(s.splice(o,0,new sr(ar(a.site,c,w(n-f)Ee?{x:f,y:w(t-f)Ee?{x:w(r-p)Ee?{x:d,y:w(t-d)Ee?{x:w(r-h)=r&&u.x<=i&&u.y>=n&&u.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/Ee)*Ee,y:Math.round(i(e,t)/Ee)*Ee,i:t}}))}return o.links=function(e){return hr(s(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 hr(s(e)).cells.forEach((function(r,n){for(var i,a,o,s,l=r.site,u=r.edges.sort($t),c=-1,f=u.length,d=u[f-1].edge,h=d.l===l?d.r:d.l;++ca&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:_r(r,n)})),a=Tr.lastIndex;return av&&(v=l.x),l.y>m&&(m=l.y),u.push(l.x),c.push(l.y);else for(f=0;fv&&(v=x),b>m&&(m=b),u.push(x),c.push(b)}var _=v-h,k=m-p;function T(e,t,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var l=e.x,u=e.y;if(null!=l)if(w(l-r)+w(u-n)<.01)A(e,t,r,n,i,a,o,s);else{var c=e.point;e.x=e.y=e.point=null,A(e,c,l,u,i,a,o,s),A(e,t,r,n,i,a,o,s)}else e.x=r,e.y=n,e.point=t}else A(e,t,r,n,i,a,o,s)}function A(e,t,r,n,i,a,o,s){var l=.5*(i+o),u=.5*(a+s),c=r>=l,f=n>=u,d=f<<1|c;e.leaf=!1,c?i=l:o=l,f?a=u:s=u,T(e=e.nodes[d]||(e.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,i,a,o,s)}_>k?m=p+_:v=h+k;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){T(M,e,+g(e,++f),+y(e,f),h,p,v,m)}};if(M.visit=function(e){yr(e,M,h,p,v,m)},M.find=function(e){return function(e,t,r,n,i,a,o){var s,l=1/0;return function e(u,c,f,d,h){if(!(c>a||f>o||d=_)<<1|t>=b,k=w+4;w=0&&!(r=a.interpolators[n](e,t)););return r}function Mr(e,t){var r,n=[],i=[],a=e.length,o=t.length,s=Math.min(e.length,t.length);for(r=0;r=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*Ie)}function zr(e){return Math.pow(2,10*(e-1))}function Fr(e){return 1-Math.sqrt(1-e*e)}function Nr(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 Br(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function jr(e){var t,r,n,i=[e.a,e.b],a=[e.c,e.d],o=qr(i),s=Ur(i,a),l=qr(((t=a)[0]+=(n=-s)*(r=i)[0],t[1]+=n*r[1],t))||0;i[0]*a[1]=0?e.slice(0,r):e,i=r>=0?e.slice(r+1):"in";return n=Er.get(n)||Sr,i=Cr.get(i)||D,t=i(n.apply(null,o.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},a.interpolateHcl=function(e,t){e=a.hcl(e),t=a.hcl(t);var r=e.h,n=e.c,i=e.l,o=t.h-r,s=t.c-n,l=t.l-i;isNaN(s)&&(s=0,n=isNaN(n)?t.c:n);isNaN(o)?(o=0,r=isNaN(r)?t.h:r):o>180?o-=360:o<-180&&(o+=360);return function(e){return Ze(r+o*e,n+s*e,i+l*e)+""}},a.interpolateHsl=function(e,t){e=a.hsl(e),t=a.hsl(t);var r=e.h,n=e.s,i=e.l,o=t.h-r,s=t.s-n,l=t.l-i;isNaN(s)&&(s=0,n=isNaN(n)?t.s:n);isNaN(o)?(o=0,r=isNaN(r)?t.h:r):o>180?o-=360:o<-180&&(o+=360);return function(e){return Ge(r+o*e,n+s*e,i+l*e)+""}},a.interpolateLab=function(e,t){e=a.lab(e),t=a.lab(t);var r=e.l,n=e.a,i=e.b,o=t.l-r,s=t.a-n,l=t.b-i;return function(e){return tt(r+o*e,n+s*e,i+l*e)+""}},a.interpolateRound=Br,a.transform=function(e){var t=l.createElementNS(a.ns.prefix.svg,"g");return(a.transform=function(e){if(null!=e){t.setAttribute("transform",e);var r=t.transform.baseVal.consolidate()}return new jr(r?r.matrix:Vr)})(e)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Vr={a:1,b:0,c:0,d:1,e:0,f:0};function Hr(e){return e.length?e.pop()+",":""}function Gr(e,t){var r=[],n=[];return e=a.transform(e),t=a.transform(t),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:_r(e[0],t[0])},{i:i-2,x:_r(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(e.translate,t.translate,r,n),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Hr(r)+"rotate(",null,")")-2,x:_r(e,t)})):t&&r.push(Hr(r)+"rotate("+t+")")}(e.rotate,t.rotate,r,n),function(e,t,r,n){e!==t?n.push({i:r.push(Hr(r)+"skewX(",null,")")-2,x:_r(e,t)}):t&&r.push(Hr(r)+"skewX("+t+")")}(e.skew,t.skew,r,n),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push(Hr(r)+"scale(",null,",",null,")");n.push({i:i-4,x:_r(e[0],t[0])},{i:i-2,x:_r(e[1],t[1])})}else 1===t[0]&&1===t[1]||r.push(Hr(r)+"scale("+t+")")}(e.scale,t.scale,r,n),e=t=null,function(e){for(var t,i=-1,a=n.length;++i0?r=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:r=0})):t>0&&(l.start({type:"start",alpha:r=t}),e=At(s.tick)),s):r},s.start=function(){var e,t,r,a=g.length,l=y.length,c=u[0],p=u[1];for(e=0;e=0;)r.push(i[n])}function sn(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(a=e.children)&&(i=a.length))for(var i,a,o=-1;++o=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;r&&(a.value=0),a.children=u}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return sn(i,(function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)})),s}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&&(on(e,(function(e){e.children&&(e.value=0)})),sn(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},a.layout.partition=function(){var e=a.layout.hierarchy(),t=[1,1];function r(e,t,n,i){var a=e.children;if(e.x=t,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=e.value?n/e.value:0;++us&&(s=n),o.push(n)}for(r=0;ri&&(n=r,i=t);return n}function _n(e){return e.reduce(wn,0)}function wn(e,t){return e+t[1]}function kn(e,t){return Tn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Tn(e,t){for(var r=-1,n=+e[0],i=(e[1]-n)/t,a=[];++r<=t;)a[r]=i*r+n;return a}function An(e){return[a.min(e),a.max(e)]}function Mn(e,t){return e.value-t.value}function Sn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function En(e,t){e._pack_next=t,t._pack_prev=e}function Cn(e,t){var r=t.x-e.x,n=t.y-e.y,i=e.r+t.r;return.999*i*i>r*r+n*n}function Ln(e){if((t=e.children)&&(l=t.length)){var t,r,n,i,a,o,s,l,u=1/0,c=-1/0,f=1/0,d=-1/0;if(t.forEach(Pn),(r=t[0]).x=-r.r,r.y=0,x(r),l>1&&((n=t[1]).x=n.r,n.y=0,x(n),l>2))for(Rn(r,n,i=t[2]),x(i),Sn(r,i),r._pack_prev=i,Sn(i,n),n=r._pack_next,a=3;a0)for(o=-1;++o=f[0]&&l<=f[1]&&((s=u[a.bisect(d,l,1,p)-1]).y+=v,s.push(i[o]));return u}return i.value=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(r=gt(e),i):r},i.bins=function(e){return arguments.length?(n="number"===typeof e?function(t){return Tn(t,e)}:gt(e),i):n},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},a.layout.pack=function(){var e,t=a.layout.hierarchy().sort(Mn),r=0,n=[1,1];function i(i,a){var o=t.call(this,i,a),s=o[0],l=n[0],u=n[1],c=null==e?Math.sqrt:"function"===typeof e?e:function(){return e};if(s.x=s.y=0,sn(s,(function(e){e.r=+c(e.value)})),sn(s,Ln),r){var f=r*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;sn(s,(function(e){e.r+=f})),sn(s,Ln),sn(s,(function(e){e.r-=f}))}return In(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),o}return i.size=function(e){return arguments.length?(n=e,i):n},i.radius=function(t){return arguments.length?(e=null==t||"function"===typeof t?t:+t,i):e},i.padding=function(e){return arguments.length?(r=+e,i):r},an(i,t)},a.layout.tree=function(){var e=a.layout.hierarchy().sort(null).value(null),t=Dn,r=[1,1],n=null;function i(i,a){var u=e.call(this,i,a),c=u[0],f=function(e){var t,r={A:null,children:[e]},n=[r];for(;null!=(t=n.pop());)for(var i,a=t.children,o=0,s=a.length;oh.x&&(h=e),e.depth>p.depth&&(p=e)}));var v=t(d,h)/2-d.x,m=r[0]/(h.x+t(h,d)/2+v),g=r[1]/(p.depth||1);on(c,(function(e){e.x=(e.x+v)*m,e.y=e.depth*g}))}return u}function o(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r.length){!function(e){var t,r=0,n=0,i=e.children,a=i.length;for(;--a>=0;)(t=i[a]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],u=a.m,c=o.m,f=s.m,d=l.m;s=Fn(s),a=zn(a),s&&a;)l=zn(l),(o=Fn(o)).a=e,(i=s.z+f-a.z-u+t(s._,a._))>0&&(Nn(Bn(s,e,n),e,i),u+=i,c+=i),f+=s.m,u+=a.m,d+=l.m,c+=o.m;s&&!Fn(o)&&(o.t=s,o.m+=f-c),a&&!zn(l)&&(l.t=a,l.m+=u-d,n=e)}return n}(e,i,e.parent.A||n[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=r[0],e.y=e.depth*r[1]}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(n=null==(r=e)?l:null,i):n?null:r},i.nodeSize=function(e){return arguments.length?(n=null==(r=e)?null:l,i):n?r:null},an(i,e)},a.layout.cluster=function(){var e=a.layout.hierarchy().sort(null).value(null),t=Dn,r=[1,1],n=!1;function i(i,o){var s,l=e.call(this,i,o),u=l[0],c=0;sn(u,(function(e){var r=e.children;r&&r.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(r),e.y=function(e){return 1+a.max(e,(function(e){return e.y}))}(r)):(e.x=s?c+=t(e,s):0,e.y=0,s=e)}));var f=jn(u),d=Un(u),h=f.x-t(f,d)/2,p=d.x+t(d,f)/2;return sn(u,n?function(e){e.x=(e.x-u.x)*r[0],e.y=(u.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(p-h)*r[0],e.y=(1-(u.y?e.y/u.y:1))*r[1]}),l}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(n=null==(r=e),i):n?null:r},i.nodeSize=function(e){return arguments.length?(n=null!=(r=e),i):n?r:null},an(i,e)},a.layout.treemap=function(){var e,t=a.layout.hierarchy(),r=Math.round,n=[1,1],i=null,o=qn,s=!1,l="squarify",u=.5*(1+Math.sqrt(5));function c(e,t){for(var r,n,i=-1,a=e.length;++i0;)s.push(r=u[i-1]),s.area+=r.area,"squarify"!==l||(n=h(s,v))<=d?(u.pop(),d=n):(s.area-=s.pop().area,p(s,v,a,!1),v=Math.min(a.dx,a.dy),s.length=s.area=0,d=1/0);s.length&&(p(s,v,a,!0),s.length=s.area=0),t.forEach(f)}}function d(e){var t=e.children;if(t&&t.length){var r,n=o(e),i=t.slice(),a=[];for(c(i,n.dx*n.dy/e.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(p(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);t.forEach(d)}}function h(e,t){for(var r,n=e.area,i=0,a=1/0,o=-1,s=e.length;++oi&&(i=r));return t*=t,(n*=n)?Math.max(t*i*u/n,n/(t*a*u)):1/0}function p(e,t,n,i){var a,o=-1,s=e.length,l=n.x,u=n.y,c=t?r(e.area/t):0;if(t==n.dx){for((i||c>n.dy)&&(c=n.dy);++on.dx)&&(c=n.dx);++o1);return e+t*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=a.random.normal.apply(a,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=a.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?Kn:Wn,l=n?Yr:Wr;return i=o(e,t,l,r),a=o(t,e,l,Ar),s}function s(e){return i(e)}return s.invert=function(e){return a(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},s.range=function(e){return arguments.length?(t=e,o()):t},s.rangeRound=function(e){return s.range(e).interpolate(Br)},s.clamp=function(e){return arguments.length?(n=e,o()):n},s.interpolate=function(e){return arguments.length?(r=e,o()):r},s.ticks=function(t){return ti(e,t)},s.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},s.nice=function(t){return Qn(e,t),o()},s.copy=function(){return Jn(e,t,r,n)},o()}function $n(e,t){return a.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Qn(e,t){return Yn(e,Zn(ei(e,t)[2])),Yn(e,Zn(ei(e,t)[2])),e}function ei(e,t){null==t&&(t=10);var r=Hn(e),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),a=t/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function ti(e,t){return a.range.apply(a,ei(e,t))}a.scale.linear=function(){return Jn([0,1],[0,1],Ar,!1)};function ri(e,t,r,n){function i(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function a(e){return r?Math.pow(t,e):-Math.pow(t,-e)}function o(t){return e(i(t))}return o.invert=function(t){return a(e.invert(t))},o.domain=function(t){return arguments.length?(r=t[0]>=0,e.domain((n=t.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(t=+r,e.domain(n.map(i)),o):t},o.nice=function(){var t=Yn(n.map(i),r?Math:ni);return e.domain(t),n=t.map(a),o},o.ticks=function(){var e=Hn(n),o=[],s=e[0],l=e[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),f=t%1?2:t;if(isFinite(c-u)){if(r){for(;u0;d--)o.push(a(u)*d);for(u=0;o[u]l;c--);o=o.slice(u,c)}return o},o.copy=function(){return ri(e.copy(),t,r,n)},$n(o,e)}a.scale.log=function(){return ri(a.scale.linear().domain([0,1]),10,!0,[1,10])};var ni={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function ii(e,t,r){var n=ai(t),i=ai(1/t);function a(t){return e(n(t))}return a.invert=function(t){return i(e.invert(t))},a.domain=function(t){return arguments.length?(e.domain((r=t.map(Number)).map(n)),a):r},a.ticks=function(e){return ti(r,e)},a.tickFormat=function(e,t){return d3_scale_linearTickFormat(r,e,t)},a.nice=function(e){return a.domain(Qn(r,e))},a.exponent=function(o){return arguments.length?(n=ai(t=o),i=ai(1/t),e.domain(r.map(n)),a):t},a.copy=function(){return ii(e.copy(),t,r)},$n(a,e)}function ai(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oi(e,t){var r,n,i;function o(i){return n[((r.get(i)||("range"===t.t?r.set(i,e.push(i)):NaN))-1)%n.length]}function s(t,r){return a.range(e.length).map((function(e){return t+r*e}))}return o.domain=function(n){if(!arguments.length)return e;e=[],r=new T;for(var i,a=-1,s=n.length;++a0?r[n-1]:e[0],nf?0:1;if(u=Oe)return l(u,h)+(s?l(s,1-h):"")+"Z";var p,v,m,g,y,x,b,_,w,k,T,A,M=0,S=0,E=[];if((g=(+o.apply(this,arguments)||0)/2)&&(m=n===mi?Math.sqrt(s*s+u*u):+n.apply(this,arguments),h||(S*=-1),u&&(S=ze(m/u*Math.sin(g))),s&&(M=ze(m/s*Math.sin(g)))),u){y=u*Math.cos(c+S),x=u*Math.sin(c+S),b=u*Math.cos(f-S),_=u*Math.sin(f-S);var C=Math.abs(f-c-2*S)<=Le?0:1;if(S&&wi(y,x,b,_)===h^C){var L=(c+f)/2;y=u*Math.cos(L),x=u*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(f-M),k=s*Math.sin(f-M),T=s*Math.cos(c+M),A=s*Math.sin(c+M);var P=Math.abs(c-f+2*M)<=Le?0:1;if(M&&wi(w,k,T,A)===1-h^P){var O=(c+f)/2;w=s*Math.cos(O),k=s*Math.sin(O),T=A=null}}else w=k=0;if(d>Ee&&(p=Math.min(Math.abs(u-s)/2,+r.apply(this,arguments)))>.001){v=s0?0:1}function ki(e,t,r,n,i){var a=e[0]-t[0],o=e[1]-t[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=e[0]+l,f=e[1]+u,d=t[0]+l,h=t[1]+u,p=(c+d)/2,v=(f+h)/2,m=d-c,g=h-f,y=m*m+g*g,x=r-n,b=c*h-d*f,_=(g<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*g-m*_)/y,k=(-b*m-g*_)/y,T=(b*g+m*_)/y,A=(-b*m+g*_)/y,M=w-p,S=k-v,E=T-p,C=A-v;return M*M+S*S>E*E+C*C&&(w=T,k=A),[[w-l,k-u],[w*r/x,k*r/x]]}function Ti(){return!0}function Ai(e){var t=Ct,r=Lt,n=Ti,i=Si,a=i.key,o=.7;function s(a){var s,l=[],u=[],c=-1,f=a.length,d=gt(t),h=gt(r);function p(){l.push("M",i(e(u),o))}for(;++c1&&i.push("H",n[0]);return i.join("")},"step-before":Ci,"step-after":Li,basis:Ii,"basis-open":function(e){if(e.length<4)return Si(e);var t,r=[],n=-1,i=e.length,a=[0],o=[0];for(;++n<3;)t=e[n],a.push(t[0]),o.push(t[1]);r.push(Ri(Fi,a)+","+Ri(Fi,o)),--n;for(;++n9&&(i=3*t/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n);s=-1;for(;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(e))}});function Si(e){return e.length>1?e.join("L"):e+"Z"}function Ei(e){return e.join("L")+"Z"}function Ci(e){for(var t=0,r=e.length,n=e[0],i=[n[0],",",n[1]];++t1){s=t[1],a=e[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;uLe)+",1 "+t}function l(e,t,r,n){return"Q 0,0 "+n}return a.radius=function(e){return arguments.length?(r=gt(e),a):r},a.source=function(t){return arguments.length?(e=gt(t),a):e},a.target=function(e){return arguments.length?(t=gt(e),a):t},a.startAngle=function(e){return arguments.length?(n=gt(e),a):n},a.endAngle=function(e){return arguments.length?(i=gt(e),a):i},a},a.svg.diagonal=function(){var e=qi,t=Vi,r=Gi;function n(n,i){var a=e.call(this,n,i),o=t.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(t){return arguments.length?(e=gt(t),n):e},n.target=function(e){return arguments.length?(t=gt(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},a.svg.diagonal.radial=function(){var e=a.svg.diagonal(),t=Gi,r=e.projection;return e.projection=function(e){return arguments.length?r(function(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Ie;return[r*Math.cos(n),r*Math.sin(n)]}}(t=e)):t},e},a.svg.symbol=function(){var e=Yi,t=Wi;function r(r,n){return(Xi.get(e.call(this,r,n))||Zi)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=gt(t),r):e},r.size=function(e){return arguments.length?(t=gt(e),r):t},r};var Xi=a.map({circle:Zi,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*Ji)),r=t*Ji;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/Ki),r=t*Ki/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ki),r=t*Ki/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});a.svg.symbolTypes=Xi.keys();var Ki=Math.sqrt(3),Ji=Math.tan(30*Re);J.transition=function(e){for(var t,r,n=ta||++ia,i=sa(e),a=[],o=ra||{time:Date.now(),ease:Rr,delay:0,duration:250},s=-1,l=this.length;++s0;)u[--d].call(e,o);if(a>=1)return f.event&&f.event.end.call(e,e.__data__,t),--c.count?delete c[n]:delete e[r],1}f||(a=i.time,o=At((function(e){var t=f.delay;if(o.t=t+a,t<=e)return d(e-t);o.c=d}),0,a),f=c[n]={tween:new T,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++c.count)}na.call=J.call,na.empty=J.empty,na.node=J.node,na.size=J.size,a.transition=function(e,t){return e&&e.transition?ta?e.transition(t):e:a.selection().transition(e)},a.transition.prototype=na,na.select=function(e){var t,r,n,i=this.id,a=this.namespace,o=[];e=$(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",o[1]-o[0])}function v(e){e.select(".extent").attr("y",s[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function m(){var f,m,g=this,y=a.select(a.event.target),x=r.of(g,arguments),b=a.select(g),_=y.datum(),w=!/^(n|s)$/.test(_)&&n,k=!/^(e|w)$/.test(_)&&i,T=y.classed("extent"),A=Te(g),M=a.mouse(g),S=a.select(c(g)).on("keydown.brush",(function(){32==a.event.keyCode&&(T||(f=null,M[0]-=o[1],M[1]-=s[1],T=2),q())})).on("keyup.brush",(function(){32==a.event.keyCode&&2==T&&(M[0]+=o[1],M[1]+=s[1],T=0,q())}));if(a.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",O):S.on("mousemove.brush",L).on("mouseup.brush",O),b.interrupt().selectAll("*").interrupt(),T)M[0]=o[0]-M[0],M[1]=s[0]-M[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);m=[o[1-E]-M[0],s[1-C]-M[1]],M[0]=o[E],M[1]=s[C]}else a.event.altKey&&(f=M.slice());function L(){var e=a.mouse(g),t=!1;m&&(e[0]+=m[0],e[1]+=m[1]),T||(a.event.altKey?(f||(f=[(o[0]+o[1])/2,(s[0]+s[1])/2]),M[0]=o[+(e[0]{"use strict";r.r(t),r.d(t,{buildQueries:()=>ot,configure:()=>be,createEvent:()=>Ar,findAllByAltText:()=>Wt,findAllByDisplayValue:()=>Nt,findAllByLabelText:()=>pt,findAllByPlaceholderText:()=>Tt,findAllByRole:()=>sr,findAllByTestId:()=>vr,findAllByText:()=>Pt,findAllByTitle:()=>Qt,findByAltText:()=>Yt,findByDisplayValue:()=>Bt,findByLabelText:()=>vt,findByPlaceholderText:()=>At,findByRole:()=>lr,findByTestId:()=>mr,findByText:()=>Ot,findByTitle:()=>er,fireEvent:()=>Tr,getAllByAltText:()=>Ht,getAllByDisplayValue:()=>zt,getAllByLabelText:()=>mt,getAllByPlaceholderText:()=>wt,getAllByRole:()=>ar,getAllByTestId:()=>hr,getAllByText:()=>Ct,getAllByTitle:()=>Jt,getByAltText:()=>Gt,getByDisplayValue:()=>Ft,getByLabelText:()=>gt,getByPlaceholderText:()=>kt,getByRole:()=>or,getByTestId:()=>pr,getByText:()=>Lt,getByTitle:()=>$t,getConfig:()=>_e,getDefaultNormalizer:()=>Le,getElementError:()=>Ke,getMultipleElementsFoundError:()=>Je,getNodeText:()=>Ie,getQueriesForElement:()=>yr,getRoles:()=>Ne,getSuggestedQuery:()=>We,isInaccessible:()=>ze,logDOM:()=>ye,logRoles:()=>je,makeFindQuery:()=>nt,makeGetAllQuery:()=>rt,makeSingleQuery:()=>et,prettyDOM:()=>ge,prettyFormat:()=>n,queries:()=>gr,queryAllByAltText:()=>qt,queryAllByAttribute:()=>$e,queryAllByDisplayValue:()=>Rt,queryAllByLabelText:()=>yt,queryAllByPlaceholderText:()=>bt,queryAllByRole:()=>nr,queryAllByTestId:()=>fr,queryAllByText:()=>St,queryAllByTitle:()=>Xt,queryByAltText:()=>Vt,queryByAttribute:()=>Qe,queryByDisplayValue:()=>Dt,queryByLabelText:()=>dt,queryByPlaceholderText:()=>_t,queryByRole:()=>ir,queryByTestId:()=>dr,queryByText:()=>Et,queryByTitle:()=>Kt,queryHelpers:()=>st,screen:()=>Er,waitFor:()=>Xe,waitForElementToBeRemoved:()=>_r,within:()=>yr,wrapAllByQueryWithSuggestion:()=>at,wrapSingleQueryWithSuggestion:()=>it});var n=r(90295),i=Object.prototype.toString;function a(e){return"function"===typeof e||"[object Function]"===i.call(e)}var o=Math.pow(2,53)-1;function s(e){var t=function(e){var t=Number(e);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t}(e);return Math.min(Math.max(t,0),o)}function l(e,t){var r=Array,n=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");if("undefined"!==typeof t&&!a(t))throw new TypeError("Array.from: when provided, the second argument must be a function");for(var i,o=s(n.length),l=a(r)?Object(new r(o)):new Array(o),u=0;u0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=void 0,(r=f(r="items"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.items=i}var t,r,n;return t=e,(r=[{key:"add",value:function(e){return!1===this.has(e)&&this.items.push(e),this}},{key:"clear",value:function(){this.items=[]}},{key:"delete",value:function(e){var t=this.items.length;return this.items=this.items.filter((function(t){return t!==e})),t!==this.items.length}},{key:"forEach",value:function(e){var t=this;this.items.forEach((function(r){e(r,r,t)}))}},{key:"has",value:function(e){return-1!==this.items.indexOf(e)}},{key:"size",get:function(){return this.items.length}}])&&c(t.prototype,r),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function h(e){var t;return null!==(t=e.localName)&&void 0!==t?t:e.tagName.toLowerCase()}var p={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",form:"form",footer:"contentinfo",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:"banner",hr:"separator",html:"document",legend:"legend",li:"listitem",math:"math",main:"main",menu:"list",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",section:"region",summary:"button",table:"table",tbody:"rowgroup",textarea:"textbox",tfoot:"rowgroup",td:"cell",th:"columnheader",thead:"rowgroup",tr:"row",ul:"list"},v={caption:new Set(["aria-label","aria-labelledby"]),code:new Set(["aria-label","aria-labelledby"]),deletion:new Set(["aria-label","aria-labelledby"]),emphasis:new Set(["aria-label","aria-labelledby"]),generic:new Set(["aria-label","aria-labelledby","aria-roledescription"]),insertion:new Set(["aria-label","aria-labelledby"]),paragraph:new Set(["aria-label","aria-labelledby"]),presentation:new Set(["aria-label","aria-labelledby"]),strong:new Set(["aria-label","aria-labelledby"]),subscript:new Set(["aria-label","aria-labelledby"]),superscript:new Set(["aria-label","aria-labelledby"])};function m(e,t){return function(e,t){return["aria-atomic","aria-busy","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-flowto","aria-grabbed","aria-hidden","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"].some((function(r){var n;return e.hasAttribute(r)&&!(null!==(n=v[t])&&void 0!==n&&n.has(r))}))}(e,t)}function g(e){var t=function(e){var t=e.getAttribute("role");if(null!==t){var r=t.trim().split(" ")[0];if(r.length>0)return r}return null}(e);if(null===t||"presentation"===t){var r=function(e){var t=p[h(e)];if(void 0!==t)return t;switch(h(e)){case"a":case"area":case"link":if(e.hasAttribute("href"))return"link";break;case"img":return""!==e.getAttribute("alt")||m(e,"img")?"img":"presentation";case"input":var r=e.type;switch(r){case"button":case"image":case"reset":case"submit":return"button";case"checkbox":case"radio":return r;case"range":return"slider";case"email":case"tel":case"text":case"url":return e.hasAttribute("list")?"combobox":"textbox";case"search":return e.hasAttribute("list")?"combobox":"searchbox";case"number":return"spinbutton";default:return null}case"select":return e.hasAttribute("multiple")||e.size>1?"listbox":"combobox"}return null}(e);if("presentation"!==t||m(e,r||""))return r}return t}function y(e){return null!==e&&e.nodeType===e.ELEMENT_NODE}function x(e){return y(e)&&"caption"===h(e)}function b(e){return y(e)&&"input"===h(e)}function _(e){return y(e)&&"legend"===h(e)}function w(e){return function(e){return y(e)&&void 0!==e.ownerSVGElement}(e)&&"title"===h(e)}function k(e,t){if(y(e)&&e.hasAttribute(t)){var r=e.getAttribute(t).split(" "),n=e.getRootNode?e.getRootNode():e.ownerDocument;return r.map((function(e){return n.getElementById(e)})).filter((function(e){return null!==e}))}return[]}function T(e,t){return!!y(e)&&-1!==t.indexOf(g(e))}function A(e,t){if(!y(e))return!1;if("range"===t)return T(e,["meter","progressbar","scrollbar","slider","spinbutton"]);throw new TypeError("No knowledge about abstract role '".concat(t,"'. This is likely a bug :("))}function M(e,t){var r=l(e.querySelectorAll(t));return k(e,"aria-owns").forEach((function(e){r.push.apply(r,l(e.querySelectorAll(t)))})),r}function S(e){return y(t=e)&&"select"===h(t)?e.selectedOptions||M(e,"[selected]"):M(e,'[aria-selected="true"]');var t}function E(e){return b(e)||y(t=e)&&"textarea"===h(t)?e.value:e.textContent||"";var t}function C(e){var t=e.getPropertyValue("content");return/^["'].*["']$/.test(t)?t.slice(1,-1):""}function L(e){var t=h(e);return"button"===t||"input"===t&&"hidden"!==e.getAttribute("type")||"meter"===t||"output"===t||"progress"===t||"select"===t||"textarea"===t}function P(e){if(L(e))return e;var t=null;return e.childNodes.forEach((function(e){if(null===t&&y(e)){var r=P(e);null!==r&&(t=r)}})),t}function O(e){if(void 0!==e.control)return e.control;var t=e.getAttribute("for");return null!==t?e.ownerDocument.getElementById(t):P(e)}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new d,n=function(e){var t=(null===e.ownerDocument?e:e.ownerDocument).defaultView;if(null===t)throw new TypeError("no window available");return t}(e),i=t.compute,a=void 0===i?"name":i,o=t.computedStyleSupportsPseudoElements,s=void 0===o?void 0!==t.getComputedStyle:o,u=t.getComputedStyle,c=void 0===u?n.getComputedStyle.bind(n):u,f=t.hidden,p=void 0!==f&&f;function v(e,t){var r="";if(y(e)&&s){var n=C(c(e,"::before"));r="".concat(n," ").concat(r)}if((function(e){return y(e)&&"slot"===h(e)}(e)?function(e){var t=e.assignedNodes();return 0===t.length?l(e.childNodes):t}(e):l(e.childNodes).concat(k(e,"aria-owns"))).forEach((function(e){var n=M(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),i="inline"!==(y(e)?c(e).getPropertyValue("display"):"inline")?" ":"";r+="".concat(i).concat(n).concat(i)})),y(e)&&s){var i=C(c(e,"::after"));r="".concat(r," ").concat(i)}return r.trim()}function m(e,t){var n=e.getAttributeNode(t);return null===n||r.has(n)||""===n.value.trim()?null:(r.add(n),n.value)}function g(e){if(!y(e))return null;if(function(e){return y(e)&&"fieldset"===h(e)}(e)){r.add(e);for(var t=l(e.childNodes),n=0;n0})).join(" ");if(b(e)&&"image"===e.type){var A=m(e,"alt");if(null!==A)return A;var S=m(e,"title");return null!==S?S:"Submit Query"}if(T(e,["button"])){var E=v(e,{isEmbeddedInLabel:!1,isReferenced:!1});if(""!==E)return E}return null}function M(e,t){if(r.has(e))return"";if(!p&&function(e,t){if(!y(e))return!1;if(e.hasAttribute("hidden")||"true"===e.getAttribute("aria-hidden"))return!0;var r=t(e);return"none"===r.getPropertyValue("display")||"hidden"===r.getPropertyValue("visibility")}(e,c)&&!t.isReferenced)return r.add(e),"";var n=y(e)?e.getAttributeNode("aria-labelledby"):null,i=null===n||r.has(n)?[]:k(e,"aria-labelledby");if("name"===a&&!t.isReferenced&&i.length>0)return r.add(n),i.map((function(e){return M(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!0,recursion:!1})})).join(" ");var o,s=t.recursion&&(T(o=e,["button","combobox","listbox","textbox"])||A(o,"range"))&&"name"===a;if(!s){var u=(y(e)&&e.getAttribute("aria-label")||"").trim();if(""!==u&&"name"===a)return r.add(e),u;if(!function(e){return T(e,["none","presentation"])}(e)){var f=g(e);if(null!==f)return r.add(e),f}}if(T(e,["menu"]))return r.add(e),"";if(s||t.isEmbeddedInLabel||t.isReferenced){if(T(e,["combobox","listbox"])){r.add(e);var d=S(e);return 0===d.length?b(e)?e.value:"":l(d).map((function(e){return M(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1,recursion:!0})})).join(" ")}if(A(e,"range"))return r.add(e),e.hasAttribute("aria-valuetext")?e.getAttribute("aria-valuetext"):e.hasAttribute("aria-valuenow")?e.getAttribute("aria-valuenow"):e.getAttribute("value")||"";if(T(e,["textbox"]))return r.add(e),E(e)}if(function(e){return T(e,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}(e)||y(e)&&t.isReferenced||function(e){return x(e)}(e)){var h=v(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1});if(""!==h)return r.add(e),h}if(e.nodeType===e.TEXT_NODE)return r.add(e),e.textContent||"";if(t.recursion)return r.add(e),v(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1});var _=function(e){return y(e)?m(e,"title"):null}(e);return null!==_?(r.add(e),_):(r.add(e),"")}return M(e,{isEmbeddedInLabel:!1,isReferenced:"description"===a,recursion:!1}).trim().replace(/\s\s+/g," ")}function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=k(e,"aria-describedby").map((function(e){return I(e,z(z({},t),{},{compute:"description"}))})).join(" ");if(""===r){var n=e.getAttribute("title");r=null===n?"":n}return r}function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return T(e,["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])?"":I(e,t)}var j=r(99824),U=r(53393),q=r.n(U);function V(e){return e.replace(//g,">")}e=r.hmd(e);const H=(e,t,r,n,i,a,o)=>{const s=n+r.indent,l=r.colors;return e.map((e=>{const u=t[e];let c=o(u,r,s,i,a);return"string"!==typeof u&&(-1!==c.indexOf("\n")&&(c=r.spacingOuter+s+c+r.spacingOuter+n),c="{"+c+"}"),r.spacingInner+n+l.prop.open+e+l.prop.close+"="+l.value.open+c+l.value.close})).join("")},G=(e,t,r,n,i,a)=>e.map((e=>{const o="string"===typeof e?W(e,t):a(e,t,r,n,i);return""===o&&"object"===typeof e&&null!==e&&3!==e.nodeType?"":t.spacingOuter+r+o})).join(""),W=(e,t)=>{const r=t.colors.content;return r.open+V(e)+r.close},Y=(e,t)=>{const r=t.colors.comment;return r.open+"\x3c!--"+V(e)+"--\x3e"+r.close},Z=(e,t,r,n,i)=>{const a=n.colors.tag;return a.open+"<"+e+(t&&a.close+t+n.spacingOuter+i+a.open)+(r?">"+a.close+r+n.spacingOuter+i+a.open+""+a.close},X=(e,t)=>{const r=t.colors.tag;return r.open+"<"+e+r.close+" \u2026"+r.open+" />"+r.close},K=3,J=8,$=11,Q=/^((HTML|SVG)\w*)?Element$/,ee=e=>{const t=e.constructor.name,{nodeType:r,tagName:n}=e,i="string"===typeof n&&n.includes("-")||"function"===typeof e.hasAttribute&&e.hasAttribute("is");return 1===r&&(Q.test(t)||i)||r===K&&"Text"===t||r===J&&"Comment"===t||r===$&&"DocumentFragment"===t};function te(e){return e.nodeType===$}function re(e){return{test:e=>{var t;return(null==e||null==(t=e.constructor)?void 0:t.name)&&ee(e)},serialize:(t,r,n,i,a,o)=>{if(function(e){return e.nodeType===K}(t))return W(t.data,r);if(function(e){return e.nodeType===J}(t))return Y(t.data,r);const s=te(t)?"DocumentFragment":t.tagName.toLowerCase();return++i>r.maxDepth?X(s,r):Z(s,H(te(t)?[]:Array.from(t.attributes).map((e=>e.name)).sort(),te(t)?{}:Array.from(t.attributes).reduce(((e,t)=>(e[t.name]=t.value,e)),{}),r,n+r.indent,i,a,o),G(Array.prototype.slice.call(t.childNodes||t.children).filter(e),r,n+r.indent,i,a,o),r,n)}}}let ne=null,ie=null,ae=null;try{const t=e&&e.require;ie=t.call(e,"fs").readFileSync,ae=t.call(e,"@babel/code-frame").codeFrameColumns,ne=t.call(e,"chalk")}catch{}function oe(){if(!ie||!ae)return"";return function(e){const t=e.indexOf("(")+1,r=e.indexOf(")"),n=e.slice(t,r),i=n.split(":"),[a,o,s]=[i[0],parseInt(i[1],10),parseInt(i[2],10)];let l="";try{l=ie(a,"utf-8")}catch{return""}const u=ae(l,{start:{line:o,column:s}},{highlightCode:!0,linesBelow:0});return ne.dim(n)+"\n"+u+"\n"}((new Error).stack.split("\n").slice(1).find((e=>!e.includes("node_modules/"))))}const se=3;function le(){return"undefined"!==typeof jest&&null!==jest&&(!0===setTimeout._isMockFunction||Object.prototype.hasOwnProperty.call(setTimeout,"clock"))}function ue(){if("undefined"===typeof window)throw new Error("Could not find default container");return window.document}function ce(e){if(e.defaultView)return e.defaultView;if(e.ownerDocument&&e.ownerDocument.defaultView)return e.ownerDocument.defaultView;if(e.window)return e.window;throw e.ownerDocument&&null===e.ownerDocument.defaultView?new Error("It looks like the window object is not available for the provided node."):e.then instanceof Function?new Error("It looks like you passed a Promise object instead of a DOM node. Did you do something like `fireEvent.click(screen.findBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`, or await the findBy query `fireEvent.click(await screen.findBy...`?"):Array.isArray(e)?new Error("It looks like you passed an Array instead of a DOM node. Did you do something like `fireEvent.click(screen.getAllBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`?"):"function"===typeof e.debug&&"function"===typeof e.logTestingPlaygroundURL?new Error("It looks like you passed a `screen` object. Did you do something like `fireEvent.click(screen, ...` when you meant to use a query, e.g. `fireEvent.click(screen.getBy..., `?"):new Error("The given node is not an Element, the node type is: "+typeof e+".")}function fe(e){if(!e||"function"!==typeof e.querySelector||"function"!==typeof e.querySelectorAll)throw new TypeError("Expected container to be an Element, a Document or a DocumentFragment but got "+function(e){if("object"===typeof e)return null===e?"null":e.constructor.name;return typeof e}(e)+".")}const de=()=>{let e;try{var t;e=JSON.parse(null==(t=process)||null==(t={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0})?void 0:t.COLORS)}catch(r){}return"boolean"===typeof e?e:"undefined"!==typeof process&&void 0!==process.versions&&void 0!==process.versions.node},{DOMCollection:he}=n.plugins,pe=1,ve=8;function me(e){return e.nodeType!==ve&&(e.nodeType!==pe||!e.matches(_e().defaultIgnore))}function ge(e,t,r){if(void 0===r&&(r={}),e||(e=ue().body),"number"!==typeof t&&(t="undefined"!==typeof process&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.DEBUG_PRINT_LIMIT||7e3),0===t)return"";e.documentElement&&(e=e.documentElement);let i=typeof e;if("object"===i?i=e.constructor.name:e={},!("outerHTML"in e))throw new TypeError("Expected an element or document but got "+i);const{filterNode:a=me,...o}=r,s=n.format(e,{plugins:[re(a),he],printFunctionName:!1,highlight:de(),...o});return void 0!==t&&e.outerHTML.length>t?s.slice(0,t)+"...":s}const ye=function(){const e=oe();e?console.log(ge(...arguments)+"\n\n"+e):console.log(ge(...arguments))};let xe={testIdAttribute:"data-testid",asyncUtilTimeout:1e3,asyncWrapper:e=>e(),unstable_advanceTimersWrapper:e=>e(),eventWrapper:e=>e(),defaultHidden:!1,defaultIgnore:"script, style",showOriginalStackTrace:!1,throwSuggestions:!1,getElementError(e,t){const r=ge(t),n=new Error([e,"Ignored nodes: comments, "+xe.defaultIgnore+"\n"+r].filter(Boolean).join("\n\n"));return n.name="TestingLibraryElementError",n},_disableExpensiveErrorDiagnostics:!1,computedStyleSupportsPseudoElements:!1};function be(e){"function"===typeof e&&(e=e(xe)),xe={...xe,...e}}function _e(){return xe}const we=["button","meter","output","progress","select","textarea","input"];function ke(e){return we.includes(e.nodeName.toLowerCase())?"":e.nodeType===se?e.textContent:Array.from(e.childNodes).map((e=>ke(e))).join("")}function Te(e){let t;return t="label"===e.tagName.toLowerCase()?ke(e):e.value||e.textContent,t}function Ae(e){var t;if(void 0!==e.labels)return null!=(t=e.labels)?t:[];if(!function(e){return/BUTTON|METER|OUTPUT|PROGRESS|SELECT|TEXTAREA/.test(e.tagName)||"INPUT"===e.tagName&&"hidden"!==e.getAttribute("type")}(e))return[];const r=e.ownerDocument.querySelectorAll("label");return Array.from(r).filter((t=>t.control===e))}function Me(e,t,r){let{selector:n="*"}=void 0===r?{}:r;const i=t.getAttribute("aria-labelledby"),a=i?i.split(" "):[];return a.length?a.map((t=>{const r=e.querySelector('[id="'+t+'"]');return r?{content:Te(r),formControl:null}:{content:"",formControl:null}})):Array.from(Ae(t)).map((e=>({content:Te(e),formControl:Array.from(e.querySelectorAll("button, input, meter, output, progress, select, textarea")).filter((e=>e.matches(n)))[0]})))}function Se(e){if(null===e||void 0===e)throw new Error("It looks like "+e+" was passed instead of a matcher. Did you do something like getByText("+e+")?")}function Ee(e,t,r,n){if("string"!==typeof e)return!1;Se(r);const i=n(e);return"string"===typeof r||"number"===typeof r?i.toLowerCase().includes(r.toString().toLowerCase()):"function"===typeof r?r(i,t):Oe(r,i)}function Ce(e,t,r,n){if("string"!==typeof e)return!1;Se(r);const i=n(e);return r instanceof Function?r(i,t):r instanceof RegExp?Oe(r,i):i===String(r)}function Le(e){let{trim:t=!0,collapseWhitespace:r=!0}=void 0===e?{}:e;return e=>{let n=e;return n=t?n.trim():n,n=r?n.replace(/\s+/g," "):n,n}}function Pe(e){let{trim:t,collapseWhitespace:r,normalizer:n}=e;if(!n)return Le({trim:t,collapseWhitespace:r});if("undefined"!==typeof t||"undefined"!==typeof r)throw new Error('trim and collapseWhitespace are not supported with a normalizer. If you want to use the default trim and collapseWhitespace logic in your normalizer, use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer');return n}function Oe(e,t){const r=e.test(t);return e.global&&0!==e.lastIndex&&(console.warn("To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp."),e.lastIndex=0),r}function Ie(e){return e.matches("input[type=submit], input[type=button], input[type=reset]")?e.value:Array.from(e.childNodes).filter((e=>e.nodeType===se&&Boolean(e.textContent))).map((e=>e.textContent)).join("")}const Re=function(e){function t(e){let{attributes:t=[]}=e;return t.length}function r(e){let{attributes:t=[]}=e;const r=t.findIndex((e=>e.value&&"type"===e.name&&"text"===e.value));r>=0&&(t=[...t.slice(0,r),...t.slice(r+1)]);const n=function(e){let{name:t,attributes:r}=e;return""+t+r.map((e=>{let{name:t,value:r,constraints:n=[]}=e;const i=-1!==n.indexOf("undefined"),a=-1!==n.indexOf("set");return"undefined"!==typeof r?"["+t+'="'+r+'"]':i?":not(["+t+"])":a?"["+t+"]:not(["+t+'=""])':"["+t+"]"})).join("")}({...e,attributes:t});return e=>!(r>=0&&"text"!==e.type)&&e.matches(n)}let n=[];for(const[i,a]of e.entries())n=[...n,{match:r(i),roles:Array.from(a),specificity:t(i)}];return n.sort((function(e,t){let{specificity:r}=e,{specificity:n}=t;return n-r}))}(j._s);function De(e){if(!0===e.hidden)return!0;if("true"===e.getAttribute("aria-hidden"))return!0;return"none"===e.ownerDocument.defaultView.getComputedStyle(e).display}function ze(e,t){void 0===t&&(t={});const{isSubtreeInaccessible:r=De}=t;if("hidden"===e.ownerDocument.defaultView.getComputedStyle(e).visibility)return!0;let n=e;for(;n;){if(r(n))return!0;n=n.parentElement}return!1}function Fe(e){for(const{match:t,roles:r}of Re)if(t(e))return[...r];return[]}function Ne(e,t){let{hidden:r=!1}=void 0===t?{}:t;return function e(t){return[t,...Array.from(t.children).reduce(((t,r)=>[...t,...e(r)]),[])]}(e).filter((e=>!1!==r||!1===ze(e))).reduce(((e,t)=>{let r=[];return r=t.hasAttribute("role")?t.getAttribute("role").split(" ").slice(0,1):Fe(t),r.reduce(((e,r)=>Array.isArray(e[r])?{...e,[r]:[...e[r],t]}:{...e,[r]:[t]}),e)}),{})}function Be(e,t){let{hidden:r,includeDescription:n}=t;const i=Ne(e,{hidden:r});return Object.entries(i).filter((e=>{let[t]=e;return"generic"!==t})).map((e=>{let[t,r]=e;const i="-".repeat(50);return t+":\n\n"+r.map((e=>{const t='Name "'+B(e,{computedStyleSupportsPseudoElements:_e().computedStyleSupportsPseudoElements})+'":\n',r=ge(e.cloneNode(!1));if(n){return""+t+('Description "'+N(e,{computedStyleSupportsPseudoElements:_e().computedStyleSupportsPseudoElements})+'":\n')+r}return""+t+r})).join("\n\n")+"\n\n"+i})).join("\n")}const je=function(e,t){let{hidden:r=!1}=void 0===t?{}:t;return console.log(Be(e,{hidden:r}))};function Ue(e,t){const r=e.getAttribute(t);return"true"===r||"false"!==r&&void 0}const qe=Le();function Ve(e){return new RegExp(function(e){return e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}(e.toLowerCase()),"i")}function He(e,t,r,n){let{variant:i,name:a}=n,o="";const s={},l=[["Role","TestId"].includes(e)?r:Ve(r)];a&&(s.name=Ve(a)),"Role"===e&&ze(t)&&(s.hidden=!0,o="Element is inaccessible. This means that the element and all its children are invisible to screen readers.\n If you are using the aria-hidden prop, make sure this is the right choice for your case.\n "),Object.keys(s).length>0&&l.push(s);const u=i+"By"+e;return{queryName:e,queryMethod:u,queryArgs:l,variant:i,warning:o,toString(){o&&console.warn(o);let[e,t]=l;return e="string"===typeof e?"'"+e+"'":e,t=t?", { "+Object.entries(t).map((e=>{let[t,r]=e;return t+": "+r})).join(", ")+" }":"",u+"("+e+t+")"}}}function Ge(e,t,r){return r&&(!t||t.toLowerCase()===e.toLowerCase())}function We(e,t,r){var n,i;if(void 0===t&&(t="get"),e.matches(_e().defaultIgnore))return;const a=null!=(n=e.getAttribute("role"))?n:null==(i=Fe(e))?void 0:i[0];if("generic"!==a&&Ge("Role",r,a))return He("Role",e,a,{variant:t,name:B(e,{computedStyleSupportsPseudoElements:_e().computedStyleSupportsPseudoElements})});const o=Me(document,e).map((e=>e.content)).join(" ");if(Ge("LabelText",r,o))return He("LabelText",e,o,{variant:t});const s=e.getAttribute("placeholder");if(Ge("PlaceholderText",r,s))return He("PlaceholderText",e,s,{variant:t});const l=qe(Ie(e));if(Ge("Text",r,l))return He("Text",e,l,{variant:t});if(Ge("DisplayValue",r,e.value))return He("DisplayValue",e,qe(e.value),{variant:t});const u=e.getAttribute("alt");if(Ge("AltText",r,u))return He("AltText",e,u,{variant:t});const c=e.getAttribute("title");if(Ge("Title",r,c))return He("Title",e,c,{variant:t});const f=e.getAttribute(_e().testIdAttribute);return Ge("TestId",r,f)?He("TestId",e,f,{variant:t}):void 0}function Ye(e,t){e.stack=t.stack.replace(t.message,e.message)}function Ze(e,t){let{container:r=ue(),timeout:n=_e().asyncUtilTimeout,showOriginalStackTrace:i=_e().showOriginalStackTrace,stackTraceError:a,interval:o=50,onTimeout:s=(e=>(Object.defineProperty(e,"message",{value:_e().getElementError(e.message,r).message}),e)),mutationObserverOptions:l={subtree:!0,childList:!0,attributes:!0,characterData:!0}}=t;if("function"!==typeof e)throw new TypeError("Received `callback` arg must be a function");return new Promise((async(t,u)=>{let c,f,d,h=!1,p="idle";const v=setTimeout((function(){let e;c?(e=c,i||"TestingLibraryElementError"!==e.name||Ye(e,a)):(e=new Error("Timed out in waitFor."),i||Ye(e,a));g(s(e),null)}),n),m=le();if(m){const{unstable_advanceTimersWrapper:e}=_e();for(x();!h;){if(!le()){const e=new Error("Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");return i||Ye(e,a),void u(e)}if(await e((async()=>{jest.advanceTimersByTime(o)})),h)break;x()}}else{try{fe(r)}catch(b){return void u(b)}f=setInterval(y,o);const{MutationObserver:e}=ce(r);d=new e(y),d.observe(r,l),x()}function g(e,r){h=!0,clearTimeout(v),m||(clearInterval(f),d.disconnect()),e?u(e):t(r)}function y(){if(le()){const e=new Error("Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");return i||Ye(e,a),u(e)}return x()}function x(){if("pending"!==p)try{const t=function(e){try{return xe._disableExpensiveErrorDiagnostics=!0,e()}finally{xe._disableExpensiveErrorDiagnostics=!1}}(e);"function"===typeof(null==t?void 0:t.then)?(p="pending",t.then((e=>{p="resolved",g(null,e)}),(e=>{p="rejected",c=e}))):g(null,t)}catch(t){c=t}}}))}function Xe(e,t){const r=new Error("STACK_TRACE_MESSAGE");return _e().asyncWrapper((()=>Ze(e,{stackTraceError:r,...t})))}function Ke(e,t){return _e().getElementError(e,t)}function Je(e,t){return Ke(e+"\n\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).",t)}function $e(e,t,r,n){let{exact:i=!0,collapseWhitespace:a,trim:o,normalizer:s}=void 0===n?{}:n;const l=i?Ce:Ee,u=Pe({collapseWhitespace:a,trim:o,normalizer:s});return Array.from(t.querySelectorAll("["+e+"]")).filter((t=>l(t.getAttribute(e),t,r,u)))}function Qe(e,t,r,n){const i=$e(e,t,r,n);if(i.length>1)throw Je("Found multiple elements by ["+e+"="+r+"]",t);return i[0]||null}function et(e,t){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a1){const e=o.map((e=>Ke(null,e).message)).join("\n\n");throw Je(t(r,...i)+"\n\nHere are the matching elements:\n\n"+e,r)}return o[0]||null}}function tt(e,t){return _e().getElementError("A better query is available, try this:\n"+e.toString()+"\n",t)}function rt(e,t){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;aXe((()=>e(t,r,n)),{container:t,...i})}const it=(e,t,r)=>function(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;ofunction(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o{var t;return null==(t=We(e,r))?void 0:t.toString()})))];if(1===e.length&&!t.endsWith(We(s[0],r).queryName))throw tt(e[0],n)}return s};function ot(e,t,r){const n=it(et(e,t),e.name,"query"),i=rt(e,r),a=et(i,t),o=it(a,e.name,"get");return[n,at(i,e.name.replace("query","get"),"getAll"),o,nt(at(i,e.name,"findAll")),nt(it(a,e.name,"find"))]}var st=Object.freeze({__proto__:null,getElementError:Ke,wrapAllByQueryWithSuggestion:at,wrapSingleQueryWithSuggestion:it,getMultipleElementsFoundError:Je,queryAllByAttribute:$e,queryByAttribute:Qe,makeSingleQuery:et,makeGetAllQuery:rt,makeFindQuery:nt,buildQueries:ot});const lt=function(e,t,r){let{exact:n=!0,trim:i,collapseWhitespace:a,normalizer:o}=void 0===r?{}:r;const s=n?Ce:Ee,l=Pe({collapseWhitespace:a,trim:i,normalizer:o}),u=function(e){return Array.from(e.querySelectorAll("label,input")).map((e=>({node:e,textToMatch:Te(e)}))).filter((e=>{let{textToMatch:t}=e;return null!==t}))}(e);return u.filter((e=>{let{node:r,textToMatch:n}=e;return s(n,r,t,l)})).map((e=>{let{node:t}=e;return t}))},ut=function(e,t,r){let{selector:n="*",exact:i=!0,collapseWhitespace:a,trim:o,normalizer:s}=void 0===r?{}:r;fe(e);const l=i?Ce:Ee,u=Pe({collapseWhitespace:a,trim:o,normalizer:s}),c=Array.from(e.querySelectorAll("*")).filter((e=>Ae(e).length||e.hasAttribute("aria-labelledby"))).reduce(((r,i)=>{const a=Me(e,i,{selector:n});a.filter((e=>Boolean(e.formControl))).forEach((e=>{l(e.content,e.formControl,t,u)&&e.formControl&&r.push(e.formControl)}));const o=a.filter((e=>Boolean(e.content))).map((e=>e.content));return l(o.join(" "),i,t,u)&&r.push(i),o.length>1&&o.forEach(((e,n)=>{l(e,i,t,u)&&r.push(i);const a=[...o];a.splice(n,1),a.length>1&&l(a.join(" "),i,t,u)&&r.push(i)})),r}),[]).concat($e("aria-label",e,t,{exact:i,normalizer:u}));return Array.from(new Set(c)).filter((e=>e.matches(n)))},ct=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;ifunction(e,t){const r=t.getAttribute("for");if(!r)return null;const n=e.querySelector('[id="'+r+'"]');return n?n.tagName.toLowerCase():null}(e,t))).filter((e=>!!e));throw n.length?_e().getElementError(n.map((e=>"Found a label with the text of: "+t+", however the element associated with this label (<"+e+" />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <"+e+" />, you can use aria-label or aria-labelledby instead.")).join("\n\n"),e):_e().getElementError("Found a label with the text of: "+t+', however no form control was found associated to that label. Make sure you\'re using the "for" attribute or "aria-labelledby" attribute correctly.',e)}throw _e().getElementError("Unable to find a label with the text of: "+t,e)}return a};const ft=(e,t)=>"Found multiple elements with the text of: "+t,dt=it(et(ut,ft),ut.name,"query"),ht=et(ct,ft),pt=nt(at(ct,ct.name,"findAll")),vt=nt(it(ht,ct.name,"find")),mt=at(ct,ct.name,"getAll"),gt=it(ht,ct.name,"get"),yt=at(ut,ut.name,"queryAll"),xt=function(){for(var e=arguments.length,t=new Array(e),r=0;r"Found multiple elements with the placeholder text of: "+t),((e,t)=>"Unable to find an element with the placeholder text of: "+t)),Mt=function(e,t,r){let{selector:n="*",exact:i=!0,collapseWhitespace:a,trim:o,ignore:s=_e().defaultIgnore,normalizer:l}=void 0===r?{}:r;fe(e);const u=i?Ce:Ee,c=Pe({collapseWhitespace:a,trim:o,normalizer:l});let f=[];return"function"===typeof e.matches&&e.matches(n)&&(f=[e]),[...f,...Array.from(e.querySelectorAll(n))].filter((e=>!s||!e.matches(s))).filter((e=>u(Ie(e),e,t,c)))},St=at(Mt,Mt.name,"queryAll"),[Et,Ct,Lt,Pt,Ot]=ot(Mt,((e,t)=>"Found multiple elements with the text: "+t),(function(e,t,r){void 0===r&&(r={});const{collapseWhitespace:n,trim:i,normalizer:a,selector:o}=r,s=Pe({collapseWhitespace:n,trim:i,normalizer:a})(t.toString());return"Unable to find an element with the text: "+(s!==t.toString()?s+" (normalized from '"+t+"')":t)+("*"!==(null!=o?o:"*")?", which matches selector '"+o+"'":"")+". This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible."})),It=function(e,t,r){let{exact:n=!0,collapseWhitespace:i,trim:a,normalizer:o}=void 0===r?{}:r;fe(e);const s=n?Ce:Ee,l=Pe({collapseWhitespace:i,trim:a,normalizer:o});return Array.from(e.querySelectorAll("input,textarea,select")).filter((e=>{if("SELECT"===e.tagName){return Array.from(e.options).filter((e=>e.selected)).some((e=>s(Ie(e),e,t,l)))}return s(e.value,e,t,l)}))},Rt=at(It,It.name,"queryAll"),[Dt,zt,Ft,Nt,Bt]=ot(It,((e,t)=>"Found multiple elements with the display value: "+t+"."),((e,t)=>"Unable to find an element with the display value: "+t+".")),jt=/^(img|input|area|.+-.+)$/i,Ut=function(e,t,r){return void 0===r&&(r={}),fe(e),$e("alt",e,t,r).filter((e=>jt.test(e.tagName)))},qt=at(Ut,Ut.name,"queryAll"),[Vt,Ht,Gt,Wt,Yt]=ot(Ut,((e,t)=>"Found multiple elements with the alt text: "+t),((e,t)=>"Unable to find an element with the alt text: "+t)),Zt=function(e,t,r){let{exact:n=!0,collapseWhitespace:i,trim:a,normalizer:o}=void 0===r?{}:r;fe(e);const s=n?Ce:Ee,l=Pe({collapseWhitespace:i,trim:a,normalizer:o});return Array.from(e.querySelectorAll("[title], svg > title")).filter((e=>s(e.getAttribute("title"),e,t,l)||(e=>{var t;return"title"===e.tagName.toLowerCase()&&"svg"===(null==(t=e.parentElement)?void 0:t.tagName.toLowerCase())})(e)&&s(Ie(e),e,t,l)))},Xt=at(Zt,Zt.name,"queryAll"),[Kt,Jt,$t,Qt,er]=ot(Zt,((e,t)=>"Found multiple elements with the title: "+t+"."),((e,t)=>"Unable to find an element with the title: "+t+".")),tr=function(e,t,r){let{hidden:n=_e().defaultHidden,name:i,description:a,queryFallbacks:o=!1,selected:s,busy:l,checked:u,pressed:c,current:f,level:d,expanded:h,value:{now:p,min:v,max:m,text:g}={}}=void 0===r?{}:r;var y,x,b,_,w,k,T,A,M,S;if((fe(e),void 0!==s)&&void 0===(null==(y=j.Ot.get(t))?void 0:y.props["aria-selected"]))throw new Error('"aria-selected" is not supported on role "'+t+'".');if(void 0!==l&&void 0===(null==(x=j.Ot.get(t))?void 0:x.props["aria-busy"]))throw new Error('"aria-busy" is not supported on role "'+t+'".');if(void 0!==u&&void 0===(null==(b=j.Ot.get(t))?void 0:b.props["aria-checked"]))throw new Error('"aria-checked" is not supported on role "'+t+'".');if(void 0!==c&&void 0===(null==(_=j.Ot.get(t))?void 0:_.props["aria-pressed"]))throw new Error('"aria-pressed" is not supported on role "'+t+'".');if(void 0!==f&&void 0===(null==(w=j.Ot.get(t))?void 0:w.props["aria-current"]))throw new Error('"aria-current" is not supported on role "'+t+'".');if(void 0!==d&&"heading"!==t)throw new Error('Role "'+t+'" cannot have "level" property.');if(void 0!==p&&void 0===(null==(k=j.Ot.get(t))?void 0:k.props["aria-valuenow"]))throw new Error('"aria-valuenow" is not supported on role "'+t+'".');if(void 0!==m&&void 0===(null==(T=j.Ot.get(t))?void 0:T.props["aria-valuemax"]))throw new Error('"aria-valuemax" is not supported on role "'+t+'".');if(void 0!==v&&void 0===(null==(A=j.Ot.get(t))?void 0:A.props["aria-valuemin"]))throw new Error('"aria-valuemin" is not supported on role "'+t+'".');if(void 0!==g&&void 0===(null==(M=j.Ot.get(t))?void 0:M.props["aria-valuetext"]))throw new Error('"aria-valuetext" is not supported on role "'+t+'".');if(void 0!==h&&void 0===(null==(S=j.Ot.get(t))?void 0:S.props["aria-expanded"]))throw new Error('"aria-expanded" is not supported on role "'+t+'".');const E=new WeakMap;function C(e){return E.has(e)||E.set(e,De(e)),E.get(e)}return Array.from(e.querySelectorAll(function(e){var t;const r='*[role~="'+e+'"]',n=null!=(t=j.wZ.get(e))?t:new Set,i=new Set(Array.from(n).map((e=>{let{name:t}=e;return t})));return[r].concat(Array.from(i)).join(",")}(t))).filter((e=>{if(e.hasAttribute("role")){const r=e.getAttribute("role");if(o)return r.split(" ").filter(Boolean).some((e=>e===t));const[n]=r.split(" ");return n===t}return Fe(e).some((e=>e===t))})).filter((e=>{if(void 0!==s)return s===function(e){return"OPTION"===e.tagName?e.selected:Ue(e,"aria-selected")}(e);if(void 0!==l)return l===function(e){return"true"===e.getAttribute("aria-busy")}(e);if(void 0!==u)return u===function(e){if(!("indeterminate"in e)||!e.indeterminate)return"checked"in e?e.checked:Ue(e,"aria-checked")}(e);if(void 0!==c)return c===function(e){return Ue(e,"aria-pressed")}(e);if(void 0!==f)return f===function(e){var t,r;return null!=(t=null!=(r=Ue(e,"aria-current"))?r:e.getAttribute("aria-current"))&&t}(e);if(void 0!==h)return h===function(e){return Ue(e,"aria-expanded")}(e);if(void 0!==d)return d===function(e){return e.getAttribute("aria-level")&&Number(e.getAttribute("aria-level"))||{H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[e.tagName]}(e);if(void 0!==p||void 0!==m||void 0!==v||void 0!==g){let r=!0;var t;if(void 0!==p&&r&&(r=p===function(e){const t=e.getAttribute("aria-valuenow");return null===t?void 0:+t}(e)),void 0!==m&&r&&(r=m===function(e){const t=e.getAttribute("aria-valuemax");return null===t?void 0:+t}(e)),void 0!==v&&r&&(r=v===function(e){const t=e.getAttribute("aria-valuemin");return null===t?void 0:+t}(e)),void 0!==g)r&&(r=Ce(null!=(t=function(e){const t=e.getAttribute("aria-valuetext");return null===t?void 0:t}(e))?t:null,e,g,(e=>e)));return r}return!0})).filter((e=>void 0===i||Ce(B(e,{computedStyleSupportsPseudoElements:_e().computedStyleSupportsPseudoElements}),e,i,(e=>e)))).filter((e=>void 0===a||Ce(N(e,{computedStyleSupportsPseudoElements:_e().computedStyleSupportsPseudoElements}),e,a,(e=>e)))).filter((e=>!1!==n||!1===ze(e,{isSubtreeInaccessible:C})))};const rr=e=>{let t="";return t=void 0===e?"":"string"===typeof e?' and name "'+e+'"':" and name `"+e+"`",t},nr=at(tr,tr.name,"queryAll"),[ir,ar,or,sr,lr]=ot(tr,(function(e,t,r){let{name:n}=void 0===r?{}:r;return'Found multiple elements with the role "'+t+'"'+rr(n)}),(function(e,t,r){let{hidden:n=_e().defaultHidden,name:i,description:a}=void 0===r?{}:r;if(_e()._disableExpensiveErrorDiagnostics)return'Unable to find role="'+t+'"'+rr(i);let o,s="";Array.from(e.children).forEach((e=>{s+=Be(e,{hidden:n,includeDescription:void 0!==a})})),o=0===s.length?!1===n?"There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole":"There are no available roles.":("\nHere are the "+(!1===n?"accessible":"available")+" roles:\n\n "+s.replace(/\n/g,"\n ").replace(/\n\s\s\n/g,"\n\n")+"\n").trim();let l="";l=void 0===i?"":"string"===typeof i?' and name "'+i+'"':" and name `"+i+"`";let u="";return u=void 0===a?"":"string"===typeof a?' and description "'+a+'"':" and description `"+a+"`",("\nUnable to find an "+(!1===n?"accessible ":"")+'element with the role "'+t+'"'+l+u+"\n\n"+o).trim()})),ur=()=>_e().testIdAttribute,cr=function(){for(var e=arguments.length,t=new Array(e),r=0;r"Found multiple elements by: ["+ur()+'="'+t+'"]'),((e,t)=>"Unable to find an element by: ["+ur()+'="'+t+'"]'));var gr=Object.freeze({__proto__:null,queryAllByLabelText:yt,queryByLabelText:dt,getAllByLabelText:mt,getByLabelText:gt,findAllByLabelText:pt,findByLabelText:vt,queryByPlaceholderText:_t,queryAllByPlaceholderText:bt,getByPlaceholderText:kt,getAllByPlaceholderText:wt,findAllByPlaceholderText:Tt,findByPlaceholderText:At,queryByText:Et,queryAllByText:St,getByText:Lt,getAllByText:Ct,findAllByText:Pt,findByText:Ot,queryByDisplayValue:Dt,queryAllByDisplayValue:Rt,getByDisplayValue:Ft,getAllByDisplayValue:zt,findAllByDisplayValue:Nt,findByDisplayValue:Bt,queryByAltText:Vt,queryAllByAltText:qt,getByAltText:Gt,getAllByAltText:Ht,findAllByAltText:Wt,findByAltText:Yt,queryByTitle:Kt,queryAllByTitle:Xt,getByTitle:$t,getAllByTitle:Jt,findAllByTitle:Qt,findByTitle:er,queryByRole:ir,queryAllByRole:nr,getAllByRole:ar,getByRole:or,findAllByRole:sr,findByRole:lr,queryByTestId:dr,queryAllByTestId:fr,getByTestId:pr,getAllByTestId:hr,findAllByTestId:vr,findByTestId:mr});function yr(e,t,r){return void 0===t&&(t=gr),void 0===r&&(r={}),Object.keys(t).reduce(((r,n)=>{const i=t[n];return r[n]=i.bind(null,e),r}),r)}const xr=e=>!e||Array.isArray(e)&&!e.length;function br(e){if(xr(e))throw new Error("The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.")}async function _r(e,t){const r=new Error("Timed out in waitForElementToBeRemoved.");if("function"!==typeof e){br(e);const t=(Array.isArray(e)?e:[e]).map((e=>{let t=e.parentElement;if(null===t)return()=>null;for(;t.parentElement;)t=t.parentElement;return()=>t.contains(e)?e:null}));e=()=>t.map((e=>e())).filter(Boolean)}return br(e()),Xe((()=>{let t;try{t=e()}catch(n){if("TestingLibraryElementError"===n.name)return;throw n}if(!xr(t))throw r}),t)}const wr={copy:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},cut:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},paste:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionEnd:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionStart:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionUpdate:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},keyDown:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyPress:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyUp:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},focus:{EventType:"FocusEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},blur:{EventType:"FocusEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},focusIn:{EventType:"FocusEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},focusOut:{EventType:"FocusEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},change:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!1}},input:{EventType:"InputEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},invalid:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!0}},submit:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!0}},reset:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!0}},click:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,button:0,composed:!0}},contextMenu:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dblClick:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drag:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragEnd:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragEnter:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragExit:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragLeave:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragOver:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragStart:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drop:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseDown:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseEnter:{EventType:"MouseEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseLeave:{EventType:"MouseEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseMove:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOut:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOver:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseUp:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},select:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!1}},touchCancel:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},touchEnd:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchMove:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchStart:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},resize:{EventType:"UIEvent",defaultInit:{bubbles:!1,cancelable:!1}},scroll:{EventType:"UIEvent",defaultInit:{bubbles:!1,cancelable:!1}},wheel:{EventType:"WheelEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},abort:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},canPlay:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},canPlayThrough:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},durationChange:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},emptied:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},encrypted:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},ended:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},loadedData:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},loadedMetadata:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},loadStart:{EventType:"ProgressEvent",defaultInit:{bubbles:!1,cancelable:!1}},pause:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},play:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},playing:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},progress:{EventType:"ProgressEvent",defaultInit:{bubbles:!1,cancelable:!1}},rateChange:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},seeked:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},seeking:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},stalled:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},suspend:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},timeUpdate:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},volumeChange:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},waiting:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},load:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},error:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},animationStart:{EventType:"AnimationEvent",defaultInit:{bubbles:!0,cancelable:!1}},animationEnd:{EventType:"AnimationEvent",defaultInit:{bubbles:!0,cancelable:!1}},animationIteration:{EventType:"AnimationEvent",defaultInit:{bubbles:!0,cancelable:!1}},transitionCancel:{EventType:"TransitionEvent",defaultInit:{bubbles:!0,cancelable:!1}},transitionEnd:{EventType:"TransitionEvent",defaultInit:{bubbles:!0,cancelable:!0}},transitionRun:{EventType:"TransitionEvent",defaultInit:{bubbles:!0,cancelable:!1}},transitionStart:{EventType:"TransitionEvent",defaultInit:{bubbles:!0,cancelable:!1}},pointerOver:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerEnter:{EventType:"PointerEvent",defaultInit:{bubbles:!1,cancelable:!1}},pointerDown:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerMove:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerUp:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerCancel:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},pointerOut:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerLeave:{EventType:"PointerEvent",defaultInit:{bubbles:!1,cancelable:!1}},gotPointerCapture:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},lostPointerCapture:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},popState:{EventType:"PopStateEvent",defaultInit:{bubbles:!0,cancelable:!1}},offline:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}},online:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!1}}},kr={doubleClick:"dblClick"};function Tr(e,t){return _e().eventWrapper((()=>{if(!t)throw new Error("Unable to fire an event - please provide an event object.");if(!e)throw new Error('Unable to fire a "'+t.type+'" event - please provide a DOM element.');return e.dispatchEvent(t)}))}function Ar(e,t,r,n){let{EventType:i="Event",defaultInit:a={}}=void 0===n?{}:n;if(!t)throw new Error('Unable to fire a "'+e+'" event - please provide a DOM element.');const o={...a,...r},{target:{value:s,files:l,...u}={}}=o;void 0!==s&&function(e,t){const{set:r}=Object.getOwnPropertyDescriptor(e,"value")||{},n=Object.getPrototypeOf(e),{set:i}=Object.getOwnPropertyDescriptor(n,"value")||{};if(i&&r!==i)i.call(e,t);else{if(!r)throw new Error("The given element does not have a value setter");r.call(e,t)}}(t,s),void 0!==l&&Object.defineProperty(t,"files",{configurable:!0,enumerable:!0,writable:!0,value:l}),Object.assign(t,u);const c=ce(t),f=c[i]||c.Event;let d;if("function"===typeof f)d=new f(e,o);else{d=c.document.createEvent(i);const{bubbles:t,cancelable:r,detail:n,...a}=o;d.initEvent(e,t,r,n),Object.keys(a).forEach((e=>{d[e]=a[e]}))}return["dataTransfer","clipboardData"].forEach((e=>{const t=o[e];"object"===typeof t&&("function"===typeof c.DataTransfer?Object.defineProperty(d,e,{value:Object.getOwnPropertyNames(t).reduce(((e,r)=>(Object.defineProperty(e,r,{value:t[r]}),e)),new c.DataTransfer)}):Object.defineProperty(d,e,{value:t}))})),d}function Mr(e){return"https://testing-playground.com/#markup="+(t=e,q().compressToEncodedURIComponent(t.replace(/[ \t]*[\n][ \t]*/g,"\n")));var t}Object.keys(wr).forEach((e=>{const{EventType:t,defaultInit:r}=wr[e],n=e.toLowerCase();Ar[e]=(e,i)=>Ar(n,e,i,{EventType:t,defaultInit:r}),Tr[e]=(t,r)=>Tr(t,Ar[e](t,r))})),Object.keys(kr).forEach((e=>{const t=kr[e];Tr[e]=function(){return Tr[t](...arguments)}}));const Sr={debug:(e,t,r)=>Array.isArray(e)?e.forEach((e=>ye(e,t,r))):ye(e,t,r),logTestingPlaygroundURL:function(e){if(void 0===e&&(e=ue().body),!e||!("innerHTML"in e))return void console.log("The element you're providing isn't a valid DOM element.");if(!e.innerHTML)return void console.log("The provided element doesn't have any children.");const t=Mr(e.innerHTML);return console.log("Open this URL in your browser\n\n"+t),t}},Er="undefined"!==typeof document&&document.body?yr(document.body,gr,Sr):Object.keys(gr).reduce(((e,t)=>(e[t]=()=>{throw new TypeError("For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error")},e)),Sr)},74107:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_NODE=void 0,t.checkContainerType=function(e){if(!e||"function"!==typeof e.querySelector||"function"!==typeof e.querySelectorAll)throw new TypeError("Expected container to be an Element, a Document or a DocumentFragment but got ".concat(function(e){if("object"===typeof e)return null===e?"null":e.constructor.name;return typeof e}(e),"."))},t.getDocument=function(){if("undefined"===typeof window)throw new Error("Could not find default container");return window.document},t.getWindowFromNode=function(e){if(e.defaultView)return e.defaultView;if(e.ownerDocument&&e.ownerDocument.defaultView)return e.ownerDocument.defaultView;if(e.window)return e.window;throw e.ownerDocument&&null===e.ownerDocument.defaultView?new Error("It looks like the window object is not available for the provided node."):e.then instanceof Function?new Error("It looks like you passed a Promise object instead of a DOM node. Did you do something like `fireEvent.click(screen.findBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`, or await the findBy query `fireEvent.click(await screen.findBy...`?"):Array.isArray(e)?new Error("It looks like you passed an Array instead of a DOM node. Did you do something like `fireEvent.click(screen.getAllBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`?"):"function"===typeof e.debug&&"function"===typeof e.logTestingPlaygroundURL?new Error("It looks like you passed a `screen` object. Did you do something like `fireEvent.click(screen, ...` when you meant to use a query, e.g. `fireEvent.click(screen.getBy..., `?"):new Error("The given node is not an Element, the node type is: ".concat(typeof e,"."))},t.jestFakeTimersAreEnabled=function(){if("undefined"!==typeof jest&&null!==jest)return!0===setTimeout._isMockFunction||Object.prototype.hasOwnProperty.call(setTimeout,"clock");return!1};t.TEXT_NODE=3},3493:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blur=function(e){if(!(0,n.isFocusable)(e))return;if((0,n.getActiveElement)(e.ownerDocument)!==e)return;(0,n.eventWrapper)((()=>e.blur()))};var n=r(80360)},94722:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.click=u,t.dblClick=function(e,t){let{skipPointerEventsCheck:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!r&&!(0,i.hasPointerEvents)(e))throw new Error('unable to double-click element as it has or inherits pointer-events set to "none".');(0,a.hover)(e,t,{skipPointerEventsCheck:r}),u(e,t,{skipHover:!0,clickCount:0,skipPointerEventsCheck:r}),u(e,t,{skipHover:!0,clickCount:1,skipPointerEventsCheck:r}),n.fireEvent.dblClick(e,(0,i.getMouseEventOptions)("dblclick",t,2))};var n=r(21021),i=r(80360),a=r(59604),o=r(3493),s=r(96306);function l(e,t,r){let{clickCount:a}=r;const l=function(e){const t=e.ownerDocument.activeElement;return t&&t!==e.ownerDocument.body&&t!==e?t:null}(e);if(n.fireEvent.pointerDown(e,t),!(0,i.isDisabled)(e)){if(n.fireEvent.mouseDown(e,(0,i.getMouseEventOptions)("mousedown",t,a))){const t=function(e,t){let r=e;do{if(t(r))return r;r=r.parentElement}while(r&&r!==e.ownerDocument.body);return}(e,i.isFocusable);l&&!t?(0,o.blur)(l):t&&(0,s.focus)(t)}}if(n.fireEvent.pointerUp(e,t),!(0,i.isDisabled)(e)){n.fireEvent.mouseUp(e,(0,i.getMouseEventOptions)("mouseup",t,a)),c(e,(0,i.getMouseEventOptions)("click",t,a));const r=e.closest("label");null!=r&&r.control&&(0,s.focus)(r.control)}}function u(e,t){let{skipHover:r=!1,clickCount:o=0,skipPointerEventsCheck:u=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!u&&!(0,i.hasPointerEvents)(e))throw new Error('unable to click element as it has or inherits pointer-events set to "none".');r||(0,a.hover)(e,t,{skipPointerEventsCheck:!0}),(0,i.isElementType)(e,"label")?function(e,t,r){let{clickCount:a}=r;(0,i.isLabelWithInternallyDisabledControl)(e)||(n.fireEvent.pointerDown(e,t),n.fireEvent.mouseDown(e,(0,i.getMouseEventOptions)("mousedown",t,a)),n.fireEvent.pointerUp(e,t),n.fireEvent.mouseUp(e,(0,i.getMouseEventOptions)("mouseup",t,a)),c(e,(0,i.getMouseEventOptions)("click",t,a)),e.control&&(0,s.focus)(e.control))}(e,t,{clickCount:o}):!(0,i.isElementType)(e,"input")||"checkbox"!==e.type&&"radio"!==e.type?l(e,t,{clickCount:o}):function(e,t,r){let{clickCount:a}=r;n.fireEvent.pointerDown(e,t),e.disabled||n.fireEvent.mouseDown(e,(0,i.getMouseEventOptions)("mousedown",t,a)),(0,s.focus)(e),n.fireEvent.pointerUp(e,t),e.disabled||(n.fireEvent.mouseUp(e,(0,i.getMouseEventOptions)("mouseup",t,a)),c(e,(0,i.getMouseEventOptions)("click",t,a)))}(e,t,{clickCount:o})}function c(e,t){2===t.button?n.fireEvent.contextMenu(e,t):n.fireEvent.click(e,t)}},96306:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.focus=function(e){if(!(0,n.isFocusable)(e))return;if((0,n.getActiveElement)(e.ownerDocument)===e)return;(0,n.eventWrapper)((()=>e.focus()))};var n=r(80360)},59604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=function(e,t){let{skipPointerEventsCheck:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!r&&!(0,i.hasPointerEvents)(e))throw new Error('unable to hover element as it has or inherits pointer-events set to "none".');if((0,i.isLabelWithInternallyDisabledControl)(e))return;const o=a(e).reverse();n.fireEvent.pointerOver(e,t);for(const i of o)n.fireEvent.pointerEnter(i,t);if(!(0,i.isDisabled)(e)){n.fireEvent.mouseOver(e,(0,i.getMouseEventOptions)("mouseover",t));for(const e of o)n.fireEvent.mouseEnter(e,(0,i.getMouseEventOptions)("mouseenter",t))}n.fireEvent.pointerMove(e,t),(0,i.isDisabled)(e)||n.fireEvent.mouseMove(e,(0,i.getMouseEventOptions)("mousemove",t))},t.unhover=function(e,t){let{skipPointerEventsCheck:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!r&&!(0,i.hasPointerEvents)(e))throw new Error('unable to unhover element as it has or inherits pointer-events set to "none".');if((0,i.isLabelWithInternallyDisabledControl)(e))return;const o=a(e);n.fireEvent.pointerMove(e,t),(0,i.isDisabled)(e)||n.fireEvent.mouseMove(e,(0,i.getMouseEventOptions)("mousemove",t));n.fireEvent.pointerOut(e,t);for(const i of o)n.fireEvent.pointerLeave(i,t);if(!(0,i.isDisabled)(e)){n.fireEvent.mouseOut(e,(0,i.getMouseEventOptions)("mouseout",t));for(const e of o)n.fireEvent.mouseLeave(e,(0,i.getMouseEventOptions)("mouseleave",t))}};var n=r(21021),i=r(80360);function a(e){const t=[e];let r=e;for(;null!=(r=r.parentElement);)t.push(r);return t}},32528:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getKeyEventProps=function(e,t){var r,n;return{key:e.key,code:e.code,altKey:t.modifiers.alt,ctrlKey:t.modifiers.ctrl,metaKey:t.modifiers.meta,shiftKey:t.modifiers.shift,keyCode:null!=(r=e.keyCode)?r:1===(null==(n=e.key)?void 0:n.length)?e.key.charCodeAt(0):void 0}},t.getMouseEventProps=function(e){return{altKey:e.modifiers.alt,ctrlKey:e.modifiers.ctrl,metaKey:e.modifiers.meta,shiftKey:e.modifiers.shift}}},44369:(e,t)=>{"use strict";var r,n,i;function a(e,t){const r=e[t];return s(r,e,t),{consumedLength:t+=r.length,descriptor:r,releasePrevious:!1,releaseSelf:!0,repeat:1}}function o(e,t,n){var i,a,o;const l="/"===e[t]?"/":"";t+=l.length;const f=null==(i=e.slice(t).match(/^\w+/))?void 0:i[0];s(f,e,t),t+=f.length;const d=null!=(a=null==(o=e.slice(t).match(/^>\d+/))?void 0:o[0])?a:"",h="/"===e[t+=d.length]||!d&&">"===e[t]?e[t]:"";t+=h.length;const p=r[n],v=e[t]===p?p:"";if(!v)throw new Error(c([!d&&"repeat modifier",!h&&"release modifier",'"'.concat(p,'"')].filter(Boolean).join(" or "),e[t],e));return{consumedLength:t+=v.length,descriptor:f,releasePrevious:!!l,repeat:d?Math.max(Number(d.substr(1)),1):1,releaseSelf:u(n,f,h,d)}}function s(e,t,r){if(!e)throw new Error(c("key descriptor",t[r],t))}function l(e,t){return e[t]}function u(e,t,r,i){return r?"/"===r:!i&&("{"!==e||!l(n,t.toLowerCase()))}function c(e,t,r){return"Expected ".concat(e,' but found "').concat(null!=t?t:"",'" in "').concat(r,'"\n See https://github.com/testing-library/user-event/blob/main/README.md#keyboardtext-options\n for more information about how userEvent parses your input.')}Object.defineProperty(t,"__esModule",{value:!0}),t.getNextKeyDef=function(e,t){var n;const{type:s,descriptor:u,consumedLength:c,releasePrevious:f,releaseSelf:d,repeat:h}=function(e){let t=0;const n=e[t]in r?e[t]:"";t+=n.length;const i=n?e.match(new RegExp("^\\".concat(n,"+")))[0].length:0,s=2===i||"{"===n&&i>3?"":n;return{type:s,...""===s?a(e,t):o(e,t,s)}}(e);return{keyDef:null!=(n=t.keyboardMap.find((e=>{var t;if("["===s)return(null==(t=e.code)?void 0:t.toLowerCase())===u.toLowerCase();if("{"===s){var r;const t=function(e){var t;return null!=(t=l(i,e))?t:e}(u);return(null==(r=e.key)?void 0:r.toLowerCase())===t.toLowerCase()}return e.key===u})))?n:{key:"Unknown",code:"Unknown",["["===s?"code":"key"]:u},consumedLength:c,releasePrevious:f,releaseSelf:d,repeat:h}},function(e){e["{"]="}",e["["]="]"}(r||(r={})),function(e){e.alt="alt",e.ctrl="ctrl",e.meta="meta",e.shift="shift"}(n||(n={})),function(e){e.ctrl="Control",e.del="Delete",e.esc="Escape",e.space=" "}(i||(i={}))},2082:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keyboard=function(e,t){var r;const{promise:i,state:a}=s(e,t);return(null!=(r=null==t?void 0:t.delay)?r:0)>0?(0,n.getConfig)().asyncWrapper((()=>i.then((()=>a)))):(i.catch(console.error),a)},t.keyboardImplementationWrapper=s,Object.defineProperty(t,"specialCharMap",{enumerable:!0,get:function(){return o.specialCharMap}});var n=r(21021),i=r(4983),a=r(24971),o=r(89999);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{keyboardState:r=l(),delay:n=0,document:o=document,autoModify:s=!1,keyboardMap:u=a.defaultKeyMap}=t,c={delay:n,document:o,autoModify:s,keyboardMap:u};return{promise:(0,i.keyboardImplementation)(e,c,r),state:r,releaseAllKeys:()=>(0,i.releaseAllKeys)(c,r)}}function l(){return{activeElement:null,pressed:[],carryChar:"",modifiers:{alt:!1,caps:!1,ctrl:!1,meta:!1,shift:!1}}}},24971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultKeyMap=void 0;var n=r(68063);const i=[..."0123456789".split("").map((e=>({code:"Digit".concat(e),key:e}))),...")!@#$%^&*(".split("").map(((e,t)=>({code:"Digit".concat(t),key:e,shiftKey:!0}))),..."abcdefghijklmnopqrstuvwxyz".split("").map((e=>({code:"Key".concat(e.toUpperCase()),key:e}))),..."ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map((e=>({code:"Key".concat(e),key:e,shiftKey:!0}))),{code:"Space",key:" "},{code:"AltLeft",key:"Alt",location:n.DOM_KEY_LOCATION.LEFT,keyCode:18},{code:"AltRight",key:"Alt",location:n.DOM_KEY_LOCATION.RIGHT,keyCode:18},{code:"ShiftLeft",key:"Shift",location:n.DOM_KEY_LOCATION.LEFT,keyCode:16},{code:"ShiftRight",key:"Shift",location:n.DOM_KEY_LOCATION.RIGHT,keyCode:16},{code:"ControlLeft",key:"Control",location:n.DOM_KEY_LOCATION.LEFT,keyCode:17},{code:"ControlRight",key:"Control",location:n.DOM_KEY_LOCATION.RIGHT,keyCode:17},{code:"MetaLeft",key:"Meta",location:n.DOM_KEY_LOCATION.LEFT,keyCode:93},{code:"MetaRight",key:"Meta",location:n.DOM_KEY_LOCATION.RIGHT,keyCode:93},{code:"OSLeft",key:"OS",location:n.DOM_KEY_LOCATION.LEFT,keyCode:91},{code:"OSRight",key:"OS",location:n.DOM_KEY_LOCATION.RIGHT,keyCode:91},{code:"CapsLock",key:"CapsLock",keyCode:20},{code:"Backspace",key:"Backspace",keyCode:8},{code:"Enter",key:"Enter",keyCode:13},{code:"Escape",key:"Escape",keyCode:27},{code:"ArrowUp",key:"ArrowUp",keyCode:38},{code:"ArrowDown",key:"ArrowDown",keyCode:40},{code:"ArrowLeft",key:"ArrowLeft",keyCode:37},{code:"ArrowRight",key:"ArrowRight",keyCode:39},{code:"Home",key:"Home",keyCode:36},{code:"End",key:"End",keyCode:35},{code:"Delete",key:"Delete",keyCode:46},{code:"PageUp",key:"PageUp",keyCode:33},{code:"PageDown",key:"PageDown",keyCode:34}];t.defaultKeyMap=i},4983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keyboardImplementation=async function e(t,r,l){var d;const{document:h}=r,p=()=>u(h),{keyDef:v,consumedLength:m,releasePrevious:g,releaseSelf:y,repeat:x}=null!=(d=l.repeatKey)?d:(0,a.getNextKeyDef)(t,r);if(!f(o.replaceBehavior,v,p(),r,l)){const e=l.pressed.find((e=>e.keyDef===v));if(e&&!l.repeatKey&&c(v,p,r,l,e.unpreventedDefault),!g){const e=function(e,t,r,i){const a=t();a!==i.activeElement&&(i.carryValue=void 0,i.carryChar="");i.activeElement=a,f(o.preKeydownBehavior,e,a,r,i);const l=n.fireEvent.keyDown(a,(0,s.getKeyEventProps)(e,i));i.pressed.push({keyDef:e,unpreventedDefault:l}),l&&f(o.keydownBehavior,e,t(),r,i);return l}(v,p,r,l);e&&function(e,t){var r;return(1===(null==(r=e.key)?void 0:r.length)||"Enter"===e.key)&&!t.modifiers.ctrl&&!t.modifiers.alt}(v,l)&&function(e,t,r,i){const a=t(),l=n.fireEvent.keyPress(a,(0,s.getKeyEventProps)(e,i));l&&f(o.keypressBehavior,e,t(),r,i)}(v,p,r,l),y&&x<=1&&c(v,p,r,l,e)}}x>1?l.repeatKey={consumedLength:0,keyDef:v,releasePrevious:g,releaseSelf:y,repeat:x-1}:delete l.repeatKey;if(t.length>m||x>1)return r.delay>0&&await(0,i.wait)(r.delay),e(t.slice(m),r,l);return},t.releaseAllKeys=function(e,t){const r=()=>u(e.document);for(const n of t.pressed)c(n.keyDef,r,e,t,n.unpreventedDefault)};var n=r(21021),i=r(80360),a=r(44369),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,r&&r.set(e,n);return n}(r(84817)),s=r(32528);function l(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}function u(e){var t;return null!=(t=(0,i.getActiveElement)(e))?t:e.body}function c(e,t,r,i,a){const l=t();f(o.preKeyupBehavior,e,l,r,i);const u=n.fireEvent.keyUp(l,(0,s.getKeyEventProps)(e,i));a&&u&&f(o.keyupBehavior,e,t(),r,i),i.pressed=i.pressed.filter((t=>t.keyDef!==e)),f(o.postKeyupBehavior,e,l,r,i)}function f(e,t,r,n,i){const a=e.find((e=>e.matches(t,r,n,i)));return a&&a.handle(t,r,n,i),!!a}},8292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keydownBehavior=void 0;var n=r(80360);const i=[{matches:(e,t)=>("ArrowLeft"===e.key||"ArrowRight"===e.key)&&(0,n.isElementType)(t,["input","textarea"]),handle:(e,t)=>{var r;const{selectionStart:i,selectionEnd:a}=(0,n.getSelectionRange)(t),o="ArrowLeft"===e.key?-1:1,s=null!=(r=i===a?(null!=i?i:0)+o:o<0?i:a)?r:0;(0,n.setSelectionRange)(t,s,s)}}];t.keydownBehavior=i},70638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keypressBehavior=void 0;var n=r(21021),i=r(37926),a=r(80360);const o=[{matches:(e,t)=>{var r;return 1===(null==(r=e.key)?void 0:r.length)&&(0,a.isElementType)(t,"input",{type:"time",readOnly:!1})},handle:(e,t,r,n)=>{var o;let s=e.key;const l=(null!=(o=n.carryValue)?o:"")+s,u=(0,a.buildTimeValue)(l);(0,a.isValidInputTimeValue)(t,u)&&(s=u);const{newValue:c,newSelectionStart:f}=(0,a.calculateNewValue)(s,t),d=(0,a.getValue)(t);d!==c&&(0,i.fireInputEvent)(t,{newValue:c,newSelectionStart:f,eventOverrides:{data:e.key,inputType:"insertText"}}),(0,i.fireChangeForInputTimeIfValid)(t,d,u),n.carryValue=l}},{matches:(e,t)=>{var r;return 1===(null==(r=e.key)?void 0:r.length)&&(0,a.isElementType)(t,"input",{type:"date",readOnly:!1})},handle:(e,t,r,o)=>{var s;let l=e.key;const u=(null!=(s=o.carryValue)?s:"")+l,c=(0,a.isValidDateValue)(t,u);c&&(l=u);const{newValue:f,newSelectionStart:d}=(0,a.calculateNewValue)(l,t);(0,a.getValue)(t)!==f&&(0,i.fireInputEvent)(t,{newValue:f,newSelectionStart:d,eventOverrides:{data:e.key,inputType:"insertText"}}),c&&n.fireEvent.change(t,{target:{value:u}}),o.carryValue=u}},{matches:(e,t)=>{var r;return 1===(null==(r=e.key)?void 0:r.length)&&(0,a.isElementType)(t,"input",{type:"number",readOnly:!1})},handle:(e,t,r,n)=>{var o,s,l,u;if(!/[\d.\-e]/.test(e.key))return;const c=null!=(o=null!=(s=n.carryValue)?s:(0,a.getValue)(t))?o:"",{newValue:f,newSelectionStart:d}=(0,a.calculateNewValue)(e.key,t,c),h=f.split("e",2);if(Number(null==(l=f.match(/-/g))?void 0:l.length)>2||Number(null==(u=f.match(/\./g))?void 0:u.length)>1||h[1]&&!/^-?\d*$/.test(h[1]))return;(0,i.fireInputEvent)(t,{newValue:f,newSelectionStart:d,eventOverrides:{data:e.key,inputType:"insertText"}});const p=(0,a.getValue)(t);n.carryValue=p===f?void 0:f}},{matches:(e,t)=>{var r;return 1===(null==(r=e.key)?void 0:r.length)&&((0,a.isElementType)(t,["input","textarea"],{readOnly:!1})&&!(0,a.isClickableInput)(t)||(0,a.isContentEditable)(t))&&0!==(0,a.getSpaceUntilMaxLength)(t)},handle:(e,t)=>{const{newValue:r,newSelectionStart:n}=(0,a.calculateNewValue)(e.key,t);(0,i.fireInputEvent)(t,{newValue:r,newSelectionStart:n,eventOverrides:{data:e.key,inputType:"insertText"}})}},{matches:(e,t)=>"Enter"===e.key&&((0,a.isElementType)(t,"textarea",{readOnly:!1})||(0,a.isContentEditable)(t))&&0!==(0,a.getSpaceUntilMaxLength)(t),handle:(e,t,r,n)=>{const{newValue:o,newSelectionStart:s}=(0,a.calculateNewValue)("\n",t),l=(0,a.isContentEditable)(t)&&!n.modifiers.shift?"insertParagraph":"insertLineBreak";(0,i.fireInputEvent)(t,{newValue:o,newSelectionStart:s,eventOverrides:{inputType:l}})}}];t.keypressBehavior=o},34676:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keydownBehavior=void 0;var n=r(80360),i=r(37926);const a=[{matches:(e,t)=>("Home"===e.key||"End"===e.key)&&((0,n.isElementType)(t,["input","textarea"])||(0,n.isContentEditable)(t)),handle:(e,t)=>{if("Home"===e.key)(0,n.setSelectionRange)(t,0,0);else{var r,i;const e=null!=(r=null==(i=(0,n.getValue)(t))?void 0:i.length)?r:0;(0,n.setSelectionRange)(t,e,e)}}},{matches:(e,t)=>("PageUp"===e.key||"PageDown"===e.key)&&(0,n.isElementType)(t,["input"]),handle:(e,t)=>{if("PageUp"===e.key)(0,n.setSelectionRange)(t,0,0);else{var r,i;const e=null!=(r=null==(i=(0,n.getValue)(t))?void 0:i.length)?r:0;(0,n.setSelectionRange)(t,e,e)}}},{matches:(e,t)=>"Delete"===e.key&&(0,n.isEditable)(t)&&!(0,n.isCursorAtEnd)(t),handle:(e,t,r,a)=>{const{newValue:o,newSelectionStart:s}=(0,n.calculateNewValue)("",t,a.carryValue,void 0,"forward");(0,i.fireInputEvent)(t,{newValue:o,newSelectionStart:s,eventOverrides:{inputType:"deleteContentForward"}}),(0,i.carryValue)(t,a,o)}}];t.keydownBehavior=a},23176:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preKeyupBehavior=t.preKeydownBehavior=t.postKeyupBehavior=t.keyupBehavior=t.keypressBehavior=t.keydownBehavior=void 0;var n=r(21021),i=r(80360),a=r(32528),o=r(37926);const s={Alt:"alt",Control:"ctrl",Shift:"shift",Meta:"meta"},l=[...Object.entries(s).map((e=>{let[t,r]=e;return{matches:e=>e.key===t,handle:(e,t,n,i)=>{i.modifiers[r]=!0}}})),{matches:e=>"AltGraph"===e.key,handle:(e,t,r,i)=>{var o;const s=null!=(o=r.keyboardMap.find((e=>"Control"===e.key)))?o:{key:"Control",code:"Control"};n.fireEvent.keyDown(t,(0,a.getKeyEventProps)(s,i))}}];t.preKeydownBehavior=l;const u=[{matches:e=>"CapsLock"===e.key,handle:(e,t,r,n)=>{n.modifiers.caps=!n.modifiers.caps}},{matches:(e,t)=>"Backspace"===e.key&&(0,i.isEditable)(t)&&!(0,i.isCursorAtStart)(t),handle:(e,t,r,n)=>{const{newValue:a,newSelectionStart:s}=(0,i.calculateNewValue)("",t,n.carryValue,void 0,"backward");(0,o.fireInputEvent)(t,{newValue:a,newSelectionStart:s,eventOverrides:{inputType:"deleteContentBackward"}}),(0,o.carryValue)(t,n,a)}}];t.keydownBehavior=u;const c=[{matches:(e,t)=>"Enter"===e.key&&(0,i.isElementType)(t,"input")&&["checkbox","radio"].includes(t.type),handle:(e,t)=>{const r=t.form;(0,i.hasFormSubmit)(r)&&n.fireEvent.submit(r)}},{matches:(e,t)=>"Enter"===e.key&&((0,i.isClickableInput)(t)||(0,i.isElementType)(t,"a")&&Boolean(t.href)),handle:(e,t,r,i)=>{n.fireEvent.click(t,(0,a.getMouseEventProps)(i))}},{matches:(e,t)=>"Enter"===e.key&&(0,i.isElementType)(t,"input"),handle:(e,t)=>{const r=t.form;r&&(1===r.querySelectorAll("input").length||(0,i.hasFormSubmit)(r))&&n.fireEvent.submit(r)}}];t.keypressBehavior=c;const f=[...Object.entries(s).map((e=>{let[t,r]=e;return{matches:e=>e.key===t,handle:(e,t,n,i)=>{i.modifiers[r]=!1}}}))];t.preKeyupBehavior=f;const d=[{matches:(e,t)=>" "===e.key&&(0,i.isClickableInput)(t),handle:(e,t,r,i)=>{n.fireEvent.click(t,(0,a.getMouseEventProps)(i))}}];t.keyupBehavior=d;const h=[{matches:e=>"AltGraph"===e.key,handle:(e,t,r,i)=>{var o;const s=null!=(o=r.keyboardMap.find((e=>"Control"===e.key)))?o:{key:"Control",code:"Control"};n.fireEvent.keyUp(t,(0,a.getKeyEventProps)(s,i))}}];t.postKeyupBehavior=h},84817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceBehavior=t.preKeyupBehavior=t.preKeydownBehavior=t.postKeyupBehavior=t.keyupBehavior=t.keypressBehavior=t.keydownBehavior=void 0;var n=r(80360),i=u(r(8292)),a=u(r(34676)),o=u(r(70638)),s=u(r(23176));function l(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}function u(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}const c=[{matches:(e,t)=>"selectall"===e.key&&(0,n.isElementType)(t,["input","textarea"]),handle:(e,t,r,i)=>{var a;(0,n.setSelectionRange)(t,0,(null!=(a=i.carryValue)?a:t.value).length)}}];t.replaceBehavior=c;const f=[...s.preKeydownBehavior];t.preKeydownBehavior=f;const d=[...i.keydownBehavior,...a.keydownBehavior,...s.keydownBehavior];t.keydownBehavior=d;const h=[...s.keypressBehavior,...o.keypressBehavior];t.keypressBehavior=h;const p=[...s.preKeyupBehavior];t.preKeyupBehavior=p;const v=[...s.keyupBehavior];t.keyupBehavior=v;const m=[...s.postKeyupBehavior];t.postKeyupBehavior=m},17872:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.carryValue=function(e,t,r){const i=(0,n.getValue)(e);t.carryValue=i!==r&&""===i&&(0,n.hasUnreliableEmptyValue)(e)?r:void 0};var n=r(80360)},29761:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fireChangeForInputTimeIfValid=function(e,t,r){(0,i.isValidInputTimeValue)(e,r)&&t!==r&&n.fireEvent.change(e,{target:{value:r}})};var n=r(21021),i=r(80360)},40072:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fireInputEvent=function(e,t){let{newValue:r,newSelectionStart:a,eventOverrides:o}=t;if((0,i.isContentEditable)(e))s(e,"textContent",r);else{if(!(0,i.isElementType)(e,["input","textarea"]))throw new Error("Invalid Element");s(e,"value",r)}(function(e,t){(0,i.setSelectionRange)(e,t,t)})(e,a),n.fireEvent.input(e,{...o}),function(e,t,r){const n=(0,i.getValue)(e),a=""===n&&(0,i.hasUnreliableEmptyValue)(e);if(!a&&n===t){const{selectionStart:t}=(0,i.getSelectionRange)(e);t===n.length&&(0,i.setSelectionRange)(e,r,r)}}(e,r,a)};var n=r(21021),i=r(80360);const a=Symbol("initial input value/textContent"),o=Symbol("onBlur");function s(e,t,r){const i=Object.getOwnPropertyDescriptor(e,t),s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);var l;(i&&s&&Object.defineProperty(e,t,s),void 0===e[a]&&(e[a]=String(e[t])),e[t]=r,e[o])||(null==(l=e.ownerDocument.defaultView)||l.addEventListener("blur",e[o]=()=>{const r=e[a];delete e[o],delete e[a],String(e[t])!==r&&n.fireEvent.change(e)},{capture:!0,once:!0}));i&&Object.defineProperty(e,t,i)}},37926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17872);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var i=r(29761);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var a=r(40072);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}))},89999:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.specialCharMap=void 0;t.specialCharMap={arrowLeft:"{arrowleft}",arrowRight:"{arrowright}",arrowDown:"{arrowdown}",arrowUp:"{arrowup}",enter:"{enter}",escape:"{esc}",delete:"{del}",backspace:"{backspace}",home:"{home}",end:"{end}",selectAll:"{selectall}",space:"{space}",whitespace:" ",pageUp:"{pageUp}",pageDown:"{pageDown}"}},68063:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.DOM_KEY_LOCATION=void 0,t.DOM_KEY_LOCATION=r,function(e){e[e.STANDARD=0]="STANDARD",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.NUMPAD=3]="NUMPAD"}(r||(t.DOM_KEY_LOCATION=r={}))},60211:(e,t,r)=>{"use strict";var n=r(21021),i=r(85629)},85629:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typeImplementation=async function(e,t,r){let{delay:o,skipClick:s=!1,skipAutoClose:l=!1,initialSelectionStart:u,initialSelectionEnd:c}=r;if(e.disabled)return;s||(0,i.click)(e);const f=()=>(0,n.getActiveElement)(e.ownerDocument),d=(0,n.getValue)(f()),{selectionStart:h,selectionEnd:p}=(0,n.getSelectionRange)(e);null==d||null!==h&&0!==h||null!==p&&0!==p||(0,n.setSelectionRange)(f(),null!=u?u:d.length,null!=c?c:d.length);const{promise:v,releaseAllKeys:m}=(0,a.keyboardImplementationWrapper)(t,{delay:o,document:e.ownerDocument});o>0&&await v;l||m();return v};var n=r(80360),i=r(94722),a=r(2082)},95462:(e,t)=>{"use strict";function r(e){return"mousedown"===e||"mouseup"===e||"click"===e||"dblclick"===e}Object.defineProperty(t,"__esModule",{value:!0}),t.getMouseEventOptions=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;var n;return t=null!=(n=t)?n:{},{...t,detail:"mousedown"===e||"mouseup"===e||"click"===e?1+r:r,buttons:o(e,t,"buttons"),button:o(e,t,"button")}};const n={none:0,primary:1,secondary:2,auxiliary:4},i={primary:0,auxiliary:1,secondary:2};function a(e,t){var r;const[a,o]="button"===t?[i,n]:[n,i],s=null==(r=Object.entries(a).find((t=>{let[,r]=t;return r===e})))?void 0:r[0];return s&&Object.prototype.hasOwnProperty.call(o,s)?o[s]:0}function o(e,t,n){return r(e)?"number"===typeof t[n]?t[n]:"button"===n&&"number"===typeof t.buttons?a(t.buttons,"buttons"):"buttons"===n&&"number"===typeof t.button?a(t.button,"button"):"button"!=n&&r(e)?1:0:0}},48795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isClickableInput=function(e){return(0,n.isElementType)(e,"button")||(0,n.isElementType)(e,"input")&&i.includes(e.type)};var n=r(68761);const i=["button","color","file","image","reset","submit","checkbox","radio"]},56831:(e,t)=>{"use strict";function r(e,t){const r=e.slice(0,t),n=Math.min(parseInt(r,10),23),i=e.slice(t),a=parseInt(i,10),o=Math.min(a,59);return"".concat(n.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))}Object.defineProperty(t,"__esModule",{value:!0}),t.buildTimeValue=function(e){const t=e.replace(/\D/g,"");if(t.length<2)return e;const n=parseInt(t[0],10),i=parseInt(t[1],10);if(n>=3||2===n&&i>=4){let e;return e=n>=3?1:2,r(t,e)}if(2===e.length)return e;return r(t,2)}},80414:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNewValue=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(()=>{var e;return null!=(e=(0,i.getValue)(t))?e:""})(),s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:(0,n.getSelectionRange)(t),l=arguments.length>4?arguments[4]:void 0;const u=null===s.selectionStart?r.length:s.selectionStart,c=null===s.selectionEnd?r.length:s.selectionEnd,f=Math.max(0,u===c&&"backward"===l?u-1:u),d=r.substring(0,f),h=Math.min(r.length,u===c&&"forward"===l?c+1:c),p=r.substring(h,r.length);let v="".concat(d).concat(e).concat(p);const m=f+e.length;"date"!==t.type||(0,a.isValidDateValue)(t,v)||(v=r);"time"!==t.type||(0,o.isValidInputTimeValue)(t,v)||(v=(0,o.isValidInputTimeValue)(t,e)?e:r);return{newValue:v,newSelectionStart:m}};var n=r(42178),i=r(14412),a=r(90734),o=r(68621)},26288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCursorAtEnd=function(e){var t;const{selectionStart:r,selectionEnd:a}=(0,n.getSelectionRange)(e);return r===a&&(null!=r?r:0)===(null!=(t=(0,i.getValue)(e))?t:"").length},t.isCursorAtStart=function(e){const{selectionStart:t,selectionEnd:r}=(0,n.getSelectionRange)(e);return t===r&&0===(null!=t?t:0)};var n=r(42178),i=r(14412)},14412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValue=function(e){if(!e)return null;if((0,n.isContentEditable)(e))return e.textContent;return e.value};var n=r(99148)},25350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasUnreliableEmptyValue=function(e){return(0,i.isElementType)(e,"input")&&Boolean(n[e.type])};var n,i=r(68761);!function(e){e.number="number"}(n||(n={}))},99148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isContentEditable=function(e){return e.hasAttribute("contenteditable")&&("true"==e.getAttribute("contenteditable")||""==e.getAttribute("contenteditable"))}},53241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editableInputTypes=void 0,t.isEditable=function(e){return o(e)||(0,n.isElementType)(e,"textarea",{readOnly:!1})||(0,i.isContentEditable)(e)},t.isEditableInput=o;var n=r(68761),i=r(99148);let a;function o(e){return(0,n.isElementType)(e,"input",{readOnly:!1})&&Boolean(a[e.type])}t.editableInputTypes=a,function(e){e.text="text",e.date="date",e["datetime-local"]="datetime-local",e.email="email",e.month="month",e.number="number",e.password="password",e.search="search",e.tel="tel",e.time="time",e.url="url",e.week="week"}(a||(t.editableInputTypes=a={}))},90734:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDateValue=function(e,t){const r=e.cloneNode();return r.value=t,r.value===t}},68621:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidInputTimeValue=function(e,t){const r=e.cloneNode();return r.value=t,r.value===t}},55127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSpaceUntilMaxLength=function(e){const t=(0,a.getValue)(e);if(null===t)return;const r=function(e){var t;if(!function(e){return(0,i.isElementType)(e,"textarea")||(0,i.isElementType)(e,"input")&&Boolean(n[e.type])}(e))return;const r=null!=(t=e.getAttribute("maxlength"))?t:"";return/^\d+$/.test(r)&&Number(r)>=0?Number(r):void 0}(e);return r?r-t.length:void 0};var n,i=r(68761),a=r(14412);!function(e){e.email="email",e.password="password",e.search="search",e.telephone="telephone",e.text="text",e.url="url"}(n||(n={}))},42178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionRange=s,t.hasSelectionSupport=o,t.setSelectionRange=function(e,t,r){const{selectionStart:n,selectionEnd:l}=s(e);if(n===t&&l===r)return;o(e)&&e.setSelectionRange(t,r);(0,i.isElementType)(e,"input")&&(e[a]={selectionStart:t,selectionEnd:r});if((0,i.isElementType)(e,"input")||(0,i.isElementType)(e,"textarea"))return;const u=e.ownerDocument.createRange();u.selectNodeContents(e),e.firstChild&&(u.setStart(e.firstChild,t),u.setEnd(e.firstChild,r));const c=e.ownerDocument.getSelection();c&&(c.removeAllRanges(),c.addRange(u))};var n,i=r(68761);!function(e){e.text="text",e.search="search",e.url="url",e.tel="tel",e.password="password"}(n||(n={}));const a=Symbol("inputSelection");function o(e){return(0,i.isElementType)(e,"textarea")||(0,i.isElementType)(e,"input")&&Boolean(n[e.type])}function s(e){if(o(e))return{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd};var t;if((0,i.isElementType)(e,"input"))return null!=(t=e[a])?t:{selectionStart:null,selectionEnd:null};const r=e.ownerDocument.getSelection();if(null!=r&&r.rangeCount&&e.contains(r.focusNode)){const e=r.getRangeAt(0);return{selectionStart:e.startOffset,selectionEnd:e.endOffset}}return{selectionStart:null,selectionEnd:null}}},11349:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getActiveElement=function e(t){const r=t.activeElement;return null!=r&&r.shadowRoot?e(r.shadowRoot):(0,n.isDisabled)(r)?t.ownerDocument?t.ownerDocument.body:t.body:r};var n=r(11385)},25083:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFocusable=function(e){return!(0,n.isLabelWithInternallyDisabledControl)(e)&&e.matches(i.FOCUSABLE_SELECTOR)};var n=r(68960),i=r(11642)},11642:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FOCUSABLE_SELECTOR=void 0;const r=["input:not([type=hidden]):not([disabled])","button:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[contenteditable=""]','[contenteditable="true"]',"a[href]","[tabindex]:not([disabled])"].join(", ");t.FOCUSABLE_SELECTOR=r},80360:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95462);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var i=r(48795);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var a=r(56831);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=r(80414);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var s=r(26288);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var l=r(14412);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var u=r(25350);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(99148);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var f=r(53241);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var d=r(90734);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var h=r(68621);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=r(55127);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var v=r(42178);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var m=r(11349);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===m[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}}))}));var g=r(25083);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var y=r(11642);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var x=r(48922);Object.keys(x).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===x[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return x[e]}}))}));var b=r(68761);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===b[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}}))}));var _=r(68960);Object.keys(_).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===_[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return _[e]}}))}));var w=r(60583);Object.keys(w).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===w[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return w[e]}}))}));var k=r(11385);Object.keys(k).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===k[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return k[e]}}))}));var T=r(45368);Object.keys(T).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===T[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return T[e]}}))}));var A=r(38740);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var M=r(56433);Object.keys(M).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===M[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return M[e]}}))}));var S=r(12571);Object.keys(S).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===S[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return S[e]}}))}))},48922:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.eventWrapper=function(e){let t;return(0,n.getConfig)().eventWrapper((()=>{t=e()})),t};var n=r(21021)},12571:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasFormSubmit=void 0;t.hasFormSubmit=e=>!(!e||!e.querySelector('input[type="submit"]')&&!e.querySelector('button[type="submit"]'))},56433:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasPointerEvents=function(e){const t=(0,n.getWindowFromNode)(e);for(let n=e;null!=(r=n)&&r.ownerDocument;n=n.parentElement){var r;const e=t.getComputedStyle(n).pointerEvents;if(e&&!["inherit","unset"].includes(e))return"none"!==e}return!0};var n=r(74107)},11385:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDisabled=function(e){return Boolean(e&&e.disabled)}},45368:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDocument=function(e){return e.nodeType===e.DOCUMENT_NODE}},68761:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isElementType=function(e,t,r){if(e.namespaceURI&&"http://www.w3.org/1999/xhtml"!==e.namespaceURI)return!1;if(!(t=Array.isArray(t)?t:[t]).includes(e.tagName.toLowerCase()))return!1;if(r)return Object.entries(r).every((t=>{let[r,n]=t;return e[r]===n}));return!0}},68960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLabelWithInternallyDisabledControl=function(e){if(!(0,i.isElementType)(e,"label"))return!1;const t=e.control;return Boolean(t&&e.contains(t)&&(0,n.isDisabled)(t))};var n=r(11385),i=r(68761)},60583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVisible=function(e){const t=(0,n.getWindowFromNode)(e);for(let n=e;null!=(r=n)&&r.ownerDocument;n=n.parentElement){var r;if("none"===t.getComputedStyle(n).display)return!1}return!0};var n=r(74107)},38740:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wait=function(e){return new Promise((t=>setTimeout((()=>t()),e)))}},76649:e=>{"use strict";e.exports=function(){let{onlyFirst:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}},58711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(17029))&&n.__esModule?n:{default:n};function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(l){s=!0,i=l}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"===typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw a}}}}(l);try{for(n.s();!(t=n.n()).done;){var i=a(t.value,2),s=i[0],u=i[1];e.call(r,u,s,l)}}catch(c){n.e(c)}finally{n.f()}},get:function(e){var t=l.find((function(t){return t[0]===e}));return t&&t[1]},has:function(e){return!!u.get(e)},keys:function(){return l.map((function(e){return a(e,1)[0]}))},values:function(){return l.map((function(e){return a(e,2)[1]}))}},c=(0,i.default)(u,u.entries());t.default=c},90464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(17029))&&n.__esModule?n:{default:n};function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(l){s=!0,i=l}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"===typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw a}}}}(l);try{for(n.s();!(t=n.n()).done;){var i=a(t.value,2),s=i[0],u=i[1];e.call(r,u,s,l)}}catch(c){n.e(c)}finally{n.f()}},get:function(e){var t=l.find((function(t){return t[0]===e}));return t&&t[1]},has:function(e){return!!u.get(e)},keys:function(){return l.map((function(e){return a(e,1)[0]}))},values:function(){return l.map((function(e){return a(e,2)[1]}))}},c=(0,i.default)(u,u.entries());t.default=c},4704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(67293),i=o(r(17029)),a=o(r(47463));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(l){s=!0,i=l}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(c);try{for(n.s();!(t=n.n()).done;){var i=s(t.value,2),a=i[0],o=i[1];e.call(r,o,a,c)}}catch(u){n.e(u)}finally{n.f()}},get:function(e){var t=c.find((function(t){return e.name===t[0].name&&(0,n.dequal)(e.attributes,t[0].attributes)}));return t&&t[1]},has:function(e){return!!y.get(e)},keys:function(){return c.map((function(e){return s(e,1)[0]}))},values:function(){return c.map((function(e){return s(e,2)[1]}))}},x=(0,i.default)(y,y.entries());t.default=x},25903:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget"]]};t.default=r},49881:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-activedescendant":null,"aria-disabled":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget"]]};t.default=r},79902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null},relatedConcepts:[{concept:{name:"input"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget"]]};t.default=r},38336:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},27703:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]};t.default=r},48696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:[],prohibitedProps:[],props:{"aria-atomic":null,"aria-busy":null,"aria-controls":null,"aria-current":null,"aria-describedby":null,"aria-details":null,"aria-dropeffect":null,"aria-flowto":null,"aria-grabbed":null,"aria-hidden":null,"aria-keyshortcuts":null,"aria-label":null,"aria-labelledby":null,"aria-live":null,"aria-owns":null,"aria-relevant":null,"aria-roledescription":null},relatedConcepts:[{concept:{name:"role"},module:"XHTML"},{concept:{name:"type"},module:"Dublin Core"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[]};t.default=r},82417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:[],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"frontmatter"},module:"DTB"},{concept:{name:"level"},module:"DTB"},{concept:{name:"level"},module:"SMIL"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]};t.default=r},64263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]};t.default=r},4980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-orientation":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","composite"],["roletype","structure","section","group"]]};t.default=r},81831:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:[],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype"]]};t.default=r},60924:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:[],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype"]]};t.default=r},89156:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!0,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-modal":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype"]]};t.default=r},31883:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=v(r(25903)),i=v(r(49881)),a=v(r(79902)),o=v(r(38336)),s=v(r(27703)),l=v(r(48696)),u=v(r(82417)),c=v(r(64263)),f=v(r(4980)),d=v(r(81831)),h=v(r(60924)),p=v(r(89156));function v(e){return e&&e.__esModule?e:{default:e}}var m=[["command",n.default],["composite",i.default],["input",a.default],["landmark",o.default],["range",s.default],["roletype",l.default],["section",u.default],["sectionhead",c.default],["select",f.default],["structure",d.default],["widget",h.default],["window",p.default]];t.default=m},53568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=q(r(48815)),i=q(r(94523)),a=q(r(38135)),o=q(r(48496)),s=q(r(80314)),l=q(r(71240)),u=q(r(41441)),c=q(r(38265)),f=q(r(27564)),d=q(r(26447)),h=q(r(79258)),p=q(r(96982)),v=q(r(89360)),m=q(r(52635)),g=q(r(387)),y=q(r(62824)),x=q(r(50755)),b=q(r(3685)),_=q(r(7377)),w=q(r(91892)),k=q(r(37579)),T=q(r(12393)),A=q(r(99051)),M=q(r(62801)),S=q(r(69722)),E=q(r(50033)),C=q(r(43369)),L=q(r(90816)),P=q(r(35229)),O=q(r(12355)),I=q(r(80698)),R=q(r(51204)),D=q(r(20237)),z=q(r(39160)),F=q(r(21132)),N=q(r(58147)),B=q(r(85721)),j=q(r(73964)),U=q(r(37163));function q(e){return e&&e.__esModule?e:{default:e}}var V=[["doc-abstract",n.default],["doc-acknowledgments",i.default],["doc-afterword",a.default],["doc-appendix",o.default],["doc-backlink",s.default],["doc-biblioentry",l.default],["doc-bibliography",u.default],["doc-biblioref",c.default],["doc-chapter",f.default],["doc-colophon",d.default],["doc-conclusion",h.default],["doc-cover",p.default],["doc-credit",v.default],["doc-credits",m.default],["doc-dedication",g.default],["doc-endnote",y.default],["doc-endnotes",x.default],["doc-epigraph",b.default],["doc-epilogue",_.default],["doc-errata",w.default],["doc-example",k.default],["doc-footnote",T.default],["doc-foreword",A.default],["doc-glossary",M.default],["doc-glossref",S.default],["doc-index",E.default],["doc-introduction",C.default],["doc-noteref",L.default],["doc-notice",P.default],["doc-pagebreak",O.default],["doc-pagelist",I.default],["doc-part",R.default],["doc-preface",D.default],["doc-prologue",z.default],["doc-pullquote",F.default],["doc-qna",N.default],["doc-subtitle",B.default],["doc-tip",j.default],["doc-toc",U.default]];t.default=V},26746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(29913)),i=o(r(98935)),a=o(r(81316));function o(e){return e&&e.__esModule?e:{default:e}}var s=[["graphics-document",n.default],["graphics-object",i.default],["graphics-symbol",a.default]];t.default=s},87886:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=Oe(r(50097)),i=Oe(r(1681)),a=Oe(r(84921)),o=Oe(r(45677)),s=Oe(r(76249)),l=Oe(r(16892)),u=Oe(r(45451)),c=Oe(r(10693)),f=Oe(r(27811)),d=Oe(r(13566)),h=Oe(r(5418)),p=Oe(r(64900)),v=Oe(r(25780)),m=Oe(r(47833)),g=Oe(r(41474)),y=Oe(r(3590)),x=Oe(r(50261)),b=Oe(r(43055)),_=Oe(r(98908)),w=Oe(r(72126)),k=Oe(r(79521)),T=Oe(r(32091)),A=Oe(r(55999)),M=Oe(r(91121)),S=Oe(r(61154)),E=Oe(r(55615)),C=Oe(r(66819)),L=Oe(r(7588)),P=Oe(r(98729)),O=Oe(r(19448)),I=Oe(r(22330)),R=Oe(r(56815)),D=Oe(r(71623)),z=Oe(r(20126)),F=Oe(r(97872)),N=Oe(r(34837)),B=Oe(r(61530)),j=Oe(r(69974)),U=Oe(r(75383)),q=Oe(r(44497)),V=Oe(r(24904)),H=Oe(r(17999)),G=Oe(r(18039)),W=Oe(r(54774)),Y=Oe(r(93172)),Z=Oe(r(78086)),X=Oe(r(52725)),K=Oe(r(14709)),J=Oe(r(2107)),$=Oe(r(838)),Q=Oe(r(69745)),ee=Oe(r(12231)),te=Oe(r(60123)),re=Oe(r(39372)),ne=Oe(r(52165)),ie=Oe(r(43987)),ae=Oe(r(8715)),oe=Oe(r(41296)),se=Oe(r(96046)),le=Oe(r(94945)),ue=Oe(r(94243)),ce=Oe(r(27306)),fe=Oe(r(49128)),de=Oe(r(18618)),he=Oe(r(38891)),pe=Oe(r(4973)),ve=Oe(r(58008)),me=Oe(r(17854)),ge=Oe(r(25483)),ye=Oe(r(97083)),xe=Oe(r(56928)),be=Oe(r(41571)),_e=Oe(r(71336)),we=Oe(r(81192)),ke=Oe(r(12189)),Te=Oe(r(99887)),Ae=Oe(r(58718)),Me=Oe(r(69326)),Se=Oe(r(80276)),Ee=Oe(r(98508)),Ce=Oe(r(847)),Le=Oe(r(28591)),Pe=Oe(r(92024));function Oe(e){return e&&e.__esModule?e:{default:e}}var Ie=[["alert",n.default],["alertdialog",i.default],["application",a.default],["article",o.default],["banner",s.default],["blockquote",l.default],["button",u.default],["caption",c.default],["cell",f.default],["checkbox",d.default],["code",h.default],["columnheader",p.default],["combobox",v.default],["complementary",m.default],["contentinfo",g.default],["definition",y.default],["deletion",x.default],["dialog",b.default],["directory",_.default],["document",w.default],["emphasis",k.default],["feed",T.default],["figure",A.default],["form",M.default],["generic",S.default],["grid",E.default],["gridcell",C.default],["group",L.default],["heading",P.default],["img",O.default],["insertion",I.default],["link",R.default],["list",D.default],["listbox",z.default],["listitem",F.default],["log",N.default],["main",B.default],["mark",j.default],["marquee",U.default],["math",q.default],["menu",V.default],["menubar",H.default],["menuitem",G.default],["menuitemcheckbox",W.default],["menuitemradio",Y.default],["meter",Z.default],["navigation",X.default],["none",K.default],["note",J.default],["option",$.default],["paragraph",Q.default],["presentation",ee.default],["progressbar",te.default],["radio",re.default],["radiogroup",ne.default],["region",ie.default],["row",ae.default],["rowgroup",oe.default],["rowheader",se.default],["scrollbar",le.default],["search",ue.default],["searchbox",ce.default],["separator",fe.default],["slider",de.default],["spinbutton",he.default],["status",pe.default],["strong",ve.default],["subscript",me.default],["superscript",ge.default],["switch",ye.default],["tab",xe.default],["table",be.default],["tablist",_e.default],["tabpanel",we.default],["term",ke.default],["textbox",Te.default],["time",Ae.default],["timer",Me.default],["toolbar",Se.default],["tooltip",Ee.default],["tree",Ce.default],["treegrid",Le.default],["treeitem",Pe.default]];t.default=Ie},48815:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"abstract [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},94523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"acknowledgments [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},38135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"afterword [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},48496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"appendix [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},80314:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"referrer [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command","link"]]};t.default=r},71240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"EPUB biblioentry [EPUB-SSV]"},module:"EPUB"}],requireContextRole:["doc-bibliography"],requiredContextRole:["doc-bibliography"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","listitem"]]};t.default=r},41441:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"bibliography [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["doc-biblioentry"]],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},38265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"biblioref [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command","link"]]};t.default=r},27564:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"chapter [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},26447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"colophon [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},79258:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"conclusion [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},96982:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"cover [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","img"]]};t.default=r},89360:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"credit [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},52635:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"credits [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},387:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"dedication [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},62824:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"rearnote [EPUB-SSV]"},module:"EPUB"}],requireContextRole:["doc-endnotes"],requiredContextRole:["doc-endnotes"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","listitem"]]};t.default=r},50755:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"rearnotes [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["doc-endnote"]],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},3685:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"epigraph [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},7377:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"epilogue [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},91892:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"errata [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},37579:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},12393:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"footnote [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},99051:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"foreword [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},62801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"glossary [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["definition"],["term"]],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},69722:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"glossref [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command","link"]]};t.default=r},50033:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"index [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark","navigation"]]};t.default=r},43369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"introduction [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},90816:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"noteref [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command","link"]]};t.default=r},35229:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"notice [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","note"]]};t.default=r},12355:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"pagebreak [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","separator"]]};t.default=r},80698:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"page-list [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark","navigation"]]};t.default=r},51204:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"part [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},20237:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"preface [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},39160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"prologue [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},21132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"pullquote [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["none"]]};t.default=r},58147:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"qna [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},85721:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"subtitle [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","sectionhead"]]};t.default=r},73964:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"help [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","note"]]};t.default=r},37163:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"toc [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark","navigation"]]};t.default=r},29913:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{module:"GRAPHICS",concept:{name:"graphics-object"}},{module:"ARIA",concept:{name:"img"}},{module:"ARIA",concept:{name:"article"}}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","document"]]};t.default=r},98935:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{module:"GRAPHICS",concept:{name:"graphics-document"}},{module:"ARIA",concept:{name:"group"}},{module:"ARIA",concept:{name:"img"}},{module:"GRAPHICS",concept:{name:"graphics-symbol"}}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","group"]]};t.default=r},81316:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","img"]]};t.default=r},50097:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-atomic":"true","aria-live":"assertive"},relatedConcepts:[{concept:{name:"alert"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},1681:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"alert"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","alert"],["roletype","window","dialog"]]};t.default=r},84921:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-activedescendant":null,"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"Device Independence Delivery Unit"}}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]};t.default=r},45677:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-posinset":null,"aria-setsize":null},relatedConcepts:[{concept:{name:"article"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","document"]]};t.default=r},76249:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{constraints:["scoped to the body element"],name:"header"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},16892:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"blockquote"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},45451:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-disabled":null,"aria-expanded":null,"aria-haspopup":null,"aria-pressed":null},relatedConcepts:[{concept:{attributes:[{name:"type",value:"button"}],name:"input"},module:"HTML"},{concept:{attributes:[{name:"type",value:"image"}],name:"input"},module:"HTML"},{concept:{attributes:[{name:"type",value:"reset"}],name:"input"},module:"HTML"},{concept:{attributes:[{name:"type",value:"submit"}],name:"input"},module:"HTML"},{concept:{name:"button"},module:"HTML"},{concept:{name:"trigger"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command"]]};t.default=r},10693:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"caption"},module:"HTML"}],requireContextRole:["figure","grid","table"],requiredContextRole:["figure","grid","table"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},27811:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-colindex":null,"aria-colspan":null,"aria-rowindex":null,"aria-rowspan":null},relatedConcepts:[{concept:{constraints:["ancestor table element has table role"],name:"td"},module:"HTML"}],requireContextRole:["row"],requiredContextRole:["row"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},13566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-checked":null,"aria-errormessage":null,"aria-expanded":null,"aria-invalid":null,"aria-readonly":null,"aria-required":null},relatedConcepts:[{concept:{attributes:[{name:"type",value:"checkbox"}],name:"input"},module:"HTML"},{concept:{name:"option"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-checked":null},superClass:[["roletype","widget","input"]]};t.default=r},5418:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"code"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},64900:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-sort":null},relatedConcepts:[{concept:{name:"th"},module:"HTML"},{concept:{attributes:[{name:"scope",value:"col"}],name:"th"},module:"HTML"},{concept:{attributes:[{name:"scope",value:"colgroup"}],name:"th"},module:"HTML"}],requireContextRole:["row"],requiredContextRole:["row"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","cell"],["roletype","structure","section","cell","gridcell"],["roletype","widget","gridcell"],["roletype","structure","sectionhead"]]};t.default=r},25780:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-activedescendant":null,"aria-autocomplete":null,"aria-errormessage":null,"aria-invalid":null,"aria-readonly":null,"aria-required":null,"aria-expanded":"false","aria-haspopup":"listbox"},relatedConcepts:[{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"email"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"search"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"tel"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"text"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"url"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"list"},{name:"type",value:"url"}],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"multiple"},{constraints:["undefined"],name:"size"}],constraints:["the multiple attribute is not set and the size attribute does not have a value greater than 1"],name:"select"},module:"HTML"},{concept:{name:"select"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-controls":null,"aria-expanded":"false"},superClass:[["roletype","widget","input"]]};t.default=r},47833:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"aside"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"aria-label"}],constraints:["scoped to a sectioning content element","scoped to a sectioning root element other than body"],name:"aside"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"aria-labelledby"}],constraints:["scoped to a sectioning content element","scoped to a sectioning root element other than body"],name:"aside"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},41474:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{constraints:["scoped to the body element"],name:"footer"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},3590:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"dd"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},50261:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"del"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},43055:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"dialog"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","window"]]};t.default=r},98908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{module:"DAISY Guide"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","list"]]};t.default=r},72126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"Device Independence Delivery Unit"}},{concept:{name:"html"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]};t.default=r},79521:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"em"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},32091:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["article"]],requiredProps:{},superClass:[["roletype","structure","section","list"]]};t.default=r},55999:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"figure"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},91121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{attributes:[{constraints:["set"],name:"aria-label"}],name:"form"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"aria-labelledby"}],name:"form"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"name"}],name:"form"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},61154:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"a"},module:"HTML"},{concept:{name:"area"},module:"HTML"},{concept:{name:"aside"},module:"HTML"},{concept:{name:"b"},module:"HTML"},{concept:{name:"bdo"},module:"HTML"},{concept:{name:"body"},module:"HTML"},{concept:{name:"data"},module:"HTML"},{concept:{name:"div"},module:"HTML"},{concept:{constraints:["scoped to the main element","scoped to a sectioning content element","scoped to a sectioning root element other than body"],name:"footer"},module:"HTML"},{concept:{constraints:["scoped to the main element","scoped to a sectioning content element","scoped to a sectioning root element other than body"],name:"header"},module:"HTML"},{concept:{name:"hgroup"},module:"HTML"},{concept:{name:"i"},module:"HTML"},{concept:{name:"pre"},module:"HTML"},{concept:{name:"q"},module:"HTML"},{concept:{name:"samp"},module:"HTML"},{concept:{name:"section"},module:"HTML"},{concept:{name:"small"},module:"HTML"},{concept:{name:"span"},module:"HTML"},{concept:{name:"u"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]};t.default=r},55615:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-multiselectable":null,"aria-readonly":null},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["row"],["row","rowgroup"]],requiredProps:{},superClass:[["roletype","widget","composite"],["roletype","structure","section","table"]]};t.default=r},66819:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null,"aria-readonly":null,"aria-required":null,"aria-selected":null},relatedConcepts:[{concept:{constraints:["ancestor table element has grid role","ancestor table element has treegrid role"],name:"td"},module:"HTML"}],requireContextRole:["row"],requiredContextRole:["row"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","cell"],["roletype","widget"]]};t.default=r},7588:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-activedescendant":null,"aria-disabled":null},relatedConcepts:[{concept:{name:"details"},module:"HTML"},{concept:{name:"fieldset"},module:"HTML"},{concept:{name:"optgroup"},module:"HTML"},{concept:{name:"address"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},98729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-level":"2"},relatedConcepts:[{concept:{name:"h1"},module:"HTML"},{concept:{name:"h2"},module:"HTML"},{concept:{name:"h3"},module:"HTML"},{concept:{name:"h4"},module:"HTML"},{concept:{name:"h5"},module:"HTML"},{concept:{name:"h6"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-level":"2"},superClass:[["roletype","structure","sectionhead"]]};t.default=r},19448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{attributes:[{constraints:["set"],name:"alt"}],name:"img"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"alt"}],name:"img"},module:"HTML"},{concept:{name:"imggroup"},module:"DTB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},22330:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"ins"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},56815:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-disabled":null,"aria-expanded":null,"aria-haspopup":null},relatedConcepts:[{concept:{attributes:[{constraints:["set"],name:"href"}],name:"a"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"href"}],name:"area"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command"]]};t.default=r},71623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"menu"},module:"HTML"},{concept:{name:"ol"},module:"HTML"},{concept:{name:"ul"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["listitem"]],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},20126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-expanded":null,"aria-invalid":null,"aria-multiselectable":null,"aria-readonly":null,"aria-required":null,"aria-orientation":"vertical"},relatedConcepts:[{concept:{attributes:[{constraints:[">1"],name:"size"}],constraints:["the size attribute value is greater than 1"],name:"select"},module:"HTML"},{concept:{attributes:[{name:"multiple"}],name:"select"},module:"HTML"},{concept:{name:"datalist"},module:"HTML"},{concept:{name:"list"},module:"ARIA"},{concept:{name:"select"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["option","group"],["option"]],requiredProps:{},superClass:[["roletype","widget","composite","select"],["roletype","structure","section","group","select"]]};t.default=r},97872:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-level":null,"aria-posinset":null,"aria-setsize":null},relatedConcepts:[{concept:{constraints:["direct descendant of ol","direct descendant of ul","direct descendant of menu"],name:"li"},module:"HTML"},{concept:{name:"item"},module:"XForms"}],requireContextRole:["directory","list"],requiredContextRole:["directory","list"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},34837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-live":"polite"},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},61530:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"main"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},69974:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:[],props:{"aria-braillelabel":null,"aria-brailleroledescription":null,"aria-description":null},relatedConcepts:[{concept:{name:"mark"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},75383:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},44497:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"math"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},24904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-orientation":"vertical"},relatedConcepts:[{concept:{name:"MENU"},module:"JAPI"},{concept:{name:"list"},module:"ARIA"},{concept:{name:"select"},module:"XForms"},{concept:{name:"sidebar"},module:"DTB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["menuitem","group"],["menuitemradio","group"],["menuitemcheckbox","group"],["menuitem"],["menuitemcheckbox"],["menuitemradio"]],requiredProps:{},superClass:[["roletype","widget","composite","select"],["roletype","structure","section","group","select"]]};t.default=r},17999:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-orientation":"horizontal"},relatedConcepts:[{concept:{name:"toolbar"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["menuitem","group"],["menuitemradio","group"],["menuitemcheckbox","group"],["menuitem"],["menuitemcheckbox"],["menuitemradio"]],requiredProps:{},superClass:[["roletype","widget","composite","select","menu"],["roletype","structure","section","group","select","menu"]]};t.default=r},18039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-disabled":null,"aria-expanded":null,"aria-haspopup":null,"aria-posinset":null,"aria-setsize":null},relatedConcepts:[{concept:{name:"MENU_ITEM"},module:"JAPI"},{concept:{name:"listitem"},module:"ARIA"},{concept:{name:"option"},module:"ARIA"}],requireContextRole:["group","menu","menubar"],requiredContextRole:["group","menu","menubar"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command"]]};t.default=r},54774:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"menuitem"},module:"ARIA"}],requireContextRole:["group","menu","menubar"],requiredContextRole:["group","menu","menubar"],requiredOwnedElements:[],requiredProps:{"aria-checked":null},superClass:[["roletype","widget","input","checkbox"],["roletype","widget","command","menuitem"]]};t.default=r},93172:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"menuitem"},module:"ARIA"}],requireContextRole:["group","menu","menubar"],requiredContextRole:["group","menu","menubar"],requiredOwnedElements:[],requiredProps:{"aria-checked":null},superClass:[["roletype","widget","input","checkbox","menuitemcheckbox"],["roletype","widget","command","menuitem","menuitemcheckbox"],["roletype","widget","input","radio"]]};t.default=r},78086:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-valuetext":null,"aria-valuemax":"100","aria-valuemin":"0"},relatedConcepts:[{concept:{name:"meter"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-valuenow":null},superClass:[["roletype","structure","range"]]};t.default=r},52725:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"nav"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},14709:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:[],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[]};t.default=r},2107:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-checked":null,"aria-posinset":null,"aria-setsize":null,"aria-selected":"false"},relatedConcepts:[{concept:{name:"item"},module:"XForms"},{concept:{name:"listitem"},module:"ARIA"},{concept:{name:"option"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-selected":"false"},superClass:[["roletype","widget","input"]]};t.default=r},69745:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"p"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},12231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{attributes:[{name:"alt",value:""}],name:"img"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]};t.default=r},60123:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-valuetext":null},relatedConcepts:[{concept:{name:"progress"},module:"HTML"},{concept:{name:"status"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","range"],["roletype","widget"]]};t.default=r},39372:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-checked":null,"aria-posinset":null,"aria-setsize":null},relatedConcepts:[{concept:{attributes:[{name:"type",value:"radio"}],name:"input"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-checked":null},superClass:[["roletype","widget","input"]]};t.default=r},52165:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null,"aria-readonly":null,"aria-required":null},relatedConcepts:[{concept:{name:"list"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["radio"]],requiredProps:{},superClass:[["roletype","widget","composite","select"],["roletype","structure","section","group","select"]]};t.default=r},43987:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{attributes:[{constraints:["set"],name:"aria-label"}],name:"section"},module:"HTML"},{concept:{attributes:[{constraints:["set"],name:"aria-labelledby"}],name:"section"},module:"HTML"},{concept:{name:"Device Independence Glossart perceivable unit"}}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},8715:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-colindex":null,"aria-expanded":null,"aria-level":null,"aria-posinset":null,"aria-rowindex":null,"aria-selected":null,"aria-setsize":null},relatedConcepts:[{concept:{name:"tr"},module:"HTML"}],requireContextRole:["grid","rowgroup","table","treegrid"],requiredContextRole:["grid","rowgroup","table","treegrid"],requiredOwnedElements:[["cell"],["columnheader"],["gridcell"],["rowheader"]],requiredProps:{},superClass:[["roletype","structure","section","group"],["roletype","widget"]]};t.default=r},41296:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"tbody"},module:"HTML"},{concept:{name:"tfoot"},module:"HTML"},{concept:{name:"thead"},module:"HTML"}],requireContextRole:["grid","table","treegrid"],requiredContextRole:["grid","table","treegrid"],requiredOwnedElements:[["row"]],requiredProps:{},superClass:[["roletype","structure"]]};t.default=r},96046:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-sort":null},relatedConcepts:[{concept:{attributes:[{name:"scope",value:"row"}],name:"th"},module:"HTML"},{concept:{attributes:[{name:"scope",value:"rowgroup"}],name:"th"},module:"HTML"}],requireContextRole:["row","rowgroup"],requiredContextRole:["row","rowgroup"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","cell"],["roletype","structure","section","cell","gridcell"],["roletype","widget","gridcell"],["roletype","structure","sectionhead"]]};t.default=r},94945:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-valuetext":null,"aria-orientation":"vertical","aria-valuemax":"100","aria-valuemin":"0"},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-controls":null,"aria-valuenow":null},superClass:[["roletype","structure","range"],["roletype","widget"]]};t.default=r},94243:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","landmark"]]};t.default=r},27306:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"search"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","input","textbox"]]};t.default=r},49128:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-orientation":"horizontal","aria-valuemax":"100","aria-valuemin":"0","aria-valuenow":null,"aria-valuetext":null},relatedConcepts:[{concept:{name:"hr"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure"]]};t.default=r},18618:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-haspopup":null,"aria-invalid":null,"aria-readonly":null,"aria-valuetext":null,"aria-orientation":"horizontal","aria-valuemax":"100","aria-valuemin":"0"},relatedConcepts:[{concept:{attributes:[{name:"type",value:"range"}],name:"input"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-valuenow":null},superClass:[["roletype","widget","input"],["roletype","structure","range"]]};t.default=r},38891:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null,"aria-readonly":null,"aria-required":null,"aria-valuetext":null,"aria-valuenow":"0"},relatedConcepts:[{concept:{attributes:[{name:"type",value:"number"}],name:"input"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","composite"],["roletype","widget","input"],["roletype","structure","range"]]};t.default=r},4973:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-atomic":"true","aria-live":"polite"},relatedConcepts:[{concept:{name:"output"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},58008:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"strong"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},17854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"sub"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},25483:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["prohibited"],prohibitedProps:["aria-label","aria-labelledby"],props:{},relatedConcepts:[{concept:{name:"sup"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},97083:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"button"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{"aria-checked":null},superClass:[["roletype","widget","input","checkbox"]]};t.default=r},56928:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-disabled":null,"aria-expanded":null,"aria-haspopup":null,"aria-posinset":null,"aria-setsize":null,"aria-selected":"false"},relatedConcepts:[],requireContextRole:["tablist"],requiredContextRole:["tablist"],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","sectionhead"],["roletype","widget"]]};t.default=r},41571:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-colcount":null,"aria-rowcount":null},relatedConcepts:[{concept:{name:"table"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["row"],["row","rowgroup"]],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},71336:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-level":null,"aria-multiselectable":null,"aria-orientation":"horizontal"},relatedConcepts:[{module:"DAISY",concept:{name:"guide"}}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["tab"]],requiredProps:{},superClass:[["roletype","widget","composite"]]};t.default=r},81192:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},12189:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"dfn"},module:"HTML"},{concept:{name:"dt"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},99887:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-activedescendant":null,"aria-autocomplete":null,"aria-errormessage":null,"aria-haspopup":null,"aria-invalid":null,"aria-multiline":null,"aria-placeholder":null,"aria-readonly":null,"aria-required":null},relatedConcepts:[{concept:{attributes:[{constraints:["undefined"],name:"type"},{constraints:["undefined"],name:"list"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"email"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"tel"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"text"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"url"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{name:"input"},module:"XForms"},{concept:{name:"textarea"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","input"]]};t.default=r},58718:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"time"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},69326:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","status"]]};t.default=r},80276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-orientation":"horizontal"},relatedConcepts:[{concept:{name:"menubar"},module:"ARIA"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","group"]]};t.default=r},98508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section"]]};t.default=r},847:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-errormessage":null,"aria-invalid":null,"aria-multiselectable":null,"aria-required":null,"aria-orientation":"vertical"},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["treeitem","group"],["treeitem"]],requiredProps:{},superClass:[["roletype","widget","composite","select"],["roletype","structure","section","group","select"]]};t.default=r},28591:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{},relatedConcepts:[],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[["row"],["row","rowgroup"]],requiredProps:{},superClass:[["roletype","widget","composite","grid"],["roletype","structure","section","table","grid"],["roletype","widget","composite","select","tree"],["roletype","structure","section","group","select","tree"]]};t.default=r},92024:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-expanded":null,"aria-haspopup":null},relatedConcepts:[],requireContextRole:["group","tree"],requiredContextRole:["group","tree"],requiredOwnedElements:[],requiredProps:{"aria-selected":null},superClass:[["roletype","structure","section","listitem"],["roletype","widget","input","option"]]};t.default=r},99824:(e,t,r)=>{"use strict";t.Ot=t.wZ=t._s=void 0;var n=l(r(58711)),i=l(r(90464)),a=l(r(47463)),o=l(r(4704)),s=l(r(44056));function l(e){return e&&e.__esModule?e:{default:e}}n.default,i.default;var u=a.default;t.Ot=u;var c=o.default;t._s=c;var f=s.default;t.wZ=f},44056:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(17029)),i=a(r(47463));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(l){s=!0,i=l}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"===typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&u.push([d,p])}}var x={entries:function(){return u},forEach:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}(u);try{for(n.s();!(t=n.n()).done;){var i=o(t.value,2),a=i[0],l=i[1];e.call(r,l,a,u)}}catch(c){n.e(c)}finally{n.f()}},get:function(e){var t=u.find((function(t){return t[0]===e}));return t&&t[1]},has:function(e){return!!x.get(e)},keys:function(){return u.map((function(e){return o(e,1)[0]}))},values:function(){return u.map((function(e){return o(e,2)[1]}))}},b=(0,n.default)(x,x.entries());t.default=b},47463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(r(31883)),i=l(r(87886)),a=l(r(53568)),o=l(r(26746)),s=l(r(17029));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=f(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(l){s=!0,i=l}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"===typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:null,n=u(h);try{for(n.s();!(t=n.n()).done;){var i=c(t.value,2),a=i[0],o=i[1];e.call(r,o,a,h)}}catch(s){n.e(s)}finally{n.f()}},get:function(e){var t=h.find((function(t){return t[0]===e}));return t&&t[1]},has:function(e){return!!p.get(e)},keys:function(){return h.map((function(e){return c(e,1)[0]}))},values:function(){return h.map((function(e){return c(e,2)[1]}))}},v=(0,s.default)(p,p.entries());t.default=v},17029:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){"function"===typeof Symbol&&"symbol"===a(Symbol.iterator)&&Object.defineProperty(e,Symbol.iterator,{value:i.default.bind(t)});return e};var n,i=(n=r(52895))&&n.__esModule?n:{default:n};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}},52895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){var e=this,t=0,r={"@@iterator":function(){return r},next:function(){if(t{"use strict";r.r(t),r.d(t,{decode:()=>s,encode:()=>o});for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"===typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)i[n.charCodeAt(a)]=a;var o=function(e){var t,r=new Uint8Array(e),i=r.length,a="";for(t=0;t>2],a+=n[(3&r[t])<<4|r[t+1]>>4],a+=n[(15&r[t+1])<<2|r[t+2]>>6],a+=n[63&r[t+2]];return i%3===2?a=a.substring(0,a.length-1)+"=":i%3===1&&(a=a.substring(0,a.length-2)+"=="),a},s=function(e){var t,r,n,a,o,s=.75*e.length,l=e.length,u=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var c=new ArrayBuffer(s),f=new Uint8Array(c);for(t=0;t>4,f[u++]=(15&n)<<4|a>>2,f[u++]=(3&a)<<6|63&o;return c}},80902:(e,t,r)=>{"use strict";function n(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}r.d(t,{GP:()=>d,OE:()=>v});var i,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){if(!(t=a.exec(e)))throw new Error("invalid format: "+e);var t;return new s({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 s(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,t){var r=n(e,t);if(!r)return e+"";var i=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}o.prototype=s.prototype,s.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};const u={"%":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,t){var r=n(e,t);if(!r)return e+"";var a=r[0],o=r[1],s=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+n(e,Math.max(0,t+s-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 f,d,h=Array.prototype.map,p=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function v(e){var t,r,a=void 0===e.grouping||void 0===e.thousands?c:(t=h.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,a=[],o=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[o=(o+1)%t.length];return a.reverse().join(r)}),s=void 0===e.currency?"":e.currency[0]+"",l=void 0===e.currency?"":e.currency[1]+"",f=void 0===e.decimal?".":e.decimal+"",d=void 0===e.numerals?c:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(h.call(e.numerals,String)),v=void 0===e.percent?"%":e.percent+"",m=void 0===e.minus?"-":e.minus+"",g=void 0===e.nan?"NaN":e.nan+"";function y(e){var t=(e=o(e)).fill,r=e.align,n=e.sign,c=e.symbol,h=e.zero,y=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):u[w]||(void 0===b&&(b=12),_=!0,w="g"),(h||"0"===t&&"="===r)&&(h=!0,t="0",r="=");var k="$"===c?s:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T="$"===c?l:/[%p]/.test(w)?v:"",A=u[w],M=/[defgprs%]/.test(w);function S(e){var o,s,l,u=k,c=T;if("c"===w)c=A(e)+c,e="";else{var v=(e=+e)<0||1/e<0;if(e=isNaN(e)?g:A(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),v&&0===+e&&"+"!==n&&(v=!1),u=(v?"("===n?n:m:"-"===n||"("===n?"":n)+u,c=("s"===w?p[8+i/3]:"")+c+(v&&"("===n?")":""),M)for(o=-1,s=e.length;++o(l=e.charCodeAt(o))||l>57){c=(46===l?f+e.slice(o+1):e.slice(o))+c,e=e.slice(0,o);break}}x&&!h&&(e=a(e,1/0));var S=u.length+e.length+c.length,E=S>1)+u+e+c+E.slice(S);break;default:e=E+u+e+c}return d(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return e+""},S}return{format:y,formatPrefix:function(e,t){var r,i=y(((e=o(e)).type="f",e)),a=3*Math.max(-8,Math.min(8,Math.floor((r=t,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),s=Math.pow(10,-a),l=p[8+a/3];return function(e){return i(s*e)+l}}}}f=v({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),d=f.format,f.formatPrefix},66354:(e,t,r)=>{"use strict";r.d(t,{DC:()=>F,de:()=>D,aL:()=>N});var n=new Date,i=new Date;function a(e,t,r,o){function s(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return s.floor=function(t){return e(t=new Date(+t)),t},s.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},s.round=function(e){var t=s(e),r=s.ceil(e);return e-t0))return o;do{o.push(a=new Date(+r)),t(r,i),e(r)}while(a=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(s.count=function(t,a){return n.setTime(+t),i.setTime(+a),e(n),e(i),Math.floor(r(n,i))},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(o?function(t){return o(t)%e===0}:function(t){return s.count(0,t)%e===0}):s:null}),s}var o=864e5,s=6048e5;function l(e){return a((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)/s}))}var u=l(0),c=l(1),f=l(2),d=l(3),h=l(4),p=l(5),v=l(6),m=(u.range,c.range,f.range,d.range,h.range,p.range,v.range,a((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/o}),(function(e){return e.getUTCDate()-1})));const g=m;m.range;function y(e){return a((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()))/s}))}var x=y(0),b=y(1),_=y(2),w=y(3),k=y(4),T=y(5),A=y(6),M=(x.range,b.range,_.range,w.range,k.range,T.range,A.range,a((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()))/o}),(function(e){return e.getDate()-1})));const S=M;M.range;var E=a((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()}));E.every=function(e){return isFinite(e=Math.floor(e))&&e>0?a((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};const C=E;E.range;var L=a((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()}));L.every=function(e){return isFinite(e=Math.floor(e))&&e>0?a((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};const P=L;L.range;function O(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 I(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 R(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function D(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=G(i),f=W(i),d=G(a),h=W(a),p=G(o),v=W(o),m=G(s),y=W(s),x=G(l),_=W(l),w={a:function(e){return o[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:he,e:he,f:ye,g:Ce,G:Pe,H:pe,I:ve,j:me,L:ge,m:xe,M:be,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:et,s:tt,S:_e,u:we,U:ke,V:Ae,w:Me,W:Se,x:null,X:null,y:Ee,Y:Le,Z:Oe,"%":Qe},k={a:function(e){return o[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Ie,e:Ie,f:Ne,g:Xe,G:Je,H:Re,I:De,j:ze,L:Fe,m:Be,M:je,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:et,s:tt,S:Ue,u:qe,U:Ve,V:Ge,w:We,W:Ye,x:null,X:null,y:Ze,Y:Ke,Z:$e,"%":Qe},T={a:function(e,t,r){var n=p.exec(t.slice(r));return n?(e.w=v[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=d.exec(t.slice(r));return n?(e.w=h[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=x.exec(t.slice(r));return n?(e.m=_[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=m.exec(t.slice(r));return n?(e.m=y[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return E(e,t,r,n)},d:ne,e:ne,f:ue,g:Q,G:$,H:ae,I:ae,j:ie,L:le,m:re,M:oe,p:function(e,t,r){var n=u.exec(t.slice(r));return n?(e.p=f[n[0].toLowerCase()],r+n[0].length):-1},q:te,Q:fe,s:de,S:se,u:Z,U:X,V:K,w:Y,W:J,x:function(e,t,n){return E(e,r,t,n)},X:function(e,t,r){return E(e,n,t,r)},y:Q,Y:$,Z:ee,"%":ce};function A(e,t){return function(r){var n,i,a,o=[],s=-1,l=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in a||(a.w=1),"Z"in a?(i=(n=I(R(a.y,0,1))).getUTCDay(),n=i>4||0===i?c.ceil(n):c(n),n=g.offset(n,7*(a.V-1)),a.y=n.getUTCFullYear(),a.m=n.getUTCMonth(),a.d=n.getUTCDate()+(a.w+6)%7):(i=(n=O(R(a.y,0,1))).getDay(),n=i>4||0===i?b.ceil(n):b(n),n=S.offset(n,7*(a.V-1)),a.y=n.getFullYear(),a.m=n.getMonth(),a.d=n.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?I(R(a.y,0,1)).getUTCDay():O(R(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,I(a)):O(a)}}function E(e,t,r,n){for(var i,a,o=0,s=t.length,l=r.length;o=l)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=T[i in B?t.charAt(o++):i])||(n=a(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return w.x=A(r,w),w.X=A(n,w),w.c=A(t,w),k.x=A(r,k),k.X=A(n,k),k.c=A(t,k),{format:function(e){var t=A(e+="",w);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=A(e+="",k);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e+="",!0);return t.toString=function(){return e},t}}}var z,F,N,B={"-":"",_:" ",0:"0"},j=/^\s*\d+/,U=/^%/,q=/[\\^$*+?|[\]().{}]/g;function V(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function ee(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 te(e,t,r){var n=j.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function re(e,t,r){var n=j.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function ne(e,t,r){var n=j.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function ie(e,t,r){var n=j.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function ae(e,t,r){var n=j.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function oe(e,t,r){var n=j.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function se(e,t,r){var n=j.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function le(e,t,r){var n=j.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function ue(e,t,r){var n=j.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function ce(e,t,r){var n=U.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function fe(e,t,r){var n=j.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function de(e,t,r){var n=j.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function he(e,t){return V(e.getDate(),t,2)}function pe(e,t){return V(e.getHours(),t,2)}function ve(e,t){return V(e.getHours()%12||12,t,2)}function me(e,t){return V(1+S.count(C(e),e),t,3)}function ge(e,t){return V(e.getMilliseconds(),t,3)}function ye(e,t){return ge(e,t)+"000"}function xe(e,t){return V(e.getMonth()+1,t,2)}function be(e,t){return V(e.getMinutes(),t,2)}function _e(e,t){return V(e.getSeconds(),t,2)}function we(e){var t=e.getDay();return 0===t?7:t}function ke(e,t){return V(x.count(C(e)-1,e),t,2)}function Te(e){var t=e.getDay();return t>=4||0===t?k(e):k.ceil(e)}function Ae(e,t){return e=Te(e),V(k.count(C(e),e)+(4===C(e).getDay()),t,2)}function Me(e){return e.getDay()}function Se(e,t){return V(b.count(C(e)-1,e),t,2)}function Ee(e,t){return V(e.getFullYear()%100,t,2)}function Ce(e,t){return V((e=Te(e)).getFullYear()%100,t,2)}function Le(e,t){return V(e.getFullYear()%1e4,t,4)}function Pe(e,t){var r=e.getDay();return V((e=r>=4||0===r?k(e):k.ceil(e)).getFullYear()%1e4,t,4)}function Oe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+V(t/60|0,"0",2)+V(t%60,"0",2)}function Ie(e,t){return V(e.getUTCDate(),t,2)}function Re(e,t){return V(e.getUTCHours(),t,2)}function De(e,t){return V(e.getUTCHours()%12||12,t,2)}function ze(e,t){return V(1+g.count(P(e),e),t,3)}function Fe(e,t){return V(e.getUTCMilliseconds(),t,3)}function Ne(e,t){return Fe(e,t)+"000"}function Be(e,t){return V(e.getUTCMonth()+1,t,2)}function je(e,t){return V(e.getUTCMinutes(),t,2)}function Ue(e,t){return V(e.getUTCSeconds(),t,2)}function qe(e){var t=e.getUTCDay();return 0===t?7:t}function Ve(e,t){return V(u.count(P(e)-1,e),t,2)}function He(e){var t=e.getUTCDay();return t>=4||0===t?h(e):h.ceil(e)}function Ge(e,t){return e=He(e),V(h.count(P(e),e)+(4===P(e).getUTCDay()),t,2)}function We(e){return e.getUTCDay()}function Ye(e,t){return V(c.count(P(e)-1,e),t,2)}function Ze(e,t){return V(e.getUTCFullYear()%100,t,2)}function Xe(e,t){return V((e=He(e)).getUTCFullYear()%100,t,2)}function Ke(e,t){return V(e.getUTCFullYear()%1e4,t,4)}function Je(e,t){var r=e.getUTCDay();return V((e=r>=4||0===r?h(e):h.ceil(e)).getUTCFullYear()%1e4,t,4)}function $e(){return"+0000"}function Qe(){return"%"}function et(e){return+e}function tt(e){return Math.floor(+e/1e3)}z=D({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"]}),F=z.format,z.parse,N=z.utcFormat,z.utcParse},67293:(e,t)=>{var r=Object.prototype.hasOwnProperty;t.dequal=function e(t,n){var i,a;if(t===n)return!0;if(t&&n&&(i=t.constructor)===n.constructor){if(i===Date)return t.getTime()===n.getTime();if(i===RegExp)return t.toString()===n.toString();if(i===Array){if((a=t.length)===n.length)for(;a--&&e(t[a],n[a]););return-1===a}if(!i||"object"===typeof t){for(i in a=0,t){if(r.call(t,i)&&++a&&!r.call(n,i))return!1;if(!(i in n)||!e(t[i],n[i]))return!1}return Object.keys(n).length===a}}return t!==t&&n!==n}},27284:e=>{"use strict";var t,r="object"===typeof Reflect?Reflect:null,n=r&&"function"===typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"===typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!==e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"===typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}v(e,t,a,{once:!0}),"error"!==t&&function(e,t,r){"function"===typeof e.on&&v(e,"error",t,r)}(e,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,a,o,u;if(s(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"===typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=l(e))>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){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 f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"===typeof l)n(l,this,t);else{var u=l.length,c=p(l,u);for(r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},22036:(e,t,r)=>{"use strict";var n=r(45665);e.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}},93527:e=>{e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],m=t[14],g=t[15];return e[0]=s*(d*g-h*m)-f*(l*g-u*m)+v*(l*h-u*d),e[1]=-(n*(d*g-h*m)-f*(i*g-a*m)+v*(i*h-a*d)),e[2]=n*(l*g-u*m)-s*(i*g-a*m)+v*(i*u-a*l),e[3]=-(n*(l*h-u*d)-s*(i*h-a*d)+f*(i*u-a*l)),e[4]=-(o*(d*g-h*m)-c*(l*g-u*m)+p*(l*h-u*d)),e[5]=r*(d*g-h*m)-c*(i*g-a*m)+p*(i*h-a*d),e[6]=-(r*(l*g-u*m)-o*(i*g-a*m)+p*(i*u-a*l)),e[7]=r*(l*h-u*d)-o*(i*h-a*d)+c*(i*u-a*l),e[8]=o*(f*g-h*v)-c*(s*g-u*v)+p*(s*h-u*f),e[9]=-(r*(f*g-h*v)-c*(n*g-a*v)+p*(n*h-a*f)),e[10]=r*(s*g-u*v)-o*(n*g-a*v)+p*(n*u-a*s),e[11]=-(r*(s*h-u*f)-o*(n*h-a*f)+c*(n*u-a*s)),e[12]=-(o*(f*m-d*v)-c*(s*m-l*v)+p*(s*d-l*f)),e[13]=r*(f*m-d*v)-c*(n*m-i*v)+p*(n*d-i*f),e[14]=-(r*(s*m-l*v)-o*(n*m-i*v)+p*(n*l-i*s)),e[15]=r*(s*d-l*f)-o*(n*d-i*f)+c*(n*l-i*s),e}},86785:e=>{e.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}},65991:e=>{e.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}},51514:e=>{e.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}},36907:e=>{e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],d=e[11],h=e[12],p=e[13],v=e[14],m=e[15];return(t*o-r*a)*(f*m-d*v)-(t*s-n*a)*(c*m-d*p)+(t*l-i*a)*(c*v-f*p)+(r*s-n*o)*(u*m-d*h)-(r*l-i*o)*(u*v-f*h)+(n*l-i*s)*(u*p-c*h)}},10133:e=>{e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,d=i*o,h=i*s,p=i*l,v=a*o,m=a*s,g=a*l;return e[0]=1-f-p,e[1]=c+g,e[2]=d-m,e[3]=0,e[4]=c-g,e[5]=1-u-p,e[6]=h+v,e[7]=0,e[8]=d+m,e[9]=h-v,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},12328:e=>{e.exports=function(e,t,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);if(Math.abs(u)<1e-6)return null;return o*=u=1/u,s*=u,l*=u,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+l*n,e[2]=l*o*a-s*n,e[3]=0,e[4]=o*s*a-l*n,e[5]=s*s*a+i,e[6]=l*s*a+o*n,e[7]=0,e[8]=o*l*a+s*n,e[9]=s*l*a-o*n,e[10]=l*l*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},84429:e=>{e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,d=n*u,h=i*l,p=i*u,v=a*u,m=o*s,g=o*l,y=o*u;return e[0]=1-(h+v),e[1]=f+y,e[2]=d-g,e[3]=0,e[4]=f-y,e[5]=1-(c+v),e[6]=p+m,e[7]=0,e[8]=d+g,e[9]=p-m,e[10]=1-(c+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}},3409:e=>{e.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}},53439:e=>{e.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}},83054:e=>{e.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}},52481:e=>{e.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}},56464:e=>{e.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}},53282:e=>{e.exports=function(e,t,r,n,i,a,o){var s=1/(r-t),l=1/(i-n),u=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}},49068:e=>{e.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}},82588:(e,t,r)=>{e.exports={create:r(51514),clone:r(86785),copy:r(65991),identity:r(49068),transpose:r(35499),invert:r(13494),adjoint:r(93527),determinant:r(36907),multiply:r(68418),translate:r(26098),scale:r(30758),rotate:r(99945),rotateX:r(61917),rotateY:r(94526),rotateZ:r(98011),fromRotation:r(12328),fromRotationTranslation:r(84429),fromScaling:r(3409),fromTranslation:r(53439),fromXRotation:r(83054),fromYRotation:r(52481),fromZRotation:r(56464),fromQuat:r(10133),frustum:r(53282),perspective:r(32946),perspectiveFromFieldOfView:r(94724),ortho:r(48706),lookAt:r(45284),str:r(56091)}},13494:e=>{e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],m=t[14],g=t[15],y=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,k=i*u-a*l,T=c*v-f*p,A=c*m-d*p,M=c*g-h*p,S=f*m-d*v,E=f*g-h*v,C=d*g-h*m,L=y*C-x*E+b*S+_*M-w*A+k*T;if(!L)return null;return L=1/L,e[0]=(s*C-l*E+u*S)*L,e[1]=(i*E-n*C-a*S)*L,e[2]=(v*k-m*w+g*_)*L,e[3]=(d*w-f*k-h*_)*L,e[4]=(l*M-o*C-u*A)*L,e[5]=(r*C-i*M+a*A)*L,e[6]=(m*b-p*k-g*x)*L,e[7]=(c*k-d*b+h*x)*L,e[8]=(o*E-s*M+u*T)*L,e[9]=(n*M-r*E-a*T)*L,e[10]=(p*w-v*b+g*y)*L,e[11]=(f*b-c*w-h*y)*L,e[12]=(s*A-o*S-l*T)*L,e[13]=(r*S-n*A+i*T)*L,e[14]=(v*x-p*_-m*y)*L,e[15]=(c*_-f*x+d*y)*L,e}},45284:(e,t,r)=>{var n=r(49068);e.exports=function(e,t,r,i){var a,o,s,l,u,c,f,d,h,p,v=t[0],m=t[1],g=t[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],k=r[2];if(Math.abs(v-_)<1e-6&&Math.abs(m-w)<1e-6&&Math.abs(g-k)<1e-6)return n(e);f=v-_,d=m-w,h=g-k,p=1/Math.sqrt(f*f+d*d+h*h),a=x*(h*=p)-b*(d*=p),o=b*(f*=p)-y*h,s=y*d-x*f,(p=Math.sqrt(a*a+o*o+s*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0);l=d*s-h*o,u=h*a-f*s,c=f*o-d*a,(p=Math.sqrt(l*l+u*u+c*c))?(l*=p=1/p,u*=p,c*=p):(l=0,u=0,c=0);return e[0]=a,e[1]=l,e[2]=f,e[3]=0,e[4]=o,e[5]=u,e[6]=d,e[7]=0,e[8]=s,e[9]=c,e[10]=h,e[11]=0,e[12]=-(a*v+o*m+s*g),e[13]=-(l*v+u*m+c*g),e[14]=-(f*v+d*m+h*g),e[15]=1,e}},68418:e=>{e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],d=t[9],h=t[10],p=t[11],v=t[12],m=t[13],g=t[14],y=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*s+_*f+w*v,e[1]=x*i+b*l+_*d+w*m,e[2]=x*a+b*u+_*h+w*g,e[3]=x*o+b*c+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*n+b*s+_*f+w*v,e[5]=x*i+b*l+_*d+w*m,e[6]=x*a+b*u+_*h+w*g,e[7]=x*o+b*c+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*n+b*s+_*f+w*v,e[9]=x*i+b*l+_*d+w*m,e[10]=x*a+b*u+_*h+w*g,e[11]=x*o+b*c+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*n+b*s+_*f+w*v,e[13]=x*i+b*l+_*d+w*m,e[14]=x*a+b*u+_*h+w*g,e[15]=x*o+b*c+_*p+w*y,e}},48706:e=>{e.exports=function(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*u,e[15]=1,e}},32946:e=>{e.exports=function(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}},94724:e=>{e.exports=function(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(o-s)*l*.5,e[9]=(i-a)*u*.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}},99945:e=>{e.exports=function(e,t,r,n){var i,a,o,s,l,u,c,f,d,h,p,v,m,g,y,x,b,_,w,k,T,A,M,S,E=n[0],C=n[1],L=n[2],P=Math.sqrt(E*E+C*C+L*L);if(Math.abs(P)<1e-6)return null;E*=P=1/P,C*=P,L*=P,i=Math.sin(r),a=Math.cos(r),o=1-a,s=t[0],l=t[1],u=t[2],c=t[3],f=t[4],d=t[5],h=t[6],p=t[7],v=t[8],m=t[9],g=t[10],y=t[11],x=E*E*o+a,b=C*E*o+L*i,_=L*E*o-C*i,w=E*C*o-L*i,k=C*C*o+a,T=L*C*o+E*i,A=E*L*o+C*i,M=C*L*o-E*i,S=L*L*o+a,e[0]=s*x+f*b+v*_,e[1]=l*x+d*b+m*_,e[2]=u*x+h*b+g*_,e[3]=c*x+p*b+y*_,e[4]=s*w+f*k+v*T,e[5]=l*w+d*k+m*T,e[6]=u*w+h*k+g*T,e[7]=c*w+p*k+y*T,e[8]=s*A+f*M+v*S,e[9]=l*A+d*M+m*S,e[10]=u*A+h*M+g*S,e[11]=c*A+p*M+y*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e}},61917:e=>{e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],d=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]=a*i+u*n,e[5]=o*i+c*n,e[6]=s*i+f*n,e[7]=l*i+d*n,e[8]=u*i-a*n,e[9]=c*i-o*n,e[10]=f*i-s*n,e[11]=d*i-l*n,e}},94526:e=>{e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],d=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]=a*i-u*n,e[1]=o*i-c*n,e[2]=s*i-f*n,e[3]=l*i-d*n,e[8]=a*n+u*i,e[9]=o*n+c*i,e[10]=s*n+f*i,e[11]=l*n+d*i,e}},98011:e=>{e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],d=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]=a*i+u*n,e[1]=o*i+c*n,e[2]=s*i+f*n,e[3]=l*i+d*n,e[4]=u*i-a*n,e[5]=c*i-o*n,e[6]=f*i-s*n,e[7]=d*i-l*n,e}},30758:e=>{e.exports=function(e,t,r){var n=r[0],i=r[1],a=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]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},56091:e=>{e.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]+")"}},26098:e=>{e.exports=function(e,t,r){var n,i,a,o,s,l,u,c,f,d,h,p,v=r[0],m=r[1],g=r[2];t===e?(e[12]=t[0]*v+t[4]*m+t[8]*g+t[12],e[13]=t[1]*v+t[5]*m+t[9]*g+t[13],e[14]=t[2]*v+t[6]*m+t[10]*g+t[14],e[15]=t[3]*v+t[7]*m+t[11]*g+t[15]):(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],d=t[9],h=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=f,e[9]=d,e[10]=h,e[11]=p,e[12]=n*v+s*m+f*g+t[12],e[13]=i*v+l*m+d*g+t[13],e[14]=a*v+u*m+h*g+t[14],e[15]=o*v+c*m+p*g+t[15]);return e}},35499:e=>{e.exports=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=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]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}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}},59283:(e,t,r)=>{"use strict";var n,i=r(73318);n="function"===typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:i,e.exports=n},17390:(e,t,r)=>{"use strict";var n=r(73318);e.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(r){e=!1}return e}()},80219:(e,t,r)=>{"use strict";var n=r(53763),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return n.isMemo(e)?o:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,n){if("string"!==typeof r){if(p){var i=h(r);i&&i!==p&&e(t,i,n)}var o=c(r);f&&(o=o.concat(f(r)));for(var s=l(t),v=l(r),m=0;m{"use strict";var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,o=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,x=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function _(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case f:case a:case s:case o:case h:return e;default:switch(e=e&&e.$$typeof){case u:case d:case m:case v:case l:return e;default:return t}}case i:return t}}}function w(e){return _(e)===f}t.AsyncMode=c,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=n,t.ForwardRef=d,t.Fragment=a,t.Lazy=m,t.Memo=v,t.Portal=i,t.Profiler=s,t.StrictMode=o,t.Suspense=h,t.isAsyncMode=function(e){return w(e)||_(e)===c},t.isConcurrentMode=w,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===a},t.isLazy=function(e){return _(e)===m},t.isMemo=function(e){return _(e)===v},t.isPortal=function(e){return _(e)===i},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===o},t.isSuspense=function(e){return _(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===f||e===s||e===o||e===h||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b||e.$$typeof===g)},t.typeOf=_},53763:(e,t,r)=>{"use strict";e.exports=r(54983)},73318:e=>{e.exports=!0},94561:e=>{"use strict";e.exports=i,e.exports.isMobile=i,e.exports.default=i;const t=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(e){e||(e={});let i=e.ua;if(i||"undefined"===typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"===typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!==typeof i)return!1;let a=t.test(i)&&!r.test(i)||!!e.tablet&&n.test(i);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(a=!0),a}},45665:e=>{"use strict";e.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}},53393:(e,t,r)=>{var n,i=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function i(e,t){if(!n[e]){n[e]={};for(var r=0;r>>8,r[2*n+1]=o%256}return r},decompressFromUint8Array:function(t){if(null===t||void 0===t)return a.decompress(t);for(var r=new Array(t.length/2),n=0,i=r.length;n>=1}else{for(i=1,n=0;n>=1}0==--f&&(f=Math.pow(2,h),h++),delete s[c]}else for(i=o[c],n=0;n>=1;0==--f&&(f=Math.pow(2,h),h++),o[u]=d++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(s,c)){if(c.charCodeAt(0)<256){for(n=0;n>=1}else{for(i=1,n=0;n>=1}0==--f&&(f=Math.pow(2,h),h++),delete s[c]}else for(i=o[c],n=0;n>=1;0==--f&&(f=Math.pow(2,h),h++)}for(i=2,n=0;n>=1;for(;;){if(v<<=1,m==t-1){p.push(r(v));break}m++}return p.join("")},decompress:function(e){return null==e?"":""==e?null:a._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,r,n){var i,a,o,s,l,u,c,f=[],d=4,h=4,p=3,v="",m=[],g={val:n(0),position:r,index:1};for(i=0;i<3;i+=1)f[i]=i;for(o=0,l=Math.pow(2,2),u=1;u!=l;)s=g.val&g.position,g.position>>=1,0==g.position&&(g.position=r,g.val=n(g.index++)),o|=(s>0?1:0)*u,u<<=1;switch(o){case 0:for(o=0,l=Math.pow(2,8),u=1;u!=l;)s=g.val&g.position,g.position>>=1,0==g.position&&(g.position=r,g.val=n(g.index++)),o|=(s>0?1:0)*u,u<<=1;c=e(o);break;case 1:for(o=0,l=Math.pow(2,16),u=1;u!=l;)s=g.val&g.position,g.position>>=1,0==g.position&&(g.position=r,g.val=n(g.index++)),o|=(s>0?1:0)*u,u<<=1;c=e(o);break;case 2:return""}for(f[3]=c,a=c,m.push(c);;){if(g.index>t)return"";for(o=0,l=Math.pow(2,p),u=1;u!=l;)s=g.val&g.position,g.position>>=1,0==g.position&&(g.position=r,g.val=n(g.index++)),o|=(s>0?1:0)*u,u<<=1;switch(c=o){case 0:for(o=0,l=Math.pow(2,8),u=1;u!=l;)s=g.val&g.position,g.position>>=1,0==g.position&&(g.position=r,g.val=n(g.index++)),o|=(s>0?1:0)*u,u<<=1;f[h++]=e(o),c=h-1,d--;break;case 1:for(o=0,l=Math.pow(2,16),u=1;u!=l;)s=g.val&g.position,g.position>>=1,0==g.position&&(g.position=r,g.val=n(g.index++)),o|=(s>0?1:0)*u,u<<=1;f[h++]=e(o),c=h-1,d--;break;case 2:return m.join("")}if(0==d&&(d=Math.pow(2,p),p++),f[c])v=f[c];else{if(c!==h)return null;v=a+a.charAt(0)}m.push(v),f[h++]=a+v.charAt(0),a=v,0==--d&&(d=Math.pow(2,p),p++)}}};return a}();void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},58530:e=>{var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i=e.clientX||0,a=e.clientY||0,o=(s=r,s===window||s===document||s===document.body?t:s.getBoundingClientRect());var s;return n[0]=i-o.left,n[1]=a-o.top,n}},24100:e=>{e.exports=function(e){var i=[];return e.replace(r,(function(e,r,a){var o=r.toLowerCase();for(a=function(e){var t=e.match(n);return t?t.map(Number):[]}(a),"m"==o&&a.length>2&&(i.push([r].concat(a.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(a.length==t[o])return a.unshift(r),i.push(a);if(a.length{var t;self,t=function(){return function(){var e={79288:function(e,t,r){"use strict";var n=r(3400),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,i[a])}},86712:function(e,t,r){"use strict";e.exports=r(84224)},37240:function(e,t,r){"use strict";e.exports=r(51132)},29744:function(e,t,r){"use strict";e.exports=r(94456)},29352:function(e,t,r){"use strict";e.exports=r(67244)},96144:function(e,t,r){"use strict";e.exports=r(97776)},53219:function(e,t,r){"use strict";e.exports=r(61712)},4624:function(e,t,r){"use strict";e.exports=r(95856)},54543:function(e,t,r){"use strict";e.exports=r(54272)},45e3:function(e,t,r){"use strict";e.exports=r(85404)},62300:function(e,t,r){"use strict";e.exports=r(26048)},6920:function(e,t,r){"use strict";e.exports=r(66240)},10264:function(e,t,r){"use strict";e.exports=r(40448)},32016:function(e,t,r){"use strict";e.exports=r(64884)},27528:function(e,t,r){"use strict";e.exports=r(15088)},75556:function(e,t,r){"use strict";e.exports=r(76744)},39204:function(e,t,r){"use strict";e.exports=r(94704)},73996:function(e,t,r){"use strict";e.exports=r(62396)},16489:function(e,t,r){"use strict";e.exports=r(32028)},5e3:function(e,t,r){"use strict";e.exports=r(81932)},77280:function(e,t,r){"use strict";e.exports=r(45536)},33992:function(e,t,r){"use strict";e.exports=r(42600)},17600:function(e,t,r){"use strict";e.exports=r(21536)},49116:function(e,t,r){"use strict";e.exports=r(65664)},46808:function(e,t,r){"use strict";e.exports=r(29044)},36168:function(e,t,r){"use strict";e.exports=r(48928)},13792:function(e,t,r){"use strict";var n=r(32016);n.register([r(37240),r(29352),r(5e3),r(33992),r(17600),r(49116),r(6920),r(67484),r(79440),r(39204),r(83096),r(36168),r(20260),r(63560),r(65832),r(46808),r(73996),r(48824),r(89904),r(25120),r(13752),r(4340),r(62300),r(29800),r(8363),r(54543),r(86636),r(42192),r(32140),r(77280),r(89296),r(56816),r(70192),r(45e3),r(27528),r(84764),r(3920),r(50248),r(4624),r(69967),r(10264),r(86152),r(53219),r(81604),r(63796),r(29744),r(89336),r(86712),r(75556),r(16489),r(97312),r(96144)]),e.exports=n},3920:function(e,t,r){"use strict";e.exports=r(43480)},25120:function(e,t,r){"use strict";e.exports=r(6296)},4340:function(e,t,r){"use strict";e.exports=r(7404)},86152:function(e,t,r){"use strict";e.exports=r(65456)},56816:function(e,t,r){"use strict";e.exports=r(22020)},89296:function(e,t,r){"use strict";e.exports=r(29928)},20260:function(e,t,r){"use strict";e.exports=r(75792)},32140:function(e,t,r){"use strict";e.exports=r(156)},84764:function(e,t,r){"use strict";e.exports=r(45499)},48824:function(e,t,r){"use strict";e.exports=r(3296)},69967:function(e,t,r){"use strict";e.exports=r(4184)},8363:function(e,t,r){"use strict";e.exports=r(36952)},86636:function(e,t,r){"use strict";e.exports=r(38983)},70192:function(e,t,r){"use strict";e.exports=r(11572)},81604:function(e,t,r){"use strict";e.exports=r(76924)},63796:function(e,t,r){"use strict";e.exports=r(62944)},89336:function(e,t,r){"use strict";e.exports=r(95443)},67484:function(e,t,r){"use strict";e.exports=r(34864)},97312:function(e,t,r){"use strict";e.exports=r(76272)},42192:function(e,t,r){"use strict";e.exports=r(97924)},29800:function(e,t,r){"use strict";e.exports=r(15436)},63560:function(e,t,r){"use strict";e.exports=r(5621)},89904:function(e,t,r){"use strict";e.exports=r(91304)},50248:function(e,t,r){"use strict";e.exports=r(41724)},65832:function(e,t,r){"use strict";e.exports=r(31991)},79440:function(e,t,r){"use strict";e.exports=r(22869)},13752:function(e,t,r){"use strict";e.exports=r(67776)},83096:function(e,t,r){"use strict";e.exports=r(95952)},72196:function(e){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},13916:function(e,t,r){"use strict";var n=r(72196),i=r(25376),a=r(33816),o=r(31780).templatedArray;r(36208),e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},90272:function(e,t,r){"use strict";var n=r(3400),i=r(54460),a=r(23816).draw;function o(e){var t=e._fullLayout;n.filterVisible(t.annotations).forEach((function(t){var r=i.getFromId(e,t.xref),n=i.getFromId(e,t.yref),a=i.getRefType(t.xref),o=i.getRefType(t.yref);t._extremes={},"range"===a&&s(t,r),"range"===o&&s(t,n)}))}function s(e,t){var r,n=t._id,a=n.charAt(0),o=e[a],s=e["a"+a],l=e[a+"ref"],u=e["a"+a+"ref"],c=e["_"+a+"padplus"],f=e["_"+a+"padminus"],d={x:1,y:-1}[a]*e[a+"shift"],h=3*e.arrowsize*e.arrowwidth||0,p=h+d,v=h-d,m=3*e.startarrowsize*e.arrowwidth||0,g=m+d,y=m-d;if(u===l){var x=i.findExtremes(t,[t.r2c(o)],{ppadplus:p,ppadminus:v}),b=i.findExtremes(t,[t.r2c(s)],{ppadplus:Math.max(c,g),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else g=s?g+s:g,y=s?y-s:y,r=i.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(c,p,g),ppadminus:Math.max(f,v,y)});e._extremes[n]=r}e.exports=function(e){var t=e._fullLayout;if(n.filterVisible(t.annotations).length&&e._fullData.length)return n.syncOrAsync([a,o],e)}},42300:function(e,t,r){"use strict";var n=r(3400),i=r(24040),a=r(31780).arrayEditor;function o(e,t){var r,n,i,a,o,l,u,c=e._fullLayout.annotations,f=[],d=[],h=[],p=(t||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var r,s,l=o(e,t),u=l.on,c=l.off.concat(l.explicitOff),f={},d=e._fullLayout.annotations;if(u.length||c.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var Y=!1,Z=["x","y"],X=0;X1)&&(ne===re?((he=ie.r2fraction(t["a"+te]))<0||he>1)&&(Y=!0):Y=!0),K=ie._offset+ie.r2p(t[te]),Q=.5}else{var pe="domain"===de;"x"===te?($=t[te],K=pe?ie._offset+ie._length*$:K=k.l+k.w*$):($=1-t[te],K=pe?ie._offset+ie._length*$:K=k.t+k.h*$),Q=t.showarrow?.5:$}if(t.showarrow){fe.head=K;var ve=t["a"+te];if(ee=oe*H(.5,t.xanchor)-se*H(.5,t.yanchor),ne===re){var me=l.getRefType(ne);"domain"===me?("y"===te&&(ve=1-ve),fe.tail=ie._offset+ie._length*ve):"paper"===me?"y"===te?(ve=1-ve,fe.tail=k.t+k.h*ve):fe.tail=k.l+k.w*ve:fe.tail=ie._offset+ie.r2p(ve),J=ee}else fe.tail=K+ve,J=ee+ve;fe.text=fe.tail+ee;var ge=w["x"===te?"width":"height"];if("paper"===re&&(fe.head=o.constrain(fe.head,1,ge-1)),"pixel"===ne){var ye=-Math.max(fe.tail-3,fe.text),xe=Math.min(fe.tail+3,fe.text)-ge;ye>0?(fe.tail+=ye,fe.text+=ye):xe>0&&(fe.tail-=xe,fe.text-=xe)}fe.tail+=ce,fe.head+=ce}else J=ee=le*H(Q,ue),fe.text=K+ee;fe.text+=ce,ee+=ce,J+=ce,t["_"+te+"padplus"]=le/2+J,t["_"+te+"padminus"]=le/2-J,t["_"+te+"size"]=le,t["_"+te+"shift"]=ee}if(Y)z.remove();else{var be=0,_e=0;if("left"!==t.align&&(be=(A-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(_e=(D-_)*("middle"===t.valign?.5:1)),f)n.select("svg").attr({x:B+be-1,y:B+_e}).call(c.setClipUrl,U?C:null,e);else{var we=B+_e-v.top,ke=B+be-v.left;G.call(d.positionText,ke,we).call(c.setClipUrl,U?C:null,e)}q.select("rect").call(c.setRect,B,B,A,D),j.call(c.setRect,F/2,F/2,N-F,V-F),z.call(c.setTranslate,Math.round(L.x.text-N/2),Math.round(L.y.text-V/2)),I.attr({transform:"rotate("+P+","+L.x.text+","+L.y.text+")"});var Te,Ae=function(r,n){O.selectAll(".annotation-arrow-g").remove();var l=L.x.head,f=L.y.head,d=L.x.tail+r,h=L.y.tail+n,v=L.x.text+r,b=L.y.text+n,_=o.rotationXYMatrix(P,v,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),C=+j.attr("width"),R=+j.attr("height"),D=v-.5*C,F=D+C,N=b-.5*R,B=N+R,U=[[D,N,D,B],[D,B,F,B],[F,B,F,N],[F,N,D,N]].map(A);if(!U.reduce((function(e,t){return e^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,t[0],t[1],t[2],t[3])}),!1)){U.forEach((function(e){var t=o.segmentsIntersect(d,h,l,f,e[0],e[1],e[2],e[3]);t&&(d=t.x,h=t.y)}));var q=t.arrowwidth,V=t.arrowcolor,H=t.arrowside,G=O.append("g").style({opacity:u.opacity(V)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+d+","+h+"L"+l+","+f).style("stroke-width",q+"px").call(u.stroke,u.rgb(V));if(m(W,H,t),T.annotationPosition&&W.node().parentNode&&!a){var Y=l,Z=f;if(t.standoff){var X=Math.sqrt(Math.pow(l-d,2)+Math.pow(f-h,2));Y+=t.standoff*(d-l)/X,Z+=t.standoff*(h-f)/X}var K,J,$=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(d-Y)+","+(h-Z),transform:s(Y,Z)}).style("stroke-width",q+6+"px").call(u.stroke,"rgba(0,0,0,0)").call(u.fill,"rgba(0,0,0,0)");p.init({element:$.node(),gd:e,prepFn:function(){var e=c.getTranslate(z);K=e.x,J=e.y,g&&g.autorange&&M(g._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(e,r){var n=w(K,J),i=n[0]+e,a=n[1]+r;z.call(c.setTranslate,i,a),S("x",y(g,e,"x",k,t)),S("y",y(x,r,"y",k,t)),t.axref===t.xref&&S("ax",y(g,e,"ax",k,t)),t.ayref===t.yref&&S("ay",y(x,r,"ay",k,t)),G.attr("transform",s(e,r)),I.attr({transform:"rotate("+P+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&Ae(0,0),R&&p.init({element:z.node(),gd:e,prepFn:function(){Te=I.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?S("ax",y(g,e,"ax",k,t)):S("ax",t.ax+e),t.ayref===t.yref?S("ay",y(x,r,"ay",k.w,t)):S("ay",t.ay+r),Ae(e,r);else{if(a)return;var i,o;if(g)i=y(g,e,"x",k,t);else{var l=t._xsize/k.w,u=t.x+(t._xshift-t.xshift)/k.w-l/2;i=p.align(u+e/k.w,l,0,1,t.xanchor)}if(x)o=y(x,r,"y",k,t);else{var c=t._ysize/k.h,f=t.y-(t._yshift+t.yshift)/k.h-c/2;o=p.align(f-r/k.h,c,0,1,t.yanchor)}S("x",i),S("y",o),g&&x||(n=p.getCursor(g?.5:i,x?.5:o,t.xanchor,t.yanchor))}I.attr({transform:s(e,r)+Te}),h(z,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",W(n))},doneFn:function(){h(z),i.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}e.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,_=v.backoff*g+r.startstandoff;if("line"===h.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},c={x:+e.attr("x2"),y:+e.attr("y2")};var w=o.x-c.x,k=o.y-c.y;if(d=(f=Math.atan2(k,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+k*k))return void R();if(b){if(b*b>w*w+k*k)return void R();var T=b*Math.cos(f),A=b*Math.sin(f);c.x+=T,c.y+=A,e.attr({x2:c.x,y2:c.y})}if(_){if(_*_>w*w+k*k)return void R();var M=_*Math.cos(f),S=_*Math.sin(f);o.x-=M,o.y-=S,e.attr({x1:o.x,y1:o.y})}}else if("path"===h.nodeName){var E=h.getTotalLength(),C="";if(E1){u=!0;break}}u?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=i(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*r[0],t.yaxis.r2l(l.y)*r[1],t.zaxis.r2l(l.z)*r[2]]),n(e.graphDiv,l,s,e.id,l._xa,l._ya))}}},56864:function(e,t,r){"use strict";var n=r(24040),i=r(3400);e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(45899)}}},layoutAttributes:r(45899),handleDefaults:r(52808),includeBasePlot:function(e,t){var r=n.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,o=Object.keys(e),s=0;s=0))return e;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}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 i=n(t||u).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.interpolate=function(e,t,r){var i=n(e).toRgb(),a=n(t).toRgb(),o={r:r*i.r+(1-r)*a.r,g:r*i.g+(1-r)*a.g,b:r*i.b+(1-r)*a.b};return n(o).toRgbString()},o.contrast=function(e,t,r){var i=n(e);return 1!==i.getAlpha()&&(i=n(o.combine(e,u))),(i.isDark()?t?i.lighten(t):u:r?i.darken(r):l).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,i,s=Object.keys(e);for(t=0;t0?n>=l:n<=l));i++)n>c&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var he=Math.pow(10,Math.floor(Math.log(de)/Math.LN10));ce*=he*u.roundUp(de/he,[2,5,10]),(Math.abs(W.start)/W.size+1e-6)%1<2e-6&&(le.tick0=0)}le.dtick=ce}le.domain=o?[oe+O/N.h,oe+Q-O/N.h]:[oe+P/N.w,oe+Q-P/N.w],le.setScale(),e.attr("transform",c(Math.round(N.l),Math.round(N.t)));var pe,ve=e.select("."+A.cbtitleunshift).attr("transform",c(-Math.round(N.l),-Math.round(N.t))),me=le.ticklabelposition,ge=le.title.font.size,ye=e.select("."+A.cbaxis),xe=0,be=0;function _e(n,i){var a={propContainer:le,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:F._dfltTitle.colorbar,containerGroup:e.select("."+A.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+o+",."+o+"-math-group").remove(),v.draw(r,n,f(a,i||{}))}function we(){var e,t;(o&&ue||!o&&!ue)&&("top"===q&&(e=P+N.l+ee*I,t=O+N.t+te*(1-oe-Q)+3+.75*ge),"bottom"===q&&(e=P+N.l+ee*I,t=O+N.t+te*(1-oe)-3-.25*ge),"right"===q&&(t=O+N.t+te*R+3+.75*ge,e=P+N.l+ee*oe),_e(le._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}}))}function ke(){if(o&&!ue||!o&&ue){var e,i,a=le.position||0,s=le._offset+le._length/2;if("right"===q)i=s,e=N.l+ee*a+10+ge*(le.showticklabels?1:.5);else if(e=s,"bottom"===q&&(i=N.t+te*a+10+(-1===me.indexOf("inside")?le.tickfont.size:0)+("intside"!==le.ticks&&t.ticklen||0)),"top"===q){var l=U.text.split("
").length;i=N.t+te*a+10-K-w*ge*l}_e((o?"h":"v")+le._id+"title",{avoid:{selection:n.select(r).selectAll("g."+le._id+"tick"),side:q,offsetTop:o?0:N.t,offsetLeft:o?N.l:0,maxShift:o?F.width:F.height},attributes:{x:e,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}}function Te(){if(!o&&!ue||o&&ue){var a,l=e.select("."+A.cbtitle),f=l.select("text"),d=[-M/2,M/2],p=l.select(".h"+le._id+"title-math-group").node(),v=15.6;if(f.node()&&(v=parseInt(f.node().style.fontSize,10)*w),p?(a=h.bBox(p),be=a.width,(xe=a.height)>v&&(d[1]-=(xe-v)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(a=h.bBox(f.node()),be=a.width,xe=a.height),o){if(xe){if(xe+=5,"top"===q)le.domain[1]-=xe/N.h,d[1]*=-1;else{le.domain[0]+=xe/N.h;var g=m.lineCount(f);d[1]+=(1-g)*v}l.attr("transform",c(d[0],d[1])),le.setScale()}}else be&&("right"===q&&(le.domain[0]+=(be+ge/2)/N.w),l.attr("transform",c(d[0],d[1])),le.setScale())}e.selectAll("."+A.cbfills+",."+A.cblines).attr("transform",o?c(0,Math.round(N.h*(1-le.domain[1]))):c(Math.round(N.w*le.domain[0]),0)),ye.attr("transform",o?c(0,Math.round(-N.t)):c(Math.round(-N.l),0));var y=e.select("."+A.cbfills).selectAll("rect."+A.cbfill).attr("style","").data(Z);y.enter().append("rect").classed(A.cbfill,!0).attr("style",""),y.exit().remove();var x=V.map(le.c2p).map(Math.round).sort((function(e,t){return e-t}));y.each((function(e,a){var s=[0===a?V[0]:(Z[a]+Z[a-1])/2,a===Z.length-1?V[1]:(Z[a]+Z[a+1])/2].map(le.c2p).map(Math.round);o&&(s[1]=u.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?"x":"y",re).attr(o?"y":"x",n.min(s)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max(n.max(s)-n.min(s),2));if(t._fillgradient)h.gradient(l,r,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var c=G(e).replace("e-","");l.attr("fill",i(c).toHexString())}}));var b=e.select("."+A.cblines).selectAll("path."+A.cbline).data(j.color&&j.width?X:[]);b.enter().append("path").classed(A.cbline,!0),b.exit().remove(),b.each((function(e){var t=re,r=Math.round(le.c2p(e))+j.width/2%1;n.select(this).attr("d","M"+(o?t+","+r:r+","+t)+(o?"h":"v")+K).call(h.lineGroupStyle,j.width,H(e),j.dash)})),ye.selectAll("g."+le._id+"tick,path").remove();var _=re+K+(M||0)/2-("outside"===t.ticks?1:0),k=s.calcTicks(le),T=s.getTickSigns(le)[2];return s.drawTicks(r,le,{vals:"inside"===le.ticks?s.clipEnds(le,k):k,layer:ye,path:s.makeTickPath(le,_,T),transFn:s.makeTransTickFn(le)}),s.drawLabels(r,le,{vals:k,layer:ye,transFn:s.makeTransTickLabelFn(le),labelFns:s.makeLabelFns(le,_)})}function Ae(){var n,s=K+M/2;-1===me.indexOf("inside")&&(n=h.bBox(ye.node()),s+=o?n.width:n.height),pe=ve.select("text");var u=0,f=o&&"top"===q,v=!o&&"right"===q,m=0;if(pe.node()&&!pe.classed(A.jsPlaceholder)){var y,x=ve.select(".h"+le._id+"title-math-group").node();x&&(o&&ue||!o&&!ue)?(u=(n=h.bBox(x)).width,y=n.height):(u=(n=h.bBox(ve.node())).right-N.l-(o?re:se),y=n.bottom-N.t-(o?se:re),o||"top"!==q||(s+=n.height,m=n.height)),v&&(pe.attr("transform",c(u/2+ge/2,0)),u*=2),s=Math.max(s,o?u:y)}var b=2*(o?P:O)+s+S+M/2,w=0;!o&&U.text&&"bottom"===L&&R<=0&&(b+=w=b/2,m+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=m;var B=S+M,j=(o?re:se)-B/2-(o?P:0),V=(o?se:re)-(o?$:O+m-w);e.select("."+A.cbbg).attr("x",j).attr("y",V).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max($+B,2)).call(p.fill,E).call(p.stroke,t.bordercolor).style("stroke-width",S);var H=v?Math.max(u-10,0):0;e.selectAll("."+A.cboutline).attr("x",(o?re:se+P)+H).attr("y",(o?se+O-$:re)+(f?xe:0)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max($-(o?2*O+xe:2*P+H),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":M});var G=o?ne*b:0,W=o?0:(1-ie)*b-m;if(G=z?N.l-G:-G,W=D?N.t-W:-W,e.attr("transform",c(G,W)),!o&&(S||i(E).getAlpha()&&!i.equals(F.paper_bgcolor,E))){var Y=ye.selectAll("text"),Z=Y[0].length,X=e.select("."+A.cbbg).node(),J=h.bBox(X),Q=h.getTranslate(e),ee=2;Y.each((function(e,t){var r=0,n=Z-1;if(t===r||t===n){var i,a=h.bBox(this),o=h.getTranslate(this);if(t===n){var s=a.right+o.x;(i=J.right+Q.x+se-S-ee+I-s)>0&&(i=0)}else if(t===r){var l=a.left+o.x;(i=J.left+Q.x+se+S+ee-l)<0&&(i=0)}i&&(Z<3?this.setAttribute("transform","translate("+i+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var te={},ae=k[C],oe=T[C],ce=k[L],fe=T[L],de=b-K;o?("pixels"===d?(te.y=R,te.t=$*ce,te.b=$*fe):(te.t=te.b=0,te.yt=R+l*ce,te.yb=R-l*fe),"pixels"===_?(te.x=I,te.l=b*ae,te.r=b*oe):(te.l=de*ae,te.r=de*oe,te.xl=I-g*ae,te.xr=I+g*oe)):("pixels"===d?(te.x=I,te.l=$*ae,te.r=$*oe):(te.l=te.r=0,te.xl=I+l*ae,te.xr=I-l*oe),"pixels"===_?(te.y=1-R,te.t=b*ce,te.b=b*fe):(te.t=de*ce,te.b=de*fe,te.yt=R-g*ce,te.yb=R+g*fe));var he=t.y<.5?"b":"t",be=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var _e={r:F.width-j-G,l:j+te.r,b:F.height-V-W,t:V+te.b};z&&D?a.autoMargin(r,t._id,te):z?r._fullLayout._reservedMargin[t._id][he]=_e[he]:D||o?r._fullLayout._reservedMargin[t._id][be]=_e[be]:r._fullLayout._reservedMargin[t._id][he]=_e[he]}return u.syncOrAsync([a.previousPromises,we,Te,ke,a.previousPromises,Ae],r)}(r,t,e);g&&g.then&&(e._promises||[]).push(g),e._context.edits.colorbarPosition&&function(e,t,r){var n,i,a,s="v"===t.orientation,u=r._fullLayout,f=u._size;l.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),d(e)},moveFn:function(r,o){e.attr("transform",n+c(r,o)),i=l.align((s?t._uFrac:t._vFrac)+r/f.w,s?t._thickFrac:t._lenFrac,0,1,t.xanchor),a=l.align((s?t._vFrac:1-t._uFrac)-o/f.h,s?t._lenFrac:t._thickFrac,0,1,t.yanchor);var u=l.getCursor(i,a,t.xanchor,t.yanchor);d(e,u)},doneFn:function(){if(d(e),void 0!==i&&void 0!==a){var n={};n[t._propPrefix+"x"]=i,n[t._propPrefix+"y"]=a,void 0!==t._traceIndex?o.call("_guiRestyle",r,n,t._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,t,e)})),t.exit().each((function(t){a.autoMargin(e,t._id)})).remove(),t.order()}}},90553:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e){return n.isPlainObject(e.colorbar)}},55080:function(e,t,r){"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:r(42996),supplyDefaults:r(64013),draw:r(37848).draw,hasColorbar:r(90553)}},49084:function(e,t,r){"use strict";var n=r(42996),i=r(53756).counter,a=r(95376),o=r(88304).scales;function s(e){return"`"+e+"`"}a(o),e.exports=function(e,t){e=e||"";var r,a=(t=t||{}).cLetter||"c",l=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),u="showScaleDflt"in t?t.showScaleDflt:"z"===a,c="string"===typeof t.colorscaleDflt?o[t.colorscaleDflt]:null,f=t.editTypeOverride||"",d=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,t.colorAttr):s(d+(r={z:"z",c:"color"}[a]));var h=a+"auto",p=a+"min",v=a+"max",m=a+"mid",g=(s(d+h),s(d+p),s(d+v),{});g[p]=g[v]=void 0;var y={};y[h]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},t.anim&&(x.color.anim=!0)),x[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:g},x[p]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[v]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:g},x.colorscale={valType:"colorscale",editType:"calc",dflt:c,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"},l||(x.showscale={valType:"boolean",dflt:u,editType:"calc"},x.colorbar=n),t.noColorAxis||(x.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),x}},47128:function(e,t,r){"use strict";var n=r(38248),i=r(3400),a=r(94288).extractOpts;e.exports=function(e,t,r){var o,s=e._fullLayout,l=r.vals,u=r.containerStr,c=u?i.nestedProperty(t,u).get():t,f=a(c),d=!1!==f.auto,h=f.min,p=f.max,v=f.mid,m=function(){return i.aggNums(Math.min,null,l)},g=function(){return i.aggNums(Math.max,null,l)};void 0===h?h=m():d&&(h=c._colorAx&&n(h)?Math.min(h,m()):m()),void 0===p?p=g():d&&(p=c._colorAx&&n(p)?Math.max(p,g()):g()),d&&void 0!==v&&(p-v>v-h?h=v-(p-v):p-v=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync("colorscale",o))}},95504:function(e,t,r){"use strict";var n=r(3400),i=r(94288).hasColorscale,a=r(94288).extractOpts;e.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function o(e,i){var o=i.container?n.nestedProperty(e,i.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function p(e,t){t=t||{};for(var r=e.domain,o=e.range,l=o.length,u=new Array(l),c=0;c4/3-s?o:s}},67416:function(e,t,r){"use strict";var n=r(3400),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(e,t,r,a){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*t),0,2),i[t][e]}},72760:function(e,t){"use strict";t.selectMode=function(e){return"lasso"===e||"select"===e},t.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.openMode=function(e){return"drawline"===e||"drawopenpath"===e},t.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}},86476:function(e,t,r){"use strict";var n=r(29128),i=r(52264),a=r(89184),o=r(3400).removeElement,s=r(33816),l=e.exports={};l.align=r(78316),l.getCursor=r(67416);var u=r(2616);function c(){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 f(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}l.unhover=u.wrapped,l.unhoverRaw=u.raw,l.init=function(e){var t,r,n,u,d,h,p,v,m=e.gd,g=1,y=m._context.doubleClickDelay,x=e.element;m._mouseDownTime||(m._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,a?(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&&(g=Math.max(g-1,1)),m._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(g,h),!v){var r;try{r=new MouseEvent("click",t)}catch(a){var n=f(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}},l.coverSlip=c},2616:function(e,t,r){"use strict";var n=r(95924),i=r(91200),a=r(52200).getGraphDiv,o=r(92456),s=e.exports={};s.wrapped=function(e,t,r){(e=a(e))._fullLayout&&i.clear(e._fullLayout._uid+o.HOVERID),s.raw(e,t,r)},s.raw=function(e,t){var r=e._fullLayout,i=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&&i&&e.emit("plotly_unhover",{event:t,points:i}))}},98192:function(e,t){"use strict";t.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},t.c={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"}},43616:function(e,t,r){"use strict";var n=r(33428),i=r(3400),a=i.numberFormat,o=r(38248),s=r(49760),l=r(24040),u=r(76308),c=r(8932),f=i.strTranslate,d=r(72736),h=r(9616),p=r(84284).LINE_SPACING,v=r(13448).DESELECTDIM,m=r(43028),g=r(7152),y=r(10624).appendArrayPointValue,x=e.exports={};function b(e){return"none"===e?void 0:e}x.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,c=t.lineposition,f=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call(u.fill,a),i&&e.style("font-weight",i),n&&e.style("font-style",n),r&&e.style("font-variant",r),f&&e.style("text-transform",b(function(e){return _[e]}(f))),l&&e.style("text-shadow","auto"===l?d.makeTextShadow(u.contrast(a)):b(l)),c&&e.style("text-decoration-line",b(function(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(c)))};var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function w(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=i&&x.getPatternAttr(i.shape,0,"");if(o){var s=x.getPatternAttr(i.bgcolor,0,null),l=x.getPatternAttr(i.fgcolor,0,null),c=i.fgopacity,f=x.getPatternAttr(i.size,0,8),d=x.getPatternAttr(i.solidity,0,.3),h=t.uid;x.pattern(e,"point",r,h,o,f,d,void 0,i.fillmode,s,l,c)}else if(a&&"none"!==a.type){var p,v,m=a.type,g="scatterfill-"+t.uid;n&&(g="legendfill-"+t.uid),n||void 0===a.start&&void 0===a.stop?("horizontal"===m&&(m+="reversed"),e.call(x.gradient,r,g,m,a.colorscale,"fill")):("horizontal"===m?(p={x:a.start,y:0},v={x:a.stop,y:0}):"vertical"===m&&(p={x:0,y:a.start},v={x:0,y:a.stop}),p.x=t._xA.c2p(void 0===p.x?t._extremes.x.min[0].val:p.x,!0),p.y=t._yA.c2p(void 0===p.y?t._extremes.y.min[0].val:p.y,!0),v.x=t._xA.c2p(void 0===v.x?t._extremes.x.max[0].val:v.x,!0),v.y=t._yA.c2p(void 0===v.y?t._extremes.y.max[0].val:v.y,!0),e.call(E,r,g,"linear",a.colorscale,"fill",p,v,!0,!1))}else t.fillcolor&&e.call(u.fill,t.fillcolor)}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,i){e.call(x.setPosition,t,r).call(x.setSize,n,i)},x.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);return!!(o(i)&&o(a)&&t.node())&&("text"===t.node().nodeName?t.attr("x",i).attr("y",a):t.attr("transform",f(i,a)),!0)},x.translatePoints=function(e,t,r){e.each((function(e){var i=n.select(this);x.translatePoint(e,i,t,r)}))},x.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,i=t.yaxis;e.each((function(t){var a=t[0].trace,o=a.xcalendar,s=a.ycalendar,u=l.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(u).each((function(e){x.hideOutsideRangePoint(e,n.select(this),r,i,o,s)}))}))}},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,i){t.style("fill","none");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";u.stroke(t,n||a.color),x.dashLine(t,s,o)},x.lineGroupStyle=function(e,t,r,i){e.style("fill","none").each((function(e){var a=(((e||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=i||a.dash||"";n.select(this).call(u.stroke,r||a.color).call(x.dashLine,s,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,t){var r=n.select(e.node());w(e,((r.data()[0]||[])[0]||{}).trace||{},t,!1)},x.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each((function(e){var i=n.select(this);e[0].trace&&w(i,e[0].trace,t,r)}))};var k=r(71984);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(k).forEach((function(e){var t=k[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,x.symbolBackOffs[r]=t.backoff||0,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 T=x.symbolNames.length;function A(e,t,r,n){var i=e%100;return x.symbolFuncs[i](t,r,n)+(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>=T||e>=400?0:Math.floor(Math.max(e,0))};var M=a("~f"),S={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function E(e,t,r,a,o,l,c,f,d,h){var p,v=o.length;"linear"===a?p={node:"linearGradient",attrs:{x1:c.x,y1:c.y,x2:f.x,y2:f.y,gradientUnits:d?"userSpaceOnUse":"objectBoundingBox"},reversed:h}:"radial"===a&&(p={node:"radialGradient",reversed:h});for(var m=new Array(v),g=0;g=0&&void 0===e.i&&(e.i=o.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):void 0===e.mo?s.opacity:e.mo),n.ms2mrc){var c;c="various"===e.ms||"various"===s.size?3:n.ms2mrc(e.ms),e.mrc=c,n.selectedSizeFn&&(c=e.mrc=n.selectedSizeFn(e));var f=x.symbolNumber(e.mx||s.symbol)||0;e.om=f%200>=100;var d=ne(e,r),h=W(e,r);t.attr("d",A(f,c,d,h))}var p,v,m,g=!1;if(e.so)m=l.outlierwidth,v=l.outliercolor,p=s.outliercolor;else{var y=(l||{}).width;m=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,v="mlc"in e?e.mlcc=n.lineScale(e.mlc):i.isArrayOrTypedArray(l.color)?u.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(p=u.defaultLine,g=!0),p="mc"in e?e.mcc=n.markerScale(e.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(e))}if(e.om)t.call(u.stroke,p).style({"stroke-width":(m||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:m)+"px");var b=s.gradient,_=e.mgt;_?g=!0:_=b&&b.type,i.isArrayOrTypedArray(_)&&(_=_[0],S[_]||(_=0));var w=s.pattern,k=w&&x.getPatternAttr(w.shape,e.i,"");if(_&&"none"!==_){var T=e.mgc;T?g=!0:T=b.color;var M=r.uid;g&&(M+="-"+e.i),x.gradient(t,a,M,_,[[0,T],[1,p]],"fill")}else if(k){var E=!1,C=w.fgcolor;!C&&o&&o.color&&(C=o.color,E=!0);var L=x.getPatternAttr(C,e.i,o&&o.color||null),P=x.getPatternAttr(w.bgcolor,e.i,null),O=w.fgopacity,I=x.getPatternAttr(w.size,e.i,8),R=x.getPatternAttr(w.solidity,e.i,.3);E=E||e.mcc||i.isArrayOrTypedArray(w.shape)||i.isArrayOrTypedArray(w.bgcolor)||i.isArrayOrTypedArray(w.fgcolor)||i.isArrayOrTypedArray(w.size)||i.isArrayOrTypedArray(w.solidity);var D=r.uid;E&&(D+="-"+e.i),x.pattern(t,"point",a,D,k,I,R,e.mcc,w.fillmode,P,L,O)}else i.isArrayOrTypedArray(p)?u.fill(t,p[e.i]):u.fill(t,p);m&&u.stroke(t,v)}},x.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=x.tryColorscale(r,""),t.lineScale=x.tryColorscale(r,"line"),l.traceIs(e,"symbols")&&(t.ms2mrc=m.isBubble(e)?g(e):function(){return(r.size||6)/2}),e.selectedpoints&&i.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.marker||{},o=r.marker||{},s=n.marker||{},u=a.opacity,c=o.opacity,f=s.opacity,d=void 0!==c,h=void 0!==f;(i.isArrayOrTypedArray(u)||d||h)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?a.opacity:e.mo;return e.selected?d?c:t:h?f:v*t});var p=a.color,m=o.color,g=s.color;(m||g)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?m||t:g||t});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.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||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,c=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?l||t:c||(l?t:u.addOpacity(t,v))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedPointStyleFns(t),i=t.marker||{},a=[];r.selectedOpacityFn&&a.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&a.push((function(e,t){u.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&a.push((function(e,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);e.attr("d",A(x.symbolNumber(a),o,ne(n,t),W(n,t))),n.mrc2=o})),a.length&&e.each((function(e){for(var t=n.select(this),r=0;r0?r:0}function R(e,t,r){return r&&(e=j(e)),t?z(e[1]):D(e[0])}function D(e){var t=n.round(e,2);return C=t,t}function z(e){var t=n.round(e,2);return L=t,t}function F(e,t,r,n){var i=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+a*a,.25),u=Math.pow(o*o+s*s,.25),c=(u*u*i-l*l*o)*n,f=(u*u*a-l*l*s)*n,d=3*u*(l+u),h=3*l*(l+u);return[[D(t[0]+(d&&c/d)),z(t[1]+(d&&f/d))],[D(t[0]-(h&&c/h)),z(t[1]-(h&&f/h))]]}x.textPointStyle=function(e,t,r){if(e.size()){var a;if(t.selectedpoints){var o=x.makeSelectedTextStyleFns(t);a=o.selectedTextColorFn}var s=t.texttemplate,l=r._fullLayout;e.each((function(e){var o=n.select(this),u=s?i.extractOption(e,t,"txt","texttemplate"):i.extractOption(e,t,"tx","text");if(u||0===u){if(s){var c=t._module.formatLabels,f=c?c(e,t,l):{},h={};y(h,t,e.i);var p=t._meta||{};u=i.texttemplateString(u,f,l._d3locale,h,e,p)}var v=e.tp||t.textposition,m=I(e,t),g=a?a(e):e.tc||t.textfont.color;o.call(x.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:m,color:g}).text(u).call(d.convertToTspans,r).call(O,v,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 i=n.select(this),a=r.selectedTextColorFn(e),o=e.tp||t.textposition,s=I(e,t);u.fill(i,a);var c=l.traceIs(t,"bar-like");O(i,o,s,e.mrc2||e.mrc,c)}))}},x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],i=[];for(r=1;r=u||w>=f&&w<=u)&&(k<=d&&k>=c||k>=d&&k<=c)&&(e=[w,k])}return e}x.steps=function(e){var t=N[e]||B;return function(e){for(var r="M"+D(e[0][0])+","+z(e[0][1]),n=e.length,i=1;i=1e4&&(x.savedBBoxes={},U=0),r&&(x.savedBBoxes[r]=m),U++,i.extendFlat({},m)},x.setClipUrl=function(e,t,r){e.attr("clip-path",V(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",i=e.attr?"attr":"setAttribute",a=e[n]("transform")||"";return t=t||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=f(t,r)).trim(),e[i]("transform",a),a},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",i=e.attr?"attr":"setAttribute",a=e[n]("transform")||"";return t=t||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+t+","+r+")").trim(),e[i]("transform",a),a};var H=/\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(H,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var G=/translate\([^)]*\)\s*$/;function W(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}x.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,i=n.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(G);e=1===t&&1===r?[]:[f(o,s),"scale("+t+","+r+")",f(-o,-s)],l&&e.push(l),i.attr("transform",e.join(""))}}))},x.getMarkerStandoff=W;var Y,Z,X,K,J,$,Q=Math.atan2,ee=Math.cos,te=Math.sin;function re(e,t){var r=t[0],n=t[1];return[r*ee(e)-n*te(e),r*te(e)+n*ee(e)]}function ne(e,t){var r,n,a=e.ma;void 0===a&&((a=t.marker.angle)&&!i.isArrayOrTypedArray(a)||(a=0));var s=t.marker.angleref;if("previous"===s||"north"===s){if(t._geo){var l=t._geo.project(e.lonlat);r=l[0],n=l[1]}else{var u=t._xA,c=t._yA;if(!u||!c)return 90;r=u.c2p(e.x),n=c.c2p(e.y)}if(t._geo){var f,d=e.lonlat[0],h=e.lonlat[1],p=t._geo.project([d,h+1e-5]),v=t._geo.project([d+1e-5,h]),m=Q(v[1]-n,v[0]-r),g=Q(p[1]-n,p[0]-r);if("north"===s)f=a/180*Math.PI;else if("previous"===s){var y=d/180*Math.PI,x=h/180*Math.PI,b=Y/180*Math.PI,_=Z/180*Math.PI,w=b-y,k=ee(_)*te(w),T=te(_)*ee(x)-ee(_)*te(x)*ee(w);f=-Q(k,T)-Math.PI,Y=d,Z=h}var A=re(m,[ee(f),0]),M=re(g,[te(f),0]);a=Q(A[1]+M[1],A[0]+M[0])/Math.PI*180,"previous"!==s||$===t.uid&&e.i===J+1||(a=null)}if("previous"===s&&!t._geo)if($===t.uid&&e.i===J+1&&o(r)&&o(n)){var S=r-X,E=n-K,C=t.line&&t.line.shape||"",L=C.slice(C.length-1);"h"===L&&(E=0),"v"===L&&(S=0),a+=Q(E,S)/Math.PI*180+90}else a=null}return X=r,K=n,J=e.i,$=t.uid,a}x.getMarkerAngle=ne},71984:function(e,t,r){"use strict";var n,i,a,o,s=r(21984),l=r(33428).round,u="M0,0Z",c=Math.sqrt(2),f=Math.sqrt(3),d=Math.PI,h=Math.cos,p=Math.sin;function v(e){return null===e}function m(e,t,r){if((!e||e%360===0)&&!t)return r;if(a===e&&o===t&&n===r)return i;function l(e,r){var n=h(e),i=p(e),a=r[0],o=r[1]+(t||0);return[a*n-o*i,a*i+o*n]}a=e,o=t,n=r;for(var u=e/180*d,c=0,f=0,v=s(r),m="",g=0;g0,f=e._context.staticPlot;t.each((function(t){var d,h=t[0].trace,p=h.error_x||{},v=h.error_y||{};h.ids&&(d=function(e){return e.id});var m=o.hasMarkers(h)&&h.marker.maxdisplayed>0;v.visible||p.visible||(t=[]);var g=n.select(this).selectAll("g.errorbar").data(t,d);if(g.exit().remove(),t.length){p.visible||g.selectAll("path.xerror").remove(),v.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var y=g.enter().append("g").classed("errorbar",!0);c&&y.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(g,r.layerClipId,e),g.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)};return void 0!==e.yh&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),i(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),i(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}(e,l,u);if(!m||e.vis){var a,o=t.select("path.yerror");if(v.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var d=v.width;a="M"+(r.x-d)+","+r.yh+"h"+2*d+"m-"+d+",0V"+r.ys,r.noYS||(a+="m-"+d+",0h"+2*d),o.size()?c&&(o=o.transition().duration(s.duration).ease(s.easing)):o=t.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",a)}else o.remove();var h=t.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var g=(p.copy_ystyle?v:p).width;a="M"+r.xh+","+(r.y-g)+"v"+2*g+"m0,-"+g+"H"+r.xs,r.noXS||(a+="m0,-"+g+"v"+2*g),h.size()?c&&(h=h.transition().duration(s.duration).ease(s.easing)):h=t.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("xerror",!0),h.attr("d",a)}else h.remove()}}))}}))}},92036:function(e,t,r){"use strict";var n=r(33428),i=r(76308);e.exports=function(e){e.each((function(e){var t=e[0].trace,r=t.error_y||{},a=t.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)}))}},55756:function(e,t,r){"use strict";var n=r(25376),i=r(65460).hoverlabel,a=r(92880).extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:"none"}}},55056:function(e,t,r){"use strict";var n=r(3400),i=r(24040);function a(e,t,r,i){i=i||n.identity,Array.isArray(e)&&(t[0][r]=i(e))}e.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 s=0;s=0&&r.indexX[0]._length||be<0||be>K[0]._length)return v.unhoverRaw(e,t)}else xe="xpx"in t?t.xpx:X[0]._length/2,be="ypx"in t?t.ypx:K[0]._length/2;if(t.pointerX=xe+X[0]._offset,t.pointerY=be+K[0]._offset,re="xval"in t?y.flat(x,t.xval):y.p2c(X,xe),ne="yval"in t?y.flat(x,t.yval):y.p2c(K,be),!i(re[0])||!i(ne[0]))return o.warn("Fx.hover failed",t,e),v.unhoverRaw(e,t)}var Te=1/0;function Ae(r,n){for(ae=0;aepe&&(ve.splice(0,pe),Te=ve[0].distance),A&&0!==te&&0===ve.length){he.distance=te,he.index=!1;var c=se._module.hoverPoints(he,fe,de,"closest",{hoverLayer:b._hoverlayer});if(c&&(c=c.filter((function(e){return e.spikeDistance<=te}))),c&&c.length){var f,d=c.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(d.length){var h=d[0];i(h.x0)&&i(h.y0)&&(f=Se(h),(!ge.vLinePoint||ge.vLinePoint.spikeDistance>f.spikeDistance)&&(ge.vLinePoint=f))}var v=c.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(v.length){var m=v[0];i(m.x0)&&i(m.y0)&&(f=Se(m),(!ge.hLinePoint||ge.hLinePoint.spikeDistance>f.spikeDistance)&&(ge.hLinePoint=f))}}}}}function Me(e,t,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(e.distance)Ne-1;Be--)Ve(ve[Be]);ve=je,Pe()}var He=e._hoverdata,Ge=[],We=V(e),Ye=H(e);for(ie=0;ie1||ve.length>1)||"closest"===M&&ye&&ve.length>1,ot=p.combine(b.plot_bgcolor||p.background,b.paper_bgcolor),st=R(ve,{gd:e,hovermode:M,rotateLabels:at,bgColor:ot,container:b._hoverlayer,outerContainer:b._paper.node(),commonLabelOpts:b.hoverlabel,hoverdistance:b.hoverdistance}),lt=st.hoverLabels;if(y.isUnifiedHover(M)||(function(e,t,r,n){var i,a,o,s,l,u,c,f=t?"xa":"ya",d=t?"ya":"xa",h=0,p=1,v=e.size(),m=new Array(v),g=0,y=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(e){return e*r._invScaleX},k=function(e){return e*r._invScaleY};function A(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,a>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=o;i=!1}if(i){var n=0;for(s=0;st.pmax&&n++;for(s=e.length-1;s>=0&&!(n<=0);s--)(u=e[s]).pos>t.pmax-1&&(u.del=!0,n--);for(s=0;s=0;l--)e[l].dp-=o;for(s=e.length-1;s>=0&&!(n<=0);s--)(u=e[s]).pos+u.dp+u.size>t.pmax&&(u.del=!0,n--)}}}for(e.each((function(e){var n=e[f],i=e[d],a="x"===n._id.charAt(0),o=n.range;0===g&&o&&o[0]>o[1]!==a&&(p=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var u,c,h=z(e,t),v=e.anchor,A="end"===v?-1:1;if("middle"===v)c=(u=e.crossPos+(a?k(h.y-e.by/2):w(e.bx/2+e.tx2width/2)))+(a?k(e.by):w(e.bx));else if(a)c=(u=e.crossPos+k(S+h.y)-k(e.by/2-S))+k(e.by);else{var M=w(A*S+h.x),E=M+w(A*e.bx);u=e.crossPos+Math.min(M,E),c=e.crossPos+Math.max(M,E)}a?void 0!==b&&void 0!==_&&Math.min(c,_)-Math.max(u,b)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==y&&void 0!==x&&Math.min(c,x)-Math.max(u,y)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}m[g++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?T:1)/2,pmin:s,pmax:l}]})),m.sort((function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)}));!i&&h<=v;){for(h++,i=!0,s=0;s.01&&C.pmin===L.pmin&&C.pmax===L.pmax){for(l=E.length-1;l>=0;l--)E[l].dp+=a;for(M.push.apply(M,E),m.splice(s+1,1),c=0,l=M.length-1;l>=0;l--)c+=M[l].dp;for(o=c/M.length,l=M.length-1;l>=0;l--)M[l].dp-=o;i=!1}else s++}m.forEach(A)}for(s=m.length-1;s>=0;s--){var P=m[s];for(l=P.length-1;l>=0;l--){var O=P[l],I=O.datum;I.offset=O.dp,I.del=O.del}}}(lt,at,b,st.commonLabelBoundingBox),F(lt,at,b._invScaleX,b._invScaleY)),l&&l.tagName){var ut=g.getComponentMethod("annotations","hasClickToShow")(e,Ge);d(n.select(l),ut?"pointer":"")}l&&!a&&function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=e._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(e,0,He)&&(He&&e.emit("plotly_unhover",{event:t,points:He}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:X,yaxes:K,xvals:re,yvals:ne}))}(e,t,r,a,l)}))},t.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var i=t.gd,a=V(i),o=H(i),s=!1,l=R(e.map((function(e){var r=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,u=e.eventData;if(u){var c=Math.min(r,n),f=Math.max(r,n),d=Math.min(s,l),h=Math.max(s,l),v=e.trace;if(g.traceIs(v,"gl3d")){var m=i._fullLayout[v.scene]._scene.container,y=m.offsetLeft,x=m.offsetTop;c+=y,f+=y,d+=x,h+=x}u.bbox={x0:c+o,x1:f+o,y0:d+a,y1:h+a},t.inOut_bbox&&t.inOut_bbox.push(u.bbox)}else u=!1;return{color:e.color||p.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,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,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:u}})),{gd:i,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||p.background,container:n.select(t.container),outerContainer:t.outerContainer||t.container}).hoverLabels,u=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 R(e,t){var r=t.gd,i=r._fullLayout,a=t.hovermode,s=t.rotateLabels,c=t.bgColor,d=t.container,v=t.outerContainer,m=t.commonLabelOpts||{};if(0===e.length)return[[]];var k=t.fontFamily||x.HOVERFONT,T=t.fontSize||x.HOVERFONTSIZE,A=t.fontWeight||i.font.weight,M=t.fontStyle||i.font.style,C=t.fontVariant||i.font.variant,L=t.fontTextcase||i.font.textcase,P=t.fontLineposition||i.font.lineposition,I=t.fontShadow||i.font.shadow,R=e[0],z=R.xa,F=R.ya,N=a.charAt(0),B=N+"Label",j=R[B];if(void 0===j&&"multicategory"===z.type)for(var U=0;Ui.width-w&&(O=i.width-w),t.attr("d","M"+(y-O)+",0L"+(y-O+S)+","+_+S+"H"+w+"v"+_+(2*E+b.height)+"H"+-w+"V"+_+S+"H"+(y-O-S)+"Z"),y=O,Q.minX=y-w,Q.maxX=y+w,"top"===z.side?(Q.minY=x-(2*E+b.height),Q.maxY=x-E):(Q.minY=x+E,Q.maxY=x+(2*E+b.height))}else{var D,N,B;"right"===F.side?(D="start",N=1,B="",y=z._offset+z._length):(D="end",N=-1,B="-",y=z._offset),x=F._offset+(R.y0+R.y1)/2,s.attr("text-anchor",D),t.attr("d","M0,0L"+B+S+","+S+"V"+(E+b.height/2)+"h"+B+(2*E+b.width)+"V-"+(E+b.height/2)+"H"+B+S+"V-"+S+"Z"),Q.minY=x-(E+b.height/2),Q.maxY=x+(E+b.height/2),"right"===F.side?(Q.minX=y+S,Q.maxX=y+S+(2*E+b.width)):(Q.minX=y-S-(2*E+b.width),Q.maxX=y-S);var U,q=b.height/2,H=V-b.top-q,W="clip"+i._uid+"commonlabel"+F._id;if(y=0?pe:ve+ye=0?ve:Me+ye=0?de:he+xe=0?he:Se+xe=0,"top"!==e.idealAlign&&J||!$?J?(B+=q/2,e.anchor="start"):e.anchor="middle":(B-=q/2,e.anchor="end"),e.crossPos=B;else{if(e.pos=B,J=N+U/2+Q<=H,$=N-U/2-Q>=0,"left"!==e.idealAlign&&J||!$)if(J)N+=U/2,e.anchor="start";else{e.anchor="middle";var ee=Q/2,te=N+ee-H,re=N-ee;te>0&&(N-=te),re<0&&(N+=-re)}else N-=U/2,e.anchor="end";e.crossPos=N}_.attr("text-anchor",e.anchor),R&&O.attr("text-anchor",e.anchor),t.attr("transform",l(N,B)+(s?u(w):""))})),{hoverLabels:Ee,commonLabelBoundingBox:Q}}function D(e,t,r,n,i,a){var s="",l="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=o.templateString(e.name,e.trace._meta)),s=U(e.name,e.nameLength));var u=r.charAt(0),c="x"===u?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(l+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(l+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(l+=(l?"z: ":"")+e.zLabel)):t&&e[u+"Label"]===i?l=e[c+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(l=e.yLabel):l=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(l+=(l?"
":"")+e.text),void 0!==e.extraText&&(l+=(l?"
":"")+e.extraText),a&&""===l&&!e.hovertemplate&&(""===s&&a.remove(),l=s);var f=e.hovertemplate||!1;if(f){var d=e.hovertemplateLabels||e;e[u+"Label"]!==i&&(d[u+"other"]=d[u+"Val"],d[u+"otherLabel"]=d[u+"Label"]),l=(l=o.hovertemplateString(f,d,n._d3locale,e.eventData[0]||{},e.trace._meta)).replace(I,(function(t,r){return s=U(r,e.nameLength),""}))}return[l,s]}function z(e,t){var r=0,n=e.offset;return t&&(n*=-M,r=e.offset*A),{x:r,y:n}}function F(e,t,r,i){var a=function(e){return e*r},o=function(e){return e*i};e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var i=r.select("text.nums"),s=e.anchor,l="end"===s?-1:1,u=function(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(S+E),n=r+t*(e.txwidth+E);return"middle"===e.anchor&&(r-=e.tx2width/2,n+=e.txwidth/2+E),{alignShift:t,textShiftX:r,text2ShiftX:n}}(e),c=z(e,t),d=c.x,p=c.y,v="middle"===s;r.select("path").attr("d",v?"M-"+a(e.bx/2+e.tx2width/2)+","+o(p-e.by/2)+"h"+a(e.bx)+"v"+o(e.by)+"h-"+a(e.bx)+"Z":"M0,0L"+a(l*S+d)+","+o(S+p)+"v"+o(e.by/2-S)+"h"+a(l*e.bx)+"v-"+o(e.by)+"H"+a(l*S+d)+"V"+o(p-S)+"Z");var m=d+u.textShiftX,g=p+e.ty0-e.by/2+E,y=e.textAlign||"auto";"auto"!==y&&("left"===y&&"start"!==s?(i.attr("text-anchor","start"),m=v?-e.bx/2-e.tx2width/2+E:-e.bx-E):"right"===y&&"end"!==s&&(i.attr("text-anchor","end"),m=v?e.bx/2-e.tx2width/2-E:e.bx+E)),i.call(f.positionText,a(m),o(g)),e.tx2width&&(r.select("text.name").call(f.positionText,a(u.text2ShiftX+u.alignShift*E+d),o(p+e.ty0-e.by/2+E)),r.select("rect").call(h.setRect,a(u.text2ShiftX+(u.alignShift-1)*e.tx2width/2+d),o(p-e.by/2-1),a(e.tx2width),o(e.by+2)))}))}function N(e,t){var r=e.index,n=e.trace||{},a=e.cd[0],s=e.cd[r]||{};function l(e){return e||i(e)&&0===e}var u=Array.isArray(r)?function(e,t){var i=o.castOption(a,r,e);return l(i)?i:o.extractOption({},n,"",t)}:function(e,t){return o.extractOption(s,n,e,t)};function c(t,r,n){var i=u(r,n);l(i)&&(e[t]=i)}if(c("hoverinfo","hi","hoverinfo"),c("bgcolor","hbg","hoverlabel.bgcolor"),c("borderColor","hbc","hoverlabel.bordercolor"),c("fontFamily","htf","hoverlabel.font.family"),c("fontSize","hts","hoverlabel.font.size"),c("fontColor","htc","hoverlabel.font.color"),c("fontWeight","htw","hoverlabel.font.weight"),c("fontStyle","hty","hoverlabel.font.style"),c("fontVariant","htv","hoverlabel.font.variant"),c("nameLength","hnl","hoverlabel.namelength"),c("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:m.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:m.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 f=m.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+f+" / -"+m.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xb1 "+f,"x"===t&&(e.distance+=1)}if(!isNaN(e.yerr)&&!("log"===e.ya.type&&e.yerr<=0)){var d=m.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+d+" / -"+m.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xb1 "+d,"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 B(e,t,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,u=r.event,c=!!t.hLinePoint,f=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),f||c){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(c){var v,g,y=t.hLinePoint;n=y&&y.xa,"cursor"===(i=y&&y.ya).spikesnap?(v=u.pointerX,g=u.pointerY):(v=n._offset+y.x,g=i._offset+y.y);var x,b,_=a.readability(y.color,d)<1.5?p.contrast(d):y.color,w=i.spikemode,k=i.spikethickness,T=i.spikecolor||_,A=m.getPxPosition(e,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,b=v),-1!==w.indexOf("across")){var M=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":k,stroke:T,"stroke-dasharray":h.dashStyle(i.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":k+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==i.side?k:-k),cy:g,r:k,fill:T}).classed("spikeline",!0)}if(f){var E,C,L=t.vLinePoint;n=L&&L.xa,i=L&&L.ya,"cursor"===n.spikesnap?(E=u.pointerX,C=u.pointerY):(E=n._offset+L.x,C=i._offset+L.y);var P,O,I=a.readability(L.color,d)<1.5?p.contrast(d):L.color,R=n.spikemode,D=n.spikethickness,z=n.spikecolor||I,F=m.getPxPosition(e,n);if(-1!==R.indexOf("toaxis")||-1!==R.indexOf("across")){if(-1!==R.indexOf("toaxis")&&(P=F,O=C),-1!==R.indexOf("across")){var N=n._counterDomainMin,B=n._counterDomainMax;"free"===n.anchor&&(N=Math.min(N,n.position),B=Math.max(B,n.position)),P=l.t+(1-B)*l.h,O=l.t+(1-N)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":D,stroke:z,"stroke-dasharray":h.dashStyle(n.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":D+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==R.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==n.side?D:-D),r:D,fill:z}).classed("spikeline",!0)}}}function j(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function U(e,t){return f.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}function q(e,t,r){var n=t[e+"a"],i=t[e+"Val"],a=t.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=t.trace[e+"periodalignment"];if(o){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var u=s[e+"End"];void 0===u&&(u=s[e]);var c=u-l;"end"===o?i+=c:"middle"===o&&(i+=c/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=a.t.dPos)),i}function V(e){return e.offsetTop+e.clientTop}function H(e){return e.offsetLeft+e.clientLeft}function G(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,a=n.top,s=i+n.width,l=a+n.height,u=o.apply3DTransform(r._invTransform)(i,a),c=o.apply3DTransform(r._invTransform)(s,l),f=u[0],d=u[1],h=c[0],p=c[1];return{x:f,y:d,width:h-f,height:p-d,top:Math.min(d,p),left:Math.min(f,h),right:Math.max(f,h),bottom:Math.max(d,p)}}},16132:function(e,t,r){"use strict";var n=r(3400),i=r(76308),a=r(10624).isUnifiedHover;e.exports=function(e,t,r,o){o=o||{};var s=t.legend;function l(e){o.font[e]||(o.font[e]=s?t.legend.font[e]:t.font[e])}t&&a(t.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(o.bgcolor||(o.bgcolor=i.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)}},41008:function(e,t,r){"use strict";var n=r(3400),i=r(65460);e.exports=function(e,t){function r(r,a){return void 0!==t[r]?t[r]:n.coerce(e,t,i,r,a)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},93024:function(e,t,r){"use strict";var n=r(33428),i=r(3400),a=r(86476),o=r(10624),s=r(65460),l=r(83292);e.exports={moduleType:"component",name:"fx",constants:r(92456),schema:{layout:s},attributes:r(55756),layoutAttributes:s,supplyLayoutGlobalDefaults:r(81976),supplyDefaults:r(95448),supplyLayoutDefaults:r(88336),calc:r(55056),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,r){return i.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return i.castOption(e,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,loneUnhover:function(e){var t=i.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:r(62376)}},65460:function(e,t,r){"use strict";var n=r(92456),i=r(25376),a=i({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,e.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"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},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:a,grouptitlefont:i({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"}}},88336:function(e,t,r){"use strict";var n=r(3400),i=r(65460),a=r(41008),o=r(16132);e.exports=function(e,t){function r(r,a){return n.coerce(e,t,i,r,a)}a(e,t)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=t._has("mapbox"),l=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((s||l)&&1===u||s&&l&&2===u)&&(t.dragmode="pan"),o(e,t,r),n.coerceFont(r,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},81976:function(e,t,r){"use strict";var n=r(3400),i=r(16132),a=r(65460);e.exports=function(e,t){i(e,t,(function(r,i){return n.coerce(e,t,a,r,i)}))}},12704:function(e,t,r){"use strict";var n=r(3400),i=r(53756).counter,a=r(86968).u,o=r(33816).idRegex,s=r(31780),l={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:[i("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:a({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 u(e,t,r){var n=t[r+"axes"],i=Object.keys((e._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function c(e,t,r,n,i,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),d=0;d1){d||h||p||"independent"===T("pattern")&&(d=!0),m._hasSubplotGrid=d;var x,b,_="top to bottom"===T("roworder"),w=d?.2:.1,k=d?.3:.1;v&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),m._domains={x:c("x",T,w,x,y),y:c("y",T,k,b,g,_)}}else delete t.grid}function T(e,t){return n.coerce(r,m,l,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,i,a,o,s,l,c,d=e.grid||{},h=t._subplots,p=r._hasSubplotGrid,v=r.rows,m=r.columns,g="independent"===r.pattern,y=r._axisMap={};if(p){var x=d.subplots||[];l=r.subplots=new Array(v);var b=1;for(n=0;n("legend"===e?1:0));if(!1===M&&(r[e]=void 0),(!1!==M||f.uirevision)&&(h("uirevision",r.uirevision),!1!==M)){h("borderwidth");var S,E,C,L="h"===h("orientation"),P="paper"===h("yref"),O="paper"===h("xref"),I="left";if(L?(S=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?P?(E=1.1,C="bottom"):(E=1,C="top"):P?(E=-.1,C="top"):(E=0,C="bottom")):(E=1,C="auto",O?S=1.02:(S=1,I="right")),i.coerce(f,d,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:S}},"x"),i.coerce(f,d,{y:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:E}},"y"),h("traceorder",_),u.isGrouped(r[e])&&h("tracegroupgap"),h("entrywidth"),h("entrywidthmode"),h("indentation"),h("itemsizing"),h("itemwidth"),h("itemclick"),h("itemdoubleclick"),h("groupclick"),h("xanchor",I),h("yanchor",C),h("valign"),i.noneOrAll(f,d,["x","y"]),h("title.text")){h("title.side",L?"left":"top");var R=i.extendFlat({},p,{size:i.bigFont(p.size)});i.coerceFont(h,"title.font",R)}}}}e.exports=function(e,t,r){var n,a=r.slice(),o=t.shapes;if(o)for(n=0;n1)}var N=p.hiddenlabels||[];if(!k&&(!p.showlegend||!S.length))return s.selectAll("."+w).remove(),p._topdefs.select("#"+r).remove(),a.autoMargin(e,w);var B=i.ensureSingle(s,"g",w,(function(e){k||e.attr("pointer-events","all")})),j=i.ensureSingleById(p._topdefs,"clipPath",r,(function(e){e.append("rect")})),U=i.ensureSingle(B,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));U.call(c.stroke,d.bordercolor).call(c.fill,d.bgcolor).style("stroke-width",d.borderwidth+"px");var q,V=i.ensureSingle(B,"g","scrollbox"),H=d.title;d._titleWidth=0,d._titleHeight=0,H.text?((q=i.ensureSingle(V,"text",w+"titletext")).attr("text-anchor","start").call(u.font,H.font).text(H.text),C(q,V,e,d,_)):V.selectAll("."+w+"titletext").remove();var G=i.ensureSingle(B,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(c.fill,h.scrollBarColor)})),W=V.selectAll("g.groups").data(S);W.enter().append("g").attr("class","groups"),W.exit().remove();var Y=W.selectAll("g.traces").data(i.identity);Y.enter().append("g").attr("class","traces"),Y.exit().remove(),Y.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==N.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(M,e,d)})).call(x,e,d).each((function(){k||n.select(this).call(E,e,w)})),i.syncOrAsync([a.previousPromises,function(){return function(e,t,r,i){var a=e._fullLayout,o=O(i);i||(i=a[o]);var s=a._size,l=b.isVertical(i),c=b.isGrouped(i),f="fraction"===i.entrywidthmode,d=i.borderwidth,p=2*d,v=h.itemGap,m=i.indentation+i.itemwidth+2*v,g=2*(d+v),y=P(i),x=i.y<0||0===i.y&&"top"===y,_=i.y>1||1===i.y&&"bottom"===y,w=i.tracegroupgap,k={};i._maxHeight=Math.max(x||_?a.height/2:s.h,30);var A=0;i._width=0,i._height=0;var M=function(e){var t=0,r=0,n=e.title.side;return n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight)),[t,r]}(i);if(l)r.each((function(e){var t=e[0].height;u.setTranslate(this,d+M[0],d+M[1]+i._height+t/2+v),i._height+=t,i._width=Math.max(i._width,e[0].width)})),A=m+i._width,i._width+=v+m+p,i._height+=g,c&&(t.each((function(e,t){u.setTranslate(this,0,t*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var S=L(i),E=i.x<0||0===i.x&&"right"===S,C=i.x>1||1===i.x&&"left"===S,I=_||x,R=a.width/2;i._maxWidth=Math.max(E?I&&"left"===S?s.l+s.w:R:C?I&&"right"===S?s.r+s.w:R:s.w,2*m);var D=0,z=0;r.each((function(e){var t=T(e,i,m);D=Math.max(D,t),z+=t})),A=null;var F=0;if(c){var N=0,B=0,j=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=T(r,i,m),a=r[0].height;u.setTranslate(this,M[0],M[1]+d+v+a/2+t),t+=a,e=Math.max(e,n),k[r[0].trace.legendgroup]=e}));var r=e+v;B>0&&r+d+B>i._maxWidth?(F=Math.max(F,B),B=0,j+=N+w,N=t):N=Math.max(N,t),u.setTranslate(this,B,j),B+=r})),i._width=Math.max(F,B)+d,i._height=j+N+g}else{var U=r.size(),q=z+p+(U-1)*v=i._maxWidth&&(F=Math.max(F,W),H=0,G+=V,i._height+=V,V=0),u.setTranslate(this,M[0]+d+H,M[1]+d+G+t/2+v),W=H+r+v,H+=n,V=Math.max(V,t)})),q?(i._width=H+p,i._height=V+g):(i._width=Math.max(F,W)+p,i._height+=V+g)}}i._width=Math.ceil(Math.max(i._width+M[0],i._titleWidth+2*(d+h.titlePad))),i._height=Math.ceil(Math.max(i._height+M[1],i._titleHeight+2*(d+h.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var Y=e._context.edits,Z=Y.legendText||Y.legendPosition;r.each((function(e){var t=n.select(this).select("."+o+"toggle"),r=e[0].height,a=e[0].trace.legendgroup,s=T(e,i,m);c&&""!==a&&(s=k[a]);var d=Z?m:A||s;l||f||(d+=v/2),u.setRect(t,0,-r/2,d,r)}))}(e,W,Y,d)},function(){var t,c,y,x,b=p._size,_=d.borderwidth,T="paper"===d.xref,M="paper"===d.yref;if(H.text&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*v,i=0,a=e.node(),o=u.bBox(a).width;"top center"===t.title.side?i=.5*(t._width-2*r-2*h.titlePad-o):"top right"===t.title.side&&(i=t._width-2*r-2*h.titlePad-o),f.positionText(e,r+h.titlePad+i,r+n)}}(q,d,_),!k){var S,E;S=T?b.l+b.w*d.x-m[L(d)]*d._width:p.width*d.x-m[L(d)]*d._width,E=M?b.t+b.h*(1-d.y)-m[P(d)]*d._effHeight:p.height*(1-d.y)-m[P(d)]*d._effHeight;var C=function(e,t,r,n){var i=e._fullLayout,o=i[t],s=L(o),l=P(o),u="paper"===o.xref,c="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var f=o.y<.5?"b":"t",d=o.x<.5?"l":"r",h={r:i.width-r,l:r+o._width,b:i.height-n,t:n+o._effHeight};if(u&&c)return a.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*m[s],r:o._width*g[s],b:o._effHeight*g[l],t:o._effHeight*m[l]});u?e._fullLayout._reservedMargin[t][f]=h[f]:c||"v"===o.orientation?e._fullLayout._reservedMargin[t][d]=h[d]:e._fullLayout._reservedMargin[t][f]=h[f]}(e,w,S,E);if(C)return;if(p.margin.autoexpand){var O=S,I=E;S=T?i.constrain(S,0,p.width-d._width):O,E=M?i.constrain(E,0,p.height-d._effHeight):I,S!==O&&i.log("Constrain "+w+".x to make legend fit inside graph"),E!==I&&i.log("Constrain "+w+".y to make legend fit inside graph")}u.setTranslate(B,S,E)}if(G.on(".drag",null),B.on("wheel",null),k||d._height<=d._maxHeight||e._context.staticPlot){var R=d._effHeight;k&&(R=d._height),U.attr({width:d._width-_,height:R-_,x:_/2,y:_/2}),u.setTranslate(V,0,0),j.select("rect").attr({width:d._width-2*_,height:R-2*_,x:_,y:_}),u.setClipUrl(V,r,e),u.setRect(G,0,0,0,0),delete d._scrollY}else{var D,z,F,N=Math.max(h.scrollBarMinHeight,d._effHeight*d._effHeight/d._height),W=d._effHeight-N-2*h.scrollBarMargin,Y=d._height-d._effHeight,Z=W/Y,X=Math.min(d._scrollY||0,Y);U.attr({width:d._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:d._effHeight-_,x:_/2,y:_/2}),j.select("rect").attr({width:d._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:d._effHeight-2*_,x:_,y:_+X}),u.setClipUrl(V,r,e),$(X,N,Z),B.on("wheel",(function(){$(X=i.constrain(d._scrollY+n.event.deltaY/W*Y,0,Y),N,Z),0!==X&&X!==Y&&n.event.preventDefault()}));var K=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;D="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,F=X})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(z="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,X=function(e,t,r){var n=(r-t)/Z+e;return i.constrain(n,0,Y)}(F,D,z),$(X,N,Z))}));G.call(K);var J=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(D=e.changedTouches[0].clientY,F=X)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(z=e.changedTouches[0].clientY,X=function(e,t,r){var n=(t-r)/Z+e;return i.constrain(n,0,Y)}(F,D,z),$(X,N,Z))}));V.call(J)}function $(t,r,n){d._scrollY=e._fullLayout[w]._scrollY=t,u.setTranslate(V,0,-t),u.setRect(G,d._width,h.scrollBarMargin+t*n,h.scrollBarWidth,r),j.select("rect").attr("y",_+t)}e._context.edits.legendPosition&&(B.classed("cursor-move",!0),l.init({element:B.node(),gd:e,prepFn:function(e){if(e.target!==G.node()){var t=u.getTranslate(B);y=t.x,x=t.y}},moveFn:function(e,r){if(void 0!==y&&void 0!==x){var n=y+e,i=x+r;u.setTranslate(B,n,i),t=l.align(n,d._width,b.l,b.l+b.w,d.xanchor),c=l.align(i+d._height,-d._height,b.t+b.h,b.t,d.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==c){var r={};r[w+".x"]=t,r[w+".y"]=c,o.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=s.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));n.size()>0&&A(e,B,n,t,r)}}))}],e)}}function T(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return"fraction"===a?t._maxWidth*o:r+(o||i)}function A(e,t,r,n,i){var a=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};a._group&&(l.group=a._group),o.traceIs(a,"pie-like")&&(l.label=r.datum()[0].label);var u=s.triggerHandler(e,"plotly_legendclick",l);if(1===n){if(!1===u)return;t._clickTimeout=setTimeout((function(){e._fullLayout&&d(r,e,n)}),e._context.doubleClickDelay)}else 2===n&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==s.triggerHandler(e,"plotly_legenddoubleclick",l)&&!1!==u&&d(r,e,n))}function M(e,t,r){var n,a,s=O(r),l=e.data()[0][0],c=l.trace,d=o.traceIs(c,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!d,v=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,a=l.groupTitle.font):(a=r.font,r.entries?n=l.text:(n=d?l.label:c.name,c._meta&&(n=i.templateString(n,c._meta))));var m=i.ensureSingle(e,"text",s+"text");m.attr("text-anchor","start").call(u.font,a).text(p?S(n,v):n);var g=r.indentation+r.itemwidth+2*h.itemGap;f.positionText(m,g,0),p?m.call(f.makeEditable,{gd:t,text:n}).call(C,e,t,r).on("edit",(function(n){this.text(S(n,v)).call(C,e,t,r);var a=l.trace._fullInput||{},s={};if(o.hasTransform(a,"groupby")){var u=o.getTransformIndices(a,"groupby"),f=u[u.length-1],d=i.keyedContainer(a,"transforms["+f+"].styles","target","value.name");d.set(l.trace._group,n),s=d.constructUpdate()}else s.name=n;return a._isShape?o.call("_guiRelayout",t,"shapes["+c.index+"].name",s.name):o.call("_guiRestyle",t,s,c.index)})):C(m,e,t,r)}function S(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 E(e,t,r){var a,o=t._context.doubleClickDelay,s=1,l=i.ensureSingle(e,"rect",r+"toggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(l.on("mousedown",(function(){(a=(new Date).getTime())-t._legendMouseDownTimeo&&(s=Math.max(s-1,1)),A(t,i,e,s,n.event)}})))}function C(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),f.convertToTspans(e,r,(function(){!function(e,t,r,n){var i=e.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var a=e.select("g[class*=math-group]"),o=a.node(),s=O(r);r||(r=t._fullLayout[s]);var l,c,d=r.borderwidth,p=(n===_?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*v;if(o){var m=u.bBox(o);l=m.height,c=m.width,n===_?u.setTranslate(a,d,d+.75*l):u.setTranslate(a,0,.25*l)}else{var g="."+s+(n===_?"title":"")+"text",y=e.select(g),x=f.lineCount(y),b=y.node();if(l=p*x,c=b?u.bBox(b).width:0,n===_)"left"===r.title.side&&(c+=2*h.itemGap),f.positionText(y,d+h.titlePad,d+p);else{var w=2*h.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(w=h.itemGap,c-=r.indentation+r.itemwidth),f.positionText(y,w,-p*((x-1)/2-.3))}}n===_?(r._titleWidth=c,r._titleHeight=l):(i.lineHeight=p,i.height=Math.max(l,16)+3,i.width=c)}else e.remove()}(t,r,n,i)}))}function L(e){return i.isRightAnchor(e)?"right":i.isCenterAnchor(e)?"center":"left"}function P(e){return i.isBottomAnchor(e)?"bottom":i.isMiddleAnchor(e)?"middle":"top"}function O(e){return e._id||"legend"}e.exports=function(e,t){if(t)k(e,t);else{var r=e._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var e=n.select(this),t=e.attr("class").split(" ")[0];t.match(w)&&-1===i.indexOf(t)&&e.remove()}));for(var a=0;aS&&(M=S)}T[a][0]._groupMinRank=M,T[a][0]._preGroupSort=a}var E=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(T.forEach((function(e,t){e[0]._preGroupSort=t})),T.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),a=0;ar?r:e}e.exports=function(e,t,r){var g=t._fullLayout;r||(r=g.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 i;if(e+1)i=e;else{if(!(t&&t.width>0))return 0;i=t.width}return y?n:Math.min(i,r)};function k(e,a,o){var c=e[0].trace,f=c.marker||{},d=f.line||{},h=f.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=o?c.visible&&c.type===o:i.traceIs(c,"bar"),v=n.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(p?[e]:[]);v.enter().append("path").classed("legend"+o,!0).attr("d",h).attr("transform",_),v.exit().remove(),v.each((function(e){var i=n.select(this),a=e[0],o=w(a.mlw,f.line,5,2);i.style("stroke-width",o+"px");var h=a.mcc;if(!r._inHover&&"mc"in a){var p=u(f),v=p.mid;void 0===v&&(v=(p.max+p.min)/2),h=s.tryColorscale(f,"")(v)}var g=h||a.mc||f.color,y=f.pattern,x=y&&s.getPatternAttr(y.shape,0,"");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),k=y.fgopacity,T=m(y.size,8,10),A=m(y.solidity,.5,1),M="legend-"+c.uid;i.call(s.pattern,"legend",t,M,x,T,A,h,y.fillmode,b,_,k)}else i.call(l.fill,g);o&&l.stroke(i,a.mlc||d.color)}))}function T(e,r,o){var s=e[0],l=s.trace,u=o?l.visible&&l.type===o:i.traceIs(l,o),c=n.select(r).select("g.legendpoints").selectAll("path.legend"+o).data(u?[e]:[]);if(c.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),c.exit().remove(),c.size()){var h=l.marker||{},p=w(d(h.line.width,s.pts),h.line,5,2),v="pieLike",m=a.minExtend(l,{marker:{line:{width:p}}},v),g=a.minExtend(s,{trace:m},v);f(c,g,m,t)}}e.each((function(e){var t=n.select(this),i=a.ensureSingle(t,"g","layers");i.style("opacity",e[0].trace.opacity);var s=r.indentation,l=r.valign,u=e[0].lineHeight,c=e[0].height;if("middle"===l&&0===s||!u||!c)i.attr("transform",null);else{var f={top:1,bottom:-1}[l]*(.5*(u-c+3))||0,d=r.indentation;i.attr("transform",o(d,f))}i.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=i.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var r,i=e[0].trace,o=[];if(i.visible)switch(i.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 c=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);c.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),c.exit().remove(),c.each((function(e,o){var c,f=n.select(this),d=u(i),h=d.colorscale,v=d.reversescale;if(h){if(!r){var m=h.length;c=0===o?h[v?m-1:0][1]:1===o?h[v?0:m-1][1]:h[Math.floor((m-1)/2)][1]}}else{var g=i.vertexcolor||i.facecolor||i.color;c=a.isArrayOrTypedArray(g)?g[o]||g[0]:g}f.attr("d",e[0]),c?f.call(l.fill,c):f.call((function(e){if(e.size()){var n="legendfill-"+i.uid;s.gradient(e,t,n,p(v,"radial"===r),h,"fill")}}))}))})).each((function(e){var t=e[0].trace,r="waterfall"===t.type;if(e[0]._distinct&&r){var i=e[0].trace[e[0].dir].marker;return e[0].mc=i.color,e[0].mlw=i.line.width,e[0].mlc=i.line.color,k(e,this,"waterfall")}var a=[];t.visible&&r&&(a=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(a);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),i=t[e[0]].marker,a=w(void 0,i.line,5,2);r.attr("d",e[1]).style("stroke-width",a+"px").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(e){k(e,this,"funnel")})).each((function(e){k(e,this)})).each((function(e){var r=e[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.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!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);e.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(e,r.line.color)}else{var u=a.minExtend(r,{marker:{size:y?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,u,t)}}))})).each((function(e){T(e,this,"funnelarea")})).each((function(e){T(e,this,"pie")})).each((function(e){var r,i,o=v(e),l=o.showFill,f=o.showLine,d=o.showGradientLine,h=o.showGradientFill,m=o.anyFill,g=o.anyLine,y=e[0],b=y.trace,_=u(b),k=_.colorscale,T=_.reversescale,A=c.hasMarkers(b)||!m?"M5,0":g?"M5,-2":"M5,-3",M=n.select(this),S=M.select(".legendfill").selectAll("path").data(l||h?[e]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",A+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(l)s.fillGroupStyle(e,t,!0);else{var r="legendfill-"+b.uid;s.gradient(e,t,r,p(T),k,"fill")}})),f||d){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(y,{trace:i})]}var C=M.select(".legendlines").selectAll("path").data(f||d?[r]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",A+(d?"l"+x+",0.0001":"h"+x)).call(f?s.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;s.lineGroupStyle(e),s.gradient(e,t,r,p(T),k,"stroke")}})})).each((function(e){var r,i,o=v(e),l=o.anyFill,u=o.anyLine,f=o.showLine,d=o.showMarker,h=e[0],p=h.trace,m=!d&&!u&&!l&&c.hasText(p);function g(e,t,r,n){var i=a.nestedProperty(p,e).get(),o=a.isArrayOrTypedArray(i)&&t?t(i):i;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(d||m||f){var b={},w={};if(d){b.mc=g("marker.color",x),b.mx=g("marker.symbol",x),b.mo=g("marker.opacity",a.mean,[.2,1]),b.mlc=g("marker.line.color",x),b.mlw=g("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var k=g("marker.size",a.mean,[2,16],12);b.ms=k,w.marker.size=k}f&&(w.line={width:g("line.width",x,[0,10],5)}),m&&(b.tx="Aa",b.tp=g("textposition",x),b.ts=10,b.tc=g("textfont.color",x),b.tf=g("textfont.family",x),b.tw=g("textfont.weight",x),b.ty=g("textfont.style",x),b.tv=g("textfont.variant",x),b.tC=g("textfont.textcase",x),b.tE=g("textfont.lineposition",x),b.tS=g("textfont.shadow",x)),r=[a.minExtend(h,b)],(i=a.minExtend(p,w)).selectedpoints=null,i.texttemplate=null}var T=n.select(this).select("g.legendpoints"),A=T.selectAll("path.scatterpts").data(d?r:[]);A.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),A.exit().remove(),A.call(s.pointStyle,i,t),d&&(r[0].mrc=3);var M=T.selectAll("g.pointtext").data(m?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),M.exit().remove(),M.selectAll("text").call(s.textPointStyle,i,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 i=n.select(this),a=t[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(l.fill,a.fillcolor),o&&l.stroke(i,a.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 i=n.select(this),a=t[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("fill","none").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},66540:function(e,t,r){"use strict";r(76052),e.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"}}},44248:function(e,t,r){"use strict";var n=r(24040),i=r(7316),a=r(79811),o=r(9224),s=r(4016).eraseActiveShape,l=r(3400),u=l._,c=e.exports={};function f(e,t){var r,i,o=t.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,u=e._fullLayout,c={},f=a.list(e,null,!0),d=u._cartesianSpikesEnabled;if("zoom"===s){var h,p="in"===l?.5:2,v=(1+p)/2,m=(1-p)/2;for(i=0;i1?(O=["toggleHover"],I=["resetViews"]):g?(P=["zoomInGeo","zoomOutGeo"],O=["hoverClosestGeo"],I=["resetGeo"]):m?(O=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(P=["zoomInMapbox","zoomOutMapbox"],O=["toggleHover"],I=["resetViewMapbox"]):b?O=["hoverClosestGl2d"]:y?O=["hoverClosestPie"]:A?(O=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):O=["toggleHover"],v&&(O=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(e){for(var t=0;t0)){var v=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),i=0,a=0;a0?e.touches[0].clientX:0}function g(e,t,r,n){var i=o.ensureSingle(e,"rect",v.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),a=n.borderwidth%2===0?n.borderwidth:n.borderwidth-1,c=-n._offsetShift,f=l.crispRound(t,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:s(c,c),"stroke-width":f}).call(u.stroke,n.bordercolor).call(u.fill,n.bgcolor)}function y(e,t,r,n){var i=t._fullLayout;o.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function x(e,t,r,i){var s,u=t.calcdata,c=e.selectAll("g."+v.rangePlotClassName).data(r._subplotsWith,o.identity);c.enter().append("g").attr("class",(function(e){return v.rangePlotClassName+" "+e})).call(l.setClipUrl,i._clipId,t),c.order(),c.exit().remove(),c.each((function(e,o){var l=n.select(this),c=0===o,h=d.getFromId(t,e,"y"),p=h._name,v=i[p],m={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};r.rangebreaks&&(m.layout.xaxis.rangebreaks=r.rangebreaks),m.layout[p]={type:h.type,domain:[0,1],range:"match"!==v.rangemode?v.range.slice():h.range.slice(),calendar:h.calendar},h.rangebreaks&&(m.layout[p].rangebreaks=h.rangebreaks),a.supplyDefaults(m);var g=m._fullLayout.xaxis,y=m._fullLayout[p];g.clearCalc(),g.setScale(),y.clearCalc(),y.setScale();var x={id:e,plotgroup:l,xaxis:g,yaxis:y,isRangePlot:!0};c?s=x:(x.mainplot="xy",x.mainplotinfo=s),f.rangePlot(t,x,function(e,t){for(var r=[],n=0;n=n.max)t=N[r+1];else if(e=n.pmax)t=N[r+1];else if(er._length||y+_<0)return;c=g+_,h=y+_;break;case l:if(b="col-resize",g+_>r._length)return;c=g+_,h=y;break;case u:if(b="col-resize",y+_<0)return;c=g,h=y+_;break;default:b="ew-resize",c=v,h=v+_}if(h=0;T--){var A=r.append("path").attr(m).style("opacity",T?.1:g).call(o.stroke,x).call(o.fill,y).call(s.dashLine,T?"solid":_,T?4+b:b);if(p(A,e,a),w){var M=l(e.layout,"selections",a);A.style({cursor:"move"});var S={element:A.node(),plotinfo:h,gd:e,editHelpers:M,isActiveSelection:!0},E=n(u,e);i(E,A,S)}else A.style("pointer-events",T?"all":"none");k[T]=A}var C=k[0];k[1].node().addEventListener("click",(function(){return function(e,t){if(d(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex)return void v(e);e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=v,f(e)}}}(e,C)}))}(e._fullLayout._selectionLayer)}function p(e,t,r){var n=r.xref+r.yref;s.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function v(e){d(e)&&e._fullLayout._activeSelectionIndex>=0&&(a(e),delete e._fullLayout._activeSelectionIndex,f(e))}e.exports={draw:f,drawOne:h,activateLastSelection:function(e){if(d(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=v,f(e)}}}},34200:function(e,t,r){"use strict";var n=r(98192).u,i=r(92880).extendFlat;e.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:i({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},81004:function(e){"use strict";e.exports=function(e,t,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},5968:function(e,t,r){"use strict";var n=r(72760).selectMode,i=r(1936).clearOutline,a=r(9856),o=a.readPaths,s=a.writePaths,l=a.fixDatesForPaths;e.exports=function(e,t){if(e.length){var r=e[0][0];if(r){var a=r.getAttribute("d"),u=t.gd,c=u._fullLayout.newselection,f=t.plotinfo,d=f.xaxis,h=f.yaxis,p=t.isActiveSelection,v=t.dragmode,m=(u.layout||{}).selections||[];if(!n(v)&&void 0!==p){var g=u._fullLayout._activeSelectionIndex;if(g-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(g)){W(e,t,a);var _=function(e,t){var r,n,i=e[0],a=-1,o=[];for(n=0;n0?function(e,t){var r,n,i,a=[];for(i=0;i0&&a.push(r);if(1===a.length&&a[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(i=0;i1)return!1;if((n+=t.selectedpoints.length)>1)return!1}return 1===n}(s)&&(d=J(_))){for(o&&o.remove(),m=0;m=0})(i)&&i._fullLayout._deactivateShape(i),function(e){return e._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,s=h(r),l=v(r);if(s||l){var u,c,f=o.selectAll(".select-outline-"+n.id);f&&i._fullLayout._outlining&&(s&&(u=k(f,e)),u&&a.call("_guiRelayout",i,{shapes:u}),l&&!U(e)&&(c=T(f,e)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:c}).then((function(){t&&A(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function Z(e){return e._id}function X(e,t,r,n){if(!e.calcdata)return[];var i,a,o,s=[],l=t.map(Z),u=r.map(Z);for(o=0;o0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(i)>-1}function $(e,t,r){var n,i;for(n=0;n-1&&t;if(!a&&t){var te=oe(e,!0);if(te.length){var ne=te[0].xref,he=te[0].yref;if(ne&&he){var pe=ue(te);ce([L(e,ne,"x"),L(e,he,"y")])(Q,pe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&fe(e,Q),d._reselect=!1}if(!a&&d._deselect){var ve=d._deselect;(function(e,t,r){for(var n=0;n=0)T._fullLayout._deactivateShape(T);else if(!x){var r=A.clickmode;C.done(Me).then((function(){if(C.clear(Me),2===e){for(be.remove(),J=0;J-1&&q(t,T,n.xaxes,n.yaxes,n.subplot,n,be),"event"===r&&fe(T,void 0);l.click(T,t,P.id)})).catch(M.error)}},n.doneFn=function(){Te.remove(),C.done(Me).then((function(){C.clear(Me),!S&&K&&n.selectionDefs&&(K.subtract=xe,n.selectionDefs.push(K),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Z)),(S||x)&&Y(n,S),n.doneFnCompleted&&n.doneFnCompleted(Se),b&&fe(T,ae)})).catch(M.error)}},clearOutline:x,clearSelectionsCache:Y,selectOnClick:q}},46056:function(e,t,r){"use strict";var n=r(13916),i=r(25376),a=r(52904).line,o=r(98192).u,s=r(92880).extendFlat,l=r(31780).templatedArray,u=(r(36208),r(45464)),c=r(21776).ye,f=r(97728);e.exports=l("shape",{visible:s({},u.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:s({},u.legend,{editType:"calc+arraydraw"}),legendgroup:s({},u.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:s({},u.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:s({},u.legendrank,{editType:"calc+arraydraw"}),legendwidth:s({},u.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:s({},n.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:s({},n.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:s({},a.color,{editType:"arraydraw"}),width:s({},a.width,{editType:"calc+arraydraw"}),dash:s({},o,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:c({},{keys:Object.keys(f)}),font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},96084:function(e,t,r){"use strict";var n=r(3400),i=r(54460),a=r(85448),o=r(65152);function s(e){return u(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return u(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function u(e,t,r,i,s,l){var u=e/2,c=l;if("pixel"===t){var f=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],d=n.aggNums(Math.max,null,f),h=n.aggNums(Math.min,null,f),p=h<0?Math.abs(h)+u:u,v=d>0?d+u:u;return{ppad:u,ppadplus:c?p:v,ppadminus:c?v:p}}return{ppad:u}}function c(e,t,r,n,i){var s="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[s(t),s(r)];if(n){var l,u,c,f,d=1/0,h=-1/0,p=n.match(a.segmentRE);for("date"===e.type&&(s=o.decodeDate(s)),l=0;lh&&(h=f)));return h>=d?[d,h]:void 0}}e.exports=function(e){var t=e._fullLayout,r=n.filterVisible(t.shapes);if(r.length&&e._fullData.length)for(var o=0;o=e?t-n:n-t,-180/Math.PI*Math.atan2(i,a)}(x,_,b,w):0),A.call((function(t){return t.call(o.font,T).attr({}),a.convertToTspans(t,e),t}));var U=function(e,t,r,n,i,a,o){var s,l,u,c,d=i.label.textposition,h=i.label.textangle,p=i.label.padding,v=i.type,m=Math.PI/180*a,g=Math.sin(m),y=Math.cos(m),x=i.label.xanchor,b=i.label.yanchor;if("line"===v){"start"===d?(s=e,l=t):"end"===d?(s=r,l=n):(s=(e+r)/2,l=(t+n)/2),"auto"===x&&(x="start"===d?"auto"===h?r>e?"left":re?"right":re?"right":re?"left":r1&&(2!==e.length||"Z"!==e[1][0])&&(0===L&&(e[0][0]="M"),t[C]=e,A(),M())}}()}}function q(e,r){!function(e,r){if(t.length)for(var n=0;nz&&a>F&&!r.shiftKey?p.getCursor(o/i,1-s/a):"move";v(t,l),D=l.split("-")[0]}}function ne(n){b(e)||(N&&(w=Z(r.xanchor)),B&&(A=X(r.yanchor)),"path"===r.type?R=r.path:(f=N?r.x0:Z(r.x0),h=B?r.y0:X(r.y0),x=N?r.x1:Z(r.x1),_=B?r.y1:X(r.y1)),f_?(M=h,L="y0",S=_,P="y1"):(M=_,L="y1",S=h,P="y0"),re(n),le(l,r),ce(t,r,e),Q.moveFn="move"===D?oe:se,Q.altKey=n.altKey)}function ie(){b(e)||(v(t),ue(l),k(t,e,r),i.call("_guiRelayout",e,c.getUpdateObj()))}function ae(){b(e)||ue(l)}function oe(n,i){if("path"===r.type){var a=function(e){return e},o=a,c=a;N?q("xanchor",r.xanchor=K(w+n)):(o=function(e){return K(Z(e)+n)},H&&"date"===H.type&&(o=g.encodeDate(o))),B?q("yanchor",r.yanchor=J(A+i)):(c=function(e){return J(X(e)+i)},W&&"date"===W.type&&(c=g.encodeDate(c))),q("path",r.path=T(R,o,c))}else N?q("xanchor",r.xanchor=K(w+n)):(q("x0",r.x0=K(f+n)),q("x1",r.x1=K(x+n))),B?q("yanchor",r.yanchor=J(A+i)):(q("y0",r.y0=J(h+i)),q("y1",r.y1=J(_+i)));t.attr("d",y(e,r)),le(l,r),u(e,s,r,V)}function se(n,i){if(U){var a=function(e){return e},o=a,c=a;N?q("xanchor",r.xanchor=K(w+n)):(o=function(e){return K(Z(e)+n)},H&&"date"===H.type&&(o=g.encodeDate(o))),B?q("yanchor",r.yanchor=J(A+i)):(c=function(e){return J(X(e)+i)},W&&"date"===W.type&&(c=g.encodeDate(c))),q("path",r.path=T(R,o,c))}else if(j){if("resize-over-start-point"===D){var d=f+n,p=B?h-i:h+i;q("x0",r.x0=N?d:K(d)),q("y0",r.y0=B?p:J(p))}else if("resize-over-end-point"===D){var v=x+n,m=B?_-i:_+i;q("x1",r.x1=N?v:K(v)),q("y1",r.y1=B?m:J(m))}}else{var b=function(e){return-1!==D.indexOf(e)},k=b("n"),G=b("s"),Y=b("w"),$=b("e"),Q=k?M+i:M,ee=G?S+i:S,te=Y?E+n:E,re=$?C+n:C;B&&(k&&(Q=M-i),G&&(ee=S-i)),(!B&&ee-Q>F||B&&Q-ee>F)&&(q(L,r[L]=B?Q:J(Q)),q(P,r[P]=B?ee:J(ee))),re-te>z&&(q(O,r[O]=N?te:K(te)),q(I,r[I]=N?re:K(re)))}t.attr("d",y(e,r)),le(l,r),u(e,s,r,V)}function le(e,t){function r(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]),i=1;n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":i}).classed("visual-cue",!0);var o=Z(N?t.xanchor:a.midRange(r?[t.x0,t.x1]:g.extractPathCoords(t.path,m.paramIsX))),s=X(B?t.yanchor:a.midRange(r?[t.y0,t.y1]:g.extractPathCoords(t.path,m.paramIsY)));if(o=g.roundPositionForSharpStrokeRendering(o,i),s=g.roundPositionForSharpStrokeRendering(s,i),N&&B){var l="M"+(o-1-i)+","+(s-1-i)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",l)}else if(N){var u="M"+(o-1-i)+","+(s-9-i)+"v18 h2 v-18 Z";n.attr("d",u)}else{var c="M"+(o-9-i)+","+(s-1-i)+"h18 v2 h-18 Z";n.attr("d",c)}}(N||B)&&r()}function ue(e){e.selectAll(".visual-cue").remove()}function ce(e,t,r){var n=t.xref,i=t.yref,a=o.getFromId(r,n),s=o.getFromId(r,i),l="";"paper"===n||a.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),d.setClipUrl(e,l?"clip"+r._fullLayout._uid+l:null,r)}p.init(Q),$.node().onmousemove=re}(e,F,c,t,r,D):!0===c.editable&&F.style("pointer-events",I||f.opacity(C)*E<=.5?"stroke":"all");F.node().addEventListener("click",(function(){return function(e,t){if(_(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex)return void A(e);e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=A,x(e)}}}(e,F)}))}c._input&&!0===c.visible&&("above"===c.layer?M(e._fullLayout._shapeUpperLayer):"paper"===c.xref||"paper"===c.yref?M(e._fullLayout._shapeLowerLayer):"between"===c.layer?M(w.shapelayerBetween):w._hadPlotinfo?M((w.mainplotinfo||w).shapelayer):M(e._fullLayout._shapeLowerLayer))}function k(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");d.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function T(e,t,r){return e.replace(m.segmentRE,(function(e){var n=0,i=e.charAt(0),a=m.paramIsX[i],o=m.paramIsY[i],s=m.numParams[i];return i+e.substr(1).replace(m.paramRE,(function(e){return n>=s||(a[n]?e=t(e):o[n]&&(e=r(e)),n++),e}))}))}function A(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(c(e),delete e._fullLayout._activeShapeIndex,x(e))}e.exports={draw:x,drawOne:w,eraseActiveShape:function(e){if(_(e)){c(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t0&&lh&&(e="X"),e}));return a>h&&(p=p.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+e)),c+p}))}(r,s,u);if("pixel"===r.xsizemode){var b=s(r.xanchor);c=b+r.x0,f=b+r.x1}else c=s(r.x0),f=s(r.x1);if("pixel"===r.ysizemode){var _=u(r.yanchor);d=_-r.y0,h=_-r.y1}else d=u(r.y0),h=u(r.y1);if("line"===p)return"M"+c+","+d+"L"+f+","+h;if("rect"===p)return"M"+c+","+d+"H"+f+"V"+h+"H"+c+"Z";var w=(c+f)/2,k=(d+h)/2,T=Math.abs(w-c),A=Math.abs(k-d),M="A"+T+","+A,S=w+T+","+k;return"M"+S+M+" 0 1,1 "+w+","+(k-A)+M+" 0 0,1 "+S+"Z"}},41592:function(e,t,r){"use strict";var n=r(4016);e.exports={moduleType:"component",name:"shapes",layoutAttributes:r(46056),supplyLayoutDefaults:r(43712),supplyDrawNewShapeDefaults:r(65144),includeBasePlot:r(36632)("shapes"),calcAutorange:r(96084),draw:n.draw,drawOne:n.drawOne}},97728:function(e){"use strict";function t(e,t){return t?t.d2l(e):e}function r(e,t){return t?t.l2d(e):e}function n(e,r){return t(e.x1,r)-t(e.x0,r)}function i(e,r,n){return t(e.y1,n)-t(e.y0,n)}e.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:i(e,0,r)/n(e,t)},dx:n,dy:i,width:function(e,t){return Math.abs(n(e,t))},height:function(e,t,r){return Math.abs(i(e,0,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(n(e,t),2)+Math.pow(i(e,0,r),2))},xcenter:function(e,n){return r((t(e.x1,n)+t(e.x0,n))/2,n)},ycenter:function(e,n,i){return r((t(e.y1,i)+t(e.y0,i))/2,i)}}},89861:function(e,t,r){"use strict";var n=r(25376),i=r(66741),a=r(92880).extendDeepAll,o=r(67824).overrideAll,s=r(85656),l=r(31780).templatedArray,u=r(60876),c=l("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});e.exports=o(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:c,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:a(i({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:n({})},font:n({}),activebgcolor:{valType:"color",dflt:u.gripBgActiveColor},bgcolor:{valType:"color",dflt:u.railBgColor},bordercolor:{valType:"color",dflt:u.railBorderColor},borderwidth:{valType:"number",min:0,dflt:u.railBorderWidth},ticklen:{valType:"number",min:0,dflt:u.tickLength},tickcolor:{valType:"color",dflt:u.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:u.minorTickLength}}),"arraydraw","from-root")},60876:function(e){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},8132:function(e,t,r){"use strict";var n=r(3400),i=r(51272),a=r(89861),o=r(60876).name,s=a.steps;function l(e,t,r){function o(r,i){return n.coerce(e,t,a,r,i)}for(var s=i(e,t,{name:"steps",handleItemDefaults:u}),l=0,c=0;c0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",l(o-.5*f.gripWidth,t._dims.currentValueTotalHeight))}}function E(e,t){var r=e._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,t))}function C(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function L(e,t,r){var n=r._dims,i=s.ensureSingle(e,"rect",f.railTouchRectClass,(function(n){n.call(A,t,e,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function P(e,t){var r=t._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(e,"rect",f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,t.bordercolor).call(a.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(i,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}e.exports=function(e){var t=e._context.staticPlot,r=e._fullLayout,a=function(e,t){for(var r=e[f.name],n=[],i=0;i0?[0]:[]);function l(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),i.autoMargin(e,m(t))}if(s.enter().append("g").classed(f.containerClassName,!0).style("cursor",t?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+f.groupClassName).each(l)})).remove(),0!==a.length){var u=s.selectAll("g."+f.groupClassName).data(a,g);u.enter().append("g").classed(f.groupClassName,!0),u.exit().each(l).remove();for(var c=0;c0||_<0){var M={left:[-w,0],right:[w,0],top:[0,-w],bottom:[0,w]}[b.side];r.attr("transform",l(M[0],M[1]))}}}return q.call(V),B&&(E?q.on(".opacity",null):(A=0,M=!0,q.text(y).on("mouseover.opacity",(function(){n.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)}))),q.call(f.makeEditable,{gd:e}).on("edit",(function(t){void 0!==x?o.call("_guiRestyle",e,g,t,x):o.call("_guiRelayout",e,g,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(V)})).on("input",(function(e){this.text(e||" ").call(f.positionText,_.x,_.y)}))),q.classed("js-placeholder",M),k}}},88444:function(e,t,r){"use strict";var n=r(25376),i=r(22548),a=r(92880).extendFlat,o=r(67824).overrideAll,s=r(66741),l=r(31780).templatedArray,u=l("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}});e.exports=o(l("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:u,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:a(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},73712:function(e){"use strict";e.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"}}},91384:function(e,t,r){"use strict";var n=r(3400),i=r(51272),a=r(88444),o=r(73712).name,s=a.buttons;function l(e,t,r){function o(r,i){return n.coerce(e,t,a,r,i)}o("visible",i(e,t,{name:"buttons",handleItemDefaults:u}).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 u(e,t){function r(r,i){return n.coerce(e,t,s,r,i)}r("visible","skip"===e.method||Array.isArray(e.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}e.exports=function(e,t){i(e,t,{name:o,handleItemDefaults:l})}},14420:function(e,t,r){"use strict";var n=r(33428),i=r(7316),a=r(76308),o=r(43616),s=r(3400),l=r(72736),u=r(31780).arrayEditor,c=r(84284).LINE_SPACING,f=r(73712),d=r(37400);function h(e){return e._index}function p(e,t){return+e.attr(f.menuIndexAttrName)===t._index}function v(e,t,r,n,i,a,o,s){t.active=o,u(e.layout,f.name,t).applyUpdate("active",o),"buttons"===t.type?g(e,n,null,null,t):"dropdown"===t.type&&(i.attr(f.menuIndexAttrName,"-1"),m(e,n,i,a,t),s||g(e,n,i,a,t))}function m(e,t,r,n,i){var a=s.ensureSingle(t,"g",f.headerClassName,(function(e){e.style("pointer-events","all")})),l=i._dims,u=i.active,c=i.buttons[u]||f.blankHeaderOpts,d={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},h={width:l.headerWidth,height:l.headerHeight};a.call(y,i,c,e).call(M,i,d,h),s.ensureSingle(t,"text",f.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on("click",(function(){r.call(S,String(p(r,i)?-1:i._index)),g(e,t,r,n,i)})),a.on("mouseover",(function(){a.call(w)})),a.on("mouseout",(function(){a.call(k,i)})),o.setTranslate(t,l.lx,l.ly)}function g(e,t,r,a,o){r||(r=t).attr("pointer-events","all");var l=function(e){return-1===+e.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,u="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,c=r.selectAll("g."+u).data(s.filterVisible(l)),d=c.enter().append("g").classed(u,!0),h=c.exit();"dropdown"===o.type?(d.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var p=0,m=0,g=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?m=g.headerHeight+f.gapButtonHeader:p=g.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(m=-f.gapButtonHeader+f.gapButton-g.openHeight),"dropdown"===o.type&&"left"===o.direction&&(p=-f.gapButtonHeader+f.gapButton-g.openWidth);var b={x:g.lx+p+o.pad.l,y:g.ly+m+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},T={l:b.x+o.borderwidth,t:b.y+o.borderwidth};c.each((function(s,l){var u=n.select(this);u.call(y,o,s,e).call(M,o,b),u.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(v(e,o,0,t,r,a,-1),i.executeAPICommand(e,s.method,s.args2)):(v(e,o,0,t,r,a,l),i.executeAPICommand(e,s.method,s.args))),e.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),u.on("mouseover",(function(){u.call(w)})),u.on("mouseout",(function(){u.call(k,o),c.call(_,o)}))})),c.call(_,o),x?(T.w=Math.max(g.openWidth,g.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(g.openHeight,g.headerHeight)),T.direction=o.direction,a&&(c.size()?function(e,t,r,n,i,a){var o,s,l,u=i.direction,c="up"===u||"down"===u,d=i._dims,h=i.active;if(c)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll("g."+f.headerGroupClassName).data(r,h);l.enter().append("g").classed(f.headerGroupClassName,!0);for(var u=s.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),c=0;cw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=p,E=m+g;E+M>u&&(E=u-M);var C=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),T?(this.hbar=C.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=g>k,P=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,I=p+v,R=m;I+P>l&&(I=l-P);var D=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),L?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:R,width:P,height:O}),this._vbarYMin=R+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var z=this.id,F=c-.5,N=L?f+P+.5:f+.5,B=d-.5,j=T?h+M+.5:h+.5,U=o._topdefs.selectAll("#"+z).data(T||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",z).append("rect"),T||L?(this._clipRect=U.select("rect").attr({x:Math.floor(F),y:Math.floor(B),width:Math.ceil(N)-Math.floor(F),height:Math.ceil(j)-Math.floor(B)}),this.container.call(a.setClipUrl,z,this.gd),this.bg.attr({x:p,y:m,width:v,height:g})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),T||L){var q=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(q);var V=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(V),L&&this.vbar.on(".drag",null).call(V)}this.setTranslate(t,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.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)},s.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)},s.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)},s.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,i=r+this._hbarTranslateMax;e=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=t+this._vbarYMin,s=a+this._vbarTranslateMax;t=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(e,t)},s.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(a.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 i=e/r;this.hbar.call(a.setTranslate,e+i*this._hbarTranslateMax,t)}if(this.vbar){var s=t/n;this.vbar.call(a.setTranslate,e,t+s*this._vbarTranslateMax)}}},84284:function(e){"use strict";e.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"}}},36208:function(e){"use strict";e.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(" ")}}},48164:function(e){"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},26880:function(e){"use strict";e.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"}},69104:function(e){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},99168:function(e){"use strict";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87792:function(e){"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},13448:function(e){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},39032:function(e){"use strict";e.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"}},2264:function(e,t){"use strict";t.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],t.STYLE=t.CSS_DECLARATIONS.map((function(e){return e.join(": ")+"; "})).join("")},9616:function(e,t){"use strict";t.xmlns="http://www.w3.org/2000/xmlns/",t.svg="http://www.w3.org/2000/svg",t.xlink="http://www.w3.org/1999/xlink",t.svgAttrs={xmlns:t.svg,"xmlns:xlink":t.xlink}},64884:function(e,t,r){"use strict";t.version=r(25788).version,r(88324),r(79288);for(var n=r(24040),i=t.register=n.register,a=r(22448),o=Object.keys(a),s=0;s",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},98308:function(e,t){"use strict";t.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},t.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},t.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},t.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},t.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},t.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},11864:function(e,t,r){"use strict";var n=r(20435),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(e){return Math.abs(e[1]-e[0])>s-1e-14}function u(e,t){return a(t-e,s)}function c(e,t){if(l(t))return!0;var r,n;t[0](n=i(n,s))&&(n+=s);var a=i(e,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(e,t,r,n,i,a,u){i=i||0,a=a||0;var c,f,d,h,p,v=l([r,n]);function m(e,t){return[e*Math.cos(t)+i,a-e*Math.sin(t)]}v?(c=0,f=o,d=s):r=i&&e<=a);var i,a},pathArc:function(e,t,r,n,i){return f(null,e,t,r,n,i,0)},pathSector:function(e,t,r,n,i){return f(null,e,t,r,n,i,1)},pathAnnulus:function(e,t,r,n,i,a){return f(e,t,r,n,i,a,1)}}},38116:function(e,t,r){"use strict";var n=r(83160).decode,i=r(63620),a=Array.isArray,o=ArrayBuffer,s=DataView;function l(e){return o.isView(e)&&!(e instanceof s)}function u(e){return a(e)||l(e)}t.isTypedArray=l,t.isArrayOrTypedArray=u,t.isArray1D=function(e){return!u(e[0])},t.ensureArray=function(e,t){return a(e)||(e=[]),e.length=t,e};var c={u1c:"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"===typeof Int8Array?void 0:Int8Array,u1:"undefined"===typeof Uint8Array?void 0:Uint8Array,i2:"undefined"===typeof Int16Array?void 0:Int16Array,u2:"undefined"===typeof Uint16Array?void 0:Uint16Array,i4:"undefined"===typeof Int32Array?void 0:Int32Array,u4:"undefined"===typeof Uint32Array?void 0:Uint32Array,f4:"undefined"===typeof Float32Array?void 0:Float32Array,f8:"undefined"===typeof Float64Array?void 0:Float64Array};function f(e){return e.constructor===ArrayBuffer}function d(e,t,r){if(u(e)){if(u(e[0])){for(var n=r,i=0;ii.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,i){-1===(i.extras||[]).indexOf(e)?(p(e)&&(e=v(e)),e%1||!n(e)||void 0!==i.min&&ei.max?t.set(r):t.set(+e)):t.set(e)}},string:{coerceFunction:function(e,t,r,n){if("string"!==typeof e){var i="number"===typeof e;!0!==n.strict&&i?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){p(e)&&(e=v(e)),i(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return i(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(s.get(e,r))}},angle:{coerceFunction:function(e,t,r){p(e)&&(e=v(e)),"auto"===e?t.set("auto"):n(e)?t.set(d(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||f(r);"string"===typeof e&&i.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"===typeof e&&!!f(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if(-1===(n.extras||[]).indexOf(e))if("string"===typeof e){for(var i=e.split("+"),a=0;a=n&&e<=i?e:c}if("string"!==typeof e&&"number"!==typeof e)return c;e=String(e);var u=_(r),g=e.charAt(0);!u||"G"!==g&&"g"!==g||(e=e.substr(1),r="");var w=u&&"chinese"===r.substr(0,7),k=e.match(w?x:y);if(!k)return c;var T=k[1],A=k[3]||"1",M=Number(k[5]||1),S=Number(k[7]||0),E=Number(k[9]||0),C=Number(k[11]||0);if(u){if(2===T.length)return c;var L;T=Number(T);try{var P=m.getComponentMethod("calendars","getCal")(r);if(w){var O="i"===A.charAt(A.length-1);A=parseInt(A,10),L=P.newDate(T,P.toMonthIndex(T,A,O),M)}else L=P.newDate(T,Number(A),M)}catch(R){return c}return L?(L.toJD()-v)*f+S*d+E*h+C*p:c}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),A-=1;var I=new Date(Date.UTC(2e3,A,M,S,E));return I.setUTCFullYear(T),I.getUTCMonth()!==A||I.getUTCDate()!==M?c:I.getTime()+C*p},n=t.MIN_MS=t.dateTime2ms("-9999"),i=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(e,r){return t.dateTime2ms(e,r)!==c};var k=90*f,T=3*d,A=5*h;function M(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+w(t,2)+":"+w(r,2),(n||i)&&(e+=":"+w(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+w(i,a)}return e}t.ms2DateTime=function(e,t,r){if("number"!==typeof e||!(e>=n&&e<=i))return c;t||(t=0);var a,o,s,u,y,x,b=Math.floor(10*l(e+.05,1)),w=Math.round(e-b/10);if(_(r)){var S=Math.floor(w/f)+v,E=Math.floor(l(e,f));try{a=m.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(C){a=g("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=t=n+f&&e<=i-f))return c;var t=Math.floor(10*l(e+.05,1)),r=new Date(Math.round(e-t/10));return M(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},t.cleanDate=function(e,r,n){if(e===c)return r;if(t.isJSDate(e)||"number"===typeof e&&isFinite(e)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(!(e=t.ms2DateTimeLocal(+e))&&void 0!==r)return r}else if(!t.isDateTime(e,n))return s.error("unrecognized date",e),r;return e};var S=/%\d?f/g,E=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function L(e,t,r,n){e=e.replace(S,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(t+.05));if(e=e.replace(E,(function(){return C[r("%q")(i)]})),_(n))try{e=m.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var P=[59,59.9,59.99,59.999,59.9999];t.formatDate=function(e,t,r,n,i,a){if(i=_(i)&&i,!t)if("y"===r)t=a.year;else if("m"===r)t=a.month;else{if("d"!==r)return function(e,t){var r=l(e+.05,f),n=w(Math.floor(r/d),2)+":"+w(l(Math.floor(r/h),60),2);if("M"!==t){o(t)||(t=0);var i=(100+Math.min(l(e/p,60),P[t])).toFixed(t).substr(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(e,r)+"\n"+L(a.dayMonthYear,e,n,i);t=a.dayMonth+"\n"+a.year}return L(t,e,n,i)};var O=3*f;t.incrementMonth=function(e,t,r){r=_(r)&&r;var n=l(e,f);if(e=Math.round(e-n),r)try{var i=Math.round(e/f)+v,a=m.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-v)*f+n}catch(c){s.error("invalid ms "+e+" in calendar "+r)}var u=new Date(e+O);return u.setUTCMonth(u.getUTCMonth()+t)+n-O},t.findExactDates=function(e,t){for(var r,n,i=0,a=0,s=0,l=0,u=_(t)&&m.getComponentMethod("calendars","getCal")(t),c=0;c0&&e[t+1][0]<0)return t;return null}switch(t="RUS"===s||"FJI"===s?function(e){var t;if(null===u(e))t=e;else for(t=new Array(e.length),i=0;it?r[n++]=[e[i][0]+360,e[i][1]]:i===t?(r[n++]=e[i],r[n++]=[e[i][0],-90]):r[n++]=e[i];var a=d.tester(r);a.pts.pop(),l.push(a)}:function(e){l.push(d.tester(e))},a.type){case"MultiPolygon":for(r=0;ri&&(i=u,t=l)}else t=r;return o.default(t).geometry.coordinates}(c),n.fIn=e,n.fOut=c,s.push(c)}else u.log(["Location",n.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[r]}switch(r.type){case"FeatureCollection":var d=r.features;for(n=0;n100?(clearInterval(a),n("Unexpected error while fetching from "+e)):void i++}),50)}))}for(var o=0;o0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},t.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},t.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r1||v<0||v>1?null:{x:e+l*v,y:t+f*v}}function l(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}var l=n*t-i*e;return l*l/r}t.segmentsIntersect=s,t.segmentDistance=function(e,t,r,n,i,a,o,u){if(s(e,t,r,n,i,a,o,u))return 0;var c=r-e,f=n-t,d=o-i,h=u-a,p=c*c+f*f,v=d*d+h*h,m=Math.min(l(c,f,p,i-e,a-t),l(c,f,p,o-e,u-t),l(d,h,v,e-i,t-a),l(d,h,v,r-i,n-a));return Math.sqrt(m)},t.getTextLocation=function(e,t,r,s){if(e===i&&s===a||(n={},i=e,a=s),n[r])return n[r];var l=e.getPointAtLength(o(r-s/2,t)),u=e.getPointAtLength(o(r+s/2,t)),c=Math.atan((u.y-l.y)/(u.x-l.x)),f=e.getPointAtLength(o(r,t)),d={x:(4*f.x+l.x+u.x)/6,y:(4*f.y+l.y+u.y)/6,theta:c};return n[r]=d,d},t.clearLocationCache=function(){i=null},t.getVisibleSegment=function(e,t,r){var n,i,a=t.left,o=t.right,s=t.top,l=t.bottom,u=0,c=e.getTotalLength(),f=c;function d(t){var r=e.getPointAtLength(t);0===t?n=r:t===c&&(i=r);var u=r.xo?r.x-o:0,f=r.yl?r.y-l:0;return Math.sqrt(u*u+f*f)}for(var h=d(u);h;){if((u+=h+r)>f)return;h=d(u)}for(h=d(f);h;){if(u>(f-=h+r))return;h=d(f)}return{min:u,max:f,len:f-u,total:c,isClosed:0===u&&f===c&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},t.findPointOnPath=function(e,t,r,n){for(var i,a,o,s=(n=n||{}).pathLength||e.getTotalLength(),l=n.tolerance||.001,u=n.iterationLimit||30,c=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,f=0,d=0,h=s;f0?h=i:d=i,f++}return a}},33040:function(e,t,r){"use strict";var n=r(38248),i=r(49760),a=r(72160),o=r(8932),s=r(22548).defaultLine,l=r(38116).isArrayOrTypedArray,u=a(s),c=1;function f(e,t){var r=e;return r[3]*=t,r}function d(e){if(n(e))return u;var t=a(e);return t.length?t:u}function h(e){return n(e)?e:c}e.exports={formatColor:function(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i,s,p,v,m,g=l(n),y=l(t),x=o.extractOpts(e),b=[];if(i=void 0!==x.colorscale?o.makeColorScaleFuncFromTrace(e):d,s=g?function(e,t){return void 0===e[t]?u:a(i(e[t]))}:d,p=y?function(e,t){return void 0===e[t]?c:h(e[t])}:h,g||y)for(var _=0;_1?(r*e+r*t)/r:e+t,i=String(n).length;if(i>16){var a=String(t).length;if(i>=String(e).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},3400:function(e,t,r){"use strict";var n=r(33428),i=r(94336).E9,a=r(57624).E9,o=r(38248),s=r(39032),l=s.FP_SAFE,u=-l,c=s.BADNUM,f=e.exports={};f.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 d={};f.warnBadFormat=function(e){var t=String(e);d[t]||(d[t]=1,f.warn('encountered bad format: "'+t+'"'))},f.noFormat=function(e){return String(e)},f.numberFormat=function(e){var t;try{t=a(f.adjustFormat(e))}catch(r){return f.warnBadFormat(e),f.noFormat}return t},f.nestedProperty=r(22296),f.keyedContainer=r(37804),f.relativeAttr=r(23193),f.isPlainObject=r(63620),f.toLogRange=r(36896),f.relinkPrivateKeys=r(51528);var h=r(38116);f.isArrayBuffer=h.isArrayBuffer,f.isTypedArray=h.isTypedArray,f.isArrayOrTypedArray=h.isArrayOrTypedArray,f.isArray1D=h.isArray1D,f.ensureArray=h.ensureArray,f.concat=h.concat,f.maxRowLength=h.maxRowLength,f.minRowLength=h.minRowLength;var p=r(20435);f.mod=p.mod,f.modHalf=p.modHalf;var v=r(63064);f.valObjectMeta=v.valObjectMeta,f.coerce=v.coerce,f.coerce2=v.coerce2,f.coerceFont=v.coerceFont,f.coercePattern=v.coercePattern,f.coerceHoverinfo=v.coerceHoverinfo,f.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,f.validate=v.validate;var m=r(67555);f.dateTime2ms=m.dateTime2ms,f.isDateTime=m.isDateTime,f.ms2DateTime=m.ms2DateTime,f.ms2DateTimeLocal=m.ms2DateTimeLocal,f.cleanDate=m.cleanDate,f.isJSDate=m.isJSDate,f.formatDate=m.formatDate,f.incrementMonth=m.incrementMonth,f.dateTick0=m.dateTick0,f.dfltRange=m.dfltRange,f.findExactDates=m.findExactDates,f.MIN_MS=m.MIN_MS,f.MAX_MS=m.MAX_MS;var g=r(14952);f.findBin=g.findBin,f.sorterAsc=g.sorterAsc,f.sorterDes=g.sorterDes,f.distinctVals=g.distinctVals,f.roundUp=g.roundUp,f.sort=g.sort,f.findIndexOfMin=g.findIndexOfMin,f.sortObjectKeys=r(95376);var y=r(63084);f.aggNums=y.aggNums,f.len=y.len,f.mean=y.mean,f.median=y.median,f.midRange=y.midRange,f.variance=y.variance,f.stdev=y.stdev,f.interp=y.interp;var x=r(52248);f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(11864);f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=r(98308);f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=r(92348);f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var k=r(92880);f.extendFlat=k.extendFlat,f.extendDeep=k.extendDeep,f.extendDeepAll=k.extendDeepAll,f.extendDeepNoArrays=k.extendDeepNoArrays;var T=r(24248);f.log=T.log,f.warn=T.warn,f.error=T.error;var A=r(53756);f.counterRegex=A.counter;var M=r(91200);f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=r(52200);function E(e){var t={};for(var r in e)for(var n=e[r],i=0;il||e=t)&&o(e)&&e>=0&&e%1===0},f.noop=r(16628),f.identity=r(35536),f.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))},f.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},f.simpleMap=function(e,t,r,n,i){for(var a=e.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn("randstr failed uniqueness"),l):e(t,r,n,(i||0)+1):l},f.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},f.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,i,a,o=e.length,s=2*o,l=2*t-1,u=new Array(l),c=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=e[i]*u[n];c[r]=a}return c},f.syncOrAsync=function(e,t,r){var n;function i(){return f.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(i);return r&&r(t)},f.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},f.noneOrAll=function(e,t,r){if(e){var n,i,a=!1,o=!0;for(n=0;n0?t:0}))},f.fillArray=function(e,t,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(e))for(var i=0;i1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var D=/^\w*$/;f.templateString=function(e,t){var r={};return e.replace(f.TEMPLATE_STRING_REGEX,(function(e,n){var i;return D.test(n)?i=t[n]:(r[n]=r[n]||f.nestedProperty(t,n).get,i=r[n]()),f.isValidTextValue(i)?i:""}))};var z={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return U.apply(z,arguments)};var F={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return U.apply(F,arguments)};var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,B={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=function(){return U.apply(B,arguments)};var j=/^[:|\|]/;function U(e,t,r){var n=this,a=arguments;t||(t={});var o={};return e.replace(f.TEMPLATE_STRING_REGEX,(function(e,s,l){var u="_xother"===s||"_yother"===s,c="_xother_"===s||"_yother_"===s,d="xother_"===s||"yother_"===s,h="xother"===s||"yother"===s||u||d||c,p=s;(u||c)&&(p=p.substring(1)),(d||c)&&(p=p.substring(0,p.length-1));var v,m,g,y=null,x=null;if(n.parseMultDiv){var b=function(e){var t=e.match(N);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(p);p=b.key,y=b.op,x=b.number}if(h){if(void 0===(v=t[p]))return""}else for(g=3;g=48&&o<=57,u=s>=48&&s<=57;if(l&&(n=10*n+o-48),u&&(i=10*i+s-48),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var q=2e9;f.seedPseudoRandom=function(){q=2e9},f.pseudoRandom=function(){var e=q;return q=(69069*q+1)%4294967296,Math.abs(q-e)<429496729?f.pseudoRandom():q/4294967296},f.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},i=f.extractOption(e,t,"htx","hovertext");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(e,t,"tx","text");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(e){return e||0===e},f.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&&(u=1):u=0,f.strTranslate(i-u*(r+o),a-u*(n+s))+f.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(e,t){e.attr("transform",f.getTextTransform(t)),e.style("display",t.scale?null:"none")},f.ensureUniformFontSize=function(e,t){var r=f.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},f.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)},f.bigFont=function(e){return Math.round(1.2*e)};var V=f.getFirefoxVersion(),H=null!==V&&V<86;f.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},63620:function(e){"use strict";e.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")}},37804:function(e,t,r){"use strict";var n=r(22296),i=/^\w*$/;e.exports=function(e,t,r,a){var o,s,l;r=r||"name",a=a||"value";var u={};t&&t.length?(l=n(e,t),s=l.get()):s=e,t=t||"";var c={};if(s)for(o=0;o2)return u[t]=2|u[t],d.set(e,null);if(f){for(o=t;o1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}},a.warn=function(){var e;if(n.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}},a.error=function(){var e;if(n.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}},30988:function(e,t,r){"use strict";var n=r(33428);e.exports=function(e,t,r){var i=e.selectAll("g."+r.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var a=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(e){e[0][a]=n.select(this)})),i}},52248:function(e,t,r){"use strict";var n=r(36524);t.init2dArray=function(e,t){for(var r=new Array(e),n=0;nt/2?e-Math.round(e/t)*t:e}}},22296:function(e,t,r){"use strict";var n=r(38248),i=r(38116).isArrayOrTypedArray;function a(e,t){return function(){var r,n,o,s,l,u=e;for(s=0;s/g),l=0;la||u===i||us)&&(!t||!l(e))}:function(e,t){var l=e[0],u=e[1];if(l===i||la||u===i||us)return!1;var c,f,d,h,p,v=r.length,m=r[0][0],g=r[0][1],y=0;for(c=1;cMath.max(f,m)||u>Math.max(d,g)))if(uc||Math.abs(n(o,d))>i)return!0;return!1},a.filter=function(e,t){var r=[e[0]],n=0,i=0;function o(o){e.push(o);var s=r.length,l=n;r.splice(i+1);for(var u=l+1;u1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}},5048:function(e,t,r){"use strict";var n=r(16576),i=r(28624);e.exports=function(e,t,a){var o=e._fullLayout,s=!0;return o._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(a);else if(!n.pick||o._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:t||[],cachedCode:a||{}})}catch(l){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:n.key})}),!1)}})),s||n({container:o._glcontainer.node()}),s}},34296:function(e,t,r){"use strict";var n=r(38248),i=r(25928);e.exports=function(e){var t;if("string"!==typeof(t=e&&e.hasOwnProperty("userAgent")?e.userAgent:function(){var e;return"undefined"!==typeof navigator&&(e=navigator.userAgent),e&&e.headers&&"string"===typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]),e}()))return!0;var r=i({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var a=t.split(" "),o=1;o-1;s--){var l=a[s];if("Version/"===l.substr(0,8)){var u=l.substr(8).split(".")[0];if(n(u)&&(u=+u),u>=13)return!0}}return r}},52416:function(e){"use strict";e.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;ni.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 f(e,t){return e>=t}t.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-s)-1:Math.floor((e-t.start)/t.size+s);var a,o,d=0,h=t.length,p=0,v=h>1?(t[h-1]-t[0])/(h-1):1;for(o=v>=0?r?l:u:r?f:c,e+=v*s*(r?-1:1)*(v>=0?1:-1);d90&&i.log("Long binary search..."),d-1},t.sorterAsc=function(e,t){return e-t},t.sorterDes=function(e,t){return t-e},t.distinctVals=function(e){var r,n=e.slice();for(n.sort(t.sorterAsc),r=n.length-1;r>-1&&n[r]===o;r--);for(var i,a=n[r]-n[0]||1,s=a/(r||1)/1e4,l=[],u=0;u<=r;u++){var c=n[u],f=c-i;void 0===i?(l.push(c),i=c):f>s&&(a=Math.min(a,f),l.push(c),i=c)}return{vals:l,minDiff:a}},t.roundUp=function(e,t,r){for(var n,i=0,a=t.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},t.findIndexOfMin=function(e,t){t=t||a;for(var r,n=1/0,i=0;ia.length)&&(o=a.length),n(r)||(r=!1),i(a[0])){for(l=new Array(o),s=0;se.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},43080:function(e,t,r){"use strict";var n=r(72160);e.exports=function(e){return e?n(e):[0,0,0,1]}},9188:function(e,t,r){"use strict";var n=r(2264),i=r(43616),a=r(3400),o=null;e.exports=function(){if(null!==o)return o;o=!1;var e=a.isIE()||a.isSafari()||a.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(n.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if("function"===typeof r)o=t.some((function(e){return r.apply(null,e)}));else{var s=i.tester.append("image").attr("style",n.STYLE),l=window.getComputedStyle(s.node()).imageRendering;o=t.some((function(e){var t=e[1];return l===t||l===t.toLowerCase()})),s.remove()}}return o}},72736:function(e,t,r){"use strict";var n=r(33428),i=r(3400),a=i.strTranslate,o=r(9616),s=r(84284).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(e,r,m){var S=e.text(),E=!e.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!==typeof MathJax&&S.match(l),P=n.select(e.node().parentNode);if(!P.empty()){var O=e.attr("class")?e.attr("class").split(" ")[0]:"text";return O+="-math",P.selectAll("svg."+O).remove(),P.selectAll("g."+O+"-group").remove(),e.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),E?(r&&r._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 a,o,s,l,d=parseInt((MathJax.version||"").split(".")[0]);if(2===d||3===d){var h=function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:f},displayAlign:"left"})},p=function(){o=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=f},v=function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},m=function(){"svg"!==(a=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg")},g=function(){var r="math-output-"+i.randstr({},64),a=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(e.replace(u,"\\lt ").replace(c,"\\gt "))).node();return 2===d?MathJax.Hub.Typeset(a):MathJax.typeset([a])},y=function(){var t=l.select(2===d?".MathJax_SVG":".MathJax"),a=!t.empty()&&l.select("svg").node();if(a){var o,s=a.getBoundingClientRect();o=2===d?n.select("body").select("#MathJax_SVG_glyphs"):t.select("defs"),r(t,o,s)}else i.log("There was an error in the tex syntax.",e),r();l.remove()},x=function(){if("SVG"!==a)return MathJax.Hub.setRenderer(a)},b=function(){"svg"!==a&&(MathJax.config.startup.output=a)},_=function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)},w=function(){MathJax.config=o};2===d?MathJax.Hub.Queue(h,v,g,y,x,_):3===d&&(p(),m(),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){g(),y(),b(),w()})))}else i.warn("No MathJax version:",MathJax.version)}(E[2],o,(function(n,i,o){P.selectAll("svg."+O).remove(),P.selectAll("g."+O+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return I(),void t();var l=P.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var u=o.width,c=o.height;s.attr({class:O,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=e.node().style.fill||"black",d=s.select("g");d.attr({fill:f,stroke:f});var h=d.node().getBoundingClientRect(),p=h.width,v=h.height;(p>u||v>c)&&(s.style("overflow","hidden"),p=(h=s.node().getBoundingClientRect()).width,v=h.height);var g=+e.attr("x"),y=+e.attr("y"),x=-(r||e.node().getBoundingClientRect().height)/4;if("y"===O[0])l.attr({transform:"rotate("+[-90,g,y]+")"+a(-p/2,x-v/2)});else if("l"===O[0])y=x-v/2;else if("a"===O[0]&&0!==O.indexOf("atitle"))g=0,y=x;else{var b=e.attr("text-anchor");g-=p*("middle"===b?.5:"end"===b?1:0),y=y+x-v/2}s.attr({x:g,y:y}),m&&m.call(e,l),t(l)}))}))):I(),e}function I(){P.empty()||(O=e.attr("class")+"-math",P.select("svg."+O).remove()),e.text("").style("white-space","pre");var r=function(e,t){t=t.replace(g," ");var r,a=!1,l=[],u=-1;function c(){u++;var t=document.createElementNS(o.svg,"tspan");n.select(t).attr({class:"line",dy:u*s+"em"}),e.appendChild(t),r=t;var i=l;if(l=[{node:t}],i.length>1)for(var a=1;a doesnt match end tag <"+e+">. Pretending it did match.",t),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",t)}var E=b.test(t);E?c():(r=e,l=[{node:e}]);for(var P=t.split(y),O=0;O|>|>)/g,f=[["$","$"],["\\(","\\)"]],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"},h={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},v="\u200b",m=["http:","https:","mailto:","",void 0,":"],g=t.NEWLINES=/(\r\n?|\n)/g,y=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;t.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&C(n)}var M=/(^|;)\s*color:/;t.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"],i=e.split(y),a=[],o="",s=0,l=0;l3?a.push(u.substr(0,h-3)+"..."):a.push(u.substr(0,h));break}o=""}}return a.join("")};var S={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(e){return e.replace(E,(function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){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)):S[t])||e}))}function L(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var i=r.protocol,a=n.protocol;return-1!==m.indexOf(i)&&-1!==m.indexOf(a)?t:""}function P(e,t,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||"top",u=e.node().getBoundingClientRect(),c=t.node().getBoundingClientRect();return a="bottom"===l?function(){return u.bottom-n.height}:"middle"===l?function(){return u.top+(u.height-n.height)/2}:function(){return u.top},o="right"===s?function(){return u.right-n.width}:"center"===s?function(){return u.left+(u.width-n.width)/2}:function(){return u.left},function(){n=this.node().getBoundingClientRect();var e=o()-c.left,t=a()-c.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}t.convertEntities=C,t.sanitizeHTML=function(e){e=e.replace(g," ");for(var t=document.createElement("p"),r=t,i=[],a=e.split(y),o=0;oa.ts+t?l():a.timer=setTimeout((function(){l(),a.timer=null}),t)},t.done=function(e){var t=r[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},t.clear=function(e){if(e)n(r[e]),delete r[e];else for(var i in r)t.clear(i)}},36896:function(e,t,r){"use strict";var n=r(38248);e.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}},59972:function(e,t,r){"use strict";var n=e.exports={},i=r(79552).locationmodeToLayer,a=r(55712).NO;n.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(e,t){return e+t+".json"},n.getTopojsonFeatures=function(e,t){var r=i[e.locationmode],n=t.objects[r];return a(t,n).features}},11680:function(e){"use strict";e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(e){"use strict";e.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"}}},69820:function(e,t,r){"use strict";var n=r(24040);e.exports=function(e){for(var t,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=e.split("[")[0],s=0;s0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},t.cleanLayout=function(e){var r,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 a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,d=(s.subplotsRegistry.gl3d||{}).attrRegex,v=Object.keys(e);for(r=0;r3?(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"),u.clean(e),e.template&&e.template.layout&&t.cleanLayout(e.template.layout),e},t.cleanData=function(e){for(var r=0;r0)return e.substr(0,t)}t.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"];t.clearAxisTypes=function(e,t,r){for(var n=0;n1&&a.warn("Full array edits are incompatible with other edits",f);var y=r[""][""];if(u(y))t.set(null);else{if(!Array.isArray(y))return a.warn("Unrecognized full array edit value",f,y),!0;t.set(y)}return!v&&(d(m,g),h(e),!0)}var x,b,_,w,k,T,A,M,S=Object.keys(r).map(Number).sort(o),E=t.get(),C=E||[],L=c(g,f).get(),P=[],O=-1,I=C.length;for(x=0;xC.length-(A?0:1))a.warn("index out of range",f,_);else if(void 0!==T)k.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",f,_),u(T)?P.push(_):A?("add"===T&&(T={}),C.splice(_,0,T),L&&L.splice(_,0,{})):a.warn("Unrecognized full object edit value",f,_,T),-1===O&&(O=_);else for(b=0;b=0;x--)C.splice(P[x],1),L&&L.splice(P[x],1);if(C.length?E||t.set(C):t.set(null),v)return!1;if(d(m,g),p!==i){var R;if(-1===O)R=S;else{for(I=Math.max(C.length,I),R=[],x=0;x=O);x++)R.push(_);for(x=O;x=e.data.length||i<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function R(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if("undefined"===typeof t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),I(e,t,"currentIndices"),"undefined"===typeof r||Array.isArray(r)||(r=[r]),"undefined"!==typeof r&&I(e,r,"newIndices"),"undefined"!==typeof r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function D(e,t,r,n,a){!function(e,t,r,n){var i=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("undefined"===typeof r)throw new Error("indices must be an integer or array of integers");for(var a in I(e,r,"indices"),t){if(!Array.isArray(t[a])||t[a].length!==r.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==t[a].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 l=function(e,t,r,n){var a,l,u,c,f,d=o.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=O(r,e.data.length-1),t)for(var v=0;v-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(t,r){e[r]=e[t],delete e[t]}}function V(e,t,r){e=o.getGraphDiv(e),k.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 i=X(e,n),a=i.flags;a.calc&&(e.calcdata=void 0);var s=[d.previousPromises];a.layoutReplot?s.push(T.layoutReplot):Object.keys(n).length&&(H(e,a,i)||d.supplyDefaults(e),a.legend&&s.push(T.doLegend),a.layoutstyle&&s.push(T.layoutStyles),a.axrange&&G(s,i.rangesAltered),a.ticks&&s.push(T.doTicksRelayout),a.modebar&&s.push(T.doModeBar),a.camera&&s.push(T.doCamera),a.colorbars&&s.push(T.doColorBars),s.push(E)),s.push(d.rehover,d.redrag,d.reselect),u.add(e,V,[e,i.undoit],V,[e,i.redoit]);var l=o.syncOrAsync(s,e);return l&&l.then||(l=Promise.resolve(e)),l.then((function(){return e.emit("plotly_relayout",i.eventData),e}))}function H(e,t,r){var n,i,a=e._fullLayout;if(!t.axrange)return!1;for(var s in t)if("axrange"!==s&&t[s])return!1;var l=function(e,t){return o.coerce(n,i,v,e,t)},u={};for(var c in r.rangesAltered){var f=h.id2name(c);if(n=e.layout[f],i=a[f],p(n,i,l,u),i._matchGroup)for(var d in i._matchGroup)if(d!==c){var m=a[h.id2name(d)];m.autorange=i.autorange,m.range=i.range.slice(),m._input.range=i.range.slice()}}return!0}function G(e,t){var r=t?function(e){var r=[];for(var n in t){var i=h.getFromId(e,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var a in i._matchGroup)t[a]||r.push(a)}return h.draw(e,r,{skipTitle:!0})}:function(e){return h.draw(e,"redraw")};e.push(b,T.doAutoRangeAndConstraints,r,T.drawData,T.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(e,t){var r,n,i,a=e.layout,l=e._fullLayout,u=l._guiEditing,d=B(l._preGUI,u),p=Object.keys(t),v=h.list(e),m=o.extendDeepAll({},t),g={};for(q(t),p=Object.keys(t),n=0;n0&&"string"!==typeof I.parts[D];)D--;var z=I.parts[D],F=I.parts[D-1]+"."+z,j=I.parts.slice(0,D).join("."),U=s(e.layout,j).get(),V=s(l,j).get(),H=I.get();if(void 0!==R){T[O]=R,S[O]="reverse"===z?R:N(H);var G=f.getLayoutValObject(l,I.parts);if(G&&G.impliedEdits&&null!==R)for(var X in G.impliedEdits)E(o.relativeAttr(O,X),G.impliedEdits[X]);if(-1!==["width","height"].indexOf(O))if(R){E("autosize",null);var J="height"===O?"width":"height";E(J,l[J])}else l[O]=e._initialAutoSize[O];else if("autosize"===O)E("width",R?null:l.width),E("height",R?null:l.height);else if(F.match(W))P(F),s(l,j+"._inputRange").set(null);else if(F.match(Y)){P(F),s(l,j+"._inputRange").set(null);var $=s(l,j).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else F.match(Z)&&s(l,j+"._inputDomain").set(null);if("type"===z){C=U;var Q="linear"===V.type&&"log"===R,ee="log"===V.type&&"linear"===R;if(Q||ee){if(C&&C.range)if(V.autorange)Q&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var te=C.range[0],re=C.range[1];Q?(te<=0&&re<=0&&E(j+".autorange",!0),te<=0?te=re/1e6:re<=0&&(re=te/1e6),E(j+".range[0]",Math.log(te)/Math.LN10),E(j+".range[1]",Math.log(re)/Math.LN10)):(E(j+".range[0]",Math.pow(10,te)),E(j+".range[1]",Math.pow(10,re)))}else E(j+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete l[I.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(e,V,R,E),c.getComponentMethod("images","convertCoords")(e,V,R,E)}else E(j+".autorange",!0),E(j+".range",null);s(l,j+"._inputRange").set(null)}else if(z.match(M)){var ne=s(l,O).get(),ie=(R||{}).type;ie&&"-"!==ie||(ie="linear"),c.getComponentMethod("annotations","convertCoords")(e,ne,ie,E),c.getComponentMethod("images","convertCoords")(e,ne,ie,E)}var ae=w.containerArrayMatch(O);if(ae){r=ae.array,n=ae.index;var oe=ae.property,se=G||{editType:"calc"};""!==n&&""===oe&&(w.isAddVal(R)?S[O]=null:w.isRemoveVal(R)?S[O]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",t)),A.update(_,se),g[r]||(g[r]={});var le=g[r][n];le||(le=g[r][n]={}),le[oe]=R,delete t[O]}else"reverse"===z?(U.range?U.range.reverse():(E(j+".autorange",!0),U.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):("dragmode"===O&&(!1===R&&!1!==H||!1!==R&&!1===H)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===R||"select"===R)&&"lasso"!==H&&"select"!==H||l._has("gl2d")?_.plot=!0:G?A.update(_,G):_.calc=!0,I.set(R))}}for(r in g)w.applyContainerArrayChanges(e,d(a,r),g[r],_,d)||(_.plot=!0);for(var ue in L){var ce=(C=h.getFromId(e,ue))&&C._constraintGroup;if(ce)for(var fe in _.calc=!0,ce)L[fe]||(h.getFromId(e,fe)._constraintShrinkable=!0)}(K(e)||t.height||t.width)&&(_.plot=!0);var de=l.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=s(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ne(e,t){for(var r=0;r=i.length?i[0]:i[e]:i}function l(e){return Array.isArray(a)?e>=a.length?a[0]:a[e]:a}function u(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(a,c){function f(){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,d.transition(e,t.frame.data,t.frame.layout,k.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&&f()};t()}var p,v,m=0;function g(e){return Array.isArray(i)?m>=i.length?e.transitionOpts=i[m]:e.transitionOpts=i[0]:e.transitionOpts=i,m++,e}var y=[],x=void 0===t||null===t,b=Array.isArray(t);if(x||b||!o.isPlainObject(t)){if(x||-1!==["string","number"].indexOf(typeof t))for(p=0;p0&&TT)&&A.push(v);y=A}}y.length>0?function(t){if(0!==t.length){for(var i=0;i=0;n--)if(o.isPlainObject(t[n])){var v=t[n].name,m=(c[v]||p[v]||{}).name,g=t[n].name,y=c[m]||p[m];m&&g&&"number"===typeof g&&y&&S<5&&(S++,o.warn('addFrames: overwriting frame "'+(c[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===S&&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[v]={name:v},h.push({frame:d.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}h.sort((function(e,t){return e.index>t.index?-1:e.index=0;n--){if("number"===typeof(i=h[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;c[i.name="frame "+e._transitionData._counter++];);if(c[i.name]){for(a=0;a=0;r--)n=t[r],a.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=d.modifyFrames,c=d.modifyFrames,f=[e,s],h=[e,a];return u&&u.add(e,l,f,c,h),d.modifyFrames(e,a)},t.addTraces=function e(r,n,i){r=o.getGraphDiv(r);var a,s,l=[],c=t.deleteTraces,f=e,d=[r,l],h=[r,n];for(function(e,t,r){var n,i;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if("undefined"===typeof t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!_(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function _(e){return e===Math.round(e)&&e>=0}function w(){var e,t,r={};for(e in f(r,o),n.subplotsRegistry)if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[u].type]||{}).attributes)&&r[t[2]],s=3}else{var c=e._module;if(c||(c=(n.modules[e.type||a.type.dflt]||{})._module),!c)return!1;if(!(i=(r=c.attributes)&&r[o])){var f=c.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return b(i,t,s)},t.getLayoutValObject=function(e,t){var r=function(e,t){var r,i,a,s,l=e._basePlotModules;if(l){var u;for(r=0;r=i&&(r._input||{})._templateitemname;s&&(o=i);var l,u=t+"["+o+"]";function c(){l={},s&&(l[u]={},l[u][a]=s)}function f(e,t){s?n.nestedProperty(l[u],e).set(t):l[u+"."+e]=t}function d(){var e=l;return c(),e}return c(),{modifyBase:function(e,t){l[e]=t},modifyItem:f,getUpdateObj:d,applyUpdate:function(t,r){t&&f(t,r);var i=d();for(var a in i)n.nestedProperty(e,a).set(i[a])}}}},39172:function(e,t,r){"use strict";var n=r(33428),i=r(24040),a=r(7316),o=r(3400),s=r(72736),l=r(73696),u=r(76308),c=r(43616),f=r(81668),d=r(45460),h=r(54460),p=r(84284),v=r(71888),m=v.enforce,g=v.clean,y=r(19280).doAutoRange,x="start",b="middle",_="end";function w(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function k(e){var r,i,s,l,f,v,m=e._fullLayout,g=m._size,y=g.p,x=h.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),t.drawMainTitle(e),d.manage(e),!m._has("cartesian"))return a.previousPromises(e);function b(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-y-n:t._offset+t._length+y+n:g.t+g.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+y+n:t._offset-y-n:g.l+g.w*(e.position||0)+n%1}for(r=0;r.5?"t":"b",o=e._fullLayout.margin[a],s=0;return"paper"===t.yref?s=r+t.pad.t+t.pad.b:"container"===t.yref&&(s=function(e,t,r,n,i){var a=0;return"middle"===r&&(a+=i/2),"t"===e?("top"===r&&(a+=i),a+=n-t*n):("bottom"===r&&(a+=i),a+=t*n),a}(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}(e,r,m);if(g>0){!function(e,t,r,n){var i="title.automargin",s=e._fullLayout.title,l=s.y>.5?"t":"b",u={x:s.x,y:s.y,t:0,b:0},c={};"paper"===s.yref&&function(e,t,r,n,i){var a="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,s=o.isTopAnchor(t)?n:n-i,l="b"===r?a-s:s;return!(o.isTopAnchor(t)&&"t"===r||o.isBottomAnchor(t)&&"b"===r)&&lk?c.push({code:"unused",traceType:y,templateCount:w,dataCount:k}):k>w&&c.push({code:"reused",traceType:y,templateCount:w,dataCount:k})}}else c.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var a=t[n],o=v(t,n,r);i(a)?(Array.isArray(t)&&!1===a._template&&a.templateitemname&&c.push({code:"missing",path:o,templateitemname:a.templateitemname}),e(a,o)):Array.isArray(a)&&m(a)&&e(a,o)}}({data:h,layout:d},""),c.length)return c.map(g)}},67024:function(e,t,r){"use strict";var n=r(38248),i=r(36424),a=r(7316),o=r(3400),s=r(81792),l=r(37164),u=r(63268),c=r(25788).version,f={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}};e.exports=function(e,t){var r,d,h,p;function v(e){return!(e in t)||o.validate(t[e],f[e])}if(t=t||{},o.isPlainObject(e)?(r=e.data||[],d=e.layout||{},h=e.config||{},p={}):(e=o.getGraphDiv(e),r=o.extendDeep([],e.data),d=o.extendDeep({},e.layout),h=e._context,p=e._fullLayout||{}),!v("width")&&null!==t.width||!v("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!v("format"))throw new Error("Export format is not "+o.join2(f.format.values,", "," or ")+".");var m={};function g(e,r){return o.coerce(t,m,f,e,r)}var y=g("format"),x=g("width"),b=g("height"),_=g("scale"),w=g("setBackground"),k=g("imageDataOnly"),T=document.createElement("div");T.style.position="absolute",T.style.left="-5000px",document.body.appendChild(T);var A=o.extendFlat({},d);x?A.width=x:null===t.width&&n(p.width)&&(A.width=p.width),b?A.height=b:null===t.height&&n(p.height)&&(A.height=p.height);var M=o.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(T);function E(){return new Promise((function(e){setTimeout(e,s.getDelay(T._fullLayout))}))}function C(){return new Promise((function(e,t){var r=l(T,y,_),n=T._fullLayout.width,f=T._fullLayout.height;function d(){i.purge(T),document.body.removeChild(T)}if("full-json"===y){var h=a.graphJson(T,!1,"keepdata","object",!0,!0);return h.version=c,h=JSON.stringify(h),d(),e(k?h:s.encodeJSON(h))}if(d(),"svg"===y)return e(k?r:s.encodeSVG(r));var p=document.createElement("canvas");p.id=o.randstr(),u({format:y,width:n,height:f,scale:_,canvas:p,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){i.newPlot(T,r,A,M).then(S).then(E).then(C).then((function(t){e(function(e){return k?e.replace(s.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},21480:function(e,t,r){"use strict";var n=r(3400),i=r(7316),a=r(73060),o=r(20556).dfltConfig,s=n.isPlainObject,l=Array.isArray,u=n.isArrayOrTypedArray;function c(e,t,r,i,a,o){o=o||[];for(var f=Object.keys(e),d=0;dx.length&&i.push(h("unused",a,g.concat(x.length)));var A,M,S,E,C,L=x.length,P=Array.isArray(T);if(P&&(L=Math.min(L,T.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(h("unused",a,g.concat(M,x[M].length)));var O=x[M].length;for(A=0;A<(P?Math.min(O,T[M].length):O);A++)S=P?T[M][A]:T,E=y[M][A],C=x[M][A],n.validate(E,S)?C!==E&&C!==+E&&i.push(h("dynamic",a,g.concat(M,A),E,C)):i.push(h("value",a,g.concat(M,A),E))}else i.push(h("array",a,g.concat(M),y[M]));else for(M=0;M1&&d.push(h("object","layout"))),i.supplyDefaults(p);for(var v=p._fullData,m=r.length,g=0;g0&&Math.round(f)===f))return{vals:i};u=f}for(var d=t.calendar,h="start"===l,p="end"===l,v=e[r+"period0"],m=a(v,d)||0,g=[],y=[],x=[],b=i.length,_=0;_A;)T=o(T,-u,d);for(;T<=A;)T=o(T,u,d);k=o(T,-u,d)}else{for(T=m+(w=Math.round((A-m)/c))*c;T>A;)T-=c;for(;T<=A;)T+=c;k=T-c}g[_]=h?k:p?T:(k+T)/2,y[_]=k,x[_]=T}return{vals:g,starts:y,ends:x}}},26720:function(e){"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(e,t,r){"use strict";var n=r(33428),i=r(38248),a=r(3400),o=r(39032).FP_SAFE,s=r(24040),l=r(43616),u=r(79811),c=u.getFromId,f=u.isLinked;function d(e,t){var r,n,i=[],o=e._fullLayout,s=p(o,t,0),l=p(o,t,1),u=m(e,t),c=u.min,f=u.max;if(0===c.length||0===f.length)return a.simpleMap(t.range,t.r2l);var d=c[0].val,v=f[0].val;for(r=1;r0&&((A=L-s(b)-l(_))>P?M/A>O&&(w=b,k=_,O=M/A):M/L>O&&(w={val:b.val,nopad:1},k={val:_.val,nopad:1},O=M/L));if(d===v){var I=d-1,R=d+1;if(E)if(0===d)i=[0,1];else{var D=(d>0?f:c).reduce((function(e,t){return Math.max(e,l(t))}),0),z=d/(1-Math.min(.5,D/L));i=d>0?[0,z]:[z,0]}else i=C?[Math.max(0,I),Math.max(1,R)]:[I,R]}else E?(w.val>=0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):C&&(w.val-O*s(w)<0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),O=(k.val-w.val-h(t,b.val,_.val))/(L-s(w)-l(k)),i=[w.val-O*s(w),k.val+O*l(k)];return i=T(i,t),t.limitRange&&t.limitRange(),y&&i.reverse(),a.simpleMap(i,t.l2r||Number)}function h(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),C=A(r.vpadminus||r.vpad);if(!k){if(d=1/0,h=-1/0,w)for(n=0;n0&&(d=a),a>h&&a-o&&(d=a),a>h&&a=O;n--)P(n);return{min:p,max:v,opts:r}},concatExtremes:m};var v=3;function m(e,t,r){var n,i,a,o=t._id,s=e._fullData,l=e._fullLayout,u=[],f=[];function d(e,t){for(n=0;n=r&&(u.extrapad||!o)){s=!1;break}i(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&0===t;e.push({val:t,pad:c?0:r,extrapad:!c&&o})}}function b(e){return i(e)&&Math.abs(e)=t}function k(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))<(r=e.d2l(r))}function T(e,t){if(!t||!t.autorangeoptions)return e;var r=e[0],n=e[1],i=t.autorangeoptions.include;if(void 0!==i){var o=t.d2l(r),s=t.d2l(n);a.isArrayOrTypedArray(i)||(i=[i]);for(var l=0;l=u&&(o=u,r=u),s<=u&&(s=u,n=u)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&k(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&k(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&k(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&k(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}},76808:function(e){"use strict";e.exports=function(e,t,r){var n,i;if(r){var a="reversed"===t||"min reversed"===t||"max reversed"===t;n=r[a?1:0],i=r[a?0:1]}var o=e("autorangeoptions.minallowed",null===i?n:void 0),s=e("autorangeoptions.maxallowed",null===n?i:void 0);void 0===o&&e("autorangeoptions.clipmin"),void 0===s&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},54460:function(e,t,r){"use strict";var n=r(33428),i=r(38248),a=r(7316),o=r(24040),s=r(3400),l=s.strTranslate,u=r(72736),c=r(81668),f=r(76308),d=r(43616),h=r(94724),p=r(98728),v=r(39032),m=v.ONEMAXYEAR,g=v.ONEAVGYEAR,y=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,w=v.ONEMAXMONTH,k=v.ONEAVGMONTH,T=v.ONEMINMONTH,A=v.ONEWEEK,M=v.ONEDAY,S=M/2,E=v.ONEHOUR,C=v.ONEMIN,L=v.ONESEC,P=v.MINUS_SIGN,O=v.BADNUM,I={K:"zeroline"},R={K:"gridline",L:"path"},D={K:"minor-gridline",L:"path"},z={K:"tick",L:"path"},F={K:"tick",L:"text"},N={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},B=r(84284),j=B.MID_SHIFT,U=B.CAP_SHIFT,q=B.LINE_SPACING,V=B.OPPOSITE_SIDE,H=e.exports={};H.setConvert=r(78344);var G=r(52976),W=r(79811),Y=W.idSort,Z=W.isLinked;H.id2name=W.id2name,H.name2id=W.name2id,H.cleanId=W.cleanId,H.list=W.list,H.listIds=W.listIds,H.getFromId=W.getFromId,H.getFromTrace=W.getFromTrace;var X=r(19280);H.getAutoRange=X.getAutoRange,H.findExtremes=X.findExtremes;var K=1e-4;function J(e){var t=(e[1]-e[0])*K;return[e[0]-t,e[1]+t]}H.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],u=n+"ref",c={};return i||(i=l[0]||("string"===typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(e){return e+" domain"}))),c[u]={valType:"enumerated",values:l.concat(a?"string"===typeof a?[a]:a:[]),dflt:i},s.coerce(e,t,c,u)},H.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},H.coercePosition=function(e,t,r,n,i,a){var o,l;if("range"!==H.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var u=H.getFromId(t,n);l=r(i,a=u.fraction2r(a)),o=u.cleanPos}e[i]=o(l)},H.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?s.ensureNumber:H.getFromId(t,r).cleanPos)(e)},H.redrawComponents=function(e,t){t=t||H.listIds(e);var r=e._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),u={},c=0;cn&&d2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},H.saveRangeInitial=function(e,t){for(var r=H.list(e,"",!0),n=!1,i=0;i.3*d||c(n)||c(a))){var h=r.dtick/2;e+=e+ho){var l=Number(r.substr(1));a.exactYears>o&&l%12===0?e=H.tickIncrement(e,"M6","reverse")+1.5*M:a.exactMonths>o?e=H.tickIncrement(e,"M1","reverse")+15.5*M:e-=S;var u=H.tickIncrement(e,r);if(u<=n)return u}return e}(y,e,g,u,a)),m=y;m<=c;)m=H.tickIncrement(m,g,!1,a);return{start:t.c2r(y,0,a),end:t.c2r(m,0,a),size:g,_dataSpan:c-u}},H.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n,a=t.dtick&&i(t._tmin);if(a){var o=H.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,.99*o+.01*t._tmin]}else{var l=s.simpleMap(t.range,t.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(e.range=s.simpleMap(n,t.l2r),e._isMinor=!0,H.prepTicks(e,r),a){var u=i(t.dtick),c=i(e.dtick),f=u?t.dtick:+t.dtick.substring(1),d=c?e.dtick:+e.dtick.substring(1);u&&c?te(f,d)?f===2*A&&d===2*M&&(e.dtick=A):f===2*A&&d===3*M?e.dtick=A:f!==A||(t._input.minor||{}).nticks?re(f/d,2.5)?e.dtick=f/2:e.dtick=f:e.dtick=M:"M"===String(t.dtick).charAt(0)?c?e.dtick="M1":te(f,d)?f>=12&&2===d&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?te(f,d)||(e.dtick=re(f/d,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},H.prepTicks=function(e,t){var r=s.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,a=e.nticks;a||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?s.bigFont(e.tickfont.size||12):15,a=e._length/n):(n="y"===e._id.charAt(0)?40:80,a=s.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(a*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(a*=100),e._roughDTick=Math.abs(r[1]-r[0])/a,H.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(i(e.dtick)||"M"!==e.dtick.charAt(0))}var n=r(),a=H.getTickFormat(e);if(a){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(t=E,o&&!n&&e.dtick=(I?0:1);R--){var D=!R;R?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var z=R?e:s.extendFlat({},e,e.minor);if(D?H.prepMinorTicks(z,e,t):H.prepTicks(z,t),"array"!==z.tickmode)if("sync"!==z.tickmode){var F=J(c),N=F[0],B=F[1],j=i(z.dtick),U="log"===a&&!(j||"L"===z.dtick.charAt(0)),q=H.tickFirst(z,t);if(R){if(e._tmin=q,q=B:Y<=B;Y=H.tickIncrement(Y,Z,f,o)){if(R&&V++,z.rangebreaks&&!f){if(Y=h)break}if(L.length>p||Y===W)break;W=Y;var X={value:Y};R?(U&&Y!==(0|Y)&&(X.simpleLabel=!0),l>1&&V%l&&(X.skipLabel=!0),L.push(X)):(X.minor=!0,P.push(X))}}else L=[],v=ae(e);else R?(L=[],v=oe(e,!D)):(P=[],C=oe(e,!D))}if(I&&!("inside"===e.minor.ticks&&"outside"===e.ticks||"outside"===e.minor.ticks&&"inside"===e.ticks)){for(var K=L.map((function(e){return e.value})),$=[],Q=0;Q0?(a=n-1,o=n):(a=n,o=n);var s,l=e[a].value,u=e[o].value,c=Math.abs(u-l),f=r||c,d=0;f>=y?d=c>=y&&c<=m?c:g:r===b&&f>=_?d=c>=_&&c<=x?c:b:f>=T?d=c>=T&&c<=w?c:k:r===A&&f>=A?d=A:f>=M?d=M:r===S&&f>=S?d=S:r===E&&f>=E&&(d=E),d>=c&&(d=c,s=!0);var h=i+d;if(t.rangebreaks&&d>0){for(var p=0,v=0;v<84;v++){var C=(v+.5)/84;t.maskBreaks(i*(1-C)+C*h)!==O&&p++}(d*=p/84)||(e[n].drop=!0),s&&c>A&&(d=c)}(d>0||0===n)&&(e[n].periodX=i+d/2)}}(L,e,e._definedDelta),e.rangebreaks){var ie="y"===e._id.charAt(0),se=1;"auto"===e.tickmode&&(se=e.tickfont?e.tickfont.size:12);var le=NaN;for(r=L.length-1;r>-1;r--)if(L[r].drop)L.splice(r,1);else{L[r].value=De(L[r].value,e);var ue=e.c2p(L[r].value);(ie?le>ue-se:leh||feh&&(ce.periodX=h),fe10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=M&&a<=10||t>=15*M)e._tickround="d";else if(t>=C&&a<=16||t>=E)e._tickround="M";else if(t>=L&&a<=19||t>=C)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(i(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);i(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),u=Math.floor(Math.log(l)/Math.LN10+.01),c=void 0===e.minexponent?3:e.minexponent;Math.abs(u)>c&&(ye(e.exponentformat)&&!xe(u)?e._tickexponent=3*Math.round((u-1)/3):e._tickexponent=u)}else e._tickround=null}function me(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}H.autoTicks=function(e,t,r){var n;function a(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=s.dateTick0(e.calendar,0);var o=2*t;if(o>g)t/=g,n=a(10),e.dtick="M"+12*pe(t,n,se);else if(o>k)t/=k,e.dtick="M"+pe(t,1,le);else if(o>M){if(e.dtick=pe(t,M,e._hasDayOfWeekBreaks?[1,2,7,14]:ce),!r){var l=H.getTickFormat(e),u="period"===e.ticklabelmode;u&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=s.dateTick0(e.calendar,2):e.tick0=s.dateTick0(e.calendar,1),u&&(e._dowTick0=e.tick0)}}else o>E?e.dtick=pe(t,E,le):o>C?e.dtick=pe(t,C,ue):o>L?e.dtick=pe(t,L,ue):(n=a(10),e.dtick=pe(t,n,se))}else if("log"===e.type){e.tick0=0;var c=s.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(c[1]-c[0])<1){var f=1.5*Math.abs((c[1]-c[0])/t);t=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/f,n=a(10),e.dtick="L"+pe(t,n,se)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Re(e)?(e.tick0=0,n=1,e.dtick=pe(t,n,he)):(e.tick0=0,n=a(10),e.dtick=pe(t,n,se));if(0===e.dtick&&(e.dtick=1),!i(e.dtick)&&"string"!==typeof e.dtick){var d=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(d)}},H.tickIncrement=function(e,t,r,a){var o=r?-1:1;if(i(t))return s.increment(e,o*t);var l=t.charAt(0),u=o*Number(t.substr(1));if("M"===l)return s.incrementMonth(e,u,a);if("L"===l)return Math.log(Math.pow(10,e)+u)/Math.LN10;if("D"===l){var c="D2"===t?de:fe,f=e+.01*o,d=s.roundUp(s.mod(f,1),c,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(t)},H.tickFirst=function(e,t){var r=e.r2l||Number,a=s.simpleMap(e.range,r,void 0,void 0,t),o=a[1]=0&&r<=e._length?t:null};if(l&&s.isArrayOrTypedArray(e.ticktext)){var h=s.simpleMap(e.range,e.r2l),p=(Math.abs(h[1]-h[0])-(e._lBreaks||0))/1e4;for(a=0;a ")}else e._prevDateHead=l,u+="
"+l;t.text=u}(e,o,r,u):"log"===c?function(e,t,r,n,a){var o=e.dtick,l=t.x,u=e.tickformat,c="string"===typeof o&&o.charAt(0);if("never"===a&&(a=""),n&&"L"!==c&&(o="L3",c="L"),u||"L"===c)t.text=be(Math.pow(10,l),e,a,n);else if(i(o)||"D"===c&&s.mod(l+.01,1)<.1){var f=Math.round(l),d=Math.abs(f),h=e.exponentformat;"power"===h||ye(h)&&xe(f)?(t.text=0===f?1:1===f?"10":"10"+(f>1?"":P)+d+"",t.fontSize*=1.25):("e"===h||"E"===h)&&d>2?t.text="1"+h+(f>0?"+":P)+d:(t.text=be(Math.pow(10,l),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==c)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,s.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var 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*(l<0?.5:.25)))}}(e,o,0,u,m):"category"===c?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r=""),t.text=String(r)}(e,o):"multicategory"===c?function(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}(e,o,r):Re(e)?function(e,t,r,n,i){if("radians"!==e.thetaunit||r)t.text=be(t.x,e,i,n);else{var a=t.x/180;if(0===a)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}function r(e,n){return t(n,0)?e:r(n,e%n)}function n(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}(a);if(o[1]>=100)t.text=be(s.deg2rad(t.x),e,i,n);else{var l=t.x<0;1===o[1]?1===o[0]?t.text="\u03c0":t.text=o[0]+"\u03c0":t.text=["",o[0],"","\u2044","",o[1],"","\u03c0"].join(""),l&&(t.text=P+t.text)}}}}(e,o,r,u,m):function(e,t,r,n,i){"never"===i?i="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=be(t.x,e,i,n)}(e,o,0,u,m),n||(e.tickprefix&&!v(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!v(e.showticksuffix)&&(o.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(o.text)){var g=e.labelalias[o.text];"string"===typeof g&&(o.text=g)}return("boundaries"===e.tickson||e.showdividers)&&(o.xbnd=[d(o.x-.5),d(o.x+e.dtick-.5)]),o},H.hoverLabelText=function(e,t,r){r&&(e=s.extendFlat({},e,{hoverformat:r}));var n=s.isArrayOrTypedArray(t)?t[0]:t,i=s.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==i&&i!==n)return H.hoverLabelText(e,n,r)+" - "+H.hoverLabelText(e,i,r);var a="log"===e.type&&n<=0,o=H.tickText(e,e.c2l(a?-n:n),"hover").text;return a?0===n?"0":P+o:o};var ge=["f","p","n","\u03bc","m","","k","M","G","T"];function ye(e){return"SI"===e||"B"===e}function xe(e){return e>14||e<-15}function be(e,t,r,n){var a=e<0,o=t._tickround,l=r||t.exponentformat||"B",u=t._tickexponent,c=H.getTickFormat(t),f=t.separatethousands;if(n){var d={exponentformat:l,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:i(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};ve(d),o=(Number(d._tickround)||0)+4,u=d._tickexponent,t.hoverformat&&(c=t.hoverformat)}if(c)return t._numFormat(c)(e).replace(/-/g,P);var h,p=Math.pow(10,-o)/2;if("none"===l&&(u=0),(e=Math.abs(e))"+h+"":"B"===l&&9===u?e+="B":ye(l)&&(e+=ge[u/3+5])),a?P+e:e}function _e(e,t){if(e){var r=Object.keys(N).reduce((function(e,r){return-1!==t.indexOf(r)&&N[r].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){r[t]||(1===t.length?e[t]=0:delete e[t])}))}}function we(e,t){for(var r=[],n={},i=0;i1&&r=i.min&&e=n(e))}function s(e,t){var r=null===t[0],n=null===t[1],i=a(e,t[0])>=0,o=a(e,t[1])<=0;return(r||i)&&(n||o)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=0&&i.unshift(i.splice(n,1).shift())}}));var o={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(t){return function(){if(t){var n=H.getFromId(e,t);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=a;var i=H.drawOne(e,n,r);return n._shiftPusher&&Ne(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},H.drawOne=function(e,t,r){var n,i,l,h=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];t.setScale();var v=e._fullLayout,m=t._id,g=m.charAt(0),y=H.counterLetter(m),x=v._plots[t._mainSubplot];if(x){if(t._shiftPusher=t.autoshift||-1!==p.indexOf(t._id)||-1!==p.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var b=t.linewidth/2||0;"inside"===t.ticks&&(b+=t.ticklen),Ne(t,b,h,!0),Ne(t,t.shift||0,h,!1)}!0===r.skipTitle&&void 0!==t._shift||(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,h));var _=x[g+"axislayer"],w=t._mainLinePosition,k=w+=t._shift,T=t._mainMirrorPosition,A=t._vals=H.calcTicks(t),M=[t.mirror,k,T].join("_");for(n=0;n0?r.bottom-c:0,f))));var d=0,h=0;if(t._shiftPusher&&(d=Math.max(f,r.height>0?"l"===l?c-r.left:r.right-c:0),t.title.text!==v._dfltTitle[g]&&(h=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(h+=Ae(t))),t._fullDepth=Math.max(d,h)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],m="number"===typeof t._shift?t._shift:0;if("x"===g){if("b"===l?n[l]=t._depth:(n[l]=t._depth=Math.max(r.width>0?c-r.top:0,f),p.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var b=t._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===l?(t._depth=Math.max(r.height>0?c-r.left:0,f),n[l]=t._depth-m):(t._depth=Math.max(r.height>0?r.right-c:0,f),n[l]=t._depth+m,p.reverse()),r.height>0){var _=r.bottom-(t._offset+t._length);_>0&&(n.yb=0,n.b=_);var w=t._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[y]="free"===t.anchor?t.position:t._anchorAxis.domain[p[0]],t.title.text!==v._dfltTitle[g]&&(n[l]+=Ae(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=t.linewidth,t.mirror&&!0!==t.mirror&&(i[u]+=f),!0===t.mirror||"ticks"===t.mirror?i[y]=t._anchorAxis.domain[p[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(i[y]=[t._counterDomainMin,t._counterDomainMax][p[1]]))}fe&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"===typeof t.automargin&&(_e(n,t.automargin),_e(i,t.automargin)),a.autoMargin(e,Ee(t),n),a.autoMargin(e,Ce(t),i),a.autoMargin(e,Le(t),s)})),s.syncOrAsync(ue)}}function de(e){var r=m+(e||"tick");return S[r]||(S[r]=function(e,t,r){var n,i,a,o;if(e._selections[t].size())n=1/0,i=-1/0,a=1/0,o=-1/0,e._selections[t].each((function(){var e=Se(this),t=d.bBox(e.node().parentNode);n=Math.min(n,t.top),i=Math.max(i,t.bottom),a=Math.min(a,t.left),o=Math.max(o,t.right)}));else{var s=H.makeLabelFns(e,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}(t,r,k)),S[r]}},H.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],i=e.side===n?1:-1,a=[-1,1,i,-i];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)===("x"===r)&&(a=a.map((function(e){return-e}))),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a},H.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return l(e._offset+e.l2p(t.x),0)}:function(t){return l(0,e._offset+e.l2p(t.x))}},H.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=function(e){return-1!==t.indexOf(e)},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var u=e.side,c=l?(e.tickwidth||0)/2:0,f=3,d=e.tickfont?e.tickfont.size:12;return(o||n)&&(c+=d*U,f+=(e.linewidth||0)/2),(i||a)&&(c+=(e.linewidth||0)/2,f+=3),s&&"top"===u&&(f-=d*(1-U)),(i||n)&&(c=-c),"bottom"!==u&&"right"!==u||(f=-f),[l?c:0,s?f:0]}(e),r=t[0],n=t[1];return"x"===e._id.charAt(0)?function(t){return l(r+e._offset+e.l2p(ke(t)),n)}:function(t){return l(n,r+e._offset+e.l2p(ke(t)))}},H.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var a=void 0!==n.len?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r},H.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",a=function(e){return-1!==n.indexOf(e)},o=a("top"),l=a("left"),u=a("right"),c=a("bottom")||l||o||u,f=a("inside"),d="inside"===n&&"inside"===e.ticks||!f&&"outside"===e.ticks&&"boundaries"!==e.tickson,h=0,p=0,v=d?e.ticklen:0;if(f?v*=-1:c&&(v=0),d&&(h+=v,r)){var m=s.deg2rad(r);h=v*Math.cos(m)+1,p=v*Math.sin(m)}e.showticklabels&&(d||e.showline)&&(h+=.2*e.tickfont.size);var g,y,x,b,_,w={labelStandoff:h+=(e.linewidth||1)/2*(f?-1:1),labelShift:p},k=0,T=e.side,A=e._id.charAt(0),M=e.tickangle;if("x"===A)b=(_=!f&&"bottom"===T||f&&"top"===T)?1:-1,f&&(b*=-1),g=p*b,y=t+h*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=j:x=-90===M&&"bottom"===T?U:90===M&&"top"===T?j:.5,k=j/2*(M/90)),w.xFn=function(e){return e.dx+g+k*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*x},w.anchorFn=function(e,t){if(c){if(l)return"end";if(u)return"start"}return i(t)&&0!==t&&180!==t?t*b<0!==f?"end":"start":"middle"},w.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==f?-n:0};else if("y"===A){if(b=(_=!f&&"left"===T||f&&"right"===T)?1:-1,f&&(b*=-1),g=h,y=p*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&"left"===T||90===M&&"right"===T?U:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);k=Math.abs(Math.sin(E))*U*b,x=0}}w.xFn=function(e){return e.dx+t-(g+e.fontSize*x)*b+k*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*j},w.anchorFn=function(e,t){return i(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},H.drawTicks=function(e,t,r){r=r||{};var i=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?r.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?r.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),o=r.layer.selectAll("path."+i).data(a,Te);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(e){return f.stroke(n.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(r){return d.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Fe(t,[z]),o.attr("transform",r.transFn)},H.drawGrid=function(e,t,r){if(r=r||{},"sync"!==t.tickmode){var i=t._id+"grid",a=t.minor&&t.minor.showgrid,o=a?r.vals.filter((function(e){return e.minor})):[],s=t.showgrid?r.vals.filter((function(e){return!e.minor})):[],l=r.counterAxis;if(l&&H.shouldShowZeroLine(e,t,l))for(var u="array"===t.tickmode,c=0;c=0;g--){var y=g?v:m;if(y){var x=y.selectAll("path."+i).data(g?s:o,Te);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each((function(e){return f.stroke(n.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return d.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?p:t._gw)+"px"})).style("display",null),"function"===typeof r.path&&x.attr("d",r.path)}}Fe(t,[R,D])}},H.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=H.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return Y(e.id,t.id)}))})),a.attr("transform",r.transFn).attr("d",r.path).call(f.stroke,t.zerolinecolor||f.defaultLine).style("stroke-width",d.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Fe(t,[I])},H.drawLabels=function(e,t,r){r=r||{};var a=e._fullLayout,o=t._id,c=r.cls||o+"tick",f=r.vals.filter((function(e){return e.text})),h=r.labelFns,p=r.secondary?0:t.tickangle,v=(t._prevTickAngles||{})[c],m=r.layer.selectAll("g."+c).data(t.showticklabels?f:[],Te),g=[];function y(e,a){e.each((function(e){var o=n.select(this),s=o.select(".text-math-group"),c=h.anchorFn(e,a),f=r.transFn.call(o.node(),e)+(i(a)&&0!==+a?" rotate("+a+","+h.xFn(e)+","+(h.yFn(e)-e.fontSize/2)+")":""),p=u.lineCount(o),v=q*e.fontSize,m=h.heightFn(e,i(a)?+a:0,(p-1)*v);if(m&&(f+=l(0,m)),s.empty()){var g=o.select("text");g.attr({transform:f,"text-anchor":c}),g.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var y=d.bBox(s.node()).width*{end:-.5,start:.5}[c];s.attr("transform",f+l(y,0))}}))}m.enter().append("g").classed(c,1).append("text").attr("text-anchor","middle").each((function(t){var r=n.select(this),i=e._promises.length;r.call(u.positionText,h.xFn(t),h.yFn(t)).call(d.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(u.convertToTspans,e),e._promises[i]?g.push(e._promises.pop().then((function(){y(r,p)}))):y(r,p)})),Fe(t,[F]),m.exit().remove(),r.repositionOnUpdate&&m.each((function(e){n.select(this).select("text").call(u.positionText,h.xFn(e),h.yFn(e))})),t._adjustTickLabelsOverflow=function(){var r=t.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),o="x"===t._id.charAt(0),l=0,u=o?e._fullLayout.width:e._fullLayout.height;if(-1!==r.indexOf("domain")){var c=s.simpleMap(t.range,t.r2l);l=t.l2p(c[0])+t._offset,u=t.l2p(c[1])+t._offset}var f=Math.min(l,u),h=Math.max(l,u),p=t.side,v=1/0,g=-1/0;for(var y in m.each((function(e){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=d.bBox(r.node()),s=0;o?(a.right>h||a.lefth||a.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==e.K||i||l.style("display",null)}))}))}))}))},y(m,v+1?v:p);var x=null;t._selections&&(t._selections[c]=m);var b=[function(){return g.length&&Promise.all(g)}];t.automargin&&a._redrawFromAutoMarginCount&&90===v?(x=v,b.push((function(){y(m,v)}))):b.push((function(){if(y(m,p),f.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){x=t.autotickangles[0];var e,n=0,i=[],a=1;m.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),o=Se(this),s=d.bBox(o.node());a=Math.max(a,u.lineCount(o)),i.push({top:0,bottom:10,height:10,left:r-s.width/2,right:r+s.width/2+2,width:s.width+2})}));var o=("boundaries"===t.tickson||t.showdividers)&&!r.secondary,l=f.length,c=Math.abs((f[l-1].x-f[0].x)*t._m)/(l-1),h=o?c/2:c,v=o?t.ticklen:1.25*n*a,g=h/Math.sqrt(Math.pow(h,2)+Math.pow(v,2)),b=t.autotickangles.map((function(e){return e*Math.PI/180})),_=b.find((function(e){return Math.abs(Math.cos(e))<=g}));void 0===_&&(_=b.reduce((function(e,t){return Math.abs(Math.cos(e))j*B&&(P=B,E[S]=C[S]=O[S])}var U=Math.abs(P-L);U-T>0?T*=1+T/(U-=T):T=0,"y"!==t._id.charAt(0)&&(T=-T),E[M]=w.p2r(w.r2p(C[M])+A*T),"min"===w.autorange||"max reversed"===w.autorange?(E[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(E[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[w._name+".range"]=E}var V=s.syncOrAsync(b);return V&&V.then&&e._promises.push(V),V},H.getPxPosition=function(e,t){var r,n=e._fullLayout._size,i=t._id.charAt(0),a=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===i?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===a||"left"===a?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},H.shouldShowZeroLine=function(e,t,r){var n=s.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===O)&&(Me(t,0)||!function(e,t,r,n){var i=r._mainAxis;if(i){var a=e._fullLayout,o=t._id.charAt(0),s=H.counterLetter(t._id),l=t._offset+(Math.abs(n[0])1)for(n=1;n2*o}(i,t))return"date";var m="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=f(r),i=0,o=0,s={},c=0;c2*i}(i,m)?"category":function(e,t){for(var r=e.length,n=0;n=2){var s,u,c="";if(2===o.length)for(s=0;s<2;s++)if(u=_(o[s])){c=g;break}var f=i("pattern",c);if(f===g)for(s=0;s<2;s++)(u=_(o[s]))&&(t.bounds[s]=o[s]=u-1);if(f)for(s=0;s<2;s++)switch(u=o[s],f){case g:if(!n(u))return void(t.enabled=!1);if((u=+u)!==Math.floor(u)||u<0||u>=7)return void(t.enabled=!1);t.bounds[s]=o[s]=u;break;case y:if(!n(u))return void(t.enabled=!1);if((u=+u)<0||u>24)return void(t.enabled=!1);t.bounds[s]=o[s]=u}if(!1===r.autorange){var d=r.range;if(d[0]d[1])return void(t.enabled=!1)}else if(o[0]>d[0]&&o[1]n?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},t.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},t.isLinked=function(e,t){return a(t,e._axisMatchGroups)||a(t,e._axisConstraintGroups)}},22416:function(e,t,r){"use strict";var n=r(38116).isTypedArraySpec;e.exports=function(e,t,r,i){if("category"===t.type){var a,o=e.categoryarray,s=Array.isArray(o)&&o.length>0||n(o);s&&(a="array");var l,u=r("categoryorder",a);"array"===u&&(l=r("categoryarray")),s||"array"!==u||(u=t.categoryorder="trace"),"trace"===u?t._initialCategories=[]:"array"===u?t._initialCategories=l.slice():(l=function(e,t){var r,n,i,a=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;nn?i.substr(n):a.substr(r))+o:i+a+e*t:o}function m(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;ou*x)||k)for(r=0;rI&&FP&&(P=F);d/=(P-L)/(2*O),L=l.l2r(L),P=l.l2r(P),l.range=l._input.range=S=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function B(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",u(r,n)).attr("d",i+"Z")}function j(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",u(t,r)).attr("d","M0,0Z")}function U(e,t,r,n,i,a){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),q(e,t,i,a)}function q(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 V(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(e){O&&e.data&&e._context.showTips&&(i.notifier(i._(e,"Double-click to zoom back out"),"long"),O=!1)}function G(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,P)/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 W(e,t,r,n,a){for(var o,s,l,u,c=!1,f={},d={},h=(a||{}).xaHash,p=(a||{}).yaHash,v=0;v=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(V(i),2!==e||ge||He(),me)o.indexOf("select")>-1&&S(r,i,K,J,t.id,Pe),o.indexOf("event")>-1&&h.click(i,r,t.id);else if(1===e&&ge){var s=v?I:O,u="s"===v||"w"===g?0:1,f=s._name+".range["+u+"]",d=function(e,t){var r,n=e.range[t],i=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(s,u),p="left",m="middle";if(s.fixedrange)return;v?(m="n"===v?"top":"bottom","right"===s.side&&(p="right")):"e"===g&&(p="right"),i._context.showAxisRangeEntryBoxes&&n.select(be).call(c.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(d),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:m}).on("edit",(function(e){var t=s.d2r(e);void 0!==t&&l.call("_guiRelayout",i,f,t)}))}}}function Re(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,he*t+_e)),i=Math.max(0,Math.min(te,pe*r+we)),a=Math.abs(n-_e),o=Math.abs(i-we);function s(){Se="",ke.r=ke.l,ke.t=ke.b,Ce.attr("d","M0,0Z")}if(ke.l=Math.min(_e,n),ke.r=Math.max(_e,n),ke.t=Math.min(we,i),ke.b=Math.max(we,i),re.isSubplotConstrained)a>P||o>P?(Se="xy",a/ee>o/te?(o=a*te/ee,we>i?ke.t=we-o:ke.b=we+o):(a=o*ee/te,_e>n?ke.l=_e-a:ke.r=_e+a),Ce.attr("d",G(ke))):s();else if(ne.isSubplotConstrained)if(a>P||o>P){Se="xy";var l=Math.min(ke.l/ee,(te-ke.b)/te),u=Math.max(ke.r/ee,(te-ke.t)/te);ke.l=l*ee,ke.r=u*ee,ke.b=(1-l)*te,ke.t=(1-u)*te,Ce.attr("d",G(ke))}else s();else!ae||o0){var c;if(ne.isSubplotConstrained||!ie&&1===ae.length){for(c=0;c1&&(void 0!==a.maxallowed&&se===(a.range[0]1&&(void 0!==o.maxallowed&&le===(o.range[0]b[1]-1/4096&&(t.domain=s),i.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return r("layer"),t}},42568:function(e,t,r){"use strict";var n=r(85024);e.exports=function(e,t,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(e);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",o)&&r("showticksuffix",s)}},96312:function(e,t,r){"use strict";var n=r(76808);e.exports=function(e,t,r,i){var a=t._template||{},o=t.type||a.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||i.noInsiderange||"log"===o||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(t.insiderange=!1,s=void 0),s&&(l=r("range",s)));var u,c=t.getAutorangeDflt(l,i),f=r("autorange",c);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==f&&!0!==f)&&(null===l[0]||"min"!==f&&"max reversed"!==f)&&(null===l[1]||"max"!==f&&"min reversed"!==f)||(l=void 0,delete t.range,t.autorange=!0,u=!0),u||(f=r("autorange",c=t.getAutorangeDflt(l,i))),f&&(n(r,f,l),"linear"!==o&&"-"!==o||r("rangemode")),t.cleanRange()}},21160:function(e,t,r){"use strict";var n=r(84284).FROM_BL;e.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],a=i[0]+(i[1]-i[0])*r;e.range=e._input.range=[e.l2r(a+(i[0]-a)*t),e.l2r(a+(i[1]-a)*t)],e.setScale()}},78344:function(e,t,r){"use strict";var n=r(33428),i=r(94336).E9,a=r(3400),o=a.numberFormat,s=r(38248),l=a.cleanNumber,u=a.ms2DateTime,c=a.dateTime2ms,f=a.ensureNumber,d=a.isArrayOrTypedArray,h=r(39032),p=h.FP_SAFE,v=h.BADNUM,m=h.LOG_CLIP,g=h.ONEWEEK,y=h.ONEDAY,x=h.ONEHOUR,b=h.ONEMIN,_=h.ONESEC,w=r(79811),k=r(33816),T=k.HOUR_PATTERN,A=k.WEEKDAY_PATTERN;function M(e){return Math.pow(10,e)}function S(e){return null!==e&&void 0!==e}e.exports=function(e,t){t=t||{};var r=e._id||"x",h=r.charAt(0);function E(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],i=e.range[1];return.5*(n+i-2*m*Math.abs(n-i))}return v}function C(t,r,n,i){if((i||{}).msUTC&&s(t))return+t;var o=c(t,n||e.calendar);if(o===v){if(!s(t))return v;t=+t;var l=Math.floor(10*a.mod(t+.05,1)),u=Math.round(t-l/10);o=c(new Date(u))+l/10}return o}function L(t,r,n){return u(t,r,n||e.calendar)}function P(t){return e._categories[Math.round(t)]}function O(t){if(S(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 v}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function R(e){var t=I(e);return void 0!==t?t:s(e)?+e:void 0}function D(e){return s(e)?+e:I(e)}function z(e,t,r){return n.round(r+t*e,2)}function F(e,t,r){return(e-r)/t}var N=function(t){return s(t)?z(t,e._m,e._b):v},B=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var j="y"===h;N=function(t){if(!s(t))return v;var r=e._rangebreaks.length;if(!r)return z(t,e._m,e._b);var n=j;e.range[0]>e.range[1]&&(n=!n);for(var i=n?-1:1,a=i*t,o=0,l=0;lc)){o=a<(u+c)/2?l:l+1;break}o=l+1}var f=e._B[o]||0;return isFinite(f)?z(t,e._m2,f):0},B=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,i=0;ie._rangebreaks[i].pmax&&(n=i+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?E:f,e.l2c="log"===e.type?M:f,e.l2p=N,e.p2l=B,e.c2p="log"===e.type?function(e,t){return N(E(e,t))}:N,e.p2c="log"===e.type?function(e){return M(B(e))}:B,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=l,e.c2d=e.c2r=e.l2d=e.l2r=f,e.d2p=e.r2p=function(t){return e.l2p(l(t))},e.p2d=e.p2r=B,e.cleanPos=f):"log"===e.type?(e.d2r=e.d2l=function(e,t){return E(l(e),t)},e.r2d=e.r2c=function(e){return M(l(e))},e.d2c=e.r2l=l,e.c2d=e.l2r=f,e.c2r=E,e.l2d=M,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return M(B(e))},e.r2p=function(t){return e.l2p(l(t))},e.p2r=B,e.cleanPos=f):"date"===e.type?(e.d2r=e.r2d=a.identity,e.d2c=e.r2c=e.d2l=e.r2l=C,e.c2d=e.c2r=e.l2d=e.l2r=L,e.d2p=e.r2p=function(t,r,n){return e.l2p(C(t,0,n))},e.p2d=e.p2r=function(e,t,r){return L(B(e),t,r)},e.cleanPos=function(t){return a.cleanDate(t,v,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=O,e.r2d=e.c2d=e.l2d=P,e.d2r=e.d2l_noadd=R,e.r2c=function(t){var r=D(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=f,e.r2l=D,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return P(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return"string"===typeof e&&""!==e?e:f(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=P,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=f,e.r2l=R,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return P(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return Array.isArray(e)||"string"===typeof e&&""!==e?e:f(e)},e.setupMultiCategory=function(n){var i,o,s=e._traceIndices,l=e._matchGroup;if(l&&0===e._categories.length)for(var u in l)if(u!==r){var c=t[w.id2name(u)];s=s.concat(c._traceIndices)}var f=[[0,{}],[0,{}]],p=[];for(i=0;il[1]&&(i[s?0:1]=n),i[0]===i[1]){var u=e.l2r(r),c=e.l2r(n);if(void 0!==r){var f=u+1;void 0!==n&&(f=Math.min(f,c)),i[s?1:0]=f}if(void 0!==n){var d=c+1;void 0!==r&&(d=Math.max(d,u)),i[s?0:1]=d}}}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,i,o=a.nestedProperty(e,t).get();if(i=(i="date"===e.type?a.dfltRange(e.calendar):"y"===h?k.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||k.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(i[0]=0),o&&2===o.length){var l=null===o[0],u=null===o[1];for("date"!==e.type||e.autorange||(o[0]=a.cleanDate(o[0],v,e.calendar),o[1]=a.cleanDate(o[1],v,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!a.isDateTime(o[n],e.calendar)){e[t]=i;break}if(e.r2l(o[0])===e.r2l(o[1])){var c=a.constrain(e.r2l(o[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);o[0]=e.l2r(c-1e3),o[1]=e.l2r(c+1e3);break}}else{if(!s(o[n])){if(l||u||!s(o[1-n])){e[t]=i;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-p?o[n]=-p:o[n]>p&&(o[n]=p),o[0]===o[1]){var f=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=f,o[1]+=f}}}else a.nestedProperty(e,t).set(i)},e.setScale=function(r){var n=t._size;if(e.overlaying){var i=w.getFromId({_fullLayout:t},e.overlaying);e.domain=i.domain}var a=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(a);var s,l,u=e.r2l(e[a][0],o),c=e.r2l(e[a][1],o),f="y"===h;if(f?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(u,c),Math.max(u,c)),e._rangebreaks.length)){for(s=0;sc&&(d=!d),d&&e._rangebreaks.reverse();var p=d?-1:1;for(e._m2=p*e._length/(Math.abs(c-u)-e._lBreaks),e._B.push(-e._m2*(f?c:u)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&t=s.min&&(es.max&&(s.max=n),i=!1)}i&&u.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,i=n.xaxis,l=n.yaxis,u=i._length,c=l._length,f=!!t.xr1,d=!!t.yr1,h=[];if(f){var p=a.simpleMap(t.xr0,i.r2l),v=a.simpleMap(t.xr1,i.r2l),m=p[1]-p[0],g=v[1]-v[0];h[0]=(p[0]*(1-r)+r*v[0]-p[0])/(p[1]-p[0])*u,h[2]=u*(1-r+r*g/m),i.range[0]=i.l2r(p[0]*(1-r)+r*v[0]),i.range[1]=i.l2r(p[1]*(1-r)+r*v[1])}else h[0]=0,h[2]=u;if(d){var y=a.simpleMap(t.yr0,l.r2l),x=a.simpleMap(t.yr1,l.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])*c,h[3]=c*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else h[1]=0,h[3]=c;s.drawOne(e,i,{skipTitle:!0}),s.drawOne(e,l,{skipTitle:!0}),s.redrawComponents(e,[i._id,l._id]);var w=f?u/h[2]:1,k=d?c/h[3]:1,T=f?h[0]:0,A=d?h[1]:0,M=f?h[0]/h[2]*u:0,S=d?h[1]/h[3]*c:0,E=i._offset-M,C=l._offset-S;n.clipRect.call(o.setTranslate,T,A).call(o.setScale,1/w,1/k),n.plot.call(o.setTranslate,E,C).call(o.setScale,w,k),o.setPointGroupScale(n.zoomScalePts,1/w,1/k),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}s.redrawComponents(e)}},14944:function(e,t,r){"use strict";var n=r(24040).traceIs,i=r(52976);function a(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var r=a(e),i=n(e,"box-violin"),o=n(e._fullInput||{},"candlestick");return i&&!o&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}e.exports=function(e,t,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(function(e,t){if("-"===e.type){var r,s=e._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var u=function(e,t,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(o(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(t,s,l);if(u)if("histogram"!==u.type||l!=={v:"y",h:"x"}[u.orientation||"v"]){var c=l+"calendar",f=u[c],d={noMultiCategory:!n(u,"cartesian")||n(u,"noMultiCategory")};if("box"===u.type&&u._hasPreCompStats&&l==={h:"x",v:"y"}[u.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=e.autotypenumbers,o(u,l)){var h=a(u),p=[];for(r=0;r0?".":"")+a;i.isPlainObject(o)?l(o,t,s,n+1):t(s,a,o)}}))}t.manageCommandObserver=function(e,r,n,o){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var u=t.hasSimpleAPICommandBindings(e,n,s.lookupTable);if(r&&r._commandObserver){if(u)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(u){a(e,u,s.cache),s.check=function(){if(l){var t=a(e,u,s.cache);return t.changed&&o&&void 0!==s.lookupTable[t.value]&&(s.disable(),Promise.resolve(o({value:t.value,type:u.type,prop:u.prop,traces:u.traces,index:s.lookupTable[t.value]})).then(s.enable,s.enable)),t.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}e.exports=function(e){return new M(e)},S.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in w.layerNameToAdjective)if("frame"!==l&&a["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(a,t)}if(!r){if(this.updateProjection(e,t))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),p.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},S.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],l=t._size,c=n.domain,f=n.projection,d=n.lonaxis,h=n.lataxis,p=d._ax,v=h._ax,g=this.projection=function(e){var t=e.projection,r=t.type,n=w.projNames[r];n="geo"+u.titleCase(n);for(var l=(i[n]||s[n])(),c=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?w.lonaxisSpan[r]/2:null,f=["center","rotate","parallels","clipExtent"],d=function(e){return e?l:[]},h=0;hc*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(e){return l.getPath().bounds(e)},l.precision(w.precision),e._isSatellite&&l.tilt(t.tilt).distance(t.distance),c&&l.clipAngle(c-w.clipPad),l}(n),y=[[l.l+l.w*c.x[0],l.t+l.h*(1-c.y[1])],[l.l+l.w*c.x[1],l.t+l.h*(1-c.y[0])]],x=n.center||{},b=f.rotation||{},_=d.range||[],k=h.range||[];if(n.fitbounds){p._length=y[1][0]-y[0][0],v._length=y[1][1]-y[0][1],p.range=m(r,p),v.range=m(r,v);var T=(p.range[0]+p.range[1])/2,A=(v.range[0]+v.range[1])/2;if(n._isScoped)x={lon:T,lat:A};else if(n._isClipped){x={lon:T,lat:A},b={lon:T,lat:A,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,C=w.lataxisSpan[M]/2||90;_=[T-S,T+S],k=[A-C,A+C]}else x={lon:T,lat:A},b={lon:T,lat:b.lat,roll:b.roll}}g.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var L=E(_,k);g.fitExtent(y,L);var P=this.bounds=g.getBounds(L),O=this.fitScale=g.scale(),I=g.translate();if(n.fitbounds){var R=g.getBounds(E(p.range,v.range)),D=Math.min((P[1][0]-P[0][0])/(R[1][0]-R[0][0]),(P[1][1]-P[0][1])/(R[1][1]-R[0][1]));isFinite(D)?g.scale(D*O):u.warn("Something went wrong during"+this.id+"fitbounds computations.")}else g.scale(f.scale*O);var z=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(g.translate([I[0]+(z[0]-I[0]),I[1]+(z[1]-I[1])]).clipExtent(P),n._isAlbersUsa){var F=g([x.lon,x.lat]),N=g.translate();g.translate([N[0]-(F[0]-N[0]),N[1]-(F[1]-N[1])])}},S.updateBaseLayers=function(e,t){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return Boolean(w.lineLayers[e])}function u(e){return Boolean(w.fillLayers[e])}var c=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(e){return l(e)||u(e)?t["show"+e]:!s(e)||t[e].showgrid})),h=r.framework.selectAll(".layer").data(c,String);h.exit().each((function(e){delete a[e],delete o[e],n.select(this).remove()})),h.enter().append("g").attr("class",(function(e){return"layer "+e})).each((function(e){var t=a[e]=n.select(this);"bg"===e?r.bgRect=t.append("rect").style("pointer-events","all"):s(e)?o[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?o[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):u(e)&&(o[e]=t.append("path").style("stroke","none"))})),h.order(),h.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];"frame"===r?n.datum(w.sphereSVG):l(r)||u(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(e,t,r){var n,i,a,o=1e-6,s=2.5,l=t[e],u=w.scopeDefaults[t.scope];"lonaxis"===e?(n=u.lonaxisRange,i=u.lataxisRange,a=function(e,t){return[e,t]}):"lataxis"===e&&(n=u.lataxisRange,i=u.lonaxisRange,a=function(e,t){return[t,e]});var c={type:"linear",range:[n[0],n[1]-o],tick0:l.tick0,dtick:l.dtick};v.setConvert(c,r);var f=v.calcTicks(c);t.isScoped||"lonaxis"!==e||f.pop();for(var d=f.length,h=new Array(d),p=0;p-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,c),s.indexOf("event")>-1&&h.click(i,n.event))}))}function f(e){return r.projection.invert([e[0]+r.xaxis._offset,e[1]+r.yaxis._offset])}},S.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,i="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=n.select(e.container).append("g").attr("class","geo "+e.id).call(d.setClipUrl,i,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},v.setConvert(e.mockAxis,r)},S.saveViewInitial=function(e){var t,r=e.center||{},n=e.projection,i=n.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":n.scale},t=e._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},u.extendFlat(this.viewInitial,t)},S.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var e,t=this.projection,r=t.getPath();function n(e){var r=t(e.lonlat);return r?c(r[0],r[1]):null}function i(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",(function(e){return r(e.geojson)}));for(e in this.dataPoints)this.dataPoints[e].attr("display",i).attr("transform",n)}},10816:function(e,t,r){"use strict";var n=r(84888).KY,i=r(3400).counterRegex,a=r(43520),o="geo",s=i(o),l={};l[o]={valType:"subplotid",dflt:o,editType:"calc"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:r(40384),supplyLayoutDefaults:r(86920),plot:function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[o],s=0;s0&&P<0&&(P+=360);var O,I,R,D=(L+P)/2;if(!h){var z=p?f.projRotate:[D,0,0];O=r("projection.rotation.lon",z[0]),r("projection.rotation.lat",z[1]),r("projection.rotation.roll",z[2]),r("showcoastlines",!p&&x)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!x&&void 0)&&r("oceancolor")}h?(I=-96.6,R=38.7):(I=p?D:O,R=(C[0]+C[1])/2),r("center.lon",I),r("center.lat",R),v&&(r("projection.tilt"),r("projection.distance")),m&&r("projection.parallels",f.projParallels||[0,60]),r("projection.scale"),r("showland",!!x&&void 0)&&r("landcolor"),r("showlakes",!!x&&void 0)&&r("lakecolor"),r("showrivers",!!x&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",p&&"usa"!==c&&x)&&(r("countrycolor"),r("countrywidth")),("usa"===c||"north america"===c&&50===u)&&(r("showsubunits",x),r("subunitcolor"),r("subunitwidth")),p||r("showframe",x)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete t.projection.scale,p?(delete t.center.lon,delete t.center.lat):g?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}e.exports=function(e,t,r){i(e,t,r,{type:"geo",attributes:s,handleDefaults:u,fullData:r,partition:"y"})}},79248:function(e,t,r){"use strict";var n=r(33428),i=r(3400),a=r(24040),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},u={cursor:"auto"};function c(e,t){return n.behavior.zoom().translate(t.translate()).scale(t.scale())}function f(e,t,r){var n=e.id,o=e.graphDiv,s=o.layout,l=s[n],u=o._fullLayout,c=u[n],f={},d={};function h(e,t){f[n+"."+e]=i.nestedProperty(l,e).get(),a.call("_storeDirectGUIEdit",s,u._preGUI,f);var r=i.nestedProperty(c,e);r.get()!==t&&(r.set(t),i.nestedProperty(l,e).set(t),d[n+"."+e]=t)}r(h),h("projection.scale",t.scale()/e.fitScale),h("fitbounds",!1),o.emit("plotly_relayout",d)}function d(e,t){var r=c(0,t);function i(r){var n=t.invert(e.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){t.scale(n.event.scale).translate(n.event.translate),e.render(!0);var r=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(u),f(e,t,i)})),r}function h(e,t){var r,i,a,o,s,d,h,p,v,m=c(0,t),g=2;function y(e){return t.invert(e)}function x(r){var n=t.rotate(),i=t.invert(e.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return m.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),i=t.rotate(),a=t.translate(),o=i,s=y(r)})).on("zoom",(function(){if(d=n.mouse(this),function(e){var r=y(e);if(!r)return!0;var n=t(r);return Math.abs(n[0]-e[0])>g||Math.abs(n[1]-e[1])>g}(r))return m.scale(t.scale()),void m.translate(t.translate());t.scale(n.event.scale),t.translate([a[0],n.event.translate[1]]),s?y(d)&&(p=y(d),h=[o[0]+(p[0]-s[0]),i[1],i[2]],t.rotate(h),o=h):s=y(r=d),v=!0,e.render(!0);var l=t.rotate(),u=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":u[0],"geo.center.lat":u[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(u),v&&f(e,t,x)})),m}function p(e,t){var r,i={r:t.rotate(),k:t.scale()},a=c(0,t),d=function(e){for(var t=0,r=arguments.length,i=[];++tp?(a=(f>0?90:-90)-h,i=0):(a=Math.asin(f/p)*s-h,i=Math.sqrt(p*p-f*f));var v=180-a-2*h,g=(Math.atan2(d,c)-Math.atan2(u,i))*s,x=(Math.atan2(d,c)-Math.atan2(u,-i))*s,b=m(r[0],r[1],a,g),_=m(r[0],r[1],v,x);return b<=_?[a,g,r[2]]:[v,x,r[2]]}(l,r,f);isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])||(h=f),t.rotate(h),f=h}}else r=v(t,u=e);d.of(this,arguments)({type:"zoom"})})),e=d.of(this,arguments),h++||e({type:"zoomstart"})})).on("zoomend",(function(){var r;n.select(this).style(u),p.call(a,"zoom",null),r=d.of(this,arguments),--h||r({type:"zoomend"}),f(e,t,g)})).on("zoom.redraw",(function(){e.render(!0);var r=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})})),n.rebind(a,d,"on")}function v(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&function(e){var t=e[0]*o,r=e[1]*o,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}(r)}function m(e,t,r,n){var i=g(r-e),a=g(n-t);return Math.sqrt(i*i+a*a)}function g(e){return(e%360+540)%360-180}function y(e,t,r){var n=r*o,i=e.slice(),a=0===t?1:0,s=2===t?1:2,l=Math.cos(n),u=Math.sin(n);return i[a]=e[a]*l-e[s]*u,i[s]=e[s]*l+e[a]*u,i}function x(e,t){for(var r=0,n=0,i=e.length;nMath.abs(s)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),u.boxEnd[1]l[3]&&(u.boxEnd[1]=l[3],u.boxEnd[0]=u.boxStart[0]+(l[3]-u.boxStart[1])/Math.abs(_))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),u.boxEnd[0]l[2]&&(u.boxEnd[0]=l[2],u.boxEnd[1]=u.boxStart[1]+(l[2]-u.boxStart[0])*Math.abs(_)))}}else u.boxEnabled?(a=u.boxStart[0]!==u.boxEnd[0],s=u.boxStart[1]!==u.boxEnd[1],a||s?(a&&(m(0,u.boxStart[0],u.boxEnd[0]),e.xaxis.autorange=!1),s&&(m(1,u.boxStart[1],u.boxEnd[1]),e.yaxis.autorange=!1),e.relayoutCallback()):e.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1):u.boxInited&&(u.boxInited=!1);break;case"pan":u.boxEnabled=!1,u.boxInited=!1,t?(u.panning||(u.dragStart[0]=n,u.dragStart[1]=i),Math.abs(u.dragStart[0]-n).999&&(m="turntable"):m="turntable")}else m="turntable";r("dragmode",m),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(e,t,r){var i=t._basePlotModules.length>1;o(e,t,r,{type:c,attributes:l,handleDefaults:f,fullLayout:t,font:t.font,fullData:r,getDfltFromLayout:function(t){if(!i)return n.validate(e[t],l[t])?e[t]:void 0},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}},346:function(e,t,r){"use strict";var n=r(86140),i=r(86968).u,a=r(92880).extendFlat,o=r(3400).counterRegex;function s(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}e.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},9020:function(e,t,r){"use strict";var n=r(43080),i=["xaxis","yaxis","zaxis"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(e){for(var t=0;t<3;++t){var r=e[i[t]];r.visible?(this.enabled[t]=r.showspikes,this.colors[t]=n(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness):(this.enabled[t]=!1,this.drawSides[t]=!1)}},e.exports=function(e){var t=new a;return t.merge(e),t}},87152:function(e,t,r){"use strict";e.exports=function(e){for(var t=e.axesOptions,r=e.glplot.axesPixels,s=e.fullSceneLayout,l=[[],[],[]],u=0;u<3;++u){var c=s[a[u]];if(c._length=(r[u].hi-r[u].lo)*r[u].pixelsPerDataUnit/e.dataScale[u],Math.abs(c._length)===1/0||isNaN(c._length))l[u]=[];else{c._input_range=c.range.slice(),c.range[0]=r[u].lo/e.dataScale[u],c.range[1]=r[u].hi/e.dataScale[u],c._m=1/(e.dataScale[u]*r[u].pixelsPerDataUnit),c.range[0]===c.range[1]&&(c.range[0]-=1,c.range[1]+=1);var f=c.tickmode;if("auto"===c.tickmode){c.tickmode="linear";var d=c.nticks||i.constrain(c._length/40,4,9);n.autoTicks(c,Math.abs(c.range[1]-c.range[0])/d)}for(var h=n.calcTicks(c,{msUTC:!0}),p=0;p/g," "));l[u]=h,c.tickmode=f}}for(t.ticks=l,u=0;u<3;++u)for(o[u]=.5*(e.glplot.bounds[0][u]+e.glplot.bounds[1][u]),p=0;p<2;++p)t.bounds[p][u]=e.glplot.bounds[p][u];e.contourLevels=function(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),a=0;ar.deltaY?1.1:1/1.1,a=e.glplot.getAspectratio();e.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(e)}}),!!u&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=n();e.graphDiv.emit("plotly_relayouting",t)}})),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",(function(r){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:r,layer:e.id})}),!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},T.render=function(){var e,t=this,r=t.graphDiv,n=t.svgContainer,i=t.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),b(t),t.glplot.axes.update(t.axesOptions);for(var u=Object.keys(t.traces),c=null,d=t.glplot.selection,v=0;v")):"isosurface"===e.type||"volume"===e.type?(T.valueLabel=h.hoverLabelText(t._mockAxis,t._mockAxis.d2l(d.traceCoordinate[3]),e.valuehoverformat),E.push("value: "+T.valueLabel),d.textLabel&&E.push(d.textLabel),x=E.join("
")):x=d.textLabel;var C={x:d.traceCoordinate[0],y:d.traceCoordinate[1],z:d.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:k};p.appendArrayPointValue(C,_,k),e._module.eventData&&(C=_._module.eventData(C,d,_,{},k));var L={points:[C]};if(t.fullSceneLayout.hovermode){var P=[];p.loneHover({trace:_,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:c.name,color:p.castHoverOption(_,k,"bgcolor")||c.color,borderColor:p.castHoverOption(_,k,"bordercolor"),fontFamily:p.castHoverOption(_,k,"font.family"),fontSize:p.castHoverOption(_,k,"font.size"),fontColor:p.castHoverOption(_,k,"font.color"),nameLength:p.castHoverOption(_,k,"namelength"),textAlign:p.castHoverOption(_,k,"align"),hovertemplate:f.castOption(_,k,"hovertemplate"),hovertemplateLabels:f.extendFlat({},C,T),eventData:[C]},{container:n,gd:r,inOut_bbox:P}),C.bbox=P[0]}d.distance<5&&(d.buttons||w)?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else p.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},T.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):f.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var M=["xaxis","yaxis","zaxis"];function S(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=M[i],o=a.charAt(0),s=n[a],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(f.isArrayOrTypedArray(l))for(var d,h=0;h<(c||l.length);h++)if(f.isArrayOrTypedArray(l[h]))for(var p=0;pg[1][o])g[0][o]=-1,g[1][o]=1;else{var O=g[1][o]-g[0][o];g[0][o]-=O/32,g[1][o]+=O/32}if(b=[g[0][o],g[1][o]],b=_(b,l),g[0][o]=b[0],g[1][o]=b[1],l.isReversed()){var I=g[0][o];g[0][o]=g[1][o],g[1][o]=I}}else b=l.range,g[0][o]=l.r2l(b[0]),g[1][o]=l.r2l(b[1]);g[0][o]===g[1][o]&&(g[0][o]-=1,g[1][o]+=1),y[o]=g[1][o]-g[0][o],l.range=[g[0][o],g[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*h[o],max:l.range[1]*h[o]})}var R=c.aspectmode;if("cube"===R)m=[1,1,1];else if("manual"===R){var D=c.aspectratio;m=[D.x,D.y,D.z]}else{if("auto"!==R&&"data"!==R)throw new Error("scene.js aspectRatio was not one of the enumerated types");var z=[1,1,1];for(o=0;o<3;++o){var F=x[u=(l=c[M[o]]).type];z[o]=Math.pow(F.acc,1/F.count)/h[o]}m="data"===R||Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1]}c.aspectratio.x=f.aspectratio.x=m[0],c.aspectratio.y=f.aspectratio.y=m[1],c.aspectratio.z=f.aspectratio.z=m[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var N=c.domain||null,B=t._size||null;if(N&&B){var j=n.container.style;j.position="absolute",j.left=B.l+N.x[0]*B.w+"px",j.top=B.t+(1-N.y[1])*B.h+"px",j.width=B.w*(N.x[1]-N.x[0])+"px",j.height=B.h*(N.y[1]-N.y[0])+"px"}n.glplot.redraw()}},T.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)},T.getCamera=function(){var e,t=this;return t.camera.view.recalcMatrix(t.camera.view.lastT()),{up:{x:(e=t.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}},T.setViewport=function(e){var t,r=this,n=e.camera;r.camera.lookAt.apply(this,[[(t=n).eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),r.glplot.setAspectratio(e.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},T.isCameraChanged=function(e){var t=this.getCamera(),r=f.nestedProperty(e,this.id+".camera").get();function n(e,t,r,n){var i=["up","center","eye"],a=["x","y","z"];return t[i[r]]&&e[i[r]][a[n]]===t[i[r]][a[n]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(t,r,a,o)){i=!0;break}(!r.projection||t.projection&&t.projection.type!==r.projection.type)&&(i=!0)}return i},T.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=f.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},T.saveLayout=function(e){var t,r,n,i,a,o,s=this,l=s.fullLayout,u=s.isCameraChanged(e),d=s.isAspectChanged(e),h=u||d;if(h){var p={};u&&(t=s.getCamera(),n=(r=f.nestedProperty(e,s.id+".camera")).get(),p[s.id+".camera"]=n),d&&(i=s.glplot.getAspectratio(),o=(a=f.nestedProperty(e,s.id+".aspectratio")).get(),p[s.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",e,l._preGUI,p),u&&(r.set(t),f.nestedProperty(l,s.id+".camera").set(t)),d&&(a.set(i),f.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return h},T.updateFx=function(e,t){var r=this,n=r.camera;if(n)if("orbit"===e)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===e){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var d=r.id+".camera.up",h={x:0,y:0,z:1},p={};p[d]=h;var v=i.layout;c.call("_storeDirectGUIEdit",v,a._preGUI,p),o.up=h,f.nestedProperty(v,d).set(h)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t},T.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(n),t.glplot.redraw();var r=t.glplot.gl,i=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);r.readPixels(0,0,i,a,r.RGBA,r.UNSIGNED_BYTE,o),function(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l,u=s.getContext("2d",{willReadFrequently:!0}),c=u.createImageData(i,a);switch(c.data.set(o),u.putImageData(c,0,0),e){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(n),l},T.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[M[e]];h.setConvert(t,this.fullLayout),t.setScale=f.noop}},T.make4thDimension=function(){var e=this,t=e.graphDiv._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},h.setConvert(e._mockAxis,t)},e.exports=k},52094:function(e){"use strict";e.exports=function(e,t,r,n){n=n||e.length;for(var i=new Array(n),a=0;aOpenStreetMap contributors',o=['\xa9 Carto',a].join(" "),s=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),l={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:a,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},u=n(l);e.exports={requiredVersion:i,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:l,styleValuesNonMapbox:u,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+i+"."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",u.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}},89032:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){var r=e.split(" "),i=r[0],a=r[1],o=n.isArrayOrTypedArray(t)?n.mean(t):t,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s}return{anchor:u[0]&&u[1]?u.join("-"):u[0]?u[0]:u[1]?u[1]:"center",offset:c}}},33688:function(e,t,r){"use strict";var n=r(3480),i=r(3400),a=i.strTranslate,o=i.strScale,s=r(84888).KY,l=r(9616),u=r(33428),c=r(43616),f=r(72736),d=r(14440),h="mapbox",p=t.constants=r(47552);function v(e){return"string"===typeof e&&(-1!==p.styleValuesMapbox.indexOf(e)||0===e.indexOf("mapbox://")||0===e.indexOf("stamen"))}t.name=h,t.attr="subplot",t.idRoot=h,t.idRegex=t.attrRegex=i.counterRegex(h),t.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},t.layoutAttributes=r(5232),t.supplyLayoutDefaults=r(5976),t.plot=function(e){var t=e._fullLayout,r=e.calcdata,a=t._subplots[h];if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var o=function(e,t){var r=e._fullLayout,n=e._context;if(""===n.mapboxAccessToken)return"";for(var a=[],o=[],s=!1,l=!1,u=0;u1&&i.warn(p.multipleTokensErrorMsg),a[0]):(o.length&&i.log(["Listed mapbox access token(s)",o.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(e,a);n.accessToken=o;for(var l=0;lw/2){var k=y.split("|").join("
");b.text(k).attr("data-unformatted",k).call(f.convertToTspans,e),_=c.bBox(b.node())}b.attr("transform",a(-3,8-_.height)),x.insert("rect",".static-attribution").attr({x:-_.width-6,y:-_.height-3,width:_.width+6,height:_.height+3,fill:"rgba(255, 255, 255, 0.75)"});var T=1;_.width+6>w&&(T=w/(_.width+6));var A=[n.l+n.w*d.x[1],n.t+n.h*(1-d.y[0])];x.attr("transform",a(A[0],A[1])+o(T))}},t.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[h],n=0;n0){for(var r=0;r0}function c(e){var t={},r={};switch(e.type){case"circle":n.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":n.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(t,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:r}}l.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=u(e)},l.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},l.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},l.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapboxLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},l.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,u(e)){var r=function(e){var t,r=e.sourcetype,n=e.source,a={type:r};return"geojson"===r?t="data":"vector"===r?t="string"===typeof n?"url":"tiles":"raster"===r?(t="tiles",a.tileSize=256):"image"===r&&(t="url",a.coordinates=e.coordinates),a[t]=n,e.sourceattribution&&(a.attribution=i(e.sourceattribution)),a}(e);t.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&m(t.originalEvent,n,[r.xaxis],[r.yaxis],r.id,e),i.indexOf("event")>-1&&u.click(n,t.originalEvent)}}},b.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(!t.isStatic){var a,o=e.dragmode;a=function(e,r){r.isRect?(e.range={})[t.id]=[u([r.xmin,r.ymin]),u([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(u)};var s=t.dragOptions;t.dragOptions=i.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:a},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),d(o)||f(o)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,n){h(e,r,n,t.dragOptions,o)},l.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function u(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},b.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},b.updateLayers=function(e){var t,r=e[this.id].layers,n=this.layerList;if(r.length!==n.length){for(t=0;t=t.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=t._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)r.on("click",(function(){w.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(e,o),s.text(o.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(e,!1,"keepdata"),i.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var A=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],M=["year","month","dayMonth","dayMonthYear"];function S(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,i={};function a(e){for(var r=!0,a=0;a1&&R.length>1){for(l.getComponentMethod("grid","sizeDefaults")(u,s),o=0;o15&&R.length>15&&0===s.shapes.length&&0===s.images.length,w.linkSubplots(d,s,c,n),w.cleanPlot(d,s,c,n);var B=!(!n._has||!n._has("gl2d")),j=!(!s._has||!s._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||B,q=!(!s._has||!s._has("cartesian"))||j;U&&!q?n._bgLayer.remove():q&&!U&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&v({_fullLayout:n}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i0){var c=1-2*s;n=Math.round(c*n),i=Math.round(c*i)}}var d=w.layoutAttributes.width.min,h=w.layoutAttributes.height.min;n1,v=!t.height&&Math.abs(r.height-i)>1;(v||p)&&(p&&(r.width=n),v&&(r.height=i)),e._initialAutoSize||(e._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,n){var i,a,o,s=l.componentsRegistry,u=t._basePlotModules,c=l.subplotsRegistry.cartesian;for(i in s)(o=s[i]).includeBasePlot&&o.includeBasePlot(e,t);for(var d in u.length||u.push(c),t._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(e,t),c.finalizeSubplots(e,t)),t._subplots)t._subplots[d].sort(f.subplotSort);for(a=0;a1&&(r.l/=g,r.r/=g)}if(h){var y=(r.t+r.b)/h;y>1&&(r.t/=y,r.b/=y)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,k=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+m},r:{val:b,size:r.r+m},b:{val:k,size:r.b+m},t:{val:_,size:r.t+m}},v[t]=1}else delete p[t],delete v[t];if(!n._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),O(t);var i=t._size,a=t.margin,s={t:0,b:0,l:0,r:0},u=f.extendFlat({},i),c=a.l,d=a.r,h=a.t,v=a.b,m=t._pushmargin,g=t._pushmarginIds,y=t.minreducedwidth,x=t.minreducedheight;if(!1!==a.autoexpand){for(var b in m)g[b]||delete m[b];var _=e._fullLayout._reservedMargin;for(var k in _)for(var T in _[k]){var A=_[k][T];s[T]=Math.max(s[T],A)}for(var M in m.base={l:{val:0,size:c},r:{val:1,size:d},t:{val:1,size:h},b:{val:0,size:v}},s){var S=0;for(var E in m)"base"!==E&&o(m[E][M].size)&&(S=m[E][M].size>S?m[E][M].size:S);var C=Math.max(0,a[M]-S);s[M]=Math.max(0,s[M]-C)}for(var L in m){var P=m[L].l||{},I=m[L].b||{},R=P.val,D=P.size,z=I.val,F=I.size,N=r-s.r-s.l,B=n-s.t-s.b;for(var j in m){if(o(D)&&m[j].r){var U=m[j].r.val,q=m[j].r.size;if(U>R){var V=(D*U+(q-N)*R)/(U-R),H=(q*(1-R)+(D-N)*(1-U))/(U-R);V+H>c+d&&(c=V,d=H)}}if(o(F)&&m[j].t){var G=m[j].t.val,W=m[j].t.size;if(G>z){var Y=(F*G+(W-B)*z)/(G-z),Z=(W*(1-z)+(F-B)*(1-G))/(G-z);Y+Z>v+h&&(v=Y,h=Z)}}}}}var X=f.constrain(r-a.l-a.r,2,y),K=f.constrain(n-a.t-a.b,2,x),J=Math.max(0,r-X),$=Math.max(0,n-K);if(J){var Q=(c+d)/J;Q>1&&(c/=Q,d/=Q)}if($){var ee=(v+h)/$;ee>1&&(v/=ee,h/=ee)}if(i.l=Math.round(c)+s.l,i.r=Math.round(d)+s.r,i.t=Math.round(h)+s.t,i.b=Math.round(v)+s.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(w.didMarginChange(u,i)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=p.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(g).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return l.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function s(){return a++,function(){var t;o++,n||o!==a||(t=i,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return l.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)))}}r.runFn(s),setTimeout(s())}))}],a=f.syncOrAsync(i,e);return a&&a.then||(a=Promise.resolve()),a.then((function(){return e}))}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var o=i?e._fullData:e.data,l=i?e._fullLayout:e.layout,u=(e._transitionData||{})._frames;function c(e,t){if("function"===typeof e)return t?"_function_":null;if(f.isPlainObject(e)){var n,i={};return Object.keys(e).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0)))if("function"!==typeof e[a]){if("keepdata"===r){if("src"===a.substr(a.length-3))return}else if("keepstream"===r){if("string"===typeof(n=e[a+"src"])&&n.indexOf(":")>0&&!f.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"===typeof(n=e[a+"src"])&&n.indexOf(":")>0)return;i[a]=c(e[a],t)}else t&&(i[a]="_function")})),i}var a=Array.isArray(e),o=f.isTypedArray(e);if((a||o)&&e.dtype&&e.shape){var l=e.bdata;return c({dtype:e.dtype,shape:e.shape,bdata:f.isArrayBuffer(l)?s.encode(l):l},t)}return a?e.map((function(e){return c(e,t)})):o?f.simpleMap(e,f.identity):f.isJSDate(e)?f.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),i)){var h=l._size;d.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return u&&(d.frames=c(u)),a&&(d.config=c(e._context,!0)),"object"===n?d:JSON.stringify(d)},w.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r=0;a--)if(l[a].enabled){r._indexToPoints=l[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(e,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[t]=o}}for(z(o,s,c),i=0;i1e-10?e:0}function d(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a0?r:1/0})),i=n.mod(r+1,t.length);return[t[r],t[i]]},findIntersectionXY:u,findXYatLength:function(e,t,r,n){var i=-t*r,a=t*t+1,o=2*(t*i-r),s=i*i+r*r-e*e,l=Math.sqrt(o*o-4*a*s),u=(-o+l)/(2*a),c=(-o-l)/(2*a);return[[u,t*u+i+n],[c,t*c+i+n]]},clampTiny:f,pathPolygon:function(e,t,r,n,i,a){return"M"+d(c(e,t,r,n),i,a).join("L")},pathPolygonAnnulus:function(e,t,r,n,i,a,o){var s,l;e=90||l>90&&u>=450?1:f<=0&&h<=0?0:Math.max(f,h),t=l<=180&&u>=180||l>180&&u>=540?-1:c>=0&&d>=0?0:Math.min(c,d),r=l<=270&&u>=270||l>270&&u>=630?-1:f>=0&&h>=0?0:Math.min(f,h),n=u>=360?1:c<=0&&d<=0?0:Math.max(c,d),[t,r,n,i]}(p),_=b[2]-b[0],w=b[3]-b[1],k=h/d,T=Math.abs(w/_);k>T?(v=d,x=(h-(m=d*T))/i.h/2,g=[s[0],s[1]],y=[f[0]+x,f[1]-x]):(m=h,x=(d-(v=h/T))/i.w/2,g=[s[0]+x,s[1]-x],y=[f[0],f[1]]),r.xLength2=v,r.yLength2=m,r.xDomain2=g,r.yDomain2=y;var A,M=r.xOffset2=i.l+i.w*g[0],S=r.yOffset2=i.t+i.h*(1-y[1]),E=r.radius=v/_,C=r.innerRadius=r.getHole(t)*E,L=r.cx=M-E*b[0],P=r.cy=S+E*b[3],O=r.cxx=L-M,I=r.cyy=P-S,R=a.side;"counterclockwise"===R?(A=R,R="top"):"clockwise"===R&&(A=R,R="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:R,_trueSide:A,domain:[C/i.w,E/i.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:g}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:y});var F=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",F).attr("transform",l(O,I)),n.frontplot.attr("transform",l(M,S)).call(c.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",F).attr("transform",l(L,P)).call(u.fill,t.bgcolor)},B.mockAxis=function(e,t,r,n){var i=o.extendFlat({},r,n);return p(i,t,e),i},B.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:"linear"},r);h(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(t));s.range=[e[r[0]]*o,e[r[1]]*o]},s.isPtWithinRange="x"!==a||i?function(){return!0}:function(e){return n.isPtInside(e)},s.setRange(),s.setScale(),s},B.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);v(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")],void 0!==i.minallowed){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(void 0!==i.maxallowed){var l=i.r2l(i.maxallowed);i._rl[0]90&&v<=270&&(m.tickangle=180);var x=y?function(e){var t=I(r,L([e.x,0]));return l(t[0]-f,t[1]-h)}:function(e){return l(m.l2p(e.x)+c,0)},b=y?function(e){return O(r,e.x,-1/0,1/0)}:function(e){return r.pathArc(m.r2p(e.x)+c)},_=j(p);if(r.radialTickLayout!==_&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),g){m.setScale();var w=0,k=y?(m.tickvals||[]).filter((function(e){return e>=0})).map((function(e){return d.tickText(m,e,!0,!1)})):d.calcTicks(m),T=y?k:d.clipEnds(m,k),A=d.getTickSigns(m)[2];y&&(("top"===m.ticks&&"bottom"===m.side||"bottom"===m.ticks&&"top"===m.side)&&(A=-A),"top"===m.ticks&&"top"===m.side&&(w=-m.ticklen),"bottom"===m.ticks&&"bottom"===m.side&&(w=m.ticklen)),d.drawTicks(n,m,{vals:k,layer:i["radial-axis"],path:d.makeTickPath(m,0,A),transFn:x,crisp:!1}),d.drawGrid(n,m,{vals:T,layer:i["radial-grid"],path:b,transFn:o.noop,crisp:!1}),d.drawLabels(n,m,{vals:k,layer:i["radial-axis"],transFn:x,labelFns:d.makeLabelFns(m,w)})}var M=r.radialAxisAngle=r.vangles?F(U(z(p.angle),r.vangles)):p.angle,S=l(f,h),E=S+s(-M);q(i["radial-axis"],g&&(p.showticklabels||p.ticks),{transform:E}),q(i["radial-grid"],g&&p.showgrid,{transform:y?"":S}),q(i["radial-line"].select("line"),g&&p.showline,{x1:y?-a:c,y1:0,x2:a,y2:0,transform:E}).attr("stroke-width",p.linewidth).call(u.stroke,p.linecolor)},B.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",f=0;if(l.title){var d=c.bBox(n.layers["radial-axis"].node()).height,h=l.title.font.size,p=l.side;f="top"===p?h:"counterclockwise"===p?-(d+.4*h):d+.8*h}var v=void 0!==r?r:n.radialAxisAngle,m=z(v),g=Math.cos(m),y=Math.sin(m),b=o+a/2*g+f*y,_=s-a/2*y+f*g;n.layers["radial-axis-title"]=x.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title",placeholder:R(i,"Click to enter radial axis title"),attributes:{x:b,y:_,"text-anchor":"middle"},transform:{rotate:-v}})}},B.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,c=r.innerRadius,f=r.cx,h=r.cy,p=r.getAngular(t),v=r.angularAxis,m=r.isSmith;m||(r.fillViewInitialKey("angularaxis.rotation",p.rotation),v.setGeometry(),v.setScale());var g=m?function(e){var t=I(r,L([0,e.x]));return Math.atan2(t[0]-f,t[1]-h)-Math.PI/2}:function(e){return v.t2g(e.x)};"linear"===v.type&&"radians"===v.thetaunit&&(v.tick0=F(v.tick0),v.dtick=F(v.dtick));var y=function(e){return l(f+a*Math.cos(e),h-a*Math.sin(e))},x=m?function(e){var t=I(r,L([0,e.x]));return l(t[0],t[1])}:function(e){return y(g(e))},b=m?function(e){var t=I(r,L([0,e.x])),n=Math.atan2(t[0]-f,t[1]-h)-Math.PI/2;return l(t[0],t[1])+s(-F(n))}:function(e){var t=g(e);return y(t)+s(-F(t))},_=m?function(e){return P(r,e.x,0,1/0)}:function(e){var t=g(e),r=Math.cos(t),n=Math.sin(t);return"M"+[f+c*r,h-c*n]+"L"+[f+a*r,h-a*n]},w=d.makeLabelFns(v,0).labelStandoff,k={xFn:function(e){var t=g(e);return Math.cos(t)*w},yFn:function(e){var t=g(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(w+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*M)},anchorFn:function(e){var t=g(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(e,t,r){var n=g(e);return-.5*(1+Math.sin(n))*r}},T=j(p);r.angularTickLayout!==T&&(i["angular-axis"].selectAll("."+v._id+"tick").remove(),r.angularTickLayout=T);var A,S=m?[1/0].concat(v.tickvals||[]).map((function(e){return d.tickText(v,e,!0,!1)})):d.calcTicks(v);if(m&&(S[0].text="\u221e",S[0].fontSize*=1.75),"linear"===t.gridshape?(A=S.map(g),o.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,"category"===v.type&&(S=S.filter((function(e){return o.isAngleInsideSector(g(e),r.sectorInRad)}))),v.visible){var E="inside"===v.ticks?-1:1,C=(v.linewidth||1)/2;d.drawTicks(n,v,{vals:S,layer:i["angular-axis"],path:"M"+E*C+",0h"+E*v.ticklen,transFn:b,crisp:!1}),d.drawGrid(n,v,{vals:S,layer:i["angular-grid"],path:_,transFn:o.noop,crisp:!1}),d.drawLabels(n,v,{vals:S,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:x,labelFns:k})}q(i["angular-line"].select("path"),p.showline,{d:r.pathSubplot(),transform:l(f,h)}).attr("stroke-width",p.linewidth).call(u.stroke,p.linecolor)},B.updateFx=function(e,t){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},B.updateHoverAndMainDrag=function(e){var t,r,s=this,u=s.isSmith,c=s.gd,f=s.layers,d=e._zoomlayer,h=S.MINZOOM,p=S.OFFEDGE,v=s.radius,x=s.innerRadius,k=s.cx,T=s.cy,A=s.cxx,M=s.cyy,C=s.sectorInRad,L=s.vangles,P=s.radialAxis,O=E.clampTiny,I=E.findXYatLength,R=E.findEnclosingVertexAngles,D=S.cornerHalfWidth,z=S.cornerLen/2,F=m.makeDragger(f,"path","maindrag",!1===e.dragmode?"none":"crosshair");n.select(F).attr("d",s.pathSubplot()).attr("transform",l(k,T)),F.onmousemove=function(e){y.hover(c,e,s.id),c._fullLayout._lasthover=F,c._fullLayout._hoversubplot=s.id},F.onmouseout=function(e){c._dragging||g.unhover(c,e)};var N,B,j,U,q,V,H,G,W,Y={element:F,gd:c,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function Z(e,t){return Math.sqrt(e*e+t*t)}function X(e,t){return Z(e-A,t-M)}function K(e,t){return Math.atan2(M-t,e-A)}function J(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function $(e,t){if(0===e)return s.pathSector(2*D);var r=z/e,n=t-r,i=t+r,a=Math.max(0,Math.min(e,v)),o=a-D,l=a+D;return"M"+J(o,n)+"A"+[o,o]+" 0,0,0 "+J(o,i)+"L"+J(l,i)+"A"+[l,l]+" 0,0,1 "+J(l,n)+"Z"}function Q(e,t,r){if(0===e)return s.pathSector(2*D);var n,i,a=J(e,t),o=J(e,r),l=O((a[0]+o[0])/2),u=O((a[1]+o[1])/2);if(l&&u){var c=u/l,f=-1/c,d=I(D,c,l,u);n=I(z,f,d[0][0],d[0][1]),i=I(z,f,d[1][0],d[1][1])}else{var h,p;u?(h=z,p=D):(h=D,p=z),n=[[l-h,u-p],[l+h,u-p]],i=[[l-h,u+p],[l+h,u+p]]}return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function ee(e,t){return t=Math.max(Math.min(t,v),x),eh?(e-1&&1===e&&_(t,c,[s.xaxis],[s.yaxis],s.id,Y),r.indexOf("event")>-1&&y.click(c,t,s.id)}Y.prepFn=function(e,n,a){var l=c._fullLayout.dragmode,f=F.getBoundingClientRect();c._fullLayout._calcInverseTransform(c);var h=c._fullLayout._invTransform;t=c._fullLayout._invScaleX,r=c._fullLayout._invScaleY;var p=o.apply3DTransform(h)(n-f.left,a-f.top);if(N=p[0],B=p[1],L){var g=E.findPolygonOffset(v,C[0],C[1],L);N+=A+g[0],B+=M+g[1]}switch(l){case"zoom":Y.clickFn=se,u||(Y.moveFn=L?ie:re,Y.doneFn=ae,function(){j=null,U=null,q=s.pathSubplot(),V=!1;var e=c._fullLayout[s.id];H=i(e.bgcolor).getLuminance(),(G=m.makeZoombox(d,H,k,T,q)).attr("fill-rule","evenodd"),W=m.makeCorners(d,k,T),w(c)}());break;case"select":case"lasso":b(e,n,a,Y,l)}},g.init(Y)},B.updateRadialDrag=function(e,t,r){var i=this,u=i.gd,c=i.layers,f=i.radius,d=i.innerRadius,h=i.cx,p=i.cy,v=i.radialAxis,y=S.radialDragBoxSize,x=y/2;if(v.visible){var b,_,k,M=z(i.radialAxisAngle),E=v._rl,C=E[0],L=E[1],P=E[r],O=.75*(E[1]-E[0])/(1-i.getHole(t))/f;r?(b=h+(f+x)*Math.cos(M),_=p-(f+x)*Math.sin(M),k="radialdrag"):(b=h+(d-x)*Math.cos(M),_=p-(d-x)*Math.sin(M),k="radialdrag-inner");var I,R,D,N=m.makeRectDragger(c,k,"crosshair",-x,-x,y,y),B={element:N,gd:u};!1===e.dragmode&&(B.dragmode=!1),q(n.select(N),v.visible&&d0===(r?D>C:Dn?function(e){return e<=0}:function(e){return e>=0};e.c2g=function(r){var n=e.c2l(r)-t;return(s(n)?n:0)+o},e.g2c=function(r){return e.l2c(r+t-o)},e.g2p=function(e){return e*a},e.c2p=function(t){return e.g2p(e.c2g(t))}}}(e,t);break;case"angularaxis":!function(e,t){var r=e.type;if("linear"===r){var i=e.d2c,s=e.c2d;e.d2c=function(e,t){return function(e,t){return"degrees"===t?a(e):e}(i(e),t)},e.c2d=function(e,t){return s(function(e,t){return"degrees"===t?o(e):e}(e,t))}}e.makeCalcdata=function(t,r){var n,i,a=t[r],o=t._length,s=function(r){return e.d2c(r,t.thetaunit)};if(a)for(n=new Array(o),i=0;i0?1:0}function r(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function n(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function i(e,t){return t*e.radius}e.exports={smith:r,reactanceArc:function(e,t,a,o){var s=n(e,r([a,t])),l=s[0],u=s[1],c=n(e,r([o,t])),f=c[0],d=c[1];if(0===t)return["M"+l+","+u,"L"+f+","+d].join(" ");var h=i(e,1/Math.abs(t));return["M"+l+","+u,"A"+h+","+h+" 0 0,"+(t<0?1:0)+" "+f+","+d].join(" ")},resistanceArc:function(e,a,o,s){var l=i(e,1/(a+1)),u=n(e,r([a,o])),c=u[0],f=u[1],d=n(e,r([a,s])),h=d[0],p=d[1];if(t(o)!==t(s)){var v=n(e,r([a,0]));return["M"+c+","+f,"A"+l+","+l+" 0 0,"+(00){for(var n=[],i=0;i=c&&(d.min=0,p.min=0,m.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function v(e,t,r,n){var i=d[t._name];function o(r,n){return a.coerce(e,t,i,r,n)}o("uirevision",n.uirevision),t.type="linear";var h=o("color"),p=h!==i.color.dflt?h:r.font.color,v=t._name.charAt(0).toUpperCase(),m="Component "+v,g=o("title.text",m);t._hovertitle=g===m?g:v,a.coerceFont(o,"title.font",r.font,{overrideDflt:{size:a.bigFont(r.font.size),color:p}}),o("min"),c(e,t,o,"linear"),l(e,t,o,"linear"),s(e,t,o,"linear",{noAutotickangles:!0}),u(e,t,o,{outerTicks:!0}),o("showticklabels")&&(a.coerceFont(o,"tickfont",r.font,{overrideDflt:{color:p}}),o("tickangle"),o("tickformat")),f(e,t,o,{dfltColor:h,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o("hoverformat"),o("layer")}e.exports=function(e,t,r){o(e,t,r,{type:"ternary",attributes:d,handleDefaults:p,font:t.font,paper_bgcolor:t.paper_bgcolor})}},24696:function(e,t,r){"use strict";var n=r(33428),i=r(49760),a=r(24040),o=r(3400),s=o.strTranslate,l=o._,u=r(76308),c=r(43616),f=r(78344),d=r(92880).extendFlat,h=r(7316),p=r(54460),v=r(86476),m=r(93024),g=r(72760),y=g.freeMode,x=g.rectMode,b=r(81668),_=r(22676).prepSelect,w=r(22676).selectOnClick,k=r(22676).clearOutline,T=r(22676).clearSelectionsCache,A=r(33816);function M(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=M;var S=M.prototype;S.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},S.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;aE*b?i=(a=b)*E:a=(i=x)/E,o=g*i/x,l=y*a/b,r=t.l+t.w*v-i/2,n=t.t+t.h*(1-m)-a/2,h.x0=r,h.y0=n,h.w=i,h.h=a,h.sum=_,h.xaxis={type:"linear",range:[w+2*T-_,_-w-2*k],domain:[v-o/2,v+o/2],_id:"x"},f(h.xaxis,h.graphDiv._fullLayout),h.xaxis.setScale(),h.xaxis.isPtWithinRange=function(e){return e.a>=h.aaxis.range[0]&&e.a<=h.aaxis.range[1]&&e.b>=h.baxis.range[1]&&e.b<=h.baxis.range[0]&&e.c>=h.caxis.range[1]&&e.c<=h.caxis.range[0]},h.yaxis={type:"linear",range:[w,_-k-T],domain:[m-l/2,m+l/2],_id:"y"},f(h.yaxis,h.graphDiv._fullLayout),h.yaxis.setScale(),h.yaxis.isPtWithinRange=function(){return!0};var A=h.yaxis.domain[0],M=h.aaxis=d({},e.aaxis,{range:[w,_-k-T],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[A,A+l*E],anchor:"free",position:0,_id:"y",_length:i});f(M,h.graphDiv._fullLayout),M.setScale();var S=h.baxis=d({},e.baxis,{range:[_-w-T,k],side:"bottom",domain:h.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});f(S,h.graphDiv._fullLayout),S.setScale();var C=h.caxis=d({},e.caxis,{range:[_-w-k,T],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[A,A+l*E],anchor:"free",position:0,_id:"y",_length:i});f(C,h.graphDiv._fullLayout),C.setScale();var L="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";h.clipDef.select("path").attr("d",L),h.layers.plotbg.select("path").attr("d",L);var P="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";h.clipDefRelative.select("path").attr("d",P);var O=s(r,n);h.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",O),h.clipDefRelative.select("path").attr("transform",null);var I=s(r-S._offset,n+a);h.layers.baxis.attr("transform",I),h.layers.bgrid.attr("transform",I);var R=s(r+i/2,n)+"rotate(30)"+s(0,-M._offset);h.layers.aaxis.attr("transform",R),h.layers.agrid.attr("transform",R);var D=s(r+i/2,n)+"rotate(-30)"+s(0,-C._offset);h.layers.caxis.attr("transform",D),h.layers.cgrid.attr("transform",D),h.drawAxes(!0),h.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(u.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),h.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(u.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),h.layers.cline.select("path").attr("d",C.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(u.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),h.graphDiv._context.staticPlot||h.initInteractions(),c.setClipUrl(h.layers.frontplot,h._hasClipOnAxisFalse?null:h.clipId,h.graphDiv)},S.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.substr(7)+"title",i=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var u=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),c=(o.showticklabels?o.tickfont.size:0)+("outside"===o.ticks?o.ticklen:0)+3;i["a-title"]=b.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title",placeholder:l(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-u,"text-anchor":"middle"}}),i["b-title"]=b.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title",placeholder:l(r,"Click to enter Component B title"),attributes:{x:t.x0-c,y:t.y0+t.h+.83*o.title.font.size+c,"text-anchor":"middle"}}),i["c-title"]=b.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title",placeholder:l(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+c,y:t.y0+t.h+.83*s.title.font.size+c,"text-anchor":"middle"}})}},S.drawAx=function(e){var t,r=this,n=r.graphDiv,i=e._name,a=i.charAt(0),s=e._id,l=r.layers[i],u=a+"tickLayout",c=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);r[u]!==c&&(l.selectAll("."+s+"tick").remove(),r[u]=c),e.setScale();var f=p.calcTicks(e),d=p.clipEnds(e,f),h=p.makeTransTickFn(e),v=p.getTickSigns(e)[2],m=o.deg2rad(30),g=v*(e.linewidth||1)/2,y=v*e.ticklen,x=r.w,b=r.h,_="b"===a?"M0,"+g+"l"+Math.sin(m)*y+","+Math.cos(m)*y:"M"+g+",0l"+Math.cos(m)*y+","+-Math.sin(m)*y,w={a:"M0,0l"+b+",-"+x/2,b:"M0,0l-"+x/2+",-"+b,c:"M0,0l-"+b+","+x/2}[a];p.drawTicks(n,e,{vals:"inside"===e.ticks?d:f,layer:l,path:_,transFn:h,crisp:!1}),p.drawGrid(n,e,{vals:d,layer:r.layers[a+"grid"],path:w,transFn:h,crisp:!1}),p.drawLabels(n,e,{vals:f,layer:l,transFn:h,labelFns:p.makeLabelFns(e,0,30)})};var C=A.MINZOOM/2+.87,L="m-0.87,.5h"+C+"v3h-"+(C+5.2)+"l"+(C/2+2.6)+",-"+(.87*C+4.5)+"l2.6,1.5l-"+C/2+","+.87*C+"Z",P="m0.87,.5h-"+C+"v3h"+(C+5.2)+"l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-2.6,1.5l"+C/2+","+.87*C+"Z",O="m0,1l"+C/2+","+.87*C+"l2.6,-1.5l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-"+(C/2+2.6)+","+(.87*C+4.5)+"l2.6,1.5l"+C/2+",-"+.87*C+"Z",I=!0;function R(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}S.clearOutline=function(){T(this.dragOptions),k(this.dragOptions.gd)},S.initInteractions=function(){var e,t,r,n,f,d,h,p,g,b,k,T,M=this,S=M.layers.plotbg.select("path").node(),C=M.graphDiv,D=C._fullLayout._zoomlayer;function z(e){var t={};return t[M.id+".aaxis.min"]=e.a,t[M.id+".baxis.min"]=e.b,t[M.id+".caxis.min"]=e.c,t}function F(e,t){var r=C._fullLayout.clickmode;R(C),2===e&&(C.emit("plotly_doubleclick",null),a.call("_guiRelayout",C,z({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&w(t,C,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf("event")>-1&&m.click(C,t,M.id)}function N(e,t){return 1-t/M.h}function B(e,t){return 1-(e+(M.h-t)/Math.sqrt(3))/M.w}function j(e,t){return(e-(M.h-t)/Math.sqrt(3))/M.w}function U(i,a){var o=r+i*e,s=n+a*t,l=Math.max(0,Math.min(1,N(0,n),N(0,s))),u=Math.max(0,Math.min(1,B(r,n),B(o,s))),c=Math.max(0,Math.min(1,j(r,n),j(o,s))),v=(l/2+c)*M.w,m=(1-l/2-u)*M.w,y=(v+m)/2,x=m-v,_=(1-l)*M.h,w=_-x/E;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),T.transition().style("opacity",1).duration(200),b=!0),C.emit("plotly_relayouting",z(h))}function q(){R(C),h!==f&&(a.call("_guiRelayout",C,z(h)),I&&C.data&&C._context.showTips&&(o.notifier(l(C,"Double-click to zoom back out"),"long"),I=!1))}function V(e,t){var r=e/M.xaxis._m,n=t/M.yaxis._m,i=[(h={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,h.b,h.c].sort(o.sorterAsc),a=i.indexOf(h.a),l=i.indexOf(h.b),u=i.indexOf(h.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),h={a:i[a],b:i[l],c:i[u]},t=(f.a-h.a)*M.yaxis._m,e=(f.c-h.c-f.b+h.b)*M.xaxis._m);var d=s(M.x0+e,M.y0+t);M.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",d);var p=s(-e,-t);M.clipDefRelative.select("path").attr("transform",p),M.aaxis.range=[h.a,M.sum-h.b-h.c],M.baxis.range=[M.sum-h.a-h.c,h.b],M.caxis.range=[M.sum-h.a-h.b,h.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,M),C.emit("plotly_relayouting",z(h))}function H(){a.call("_guiRelayout",C,z(h))}this.dragOptions={element:S,gd:C,plotinfo:{id:M.id,domain:C._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,c){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],e=C._fullLayout._invScaleX,t=C._fullLayout._invScaleY;var v=M.dragOptions.dragmode=C._fullLayout.dragmode;y(v)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,"zoom"===v?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=q,function(e,t,a){var l=S.getBoundingClientRect();r=t-l.left,n=a-l.top,C._fullLayout._calcInverseTransform(C);var c=C._fullLayout._invTransform,v=o.apply3DTransform(c)(r,n);r=v[0],n=v[1],f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},h=f,d=M.aaxis.range[1]-f.a,p=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),g="M0,"+M.h+"L"+M.w/2+", 0L"+M.w+","+M.h+"Z",b=!1,k=D.append("path").attr("class","zoombox").attr("transform",s(M.x0,M.y0)).style({fill:p>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",g),T=D.append("path").attr("class","zoombox-corners").attr("transform",s(M.x0,M.y0)).style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),M.clearOutline(C)}(0,l,c)):"pan"===v?(M.dragOptions.moveFn=V,M.dragOptions.clickFn=F,M.dragOptions.doneFn=H,f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},h=f,M.clearOutline(C)):(x(v)||y(v))&&_(a,l,c,M.dragOptions,v)}},S.onmousemove=function(e){m.hover(C,e,M.id),C._fullLayout._lasthover=S,C._fullLayout._hoversubplot=M.id},S.onmouseout=function(e){C._dragging||v.unhover(C,e)},v.init(this.dragOptions)}},24040:function(e,t,r){"use strict";var n=r(24248),i=r(16628),a=r(52416),o=r(63620),s=r(52200).addStyleRule,l=r(92880),u=r(45464),c=r(64859),f=l.extendFlat,d=l.extendDeepAll;function h(e){var r=e.name,i=e.categories,a=e.meta;if(t.modules[r])n.log("Type "+r+" already registered");else{t.subplotsRegistry[e.basePlotModule.name]||function(e){var r=e.name;if(t.subplotsRegistry[r])n.log("Plot type "+r+" already registered.");else for(var i in g(e),t.subplotsRegistry[r]=e,t.componentsRegistry)b(i,e.name)}(e.basePlotModule);for(var o={},l=0;l-1&&(f[h[r]].title={text:""});for(r=0;r")?"":t.html(e).text()}));return t.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),i.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},84664:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){for(var r=0;rf+u||!n(c))}for(var h=0;h=0)return e}else if("string"===typeof e&&"%"===(e=e.trim()).slice(-1)&&n(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function p(e,t,r,n,a,o){var s=!(!1===(o=o||{}).moduleHasSelected),l=!(!1===o.moduleHasUnselected),u=!(!1===o.moduleHasConstrain),c=!(!1===o.moduleHasCliponaxis),f=!(!1===o.moduleHasTextangle),h=!(!1===o.moduleHasInsideanchor),p=!!o.hasPathbar,v=Array.isArray(a)||"auto"===a,m=v||"inside"===a,g=v||"outside"===a;if(m||g){var y=d(n,"textfont",r.font),x=i.extendFlat({},y),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,d(n,"insidetextfont",x),p){var _=i.extendFlat({},y);b&&delete _.color,d(n,"pathbar.textfont",_)}g&&d(n,"outsidetextfont",y),s&&n("selected.textfont.color"),l&&n("unselected.textfont.color"),u&&n("constraintext"),c&&n("cliponaxis"),f&&n("textangle"),n("texttemplate")}m&&h&&n("insidetextanchor")}e.exports={supplyDefaults:function(e,t,r,n){function c(r,n){return i.coerce(e,t,f,r,n)}if(s(e,t,n,c)){l(e,t,n,c),c("xhoverformat"),c("yhoverformat"),c("zorder"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate");var d=c("textposition");p(e,0,n,c,d,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u(e,t,c,r,n);var h=(t.marker.line||{}).color,v=o.getComponentMethod("errorbars","supplyDefaults");v(e,t,h||a.defaultLine,{axis:"y"}),v(e,t,h||a.defaultLine,{axis:"x",inherit:"y"}),i.coerceSelectionMarkerOpacity(t,c)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,n;function a(e,t){return i.coerce(n._input,n,f,e,t)}for(var o=0;oa))return t}return void 0!==r?r:e.dflt},t.coerceColor=function(e,t,r){return i(t).isValid()?t:void 0!==r?r:e.dflt},t.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},t.getValue=function(e,t){var r;return a(e)?t0?t+=r:c<0&&(t-=r)}return t}function R(e){var t=c,r=e.b,i=I(e);return n.inbox(r-t,i-t,_+(i-t)/(i-r)-1)}var D=e[f+"a"],z=e[d+"a"];v=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var F=n.getDistanceFunction(i,h,p,(function(e){return(h(e)+p(e))/2}));if(n.getClosest(m,F,e),!1!==e.index&&m[e.index].p!==u){T||(C=function(e){return Math.min(A(e),e.p-y.bargroupwidth/2)},L=function(e){return Math.max(M(e),e.p+y.bargroupwidth/2)});var N=m[e.index],B=g.base?N.b+N.s:N.s;e[d+"0"]=e[d+"1"]=z.c2p(N[d],!0),e[d+"LabelVal"]=B;var j=y.extents[y.extents.round(N.p)];e[f+"0"]=D.c2p(x?C(N):j[0],!0),e[f+"1"]=D.c2p(x?L(N):j[1],!0);var U=void 0!==N.orig_p;return e[f+"LabelVal"]=U?N.orig_p:N.p,e.labelLabel=l(D,e[f+"LabelVal"],g[f+"hoverformat"]),e.valueLabel=l(z,e[d+"LabelVal"],g[d+"hoverformat"]),e.baseLabel=l(z,N.b,g[d+"hoverformat"]),e.spikeDistance=(function(e){var t=c,r=e.b,i=I(e);return n.inbox(r-t,i-t,w+(i-t)/(i-r)-1)}(N)+function(e){return P(A(e),M(e),w)}(N))/2,e[f+"Spike"]=D.c2p(N.p,!0),o(N,g,e),e.hovertemplate=g.hovertemplate,e}}function f(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=s(e,t);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(e,t,r,n,a){var o=c(e,t,r,n,a);if(o){var s=o.cd,l=s[0].trace,u=s[o.index];return o.color=f(l,u),i.getComponentMethod("errorbars","hoverInfo")(u,l,o),[o]}},hoverOnBars:c,getTraceColor:f}},51132:function(e,t,r){"use strict";e.exports={attributes:r(20832),layoutAttributes:r(39324),supplyDefaults:r(31508).supplyDefaults,crossTraceDefaults:r(31508).crossTraceDefaults,supplyLayoutDefaults:r(37156),calc:r(71820),crossTraceCalc:r(96376).crossTraceCalc,colorbar:r(5528),arraysToCalcdata:r(84664),plot:r(98184).plot,style:r(60100).style,styleOnSelect:r(60100).styleOnSelect,hoverPoints:r(63400).hoverPoints,eventData:r(52160),selectPoints:r(45784),moduleType:"trace",name:"bar",basePlotModule:r(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(e){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(e,t,r){"use strict";var n=r(24040),i=r(54460),a=r(3400),o=r(39324),s=r(31508).validateCornerradius;e.exports=function(e,t,r){function l(r,n){return a.coerce(e,t,o,r,n)}for(var u=!1,c=!1,f=!1,d={},h=l("barmode"),p=0;p0)-(e<0)}function A(e,t){return e0}function E(e,t,r,n,i){return!(e<0||t<0)&&(r<=e&&n<=t||r<=t&&n<=e||(i?e>=r*(t/n):t>=n*(e/r)))}function C(e){return"auto"===e?0:e}function L(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function P(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c="end"===u,f="start"===u,d=((a.leftToRight||0)+1)/2,h=1-d,p=a.hasB,v=a.r,m=a.overhead,g=i.width,y=i.height,x=Math.abs(t-e),b=Math.abs(n-r),w=x>2*_&&b>2*_?_:0;x-=2*w,b-=2*w;var k=C(l);"auto"!==l||g<=x&&y<=b||!(g>x||y>b)||(g>b||y>x)&&g_){var E=function(e,t,r,n,i,a,o,s,l){var u,c,f,d,h,p=Math.max(0,Math.abs(t-e)-2*_),v=Math.max(0,Math.abs(n-r)-2*_),m=a-_,g=o?m-Math.sqrt(m*m-(m-o)*(m-o)):m,y=l?2*m:s?m-o:2*g,x=l?2*m:s?2*g:m-o;return i.y/i.x>=v/(p-y)?d=v/i.y:i.y/i.x<=(v-x)/p?d=p/i.x:!l&&s?(u=i.x*i.x+i.y*i.y/4,f=(p-m)*(p-m)+(v/2-m)*(v/2-m)-m*m,d=(-(c=-2*i.x*(p-m)-i.y*(v/2-m))+Math.sqrt(c*c-4*u*f))/(2*u)):l?(u=(i.x*i.x+i.y*i.y)/4,f=(p/2-m)*(p/2-m)+(v/2-m)*(v/2-m)-m*m,d=(-(c=-i.x*(p/2-m)-i.y*(v/2-m))+Math.sqrt(c*c-4*u*f))/(2*u)):(u=i.x*i.x/4+i.y*i.y,f=(p/2-m)*(p/2-m)+(v-m)*(v-m)-m*m,d=(-(c=-i.x*(p/2-m)-2*i.y*(v-m))+Math.sqrt(c*c-4*u*f))/(2*u)),d=Math.min(1,d),h=s?Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(v-i.y*d)/2)*(m-(v-i.y*d)/2)))-o):Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(p-i.x*d)/2)*(m-(p-i.x*d)/2)))-o),{scale:d,pad:h}}(e,t,r,n,S,v,m,o,p);T=E.scale,M=E.pad}else T=1,s&&(T=Math.min(1,x/S.x,b/S.y)),M=0;var P=i.left*h+i.right*d,O=(i.top+i.bottom)/2,I=(e+_)*h+(t-_)*d,R=(r+n)/2,D=0,z=0;if(f||c){var F=(o?S.x:S.y)/2;v&&(c||p)&&(w+=M);var N=o?A(e,t):A(r,n);o?f?(I=e+N*w,D=-N*F):(I=t-N*w,D=N*F):f?(R=r+N*w,z=-N*F):(R=n-N*w,z=N*F)}return{textX:P,textY:O,targetX:I,targetY:R,anchorX:D,anchorY:z,scale:T,rotate:k}}e.exports={plot:function(e,t,r,f,m,g){var w=t.xaxis,O=t.yaxis,I=e._fullLayout,R=e._context.staticPlot;m||(m={mode:I.barmode,norm:I.barmode,gap:I.bargap,groupgap:I.bargroupgap},h("bar",I));var D=a.makeTraceGroups(f,r,"trace bars").each((function(r){var u=n.select(this),f=r[0].trace,h=r[0].t,D="waterfall"===f.type,z="funnel"===f.type,F="histogram"===f.type,N="bar"===f.type,B=N||z,j=0;D&&f.connector.visible&&"between"===f.connector.mode&&(j=f.connector.line.width/2);var U="h"===f.orientation,q=S(m),V=a.ensureSingle(u,"g","points"),H=k(f),G=V.selectAll("g.point").data(a.identity,H);G.enter().append("g").classed("point",!0),G.exit().remove(),G.each((function(u,k){var S,D,z=n.select(this),V=function(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n?[i,a]:[a,i]}(u,w,O,U),H=V[0][0],G=V[0][1],W=V[1][0],Y=V[1][1],Z=0===(U?G-H:Y-W);if(Z&&B&&v.getLineWidth(f,u)&&(Z=!1),Z||(Z=!i(H)||!i(G)||!i(W)||!i(Y)),u.isBlank=Z,Z&&(U?G=H:Y=W),j&&!Z&&(U?(H-=A(H,G)*j,G+=A(H,G)*j):(W-=A(W,Y)*j,Y+=A(W,Y)*j)),"waterfall"===f.type){if(!Z){var X=f[u.dir].marker;S=X.line.width,D=X.color}}else S=v.getLineWidth(f,u),D=u.mc||f.marker.color;function K(e){var t=n.round(S/2%1,2);return 0===m.gap&&0===m.groupgap?n.round(Math.round(e)-t,2):e}var J=s.opacity(D)<1||S>.01?K:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?K(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(H=J(H,G,U),G=J(G,H,U),W=J(W,Y,!U),Y=J(Y,W,!U));var $,Q=U?w.c2p:O.c2p;$=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var ee,te,re=N||F?function(e,t){if(!e)return 0;var r,n=U?Math.abs(Y-W):Math.abs(G-H),i=U?Math.abs(G-H):Math.abs(Y-W),a=J(Math.abs(Q($,!0)-Q(0,!0))),o=u.hasB?Math.min(n/2,i/2):Math.min(n/2,a);return r="%"===t?n*(Math.min(50,e)/100):e,J(Math.max(Math.min(r,o),0))}(h.cornerradiusvalue,h.cornerradiusform):0,ne="M"+H+","+W+"V"+Y+"H"+G+"V"+W+"Z",ie=0;if(re&&u.s){var ae=0===T(u.s0)||T(u.s)===T(u.s0)?u.s1:u.s0;if((ie=J(u.hasB?0:Math.abs(Q($,!0)-Q(ae,!0))))0?Math.sqrt(ie*(2*re-ie)):0,fe=oe>0?Math.max:Math.min;ee="M"+H+","+W+"V"+(Y-ue*se)+"H"+fe(G-(re-ie)*oe,H)+"A "+re+","+re+" 0 0 "+le+" "+G+","+(Y-re*se-ce)+"V"+(W+re*se+ce)+"A "+re+","+re+" 0 0 "+le+" "+fe(G-(re-ie)*oe,H)+","+(W+ue*se)+"Z"}else if(u.hasB)ee="M"+(H+re*oe)+","+W+"A "+re+","+re+" 0 0 "+le+" "+H+","+(W+re*se)+"V"+(Y-re*se)+"A "+re+","+re+" 0 0 "+le+" "+(H+re*oe)+","+Y+"H"+(G-re*oe)+"A "+re+","+re+" 0 0 "+le+" "+G+","+(Y-re*se)+"V"+(W+re*se)+"A "+re+","+re+" 0 0 "+le+" "+(G-re*oe)+","+W+"Z";else{var de=(te=Math.abs(Y-W)+ie)0?Math.sqrt(ie*(2*re-ie)):0,pe=se>0?Math.max:Math.min;ee="M"+(H+de*oe)+","+W+"V"+pe(Y-(re-ie)*se,W)+"A "+re+","+re+" 0 0 "+le+" "+(H+re*oe-he)+","+Y+"H"+(G-re*oe+he)+"A "+re+","+re+" 0 0 "+le+" "+(G-de*oe)+","+pe(Y-(re-ie)*se,W)+"V"+W+"Z"}}else ee=ne}else ee=ne;var ve=M(a.ensureSingle(z,"path"),I,m,g);if(ve.style("vector-effect",R?"none":"non-scaling-stroke").attr("d",isNaN((G-H)*(Y-W))||Z&&e._context.staticPlot?"M0,0Z":ee).call(l.setClipUrl,t.layerClipId,e),!I.uniformtext.mode&&q){var me=l.makePointStyleFns(f);l.singlePointStyle(u,ve,f,me,e)}!function(e,t,r,n,i,s,u,f,h,m,g,w,k){var T,S=t.xaxis,O=t.yaxis,I=e._fullLayout;function R(t,r,n){return a.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+T,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,e)}var D=n[0].trace,z="h"===D.orientation,F=function(e,t,r,n,i){var o,s=t[0].trace,l=s.texttemplate;return o=l?function(e,t,r,n,i){var o=t[0].trace,s=a.castOption(o,r,"texttemplate");if(!s)return"";var l,u,f,d,h="histogram"===o.type,p="waterfall"===o.type,v="funnel"===o.type,m="h"===o.orientation;function g(e){return c(u,u.c2l(e),!0).text}function y(e){return c(d,d.c2l(e),!0).text}m?(l="y",u=i,f="x",d=n):(l="x",u=n,f="y",d=i);var x=t[r],_={};_.label=x.p,_.labelLabel=_[l+"Label"]=g(x.p);var w=a.castOption(o,x.i,"text");(0===w||w)&&(_.text=w),_.value=x.s,_.valueLabel=_[f+"Label"]=y(x.s);var k={};b(k,o,x.i),(h||void 0===k.x)&&(k.x=m?_.value:_.label),(h||void 0===k.y)&&(k.y=m?_.label:_.value),(h||void 0===k.xLabel)&&(k.xLabel=m?_.valueLabel:_.labelLabel),(h||void 0===k.yLabel)&&(k.yLabel=m?_.labelLabel:_.valueLabel),p&&(_.delta=+x.rawS||x.s,_.deltaLabel=y(_.delta),_.final=x.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial)),v&&(_.value=x.s,_.valueLabel=y(_.value),_.percentInitial=x.begR,_.percentInitialLabel=a.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=a.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=a.formatPercent(x.sumR));var T=a.castOption(o,x.i,"customdata");return T&&(_.customdata=T),a.texttemplateString(s,_,e._d3locale,k,_,o._meta||{})}(e,t,r,n,i):s.textinfo?function(e,t,r,n){var i=e[0].trace,o="h"===i.orientation,s="waterfall"===i.type,l="funnel"===i.type;function u(e){return c(o?n:r,e,!0).text}function f(e){return c(o?r:n,+e,!0).text}var d,h=i.textinfo,p=e[t],v=h.split("+"),m=[],g=function(e){return-1!==v.indexOf(e)};if(g("label")&&m.push(u(e[t].p)),g("text")&&(0===(d=a.castOption(i,p.i,"text"))||d)&&m.push(d),s){var y=+p.rawS||p.s,x=p.v,b=x-y;g("initial")&&m.push(f(b)),g("delta")&&m.push(f(y)),g("final")&&m.push(f(x))}if(l){g("value")&&m.push(f(p.s));var _=0;g("percent initial")&&_++,g("percent previous")&&_++,g("percent total")&&_++;var w=_>1;g("percent initial")&&(d=a.formatPercent(p.begR),w&&(d+=" of initial"),m.push(d)),g("percent previous")&&(d=a.formatPercent(p.difR),w&&(d+=" of previous"),m.push(d)),g("percent total")&&(d=a.formatPercent(p.sumR),w&&(d+=" of total"),m.push(d))}return m.join("
")}(t,r,n,i):v.getValue(s.text,r),v.coerceString(y,o)}(I,n,i,S,O);T=function(e,t){var r=v.getValue(e.textposition,t);return v.coerceEnumerated(x,r)}(D,i);var N="stack"===w.mode||"relative"===w.mode,B=n[i],j=!N||B._outmost,U=B.hasB,q=m&&m-g>_;if(F&&"none"!==T&&(!B.isBlank&&s!==u&&f!==h||"auto"!==T&&"inside"!==T)){var V=I.font,H=p.getBarColor(n[i],D),G=p.getInsideTextFont(D,i,V,H),W=p.getOutsideTextFont(D,i,V),Y=D.insidetextanchor||"end",Z=r.datum();z?"log"===S.type&&Z.s0<=0&&(s=S.range[0]0&&$>0;ie=q?U?E(re-2*m,ne,J,$,z)||E(re,ne-2*m,J,$,z):z?E(re-(m-g),ne,J,$,z)||E(re,ne-2*(m-g),J,$,z):E(re,ne-(m-g),J,$,z)||E(re-2*(m-g),ne,J,$,z):E(re,ne,J,$,z),ae&&ie?T="inside":(T="outside",X.remove(),X=null)}else T="inside";if(!X){var oe=(X=R(r,F,Q=a.ensureUniformFontSize(e,"outside"===T?W:G))).attr("transform");if(X.attr("transform",""),J=(K=l.bBox(X.node())).width,$=K.height,X.attr("transform",oe),J<=0||$<=0)return void X.remove()}var se,le=D.textangle;se="outside"===T?function(e,t,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,u=a.angle||0,c=i.width,f=i.height,d=Math.abs(t-e),h=Math.abs(n-r);o=s?h>2*_?_:0:d>2*_?_:0;var p=1;l&&(p=s?Math.min(1,h/f):Math.min(1,d/c));var v=C(u),m=L(i,v),g=(s?m.x:m.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(e+t)/2,w=(r+n)/2,k=0,T=0,M=s?A(t,e):A(r,n);return s?(b=t-M*o,k=M*g):(w=n+M*o,T=-M*g),{textX:y,textY:x,targetX:b,targetY:w,anchorX:k,anchorY:T,scale:p,rotate:v}}(s,u,f,h,K,{isHorizontal:z,constrained:"both"===D.constraintext||"outside"===D.constraintext,angle:le}):P(s,u,f,h,K,{isHorizontal:z,constrained:"both"===D.constraintext||"inside"===D.constraintext,angle:le,anchor:Y,hasB:U,r:m,overhead:g}),se.fontSize=Q.size,d("histogram"===D.type?"bar":D.type,se,I),B.transform=se;var ue=M(X,I,w,k);a.setTransormAndDisplay(ue,se)}else r.select("text").remove()}(e,t,z,r,k,H,G,W,Y,re,ie,m,g),t.layerClipId&&l.hideOutsideRangePoint(u,z.select("text"),w,O,f.xcalendar,f.ycalendar)}));var W=!1===f.cliponaxis;l.setClipUrl(u,W?null:t.layerClipId,e)}));u.getComponentMethod("errorbars","plot")(e,D,t,m)},toMoveInsideBar:P}},45784:function(e){"use strict";function t(e,t,r,n,i){var a=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(e,r){var n,i=e.cd,a=e.xaxis,o=e.yaxis,s=i[0].trace,l="funnel"===s.type,u="h"===s.orientation,c=[];if(!1===r)for(n=0;n1||0===i.bargap&&0===i.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(n.select(this),t[0].trace,e)})),s.getComponentMethod("errorbars","style")(t)},styleTextPoints:v,styleOnSelect:function(e,t,r){var i=t[0].trace;i.selectedpoints?function(e,t,r){a.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var i,s=n.select(this);if(e.selected){i=o.ensureUniformFontSize(r,m(s,e,t,r));var l=t.selected.textfont&&t.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,t)}))}(e.selectAll("text"),t,r)}(r,i,e):(p(r,i,e),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},55592:function(e,t,r){"use strict";var n=r(76308),i=r(94288).hasColorscale,a=r(27260),o=r(3400).coercePattern;e.exports=function(e,t,r,s,l){var u=r("marker.color",s),c=i(e,"marker");c&&a(e,t,l,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(e,"marker.line")&&a(e,t,l,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",u,c),r("selected.marker.color"),r("unselected.marker.color")}},82744:function(e,t,r){"use strict";var n=r(33428),i=r(3400);function a(e){return"_"+e+"Text_minsize"}e.exports={recordMinTextSize:function(e,t,r){if(r.uniformtext.mode){var n=a(e),i=r.uniformtext.minsize,o=t.scale*t.fontSize;t.hide=od.range[1]&&(x+=Math.PI),n.getClosest(u,(function(e){return v(y,x,[e.rp0,e.rp1],[e.thetag0,e.thetag1],p)?m+Math.min(1,Math.abs(e.thetag1-e.thetag0)/g)-1+(e.rp1-y)/(e.rp1-e.rp0)-1:1/0}),e),!1!==e.index){var b=u[e.index];e.x0=e.x1=b.ct[0],e.y0=e.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,c,e),s(_,c,f,e),e.hovertemplate=c.hovertemplate,e.color=a(c,b),e.xLabelVal=e.yLabelVal=void 0,b.s<0&&(e.idealAlign="left"),[e]}}},94456:function(e,t,r){"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:r(40872),categories:["polar","bar","showLegend"],attributes:r(78100),layoutAttributes:r(9320),supplyDefaults:r(70384),supplyLayoutDefaults:r(89580),calc:r(47056).calc,crossTraceCalc:r(47056).crossTraceCalc,plot:r(42040),colorbar:r(5528),formatLabels:r(22852),style:r(60100).style,styleOnSelect:r(60100).styleOnSelect,hoverPoints:r(68896),selectPoints:r(45784),meta:{}}},9320:function(e){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(e,t,r){"use strict";var n=r(3400),i=r(9320);e.exports=function(e,t,r){var a,o={};function s(r,o){return n.coerce(e[a]||{},t[a],i,r,o)}for(var l=0;l0?(u=o,c=l):(u=l,c=o);var f=[s.findEnclosingVertexAngles(u,e.vangles)[0],(u+c)/2,s.findEnclosingVertexAngles(c,e.vangles)[1]];return s.pathPolygonAnnulus(n,i,u,c,f,t,r)}:function(e,n,i,o){return a.pathAnnulus(e,n,i,o,t,r)}}(t),p=t.layers.frontplot.select("g.barlayer");a.makeTraceGroups(p,r,"trace bars").each((function(){var r=n.select(this),s=a.ensureSingle(r,"g","points").selectAll("g.point").data(a.identity);s.enter().append("g").style("vector-effect",l?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(e){var t,r=n.select(this),o=e.rp0=f.c2p(e.s0),s=e.rp1=f.c2p(e.s1),l=e.thetag0=d.c2g(e.p0),p=e.thetag1=d.c2g(e.p1);if(i(o)&&i(s)&&i(l)&&i(p)&&o!==s&&l!==p){var v=f.c2g(e.s1),m=(l+p)/2;e.ct=[u.c2p(v*Math.cos(m)),c.c2p(v*Math.sin(m))],t=h(o,s,l,p)}else t="M0,0Z";a.ensureSingle(r,"path").attr("d",t)})),o.setClipUrl(r,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)}))}},63188:function(e,t,r){"use strict";var n=r(98304),i=r(52904),a=r(20832),o=r(22548),s=r(29736).axisHoverFormat,l=r(21776).Ks,u=r(92880).extendFlat,c=i.marker,f=c.line;e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:i.xperiod,yperiod:i.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:i.xperiodalignment,yperiodalignment:i.yperiodalignment,xhoverformat:s("x"),yhoverformat:s("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:u({},c.symbol,{arrayOk:!1,editType:"plot"}),opacity:u({},c.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:u({},c.angle,{arrayOk:!1,editType:"calc"}),size:u({},c.size,{arrayOk:!1,editType:"calc"}),color:u({},c.color,{arrayOk:!1,editType:"style"}),line:{color:u({},f.color,{arrayOk:!1,dflt:o.defaultLine,editType:"style"}),width:u({},f.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:n(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:i.selected.marker,editType:"style"},unselected:{marker:i.unselected.marker,editType:"style"},text:u({},i.text,{}),hovertext:u({},i.hovertext,{}),hovertemplate:l({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:i.zorder}},62555:function(e,t,r){"use strict";var n=r(38248),i=r(54460),a=r(1220),o=r(3400),s=r(39032).BADNUM,l=o._;e.exports=function(e,t){var r,u,y,x,b,_,w,k=e._fullLayout,T=i.getFromId(e,t.xaxis||"x"),A=i.getFromId(e,t.yaxis||"y"),M=[],S="violin"===t.type?"_numViolins":"_numBoxes";"h"===t.orientation?(y=T,x="x",b=A,_="y",w=!!t.yperiodalignment):(y=A,x="y",b=T,_="x",w=!!t.xperiodalignment);var E,C,L,P,O,I,R=function(e,t,r,i){var s,l=t in e,u=t+"0"in e,c="d"+t in e;if(l||u&&c){var f=r.makeCalcdata(e,t);return[a(e,r,t,f).vals,f]}s=u?e[t+"0"]:"name"in e&&("category"===r.type||n(e.name)&&-1!==["linear","log"].indexOf(r.type)||o.isDateTime(e.name)&&"date"===r.type)?e.name:i;for(var d="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,e[t+"calendar"]),h=e._length,p=new Array(h),v=0;vE.uf};if(t._hasPreCompStats){var U=t[x],q=function(e){return y.d2c((t[e]||[])[r])},V=1/0,H=-1/0;for(r=0;r=E.q1&&E.q3>=E.med){var W=q("lowerfence");E.lf=W!==s&&W<=E.q1?W:h(E,L,P);var Y=q("upperfence");E.uf=Y!==s&&Y>=E.q3?Y:p(E,L,P);var Z=q("mean");E.mean=Z!==s?Z:P?o.mean(L,P):(E.q1+E.q3)/2;var X=q("sd");E.sd=Z!==s&&X>=0?X:P?o.stdev(L,P,E.mean):E.q3-E.q1,E.lo=v(E),E.uo=m(E);var K=q("notchspan");K=K!==s&&K>0?K:g(E,P),E.ln=E.med-K,E.un=E.med+K;var J=E.lf,$=E.uf;t.boxpoints&&L.length&&(J=Math.min(J,L[0]),$=Math.max($,L[P-1])),t.notched&&(J=Math.min(J,E.ln),$=Math.max($,E.un)),E.min=J,E.max=$}else{var Q;o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join("\n")),Q=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=Q,E.q1=E.q3=Q,E.lf=E.uf=Q,E.mean=E.sd=Q,E.ln=E.un=Q,E.min=E.max=Q}V=Math.min(V,E.min),H=Math.max(H,E.max),E.pts2=C.filter(j),M.push(E)}}t._extremes[y._id]=i.findExtremes(y,[V,H],{padded:!0})}else{var ee=y.makeCalcdata(t,x),te=function(e,t){for(var r=e.length,n=new Array(r+1),i=0;i=0&&ie0){var ce,fe;(E={}).pos=E[_]=N[r],C=E.pts=ne[r].sort(f),P=(L=E[x]=C.map(d)).length,E.min=L[0],E.max=L[P-1],E.mean=o.mean(L,P),E.sd=o.stdev(L,P,E.mean)*t.sdmultiple,E.med=o.interp(L,.5),P%2&&(le||ue)?(le?(ce=L.slice(0,P/2),fe=L.slice(P/2+1)):ue&&(ce=L.slice(0,P/2+1),fe=L.slice(P/2)),E.q1=o.interp(ce,.5),E.q3=o.interp(fe,.5)):(E.q1=o.interp(L,.25),E.q3=o.interp(L,.75)),E.lf=h(E,L,P),E.uf=p(E,L,P),E.lo=v(E),E.uo=m(E);var de=g(E,P);E.ln=E.med-de,E.un=E.med+de,ae=Math.min(ae,E.ln),oe=Math.max(oe,E.un),E.pts2=C.filter(j),M.push(E)}t.notched&&o.isTypedArray(ee)&&(ee=Array.from(ee)),t._extremes[y._id]=i.findExtremes(y,t.notched?ee.concat([ae,oe]):ee,{padded:!0})}return function(e,t){if(o.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r0?(M[0].t={num:k[S],dPos:B,posLetter:_,valLetter:x,labels:{med:l(e,"median:"),min:l(e,"min:"),q1:l(e,"q1:"),q3:l(e,"q3:"),max:l(e,"max:"),mean:"sd"===t.boxmean||"sd"===t.sizemode?l(e,"mean \xb1 \u03c3:").replace("\u03c3",1===t.sdmultiple?"\u03c3":t.sdmultiple+"\u03c3"):l(e,"mean:"),lf:l(e,"lower fence:"),uf:l(e,"upper fence:")}},k[S]++,M):[{t:{empty:!0}}]};var u={text:"tx",hovertext:"htx"};function c(e,t,r){for(var n in u)o.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(t[n][r[0]])&&(e[u[n]]=t[n][r[0]][r[1]]):e[u[n]]=t[n][r])}function f(e,t){return e.v-t.v}function d(e){return e.v}function h(e,t,r){return 0===r?e.q1:Math.min(e.q1,t[Math.min(o.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function p(e,t,r){return 0===r?e.q3:Math.max(e.q3,t[Math.max(o.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function v(e){return 4*e.q1-3*e.q3}function m(e){return 4*e.q3-3*e.q1}function g(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}},96404:function(e,t,r){"use strict";var n=r(54460),i=r(3400),a=r(71888).getAxisGroup,o=["v","h"];function s(e,t,r,o){var s,l,u,c=t.calcdata,f=t._fullLayout,d=o._id,h=d.charAt(0),p=[],v=0;for(s=0;s1,b=1-f[e+"gap"],_=1-f[e+"groupgap"];for(s=0;s0){var H=E.pointpos,G=E.jitter,W=E.marker.size/2,Y=0;H+G>=0&&((Y=q*(H+G))>M?(V=!0,j=W,N=Y):Y>z&&(j=W,N=M)),Y<=M&&(N=M);var Z=0;H-G<=0&&((Z=-q*(H-G))>S?(V=!0,U=W,B=Z):Z>F&&(U=W,B=S)),Z<=S&&(B=S)}else N=M,B=S;var X=new Array(u.length);for(l=0;l0?(m="v",g=x>0?Math.min(_,b):Math.min(b)):x>0?(m="h",g=Math.min(_)):g=0;if(g){t._length=g;var S=r("orientation",m);t._hasPreCompStats?"v"===S&&0===x?(r("x0",0),r("dx",1)):"h"===S&&0===y&&(r("y0",0),r("dy",1)):"v"===S&&0===x?r("x0"):"h"===S&&0===y&&r("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],a)}else t.visible=!1}function f(e,t,r,i){var a=i.prefix,o=n.coerce2(e,t,u,"marker.outliercolor"),s=r("marker.line.outliercolor"),l="outliers";t._hasPreCompStats?l="all":(o||s)&&(l="suspectedoutliers");var c=r(a+"points",l);c?(r("jitter","all"===c?.3:0),r("pointpos","all"===c?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===c&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var f=r("hoveron");"all"!==f&&-1===f.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(t,r)}e.exports={supplyDefaults:function(e,t,r,i){function s(r,i){return n.coerce(e,t,u,r,i)}if(c(e,t,s,i),!1!==t.visible){o(e,t,i,s),s("xhoverformat"),s("yhoverformat");var l=t._hasPreCompStats;l&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||r),s("line.width"),s("fillcolor",a.addOpacity(t.line.color,.5));var d=!1;if(l){var h=s("mean"),p=s("sd");h&&h.length&&(d=!0,p&&p.length&&(d="sd"))}s("whiskerwidth");var v,m=s("sizemode");"quartiles"===m&&(v=s("boxmean",d)),s("showwhiskers","quartiles"===m),"sd"!==m&&"sd"!==v||s("sdmultiple"),s("width"),s("quartilemethod");var g=!1;if(l){var y=s("notchspan");y&&y.length&&(g=!0)}else n.validate(e.notchwidth,u.notchwidth)&&(g=!0);s("notched",g)&&s("notchwidth"),f(e,t,s,{prefix:"box"}),s("zorder")}},crossTraceDefaults:function(e,t){var r,i;function a(e){return n.coerce(i._input,i,u,e)}for(var o=0;oe.lo&&(_.so=!0)}return a}));p.enter().append("path").classed("point",!0),p.exit().remove(),p.call(a.translatePoints,l,u)}function c(e,t,r,a){var o,s,l=t.val,u=t.pos,c=!!u.rangebreaks,f=a.bPos,d=a.bPosPxOffset||0,h=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var p=e.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each((function(e){var t=u.c2l(e.pos+f,!0),i=u.l2p(t-o)+d,a=u.l2p(t+s)+d,p=c?(i+a)/2:u.l2p(t)+d,v=l.c2p(e.mean,!0),m=l.c2p(e.mean-e.sd,!0),g=l.c2p(e.mean+e.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+v+","+i+"V"+a+("sd"===h?"m0,0L"+m+","+p+"L"+v+","+i+"L"+g+","+p+"Z":"")):n.select(this).attr("d","M"+i+","+v+"H"+a+("sd"===h?"m0,0L"+p+","+m+"L"+i+","+v+"L"+p+","+g+"Z":""))}))}e.exports={plot:function(e,t,r,a){var o=e._context.staticPlot,s=t.xaxis,f=t.yaxis;i.makeTraceGroups(a,r,"trace boxes").each((function(e){var t,r,i=n.select(this),a=e[0],d=a.t,h=a.trace;d.wdPos=d.bdPos*h.whiskerwidth,!0!==h.visible||d.empty?i.remove():("h"===h.orientation?(t=f,r=s):(t=s,r=f),l(i,{pos:t,val:r},h,d,o),u(i,{x:s,y:f},h,d),c(i,{pos:t,val:r},h,d))}))},plotBoxAndWhiskers:l,plotPoints:u,plotBoxMean:c}},8264:function(e){"use strict";e.exports=function(e,t){var r,n,i=e.cd,a=e.xaxis,o=e.yaxis,s=[];if(!1===t)for(r=0;r=10)return null;for(var r=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,O=C>0?Math.ceil:Math.floor,I=C>0?Math.min:Math.max,R=C>0?Math.max:Math.min,D=P(S+L),z=O(E-L),F=[[f=M(S)]];for(a=D;a*C=0;i--)a[c-i]=e[f][i],o[c-i]=t[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=e[i][0],o[f-i]=t[i][0];return s.push({x:a,y:o,bicubic:u}),s}},19216:function(e,t,r){"use strict";var n=r(54460),i=r(92880).extendFlat;e.exports=function(e,t,r){var a,o,s,l,u,c,f,d,h,p,v,m,g,y,x=e["_"+t],b=e[t+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],T=e["_"+r],A=e[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=e._xctrl,S=e._yctrl,E=M[0].length,C=M.length,L=e._a.length,P=e._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var O=b.smoothing?3:1;function I(n){var i,a,o,s,l,u,c,f,h,p,v,m,g=[],y=[],x={};if("b"===t)for(a=e.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,a))),s=a-o,x.length=P,x.crossLength=L,x.xy=function(t){return e.evalxy([],t,a)},x.dxy=function(t,r){return e.dxydi([],t,o,r,s)},i=0;i0&&(h=e.dxydi([],i-1,o,0,s),g.push(l[0]+h[0]/3),y.push(l[1]+h[1]/3),p=e.dxydi([],i-1,o,1,s),g.push(f[0]-p[0]/3),y.push(f[1]-p[1]/3)),g.push(f[0]),y.push(f[1]),l=f;else for(i=e.a2i(n),u=Math.floor(Math.max(0,Math.min(L-2,i))),c=i-u,x.length=L,x.crossLength=P,x.xy=function(t){return e.evalxy([],i,t)},x.dxy=function(t,r){return e.dxydj([],u,t,c,r)},a=0;a0&&(v=e.dxydj([],u,a-1,c,0),g.push(l[0]+v[0]/3),y.push(l[1]+v[1]/3),m=e.dxydj([],u,a-1,c,1),g.push(f[0]-m[0]/3),y.push(f[1]-m[1]/3)),g.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=t,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=d,x.x=g,x.y=y,x.smoothing=A.smoothing,x}function R(n){var i,a,o,s,l,u=[],c=[],f={};if(f.length=x.length,f.crossLength=T.length,"b"===t)for(o=Math.max(0,Math.min(P-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(t){return e.evalxy([],t,n)},f.dxy=function(t,r){return e.dxydi([],t,o,r,l)},i=0;ix.length-1||_.push(i(R(o),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(d=c;dx.length-1)&&!(v<0||v>x.length-1))for(m=x[s],g=x[v],a=0;ax[x.length-1]||w.push(i(I(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&k.push(i(R(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(R(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,c=(u=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(e,t){return e-t})))[0],f=u[1],d=c;d<=f;d++)h=b.tick0+b.dtick*d,_.push(i(I(h),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(d=c-1;dx[x.length-1]||w.push(i(I(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&k.push(i(I(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(I(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},14724:function(e,t,r){"use strict";var n=r(54460),i=r(92880).extendFlat;e.exports=function(e,t){var r,a,o,s=t._labels=[],l=t._gridlines;for(r=0;rt.length&&(e=e.slice(0,t.length)):e=[],i=0;i90&&(h-=180,l=-l),{angle:h,flip:l,p:e.c2p(n,t,r),offsetMultplier:u}}},164:function(e,t,r){"use strict";var n=r(33428),i=r(43616),a=r(87072),o=r(53416),s=r(15584),l=r(72736),u=r(3400),c=u.strRotate,f=u.strTranslate,d=r(84284);function h(e,t,r,s,l,u,c){var f="const-"+l+"-lines",d=r.selectAll("."+f).data(u);d.enter().append("path").classed(f,!0).style("vector-effect",c?"none":"non-scaling-stroke"),d.each((function(r){var s=r,l=s.x,u=s.y,c=a([],l,e.c2p),f=a([],u,t.c2p),d="M"+o(c,f,s.smoothing);n.select(this).attr("d",d).style("stroke-width",s.width).style("stroke",s.color).style("stroke-dasharray",i.dashStyle(s.dash,s.width)).style("fill","none")})),d.exit().remove()}function p(e,t,r,a,o,u,d,h){var p=u.selectAll("text."+h).data(d);p.enter().append("text").classed(h,!0);var v=0,m={};return p.each((function(o,u){var d;if("auto"===o.axis.tickangle)d=s(a,t,r,o.xy,o.dxy);else{var h=(o.axis.tickangle+180)*Math.PI/180;d=s(a,t,r,o.xy,[Math.cos(h),Math.sin(h)])}u||(m={angle:d.angle,flip:d.flip});var p=(o.endAnchor?-1:1)*d.flip,g=n.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,e),y=i.bBox(this);g.attr("transform",f(d.p[0],d.p[1])+c(d.angle)+f(o.axis.labelpadding*p,.3*y.height)),v=Math.max(v,y.width+o.axis.labelpadding)})),p.exit().remove(),m.maxExtent=v,m}e.exports=function(e,t,r,i){var l=e._context.staticPlot,c=t.xaxis,f=t.yaxis,d=e._fullLayout._clips;u.makeTraceGroups(i,r,"trace").each((function(t){var r=n.select(this),i=t[0],v=i.trace,m=v.aaxis,y=v.baxis,x=u.ensureSingle(r,"g","minorlayer"),b=u.ensureSingle(r,"g","majorlayer"),_=u.ensureSingle(r,"g","boundarylayer"),w=u.ensureSingle(r,"g","labellayer");r.style("opacity",v.opacity),h(c,f,b,0,"a",m._gridlines,!0),h(c,f,b,0,"b",y._gridlines,!0),h(c,f,x,0,"a",m._minorgridlines,!0),h(c,f,x,0,"b",y._minorgridlines,!0),h(c,f,_,0,"a-boundary",m._boundarylines,l),h(c,f,_,0,"b-boundary",y._boundarylines,l);var k=p(e,c,f,v,0,w,m._labels,"a-label"),T=p(e,c,f,v,0,w,y._labels,"b-label");!function(e,t,r,n,i,a,o,l){var c,f,d,h,p=u.aggNums(Math.min,null,r.a),v=u.aggNums(Math.max,null,r.a),m=u.aggNums(Math.min,null,r.b),y=u.aggNums(Math.max,null,r.b);c=.5*(p+v),f=m,d=r.ab2xy(c,f,!0),h=r.dxyda_rough(c,f),void 0===o.angle&&u.extendFlat(o,s(r,i,a,d,r.dxydb_rough(c,f))),g(e,t,r,0,d,h,r.aaxis,i,a,o,"a-title"),c=p,f=.5*(m+y),d=r.ab2xy(c,f,!0),h=r.dxydb_rough(c,f),void 0===l.angle&&u.extendFlat(l,s(r,i,a,d,r.dxyda_rough(c,f))),g(e,t,r,0,d,h,r.baxis,i,a,l,"b-title")}(e,w,v,0,c,f,k,T),function(e,t,r,n,i){var s,l,c,f,d=r.select("#"+e._clipPathId);d.size()||(d=r.append("clipPath").classed("carpetclip",!0));var h=u.ensureSingle(d,"path","carpetboundary"),p=t.clipsegments,v=[];for(f=0;f90&&y<270,b=n.select(this);b.text(d.title.text).call(l.convertToTspans,e),x&&(_=(-l.lineCount(b)+m)*v*a-_),b.attr("transform",f(t.p[0],t.p[1])+c(t.angle)+f(0,_)).attr("text-anchor","middle").call(i.font,d.title.font)})),b.exit().remove()}},81e3:function(e,t,r){"use strict";var n=r(24588),i=r(14952).findBin,a=r(30180),o=r(29056),s=r(26435),l=r(24464);e.exports=function(e){var t=e._a,r=e._b,u=t.length,c=r.length,f=e.aaxis,d=e.baxis,h=t[0],p=t[u-1],v=r[0],m=r[c-1],g=t[t.length-1]-t[0],y=r[r.length-1]-r[0],x=g*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;h-=x,p+=x,v-=b,m+=b,e.isVisible=function(e,t){return e>h&&ev&&tp||tm},e.setScale=function(){var t=e._x,r=e._y,n=a(e._xctrl,e._yctrl,t,r,f.smoothing,d.smoothing);e._xctrl=n[0],e._yctrl=n[1],e.evalxy=o([e._xctrl,e._yctrl],u,c,f.smoothing,d.smoothing),e.dxydi=s([e._xctrl,e._yctrl],f.smoothing,d.smoothing),e.dxydj=l([e._xctrl,e._yctrl],f.smoothing,d.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),u-2),n=e[0]-r;return(1-n)*t[r]+n*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),u-2),n=e[1]-t;return(1-n)*r[t]+n*r[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(i(e,t),u-2)),n=t[r],a=t[r+1];return Math.max(0,Math.min(u-1,r+(e-n)/(a-n)))},e.b2j=function(e){var t=Math.max(0,Math.min(i(e,r),c-2)),n=r[t],a=r[t+1];return Math.max(0,Math.min(c-1,t+(e-n)/(a-n)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(n,i,a){if(!a&&(nt[u-1]|ir[c-1]))return[!1,!1];var o=e.a2i(n),s=e.b2j(i),l=e.evalxy([],o,s);if(a){var f,d,h,p,v=0,m=0,g=[];nt[u-1]?(f=u-2,d=1,v=(n-t[u-1])/(t[u-1]-t[u-2])):d=o-(f=Math.max(0,Math.min(u-2,Math.floor(o)))),ir[c-1]?(h=c-2,p=1,m=(i-r[c-1])/(r[c-1]-r[c-2])):p=s-(h=Math.max(0,Math.min(c-2,Math.floor(s)))),v&&(e.dxydi(g,f,h,d,p),l[0]+=g[0]*v,l[1]+=g[1]*v),m&&(e.dxydj(g,f,h,d,p),l[0]+=g[0]*m,l[1]+=g[1]*m)}return l},e.c2p=function(e,t,r){return[t.c2p(e[0]),r.c2p(e[1])]},e.p2x=function(e,t,r){return[t.p2c(e[0]),r.p2c(e[1])]},e.dadi=function(e){var r=Math.max(0,Math.min(t.length-2,e));return t[r+1]-t[r]},e.dbdj=function(e){var t=Math.max(0,Math.min(r.length-2,e));return r[t+1]-r[t]},e.dxyda=function(t,r,n,i){var a=e.dxydi(null,t,r,n,i),o=e.dadi(t,n);return[a[0]/o,a[1]/o]},e.dxydb=function(t,r,n,i){var a=e.dxydj(null,t,r,n,i),o=e.dbdj(r,i);return[a[0]/o,a[1]/o]},e.dxyda_rough=function(t,r,n){var i=g*(n||.1),a=e.ab2xy(t+i,r,!0),o=e.ab2xy(t-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},e.dxydb_rough=function(t,r,n){var i=y*(n||.1),a=e.ab2xy(t,r+i,!0),o=e.ab2xy(t,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}},51512:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t,r){var i,a,o,s=[],l=[],u=e[0].length,c=e.length;function f(t,r){var n,i=0,a=0;return t>0&&void 0!==(n=e[r][t-1])&&(a++,i+=n),t0&&void 0!==(n=e[r-1][t])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log("Smoother converged to",T,"after",A,"iterations"),e}},86411:function(e,t,r){"use strict";var n=r(3400).isArray1D;e.exports=function(e,t,r){var i=r("x"),a=i&&i.length,o=r("y"),s=o&&o.length;if(!a&&!s)return!1;if(t._cheater=!i,a&&!n(i)||s&&!n(o))t._length=null;else{var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),t.a&&t.a.length&&(l=Math.min(l,t.a.length)),t.b&&t.b.length&&(l=Math.min(l,t.b.length)),t._length=l}return!0}},83372:function(e,t,r){"use strict";var n=r(21776).Ks,i=r(6096),a=r(49084),o=r(45464),s=r(22548).defaultLine,l=r(92880).extendFlat,u=i.marker.line;e.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:i.locationmode,z:{valType:"data_array",editType:"calc"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},u.color,{dflt:s}),width:l({},u.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:i.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a("",{cLetter:"z",editTypeOverride:"calc"}))},7924:function(e,t,r){"use strict";var n=r(38248),i=r(39032).BADNUM,a=r(47128),o=r(20148),s=r(4500);function l(e){return e&&"string"===typeof e}e.exports=function(e,t){var r,u=t._length,c=new Array(u);r=t.geojson?function(e){return l(e)||n(e)}:l;for(var f=0;f")}}(e,f,o),[e]}},54272:function(e,t,r){"use strict";e.exports={attributes:r(83372),supplyDefaults:r(30972),colorbar:r(96288),calc:r(7924),calcGeoJSON:r(88364).calcGeoJSON,plot:r(88364).plot,style:r(7947).style,styleOnSelect:r(7947).styleOnSelect,hoverPoints:r(69224),eventData:r(52428),selectPoints:r(17328),moduleType:"trace",name:"choropleth",basePlotModule:r(10816),categories:["geo","noOpacity","showLegend"],meta:{}}},88364:function(e,t,r){"use strict";var n=r(33428),i=r(3400),a=r(27144),o=r(59972).getTopojsonFeatures,s=r(19280).findExtremes,l=r(7947).style;e.exports={calcGeoJSON:function(e,t){for(var r=e[0].trace,n=t[r.geo],i=n._subplot,l=r.locationmode,u=r._length,c="geojson-id"===l?a.extractTraceFeature(e):o(r,i.topojson),f=[],d=[],h=0;h=0;n--){var i=r[n].id;if("string"===typeof i&&0===i.indexOf("water"))for(var a=n+1;a=0;r--)e.removeLayer(t[r][1])},s.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},e.exports=function(e,t){var r=t[0].trace,i=new o(e,r.uid),a=i.sourceId,s=n(t),l=i.below=e.belowLookup["trace-"+r.uid];return e.map.addSource(a,{type:"geojson",data:s.geojson}),i._addLayers(s,l),t[0].trace._glTrace=i,i}},86040:function(e,t,r){"use strict";var n=r(49084),i=r(29736).axisHoverFormat,a=r(21776).Ks,o=r(52948),s=r(45464),l=r(92880).extendFlat,u={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["norm"]}),uhoverformat:i("u",1),vhoverformat:i("v",1),whoverformat:i("w",1),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),showlegend:l({},s.showlegend,{dflt:!1})};l(u,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(e){u[e]=o[e]})),u.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),u.transforms=void 0,e.exports=u},83344:function(e,t,r){"use strict";var n=r(47128);e.exports=function(e,t){for(var r=t.u,i=t.v,a=t.w,o=Math.min(t.x.length,t.y.length,t.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,u=0;uo.level||o.starts.length&&a===o.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,u=-1/0,c=1/0;for(r=0;r":h>u&&(n.prefixBoundary=!0);break;case"<":(hu||n.starts.length&&d===c)&&(n.prefixBoundary=!0);break;case"][":f=Math.min(h[0],h[1]),d=Math.max(h[0],h[1]),fu&&(n.prefixBoundary=!0)}}}},55296:function(e,t,r){"use strict";var n=r(8932),i=r(41076),a=r(46960);e.exports={min:"zmin",max:"zmax",calc:function(e,t,r){var o=t.contours,s=t.line,l=o.size||1,u=o.coloring,c=i(t,{isColorbar:!0});if("heatmap"===u){var f=n.extractOpts(t);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else"fill"===u&&(r._fillcolor=c);r._line={color:"lines"===u?c:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},93252:function(e){"use strict";e.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},95536:function(e,t,r){"use strict";var n=r(38248),i=r(17428),a=r(76308),o=a.addOpacity,s=a.opacity,l=r(69104),u=r(3400).isArrayOrTypedArray,c=l.CONSTRAINT_REDUCTION,f=l.COMPARISON_OPS2;e.exports=function(e,t,r,a,l,d){var h,p,v,m=t.contours,g=r("contours.operation");m._operation=c[g],function(e,t){var r;-1===f.indexOf(t.operation)?(e("contours.value",[0,1]),u(t.value)?t.value.length>2?t.value=t.value.slice(2):0===t.length?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:n(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),n(t.value)||(u(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}(r,m),"="===g?h=m.showlines=!0:(h=r("contours.showlines"),v=r("fillcolor",o((e.line||{}).color||l,.5))),h&&(p=r("line.color",v&&s(v)?o(t.fillcolor,1):l),r("line.width",2),r("line.dash")),r("line.smoothing"),i(r,a,p,d)}},3212:function(e,t,r){"use strict";var n=r(69104),i=r(38248);function a(e,t){var r,a=Array.isArray(t);function o(e){return i(e)?+e:null}return-1!==n.COMPARISON_OPS2.indexOf(e)?r=o(a?t[0]:t):-1!==n.INTERVAL_OPS.indexOf(e)?r=a?[o(t[0]),o(t[1])]:[o(t),o(t)]:-1!==n.SET_OPS.indexOf(e)&&(r=a?t.map(o):[o(t)]),r}function o(e){return function(t){t=a(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function s(e){return function(t){return{start:t=a(e,t),end:1/0,size:1/0}}}e.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},84952:function(e){"use strict";e.exports=function(e,t,r,n){var i=n("contours.start"),a=n("contours.end"),o=!1===i||!1===a,s=r("contours.size");!(o?t.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},82172:function(e,t,r){"use strict";var n=r(3400);function i(e){return n.extendFlat({},e,{edgepaths:n.extendDeep([],e.edgepaths),paths:n.extendDeep([],e.paths),starts:n.extendDeep([],e.starts)})}e.exports=function(e,t){var r,a,o,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&n.warn("Contour data invalid for the specified inequality operation."),a=e[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",e);break}return l}},46960:function(e){"use strict";e.exports=function(e){return e.end+e.size/1e6}},88748:function(e,t,r){"use strict";var n=r(3400),i=r(93252);function a(e,t,r,n){return Math.abs(e[0]-t[0])20&&t?208===e||1114===e?n=0===r[0]?1:-1:a=0===r[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(e)?a=1:-1!==i.LEFTSTART.indexOf(e)?n=1:-1!==i.TOPSTART.indexOf(e)?a=-1:n=-1,[n,a]}(d,r,t),p=[l(e,t,[-h[0],-h[1]])],v=e.z.length,m=e.z[0].length,g=t.slice(),y=h.slice();for(c=0;c<1e4;c++){if(d>20?(d=i.CHOOSESADDLE[d][(h[0]||h[1])<0?0:1],e.crossings[f]=i.SADDLEREMAINDER[d]):delete e.crossings[f],!(h=i.NEWDELTA[d])){n.log("Found bad marching index:",d,t,e.level);break}p.push(l(e,t,h)),t[0]+=h[0],t[1]+=h[1],f=t.join(","),a(p[p.length-1],p[p.length-2],s,u)&&p.pop();var x=h[0]&&(t[0]<0||t[0]>m-2)||h[1]&&(t[1]<0||t[1]>v-2);if(t[0]===g[0]&&t[1]===g[1]&&h[0]===y[0]&&h[1]===y[1]||r&&x)break;d=e.crossings[f]}1e4===c&&n.log("Infinite loop in contour?");var b,_,w,k,T,A,M,S,E,C,L,P=a(p[0],p[p.length-1],s,u),O=0,I=.2*e.smoothing,R=[],D=0;for(c=1;c=D;c--)if((b=R[c])=D&&b+R[_]S&&E--,e.edgepaths[E]=L.concat(p,C));break}B||(e.edgepaths[S]=p.concat(C))}for(S=0;S=y)&&(r<=g&&(r=g),o>=y&&(o=y),l=Math.floor((o-r)/s)+1,u=0),d=0;dg&&(v.unshift(g),m.unshift(m[0])),v[v.length-1]e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(e){var t,r,a,o,s,l,u,c,f,d=e[0].z,h=d.length,p=d[0].length,v=2===h||2===p;for(r=0;r=0&&(n=y,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-y[1])<.01&&(y[0]-r[0])*(n[0]-y[0])>=0&&(n=y,s=l):i.log("endpt to newendpt is not vert. or horz.",r,n,y)}if(r=n,s>=0)break;f+="L"+n}if(s===e.edgepaths.length){i.log("unclosed perimeter path");break}d=s,(p=-1===h.indexOf(d))&&(d=h[0],f+="Z")}for(d=0;dn.center?n.right-s:s-n.left)/(c+Math.abs(Math.sin(u)*o)),h=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(u)*o);if(d<1||h<1)return 1/0;var p=g.EDGECOST*(1/(d-1)+1/(h-1));p+=g.ANGLECOST*u*u;for(var v=s-c,m=l-f,y=s+c,x=l+f,b=0;b2*g.MAXCOST)break;h&&(s/=2),l=(o=u-s/2)+1.5*s}if(d<=g.MAXCOST)return c},t.addLabelData=function(e,t,r,n){var i=t.fontSize,a=t.width+i/3,o=Math.max(0,t.height-i/3),s=e.x,l=e.y,u=e.theta,c=Math.sin(u),f=Math.cos(u),d=function(e,t){return[s+e*f-t*c,l+e*c+t*f]},h=[d(-a/2,-o/2),d(-a/2,o/2),d(a/2,o/2),d(a/2,-o/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:u,level:t.level,width:a,height:o}),n.push(h)},t.drawLabels=function(e,t,r,a,o){var l=e.selectAll("text").data(t,(function(e){return e.text+","+e.x+","+e.y+","+e.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(e){var t=e.x+Math.sin(e.theta)*e.dy,i=e.y-Math.cos(e.theta)*e.dy;n.select(this).text(e.text).attr({x:t,y:i,transform:"rotate("+180*e.theta/Math.PI+" "+t+" "+i+")"}).call(s.convertToTspans,r)})),o){for(var u="",c=0;cr.end&&(r.start=r.end=(r.start+r.end)/2),e._input.contours||(e._input.contours={}),i.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if("constraint"!==r.type){var u,c=r.start,f=r.end,d=e._input.contours;c>f&&(r.start=d.start=f,f=r.end=d.end=c,c=r.start),r.size>0||(u=c===f?1:a(c,f,e.ncontours).dtick,d.size=r.size=u)}}},52440:function(e,t,r){"use strict";var n=r(33428),i=r(43616),a=r(41648),o=r(41076);e.exports=function(e){var t=n.select(e).selectAll("g.contour");t.style("opacity",(function(e){return e[0].trace.opacity})),t.each((function(e){var t=n.select(this),r=e[0].trace,a=r.contours,s=r.line,l=a.size||1,u=a.start,c="constraint"===a.type,f=!c&&"lines"===a.coloring,d=!c&&"fill"===a.coloring,h=f||d?o(r):null;t.selectAll("g.contourlevel").each((function(e){n.select(this).selectAll("path").call(i.lineGroupStyle,s.width,f?h(e.level):s.color,s.dash)}));var p=a.labelfont;if(t.selectAll("g.contourlabels text").each((function(e){i.font(n.select(this),{weight:p.weight,style:p.style,variant:p.variant,textcase:p.textcase,lineposition:p.lineposition,shadow:p.shadow,family:p.family,size:p.size,color:p.color||(f?h(e.level):s.color)})})),c)t.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(d){var v;t.selectAll("g.contourfill path").style("fill",(function(e){return void 0===v&&(v=e.level),h(e.level+.5*l)})),void 0===v&&(v=u),t.selectAll("g.contourbg path").style("fill",h(v-.5*l))}})),a(e)}},97680:function(e,t,r){"use strict";var n=r(27260),i=r(17428);e.exports=function(e,t,r,a,o){var s,l=r("contours.coloring"),u="";"fill"===l&&(s=r("contours.showlines")),!1!==s&&("lines"!==l&&(u=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,n(e,t,a,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),i(r,a,u,o)}},37960:function(e,t,r){"use strict";var n=r(83328),i=r(67104),a=r(49084),o=r(92880).extendFlat,s=i.contours;e.exports=o({carpet:{valType:"string",editType:"calc"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},zorder:i.zorder,transforms:void 0},a("",{cLetter:"z",autoColorDflt:!1}))},30572:function(e,t,r){"use strict";var n=r(47128),i=r(3400),a=r(2872),o=r(26136),s=r(70448),l=r(11240),u=r(35744),c=r(3252),f=r(50948),d=r(54444);e.exports=function(e,t){var r=t._carpetTrace=f(e,t);if(r&&r.visible&&"legendonly"!==r.visible){if(!t.a||!t.b){var h=e.data[r.index],p=e.data[t.index];p.a||(p.a=h.a),p.b||(p.b=h.b),c(p,t,t._defaultColor,e._fullLayout)}var v=function(e,t){var r,c,f,d,h,p,v,m=t._carpetTrace,g=m.aaxis,y=m.baxis;g._minDtick=0,y._minDtick=0,i.isArray1D(t.z)&&a(t,g,y,"a","b",["z"]),r=t._a=t._a||t.a,d=t._b=t._b||t.b,r=r?g.makeCalcdata(t,"_a"):[],d=d?y.makeCalcdata(t,"_b"):[],c=t.a0||0,f=t.da||1,h=t.b0||0,p=t.db||1,v=t._z=o(t._z||t.z,t.transpose),t._emptypoints=l(v),s(v,t._emptypoints);var x=i.maxRowLength(v),b="scaled"===t.xtype?"":r,_=u(t,b,c,f,x,g),w="scaled"===t.ytype?"":d,k=u(t,w,h,p,v.length,y),T={a:_,b:k,z:v};return"levels"===t.contours.type&&"none"!==t.contours.coloring&&n(e,t,{vals:v,containerStr:"",cLetter:"z"}),[T]}(e,t);return d(t,t._z),v}}},3252:function(e,t,r){"use strict";var n=r(3400),i=r(51264),a=r(37960),o=r(95536),s=r(84952),l=r(97680);e.exports=function(e,t,r,u){function c(r,i){return n.coerce(e,t,a,r,i)}if(c("carpet"),e.a&&e.b){if(!i(e,t,c,u,"a","b"))return void(t.visible=!1);c("text"),"constraint"===c("contours.type")?o(e,t,c,u,r,{hasHover:!1}):(s(e,t,c,(function(r){return n.coerce2(e,t,a,r)})),l(e,t,c,u,{hasHover:!1}))}else t._defaultColor=r,t._length=null;c("zorder")}},40448:function(e,t,r){"use strict";e.exports={attributes:r(37960),supplyDefaults:r(3252),colorbar:r(55296),calc:r(30572),plot:r(94440),style:r(52440),moduleType:"trace",name:"contourcarpet",basePlotModule:r(57952),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},94440:function(e,t,r){"use strict";var n=r(33428),i=r(87072),a=r(53416),o=r(43616),s=r(3400),l=r(72424),u=r(88748),c=r(23676),f=r(93252),d=r(82172),h=r(61512),p=r(56008),v=r(50948),m=r(77712);function g(e,t,r){var n=e.getPointAtLength(t),i=e.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function y(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function x(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]);return Math.sqrt(1-r*r)/r}e.exports=function(e,t,r,b){var _=t.xaxis,w=t.yaxis;s.makeTraceGroups(b,r,"contour").each((function(r){var b=n.select(this),k=r[0],T=k.trace,A=T._carpetTrace=v(e,T),M=e.calcdata[A.index][0];if(A.visible&&"legendonly"!==A.visible){var S=k.a,E=k.b,C=T.contours,L=h(C,t,k),P="constraint"===C.type,O=C._operation,I=P?"="===O?"lines":"fill":C.coloring,R=[[S[0],E[E.length-1]],[S[S.length-1],E[E.length-1]],[S[S.length-1],E[0]],[S[0],E[0]]];l(L);var D=1e-8*(S[S.length-1]-S[0]),z=1e-8*(E[E.length-1]-E[0]);u(L,D,z);var F,N,B,j,U=L;"constraint"===C.type&&(U=d(L,O)),function(e,t){var r,n,i,a,o,s,l,u,c;for(r=0;r=0;j--)F=M.clipsegments[j],N=i([],F.x,_.c2p),B=i([],F.y,w.c2p),N.reverse(),B.reverse(),q.push(a(N,B,F.bicubic));var V="M"+q.join("L")+"Z";!function(e,t,r,n,o,l){var u,c,f,d,h=s.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);h.enter().append("path"),h.exit().remove();var p=[];for(d=0;d=0&&(d=C,p=v):Math.abs(f[1]-d[1])=0&&(d=C,p=v):s.log("endpt to newendpt is not vert. or horz.",f,d,C)}if(p>=0)break;y+=S(f,d),f=d}if(p===t.edgepaths.length){s.log("unclosed perimeter path");break}c=p,(b=-1===x.indexOf(c))&&(c=x[0],y+=S(f,d)+"Z",f=null)}for(c=0;cv&&(n.max=v),n.len=n.max-n.min}function m(e,t){var r,n=0,o=.1;return(Math.abs(e[0]-l)0?+h[c]:0),f.push({type:"Feature",geometry:{type:"Point",coordinates:g},properties:y})}}var b=o.extractOpts(t),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],k=["interpolate",["linear"],["heatmap-density"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(c=1;c<_.length;c++)k.push(_[c][0],_[c][1]);var T=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return i.extendFlat(u.heatmap.paint,{"heatmap-weight":p?T:1/(b.max-b.min),"heatmap-color":k,"heatmap-radius":v?{type:"identity",property:"r"}:t.radius,"heatmap-opacity":t.opacity}),u.geojson={type:"FeatureCollection",features:f},u.heatmap.layout.visibility="visible",u}},97664:function(e,t,r){"use strict";var n=r(3400),i=r(27260),a=r(33928);e.exports=function(e,t,r,o){function s(r,i){return n.coerce(e,t,a,r,i)}var l=s("lon")||[],u=s("lat")||[],c=Math.min(l.length,u.length);c?(t._length=c,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),i(e,t,o,s,{prefix:"",cLetter:"z"})):t.visible=!1}},96176:function(e){"use strict";e.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}},25336:function(e,t,r){"use strict";var n=r(54460),i=r(63312).hoverPoints,a=r(63312).getExtraText;e.exports=function(e,t,r){var o=i(e,t,r);if(o){var s=o[0],l=s.cd,u=l[0].trace,c=l[s.index];if(delete s.color,"z"in c){var f=s.subplot.mockAxis;s.z=c.z,s.zLabel=n.tickText(f,f.c2l(c.z),"hover").text}return s.extraText=a(u,c,l[0].t.labels),[s]}}},15088:function(e,t,r){"use strict";e.exports={attributes:r(33928),supplyDefaults:r(97664),colorbar:r(96288),formatLabels:r(11960),calc:r(90876),plot:r(35256),hoverPoints:r(25336),eventData:r(96176),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n=0;r--)e.removeLayer(t[r][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},e.exports=function(e,t){var r=t[0].trace,i=new a(e,r.uid),o=i.sourceId,s=n(t),l=i.below=e.belowLookup["trace-"+r.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),i}},74248:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){for(var r=0;r"),l.color=function(e,t){var r=e.marker,i=t.mc||r.color,a=t.mlc||r.line.color,o=t.mlw||r.line.width;return n(i)?i:n(a)&&o?a:void 0}(c,d),[l]}}},94704:function(e,t,r){"use strict";e.exports={attributes:r(20088),layoutAttributes:r(7076),supplyDefaults:r(45432).supplyDefaults,crossTraceDefaults:r(45432).crossTraceDefaults,supplyLayoutDefaults:r(11631),calc:r(23096),crossTraceCalc:r(4804),plot:r(42200),style:r(44544).style,hoverPoints:r(31488),eventData:r(34580),selectPoints:r(45784),moduleType:"trace",name:"funnel",basePlotModule:r(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},7076:function(e){"use strict";e.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},11631:function(e,t,r){"use strict";var n=r(3400),i=r(7076);e.exports=function(e,t,r){var a=!1;function o(r,a){return n.coerce(e,t,i,r,a)}for(var s=0;s path").each((function(e){if(!e.isBlank){var t=s.marker;n.select(this).call(a.fill,e.mc||t.color).call(a.stroke,e.mlc||t.line.color).call(i.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",s.selectedpoints&&!e.selected?o:1)}})),u(r,s,e),r.selectAll(".regions").each((function(){n.select(this).selectAll("path").style("stroke-width",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(".lines").each((function(){var e=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},22332:function(e,t,r){"use strict";var n=r(74996),i=r(45464),a=r(86968).u,o=r(21776).Ks,s=r(21776).Gw,l=r(92880).extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:"calc"},pattern:n.marker.pattern,editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:["label","text","value","percent"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:l({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),textposition:l({},n.textposition,{values:["inside","none"],dflt:"inside"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:a({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},91248:function(e,t,r){"use strict";var n=r(7316);t.name="funnelarea",t.plot=function(e,r,i,a){n.plotBasePlot(t.name,e,r,i,a)},t.clean=function(e,r,i,a){n.cleanBasePlot(t.name,e,r,i,a)}},54e3:function(e,t,r){"use strict";var n=r(45768);e.exports={calc:function(e,t){return n.calc(e,t)},crossTraceCalc:function(e){n.crossTraceCalc(e,{type:"funnelarea"})}}},92688:function(e,t,r){"use strict";var n=r(3400),i=r(22332),a=r(86968).Q,o=r(31508).handleText,s=r(74174).handleLabelsAndValues,l=r(74174).handleMarkerDefaults;e.exports=function(e,t,r,u){function c(r,a){return n.coerce(e,t,i,r,a)}var f=c("labels"),d=c("values"),h=s(f,d),p=h.len;if(t._hasLabels=h.hasLabels,t._hasValues=h.hasValues,!t._hasLabels&&t._hasValues&&(c("label0"),c("dlabel")),p){t._length=p,l(e,t,u,c),c("scalegroup");var v,m=c("text"),g=c("texttemplate");if(g||(v=c("textinfo",Array.isArray(m)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),g||v&&"none"!==v){var y=c("textposition");o(e,t,u,c,y,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else"none"===v&&c("textposition","none");a(t,u,c),c("title.text")&&(c("title.position"),n.coerceFont(c,"title.font",u.font)),c("aspectratio"),c("baseratio")}else t.visible=!1}},62396:function(e,t,r){"use strict";e.exports={moduleType:"trace",name:"funnelarea",basePlotModule:r(91248),categories:["pie-like","funnelarea","showLegend"],attributes:r(22332),layoutAttributes:r(61280),supplyDefaults:r(92688),supplyLayoutDefaults:r(35384),calc:r(54e3).calc,crossTraceCalc:r(54e3).crossTraceCalc,plot:r(39472),style:r(62096),styleOne:r(10528),meta:{}}},61280:function(e,t,r){"use strict";var n=r(85204).hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},35384:function(e,t,r){"use strict";var n=r(3400),i=r(61280);e.exports=function(e,t){function r(r,a){return n.coerce(e,t,i,r,a)}r("hiddenlabels"),r("funnelareacolorway",t.colorway),r("extendfunnelareacolors")}},39472:function(e,t,r){"use strict";var n=r(33428),i=r(43616),a=r(3400),o=a.strScale,s=a.strTranslate,l=r(72736),u=r(98184).toMoveInsideBar,c=r(82744),f=c.recordMinTextSize,d=c.clearMinTextSize,h=r(69656),p=r(37820),v=p.attachFxHandlers,m=p.determineInsideTextFont,g=p.layoutAreas,y=p.prerenderTitles,x=p.positionTitleOutside,b=p.formatSliceLabel;function _(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}function w(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}e.exports=function(e,t){var r=e._context.staticPlot,c=e._fullLayout;d("funnelarea",c),y(t,e),g(t,c._size),a.makeTraceGroups(c._funnelarealayer,t,"trace").each((function(t){var d=n.select(this),p=t[0],g=p.trace;!function(e){if(e.length){var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o,s,l=Math.pow(i,2),u=t.vTotal,c=u,f=u*l/(1-l)/u,d=[];for(d.push(E()),o=e.length-1;o>-1;o--)if(!(s=e[o]).hidden){var h=s.v/c;f+=h,d.push(E())}var p=1/0,v=-1/0;for(o=0;o-1;o--)if(!(s=e[o]).hidden){var A=d[T+=1][0],M=d[T][1];s.TL=[-A,M],s.TR=[A,M],s.BL=_,s.BR=k,s.pxmid=w(s.TR,s.BR),_=s.TL,k=s.TR}}function S(){var e=Math.sqrt(f);return{x:e,y:-e}}function E(){var e=S();return[e.x,e.y]}}(t),d.each((function(){var d=n.select(this).selectAll("g.slice").data(t);d.enter().append("g").classed("slice",!0),d.exit().remove(),d.each((function(o,s){if(o.hidden)n.select(this).selectAll("path,g").remove();else{o.pointNumber=o.i,o.curveNumber=g.index;var d=p.cx,y=p.cy,x=n.select(this),w=x.selectAll("path.surface").data([o]);w.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),x.call(v,e,t);var k="M"+(d+o.TR[0])+","+(y+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+"Z";w.attr("d",k),b(e,o,p);var T=h.castOption(g.textposition,o.pts),A=x.selectAll("g.slicetext").data(o.text&&"none"!==T?[0]:[]);A.enter().append("g").classed("slicetext",!0),A.exit().remove(),A.each((function(){var r=a.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),h=a.ensureUniformFontSize(e,m(g,o,c.font));r.text(o.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,h).call(l.convertToTspans,e);var p,v,x,b=i.bBox(r.node()),_=Math.min(o.BL[1],o.BR[1])+y,w=Math.max(o.TL[1],o.TR[1])+y;v=Math.max(o.TL[0],o.BL[0])+d,x=Math.min(o.TR[0],o.BR[0])+d,(p=u(v,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=h.size,f(g.type,p,c),t[s].transform=p,a.setTransormAndDisplay(r,p)}))}}));var y=n.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);y.enter().append("g").classed("titletext",!0),y.exit().remove(),y.each((function(){var t=a.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),r=g.title.text;g._meta&&(r=a.templateString(r,g._meta)),t.text(r).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,g.title.font).call(l.convertToTspans,e);var u=x(p,c._size);t.attr("transform",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},62096:function(e,t,r){"use strict";var n=r(33428),i=r(10528),a=r(82744).resizeText;e.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");a(e,t,"funnelarea"),t.each((function(t){var r=t[0].trace,a=n.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each((function(t){n.select(this).call(i,t,r,e)}))}))}},83328:function(e,t,r){"use strict";var n=r(52904),i=r(45464),a=r(25376),o=r(29736).axisHoverFormat,s=r(21776).Ks,l=r(21776).Gw,u=r(49084),c=r(92880).extendFlat;e.exports=c({z:{valType:"data_array",editType:"calc"},x:c({},n.x,{impliedEdits:{xtype:"array"}}),x0:c({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:c({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:c({},n.y,{impliedEdits:{ytype:"array"}}),y0:c({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:c({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:c({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:c({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:c({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:c({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:c({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:c({},n.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:a({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:c({},i.showlegend,{dflt:!1}),zorder:n.zorder},{transforms:void 0},u("",{cLetter:"z",autoColorDflt:!1}))},19512:function(e,t,r){"use strict";var n=r(24040),i=r(3400),a=r(54460),o=r(1220),s=r(55480),l=r(47128),u=r(2872),c=r(26136),f=r(70448),d=r(11240),h=r(35744),p=r(39032).BADNUM;function v(e){for(var t=[],r=e.length,n=0;n1){var t=(e[e.length-1]-e[0])/(e.length-1),r=Math.abs(t/100);for(T=0;Tr)return!1}return!0}(M.rangebreaks||S.rangebreaks)&&(k=function(e,t,r){for(var n=[],i=-1,a=0;a=0;o--)(s=((f[[(r=(a=d[o])[0])-1,i=a[1]]]||v)[2]+(f[[r+1,i]]||v)[2]+(f[[r,i-1]]||v)[2]+(f[[r,i+1]]||v)[2])/20)&&(l[a]=[r,i,s],d.splice(o,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(a in l)f[a]=l[a],c.push(l[a])}return c.sort((function(e,t){return t[2]-e[2]}))}},55512:function(e,t,r){"use strict";var n=r(93024),i=r(3400),a=i.isArrayOrTypedArray,o=r(54460),s=r(8932).extractOpts;e.exports=function(e,t,r,l,u){u||(u={});var c,f,d,h,p=u.isContour,v=e.cd[0],m=v.trace,g=e.xa,y=e.ya,x=v.x,b=v.y,_=v.z,w=v.xCenter,k=v.yCenter,T=v.zmask,A=m.zhoverformat,M=x,S=b;if(!1!==e.index){try{d=Math.round(e.index[1]),h=Math.round(e.index[0])}catch(j){return void i.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index)}if(d<0||d>=_[0].length||h<0||h>_.length)return}else{if(n.inbox(t-x[0],t-x[x.length-1],0)>0||n.inbox(r-b[0],r-b[b.length-1],0)>0)return;if(p){var E;for(M=[2*x[0]-x[1]],E=1;Ev&&(g=Math.max(g,Math.abs(e[a][o]-p)/(m-v))))}return g}e.exports=function(e,t){var r,i=1;for(o(e,t),r=0;r.01;r++)i=o(e,t,a(i));return i>.01&&n.log("interp2d didn't converge quickly",i),e}},39096:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){e("texttemplate");var r=n.extendFlat({},t.font,{color:"auto",size:"auto"});n.coerceFont(e,"textfont",r)}},35744:function(e,t,r){"use strict";var n=r(24040),i=r(3400).isArrayOrTypedArray;e.exports=function(e,t,r,a,o,s){var l,u,c,f=[],d=n.traceIs(e,"contour"),h=n.traceIs(e,"histogram"),p=n.traceIs(e,"gl2d");if(i(t)&&t.length>1&&!h&&"category"!==s.type){var v=t.length;if(!(v<=o))return d?t.slice(0,o):t.slice(0,o+1);if(d||p)f=Array.from(t).slice(0,o);else if(1===o)f="log"===s.type?[.5*t[0],2*t[0]]:[t[0]-.5,t[0]+.5];else if("log"===s.type){for(f=[Math.pow(t[0],1.5)/Math.pow(t[1],.5)],c=1;c0;)T=A.c2p(B[L]),L--;for(T0;)C=M.c2p(j[L]),L--;C=A._length||T<=0||E>=M._length||C<=0)return I.selectAll("image").data([]).exit().remove(),void b(I);"fast"===X?(J=W,$=G):(J=Q,$=ee);var te=document.createElement("canvas");te.width=J,te.height=$;var re,ne,ie=te.getContext("2d",{willReadFrequently:!0}),ae=h(D,{noNumericCheck:!0,returnArray:!0});"fast"===X?(re=Y?function(e){return W-1-e}:l.identity,ne=Z?function(e){return G-1-e}:l.identity):(re=function(e){return l.constrain(Math.round(A.c2p(B[e])-r),0,Q)},ne=function(e){return l.constrain(Math.round(M.c2p(j[e])-E),0,ee)});var oe,se,le,ue,ce=ne(0),fe=[ce,ce],de=Y?0:1,he=Z?0:1,pe=0,ve=0,me=0,ge=0;function ye(e,t){if(void 0!==e){var r=ae(e);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),pe+=t,ve+=r[0]*t,me+=r[1]*t,ge+=r[2]*t,r}return[0,0,0,0]}function xe(e,t,r,n){var i=e[r.bin0];if(void 0===i)return ye(void 0,1);var a,o=e[r.bin1],s=t[r.bin0],l=t[r.bin1],u=o-i||0,c=s-i||0;return a=void 0===o?void 0===l?0:void 0===s?2*(l-i):2*(2*l-s-i)/3:void 0===l?void 0===s?0:2*(2*i-o-s)/3:void 0===s?2*(2*l-o-i)/3:l+i-o-s,ye(i+r.frac*u+n.frac*(c+r.frac*a))}if("default"!==X){var be,_e=0;try{be=new Uint8Array(J*$*4)}catch(mt){be=new Array(J*$*4)}if("smooth"===X){var we,ke,Te,Ae=U||B,Me=q||j,Se=new Array(Ae.length),Ee=new Array(Me.length),Ce=new Array(Q),Le=U?w:_,Pe=q?w:_;for(L=0;LXe||Xe>M._length))for(P=Ge;PJe||Je>A._length)){var $e=c({x:Ke,y:Ze},D,e._fullLayout);$e.x=Ke,$e.y=Ze;var Qe=R.z[L][P];void 0===Qe?($e.z="",$e.zLabel=""):($e.z=Qe,$e.zLabel=s.tickText(Ue,Qe,"hover").text);var et=R.text&&R.text[L]&&R.text[L][P];void 0!==et&&!1!==et||(et=""),$e.text=et;var tt=l.texttemplateString(Be,$e,e._fullLayout._d3locale,$e,D._meta||{});if(tt){var rt=tt.split("
"),nt=rt.length,it=0;for(O=0;O0&&(a=!0);for(var l=0;la){var o=a-r[e];return r[e]=a,o}}return 0},max:function(e,t,r,i){var a=i[t];if(n(a)){if(a=Number(a),!n(r[e]))return r[e]=a,a;if(r[e]u?e>o?e>1.1*i?i:e>1.1*a?a:o:e>s?s:e>l?l:u:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function h(e,t,r,n,a,s){if(n&&e>o){var l=p(t,a,s),u=p(r,a,s),c=e===i?0:1;return l[c]!==u[c]}return Math.floor(r/e)-Math.floor(t/e)>.1}function p(e,t,r){var n=t.c2d(e,i,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}e.exports=function(e,t,r,n,a){var s,l,u=-1.1*t,d=-.1*t,h=e-d,p=r[0],v=r[1],m=Math.min(f(p+d,p+h,n,a),f(v+d,v+h,n,a)),g=Math.min(f(p+u,p+d,n,a),f(v+u,v+d,n,a));if(m>g&&go){var y=s===i?1:6,x=s===i?"M12":"M1";return function(t,r){var o=n.c2d(t,i,a),s=o.indexOf("-",y);s>0&&(o=o.substr(0,s));var u=n.d2c(o,0,a);if(ur.r2l(N)&&(j=o.tickIncrement(j,b.size,!0,h)),R.start=r.l2r(j),F||i.nestedProperty(t,g+".start").set(R.start)}var U=b.end,q=r.r2l(I.end),V=void 0!==q;if((b.endFound||V)&&q!==r.r2l(U)){var H=V?q:i.aggNums(Math.max,null,p);R.end=r.l2r(H),V||i.nestedProperty(t,g+".start").set(R.end)}var G="autobin"+s;return!1===t._input[G]&&(t._input[g]=i.extendFlat({},t[g]||{}),delete t._input[G],delete t[G]),[R,p]}e.exports={calc:function(e,t){var r,a,h,p,v=[],m=[],g="h"===t.orientation,y=o.getFromId(e,g?t.yaxis:t.xaxis),x=g?"y":"x",b={x:"y",y:"x"}[x],_=t[x+"calendar"],w=t.cumulative,k=d(e,t,y,x),T=k[0],A=k[1],M="string"===typeof T.size,S=[],E=M?S:T,C=[],L=[],P=[],O=0,I=t.histnorm,R=t.histfunc,D=-1!==I.indexOf("density");w.enabled&&D&&(I=I.replace(/ ?density$/,""),D=!1);var z,F="max"===R||"min"===R?null:0,N=l.count,B=u[I],j=!1,U=function(e){return y.r2c(e,0,_)};for(i.isArrayOrTypedArray(t[b])&&"count"!==R&&(z=t[b],j="avg"===R,N=l[R]),r=U(T.start),h=U(T.end)+(r-o.tickIncrement(r,T.size,!1,_))/1e6;r=0&&p=0;n--)s(n);else if("increasing"===t){for(n=1;n=0;n--)e[n]+=e[n+1];"exclude"===r&&(e.push(0),e.shift())}}(m,w.direction,w.currentbin);var J=Math.min(v.length,m.length),$=[],Q=0,ee=J-1;for(r=0;r=Q;r--)if(m[r]){ee=r;break}for(r=Q;r<=ee;r++)if(n(v[r])&&n(m[r])){var te={p:v[r],s:m[r],b:0};w.enabled||(te.pts=P[r],W?te.ph0=te.ph1=P[r].length?A[P[r][0]]:v[r]:(t._computePh=!0,te.ph0=H(S[r]),te.ph1=H(S[r+1],!0))),$.push(te)}return 1===$.length&&($[0].width1=o.tickIncrement($[0].p,T.size,!1,_)-$[0].p),s($,t),i.isArrayOrTypedArray(t.selectedpoints)&&i.tagSelected($,t,X),$},calcAllAutoBins:d}},73316:function(e){"use strict";e.exports={eventDataKeys:["binNumber"]}},80536:function(e,t,r){"use strict";var n=r(3400),i=r(79811),a=r(24040).traceIs,o=r(20011),s=r(31508).validateCornerradius,l=n.nestedProperty,u=r(71888).getAxisGroup,c=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],f=["x","y"];e.exports=function(e,t){var r,d,h,p,v,m,g,y=t._histogramBinOpts={},x=[],b={},_=[];function w(e,t){return n.coerce(r._input,r,r._module.attributes,e,t)}function k(e){return"v"===e.orientation?"x":"y"}function T(e,r,a){var o=e.uid+"__"+a;r||(r=o);var s=function(e,r){return i.getFromTrace({_fullLayout:t},e,r).type}(e,a),l=e[a+"calendar"]||"",u=y[r],c=!0;u&&(s===u.axType&&l===u.calendar?(c=!1,u.traces.push(e),u.dirs.push(a)):(r=o,s!==u.axType&&n.warn(["Attempted to group the bins of trace",e.index,"set on a","type:"+s,"axis","with bins on","type:"+u.axType,"axis."].join(" ")),l!==u.calendar&&n.warn(["Attempted to group the bins of trace",e.index,"set with a",l,"calendar","with bins",u.calendar?"on a "+u.calendar+" calendar":"w/o a set calendar"].join(" ")))),c&&(y[r]={traces:[e],dirs:[a],axType:s,calendar:e[a+"calendar"]||""}),e["_"+a+"bingroup"]=r}for(v=0;vS&&k.splice(S,k.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],C=[],L=[],P="string"===typeof w.size,O="string"===typeof A.size,I=[],R=[],D=P?I:w,z=O?R:A,F=0,N=[],B=[],j=t.histnorm,U=t.histfunc,q=-1!==j.indexOf("density"),V="max"===U||"min"===U?null:0,H=a.count,G=o[j],W=!1,Y=[],Z=[],X="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";X&&"count"!==U&&(W="avg"===U,H=a[U]);var K=w.size,J=x(w.start),$=x(w.end)+(J-i.tickIncrement(J,K,!1,g))/1e6;for(r=J;r<$;r=i.tickIncrement(r,K,!1,g))C.push(V),I.push(r),W&&L.push(0);I.push(r);var Q,ee=C.length,te=(r-J)/ee,re=(Q=J+te/2,v.c2r(Q,0,g)),ne=A.size,ie=b(A.start),ae=b(A.end)+(ie-i.tickIncrement(ie,ne,!1,y))/1e6;for(r=ie;r=0&&h=0&&p-1,flipY:L.tiling.flip.indexOf("y")>-1,orientation:L.tiling.orientation,pad:{inner:L.tiling.pad},maxDepth:L._maxDepth}).descendants(),D=1/0,z=-1/0;R.forEach((function(e){var t=e.depth;t>=L._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(D=Math.min(D,t),z=Math.max(z,t))})),p=p.data(R,c.getPtId),L._maxVisibleLayers=isFinite(z)?z-D+1:0,p.enter().append("g").classed("slice",!0),T(p,h,{},[m,g],b),p.order();var F=null;if(k&&S){var N=c.getPtId(S);p.each((function(e){null===F&&c.getPtId(e)===N&&(F={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var B=function(){return F||{x0:0,x1:m,y0:0,y1:g}},j=p;return k&&(j=j.transition().each("end",(function(){var t=n.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),j.each((function(s){s._x0=y(s.x0),s._x1=y(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=y(s.x1-L.tiling.pad),s._hoverY=x(I?s.y1-L.tiling.pad/2:s.y0+L.tiling.pad/2);var p=n.select(this),v=i.ensureSingle(p,"path","surface",(function(e){e.style("pointer-events",E?"none":"all")}));k?v.transition().attrTween("d",(function(e){var t=A(e,h,B(),[m,g],{orientation:L.tiling.orientation,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1});return function(e){return b(t(e))}})):v.attr("d",b),p.call(f,r,e,t,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),v.call(l,s,L,e,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=d(s,r,L,t,C)||"";var T=i.ensureSingle(p,"g","slicetext"),S=i.ensureSingle(T,"text","",(function(e){e.attr("data-notex",1)})),R=i.ensureUniformFontSize(e,c.determineTextFont(L,s,C.font));S.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",O?"end":P?"start":"middle").call(a.font,R).call(o.convertToTspans,e),s.textBB=a.bBox(S.node()),s.transform=_(s,{fontSize:R.size}),s.transform.fontSize=R.size,k?S.transition().attrTween("transform",(function(e){var t=M(e,h,B(),[m,g]);return function(e){return w(t(e))}})):S.attr("transform",w(s))})),F}},29044:function(e,t,r){"use strict";e.exports={moduleType:"trace",name:"icicle",basePlotModule:r(59564),categories:[],animatable:!0,attributes:r(97376),layoutAttributes:r(90676),supplyDefaults:r(7045),supplyLayoutDefaults:r(4304),calc:r(73876).r,crossTraceCalc:r(73876).q,plot:r(38364),style:r(47192).style,colorbar:r(5528),meta:{}}},90676:function(e){"use strict";e.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},4304:function(e,t,r){"use strict";var n=r(3400),i=r(90676);e.exports=function(e,t){function r(r,a){return n.coerce(e,t,i,r,a)}r("iciclecolorway",t.colorway),r("extendiciclecolors")}},25132:function(e,t,r){"use strict";var n=r(74148),i=r(83024);e.exports=function(e,t,r){var a=r.flipX,o=r.flipY,s="h"===r.orientation,l=r.maxDepth,u=t[0],c=t[1];l&&(u=(e.height+1)*t[0]/Math.min(e.height+1,l),c=(e.height+1)*t[1]/Math.min(e.height+1,l));var f=n.partition().padding(r.pad.inner).size(s?[t[1],u]:[t[0],c])(e);return(s||a||o)&&i(f,t,{swapXY:s,flipX:a,flipY:o}),f}},38364:function(e,t,r){"use strict";var n=r(95808),i=r(67880);e.exports=function(e,t,r,a){return n(e,t,r,a,{type:"icicle",drawDescendants:i})}},47192:function(e,t,r){"use strict";var n=r(33428),i=r(76308),a=r(3400),o=r(82744).resizeText,s=r(60404);function l(e,t,r,n){var o=t.data.data,l=!t.children,u=o.i,c=a.castOption(r,u,"marker.line.color")||i.defaultLine,f=a.castOption(r,u,"marker.line.width")||0;e.call(s,t,r,n).style("stroke-width",f).call(i.stroke,c).style("opacity",l?r.leaf.opacity:null)}e.exports={style:function(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");o(e,t,"icicle"),t.each((function(t){var r=n.select(this),i=t[0].trace;r.style("opacity",i.opacity),r.selectAll("path.surface").each((function(t){n.select(this).call(l,t,i,e)}))}))},styleOne:l}},95188:function(e,t,r){"use strict";for(var n=r(45464),i=r(52904).zorder,a=r(21776).Ks,o=r(92880).extendFlat,s=r(47797).colormodel,l=["rgb","rgba","rgba256","hsl","hsla"],u=[],c=[],f=0;f0||n.inbox(r-s.y0,r-(s.y0+s.h*l.dy),0)>0)){var f,d=Math.floor((t-s.x0)/l.dx),h=Math.floor(Math.abs(r-s.y0)/l.dy);if(l._hasZ?f=s.z[h][d]:l._hasSource&&(f=l._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(d,h,1,1).data),f){var p,v=s.hi||l.hoverinfo;if(v){var m=v.split("+");-1!==m.indexOf("all")&&(m=["color"]),-1!==m.indexOf("color")&&(p=!0)}var g,y=o.colormodel[l.colormodel],x=y.colormodel||l.colormodel,b=x.length,_=l._scaler(f),w=y.suffix,k=[];(l.hovertemplate||p)&&(k.push("["+[_[0]+w[0],_[1]+w[1],_[2]+w[2]].join(", ")),4===b&&k.push(", "+_[3]+w[3]),k.push("]"),k=k.join(""),e.extraText=x.toUpperCase()+": "+k),a(l.hovertext)&&a(l.hovertext[h])?g=l.hovertext[h][d]:a(l.text)&&a(l.text[h])&&(g=l.text[h][d]);var T=c.c2p(s.y0+(h+.5)*l.dy),A=s.x0+(d+.5)*l.dx,M=s.y0+(h+.5)*l.dy,S="["+f.slice(0,l.colormodel.length).join(", ")+"]";return[i.extendFlat(e,{index:[h,d],x0:u.c2p(s.x0+d*l.dx),x1:u.c2p(s.x0+(d+1)*l.dx),y0:T,y1:T,color:_,xVal:A,xLabelVal:A,yVal:M,yLabelVal:M,zLabelVal:S,text:g,hovertemplateLabels:{zLabel:S,colorLabel:k,"color[0]Label":_[0]+w[0],"color[1]Label":_[1]+w[1],"color[2]Label":_[2]+w[2],"color[3]Label":_[3]+w[3]}})]}}}},48928:function(e,t,r){"use strict";e.exports={attributes:r(95188),supplyDefaults:r(13188),calc:r(93336),plot:r(63715),style:r(28576),hoverPoints:r(24892),eventData:r(79972),moduleType:"trace",name:"image",basePlotModule:r(57952),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},63715:function(e,t,r){"use strict";var n=r(33428),i=r(3400),a=i.strTranslate,o=r(9616),s=r(47797),l=r(9188),u=r(2264).STYLE;e.exports=function(e,t,r,c){var f=t.xaxis,d=t.yaxis,h=!e._context._exportedPlot&&l();i.makeTraceGroups(c,r,"im").each((function(t){var r=n.select(this),l=t[0],c=l.trace,p=("fast"===c.zsmooth||!1===c.zsmooth&&h)&&!c._hasZ&&c._hasSource&&"linear"===f.type&&"linear"===d.type;c._realImage=p;var v,m,g,y,x,b,_=l.z,w=l.x0,k=l.y0,T=l.w,A=l.h,M=c.dx,S=c.dy;for(b=0;void 0===v&&b0;)m=f.c2p(w+b*M),b--;for(b=0;void 0===y&&b0;)x=d.c2p(k+b*S),b--;mI[0];if(R||D){var z=v+E/2,F=y+C/2;P+="transform:"+a(z+"px",F+"px")+"scale("+(R?-1:1)+","+(D?-1:1)+")"+a(-z+"px",-F+"px")+";"}}L.attr("style",P);var N=new Promise((function(e){if(c._hasZ)e();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===T&&c._canvas.el.height===A&&c._canvas.source===c.source)e();else{var t=document.createElement("canvas");t.width=T,t.height=A;var r=t.getContext("2d",{willReadFrequently:!0});c._image=c._image||new Image;var n=c._image;n.onload=function(){r.drawImage(n,0,0),c._canvas={el:t,source:c.source},e()},n.setAttribute("src",c.source)}})).then((function(){var e,t;if(c._hasZ)t=B((function(e,t){var r=_[t][e];return i.isTypedArray(r)&&(r=Array.from(r)),r})),e=t.toDataURL("image/png");else if(c._hasSource)if(p)e=c.source;else{var r=c._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,T,A).data;t=B((function(e,t){var n=4*(t*T+e);return[r[n],r[n+1],r[n+2],r[n+3]]})),e=t.toDataURL("image/png")}L.attr({"xlink:href":e,height:C,width:E,x:v,y:y})}));e._promises.push(N)}function B(e){var t=document.createElement("canvas");t.width=E,t.height=C;var r,n=t.getContext("2d",{willReadFrequently:!0}),a=function(e){return i.constrain(Math.round(f.c2p(w+e*M)-v),0,E)},o=function(e){return i.constrain(Math.round(d.c2p(k+e*S)-y),0,C)},u=s.colormodel[c.colormodel],h=u.colormodel||c.colormodel,p=u.fmt;for(b=0;b0}function k(e){e.each((function(e){y.stroke(n.select(this),e.line.color)})).each((function(e){y.fill(n.select(this),e.color)})).style("stroke-width",(function(e){return e.line.width}))}function T(e,t,r){var n=e._fullLayout,i=o.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),a={type:"linear",_id:"x"+t._id},s={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function l(e,t){return o.coerce(i,a,g,e,t)}return v(i,a,l,s,n),m(i,a,l,s),a}function A(e,t,r){return[Math.min(t/e.width,r/e.height),e,t+"x"+r]}function M(e,t,r,i){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.select(a);return o.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(h.convertToTspans,i).call(f.font,t),f.bBox(o.node())}function S(e,t,r,n,i,a){var s="_cache"+t;e[s]&&e[s].key===i||(e[s]={key:i,value:r});var l=o.aggNums(a,null,[e[s].value,n],2);return e[s].value=l,l}e.exports=function(e,t,r,v){var m,g=e._fullLayout;w(r)&&v&&(m=v()),o.makeTraceGroups(g._indicatorlayer,t,"trace").each((function(t){var v,E,C,L,P,O=t[0].trace,I=n.select(this),R=O._hasGauge,D=O._isAngular,z=O._isBullet,F=O.domain,N={w:g._size.w*(F.x[1]-F.x[0]),h:g._size.h*(F.y[1]-F.y[0]),l:g._size.l+g._size.w*F.x[0],r:g._size.r+g._size.w*(1-F.x[1]),t:g._size.t+g._size.h*(1-F.y[1]),b:g._size.b+g._size.h*F.y[0]},B=N.l+N.w/2,j=N.t+N.h/2,U=Math.min(N.w/2,N.h),q=d.innerRadius*U,V=O.align||"center";if(E=j,R){if(D&&(v=B,E=j+U/2,C=function(e){return function(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}(e,.9*q)}),z){var H=d.bulletPadding,G=1-d.bulletNumberDomainSize+H;v=N.l+(G+(1-G)*b[V])*N.w,C=function(e){return A(e,(d.bulletNumberDomainSize-H)*N.w,N.h)}}}else v=N.l+b[V]*N.w,C=function(e){return A(e,N.w,N.h)};!function(e,t,r,i){var u,c,d,v=r[0].trace,m=i.numbersX,g=i.numbersY,k=v.align||"center",A=x[k],E=i.transitionOpts,C=i.onComplete,L=o.ensureSingle(t,"g","numbers"),P=[];v._hasNumber&&P.push("number"),v._hasDelta&&(P.push("delta"),"left"===v.delta.position&&P.reverse());var O=L.selectAll("text").data(P);function I(t,r,n,i){if(!t.match("s")||n>=0===i>=0||r(n).slice(-1).match(_)||r(i).slice(-1).match(_))return r;var a=t.slice().replace("s","f").replace(/\d+/,(function(e){return parseInt(e)-1})),o=T(e,{tickformat:a});return function(e){return Math.abs(e)<1?p.tickText(o,e).text:r(e)}}function R(){var t=T(e,{tickformat:v.number.valueformat},v._range);t.setScale(),p.prepTicks(t);var i=function(e){return p.tickText(t,e).text},o=v.number.suffix,s=v.number.prefix,l=L.select("text.number");function c(){var t="number"===typeof r[0].y?s+i(r[0].y)+o:"-";l.text(t).call(f.font,v.number.font).call(h.convertToTspans,e)}return w(E)?l.transition().duration(E.duration).ease(E.easing).each("end",(function(){c(),C&&C()})).each("interrupt",(function(){c(),C&&C()})).attrTween("text",(function(){var e=n.select(this),t=a(r[0].lastY,r[0].y);v._lastValue=r[0].y;var l=I(v.number.valueformat,i,r[0].lastY,r[0].y);return function(r){e.text(s+l(t(r))+o)}})):c(),u=M(s+i(r[0].y)+o,v.number.font,A,e),l}function D(){var t=T(e,{tickformat:v.delta.valueformat},v._range);t.setScale(),p.prepTicks(t);var i=function(e){return p.tickText(t,e).text},o=v.delta.suffix,s=v.delta.prefix,l=function(e){return v.delta.relative?e.relativeDelta:e.delta},u=function(e,t){return 0===e||"number"!==typeof e||isNaN(e)?"-":(e>0?v.delta.increasing.symbol:v.delta.decreasing.symbol)+s+t(e)+o},d=function(e){return e.delta>=0?v.delta.increasing.color:v.delta.decreasing.color};void 0===v._deltaLastValue&&(v._deltaLastValue=l(r[0]));var m=L.select("text.delta");function g(){m.text(u(l(r[0]),i)).call(y.fill,d(r[0])).call(h.convertToTspans,e)}return m.call(f.font,v.delta.font).call(y.fill,d({delta:v._deltaLastValue})),w(E)?m.transition().duration(E.duration).ease(E.easing).tween("text",(function(){var e=n.select(this),t=l(r[0]),o=v._deltaLastValue,s=I(v.delta.valueformat,i,o,t),c=a(o,t);return v._deltaLastValue=t,function(t){e.text(u(c(t),s)),e.call(y.fill,d({delta:c(t)}))}})).each("end",(function(){g(),C&&C()})).each("interrupt",(function(){g(),C&&C()})):g(),c=M(u(l(r[0]),i),v.delta.font,A,e),m}O.enter().append("text"),O.attr("text-anchor",(function(){return A})).attr("class",(function(e){return e})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),O.exit().remove();var z,F=v.mode+v.align;if(v._hasDelta&&(z=D(),F+=v.delta.position+v.delta.font.size+v.delta.font.family+v.delta.valueformat,F+=v.delta.increasing.symbol+v.delta.decreasing.symbol,d=c),v._hasNumber&&(R(),F+=v.number.font.size+v.number.font.family+v.number.valueformat+v.number.suffix+v.number.prefix,d=u),v._hasDelta&&v._hasNumber){var N,B,j=[(u.left+u.right)/2,(u.top+u.bottom)/2],U=[(c.left+c.right)/2,(c.top+c.bottom)/2],q=.75*v.delta.font.size;"left"===v.delta.position&&(N=S(v,"deltaPos",0,-1*(u.width*b[v.align]+c.width*(1-b[v.align])+q),F,Math.min),B=j[1]-U[1],d={width:u.width+c.width+q,height:Math.max(u.height,c.height),left:c.left+N,right:u.right,top:Math.min(u.top,c.top+B),bottom:Math.max(u.bottom,c.bottom+B)}),"right"===v.delta.position&&(N=S(v,"deltaPos",0,u.width*(1-b[v.align])+c.width*b[v.align]+q,F,Math.max),B=j[1]-U[1],d={width:u.width+c.width+q,height:Math.max(u.height,c.height),left:u.left,right:c.right+N,top:Math.min(u.top,c.top+B),bottom:Math.max(u.bottom,c.bottom+B)}),"bottom"===v.delta.position&&(N=null,B=c.height,d={width:Math.max(u.width,c.width),height:u.height+c.height,left:Math.min(u.left,c.left),right:Math.max(u.right,c.right),top:u.bottom-u.height,bottom:u.bottom+c.height}),"top"===v.delta.position&&(N=null,B=u.top,d={width:Math.max(u.width,c.width),height:u.height+c.height,left:Math.min(u.left,c.left),right:Math.max(u.right,c.right),top:u.bottom-u.height-c.height,bottom:u.bottom}),z.attr({dx:N,dy:B})}(v._hasNumber||v._hasDelta)&&L.attr("transform",(function(){var e=i.numbersScaler(d);F+=e[2];var t,r=S(v,"numbersScale",1,e[0],F,Math.min);v._scaleNumbers||(r=1),t=v._isAngular?g-r*d.bottom:g-r*(d.top+d.bottom)/2,v._numbersTop=r*d.top+t;var n=d[k];"center"===k&&(n=(d.left+d.right)/2);var a=m-r*n;return a=S(v,"numbersTranslate",0,a,F,Math.max),l(a,t)+s(r)}))}(e,I,t,{numbersX:v,numbersY:E,numbersScaler:C,transitionOpts:r,onComplete:m}),R&&(L={range:O.gauge.axis.range,color:O.gauge.bgcolor,line:{color:O.gauge.bordercolor,width:0},thickness:1},P={range:O.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:O.gauge.bordercolor,width:O.gauge.borderwidth},thickness:1});var W=I.selectAll("g.angular").data(D?t:[]);W.exit().remove();var Y=I.selectAll("g.angularaxis").data(D?t:[]);Y.exit().remove(),D&&function(e,t,r,a){var o,s,f,d,h=r[0].trace,v=a.size,m=a.radius,g=a.innerRadius,y=a.gaugeBg,x=a.gaugeOutline,b=[v.l+v.w/2,v.t+v.h/2+m/2],_=a.gauge,A=a.layer,M=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function C(e){var t=h.gauge.axis.range[0],r=(e-t)/(h.gauge.axis.range[1]-t)*Math.PI-E;return r<-E?-E:r>E?E:r}function L(e){return n.svg.arc().innerRadius((g+m)/2-e/2*(m-g)).outerRadius((g+m)/2+e/2*(m-g)).startAngle(-E)}function P(e){e.attr("d",(function(e){return L(e.thickness).startAngle(C(e.range[0])).endAngle(C(e.range[1]))()}))}_.enter().append("g").classed("angular",!0),_.attr("transform",l(b[0],b[1])),A.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),A.selectAll("g.xangularaxistick,path,text").remove(),(o=T(e,h.gauge.axis)).type="linear",o.range=h.gauge.axis.range,o._id="xangularaxis",o.ticklabeloverflow="allow",o.setScale();var O=function(e){return(o.range[0]-e.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},I={},R=p.makeLabelFns(o,0).labelStandoff;I.xFn=function(e){var t=O(e);return Math.cos(t)*R},I.yFn=function(e){var t=O(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(R+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*c)},I.anchorFn=function(e){var t=O(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},I.heightFn=function(e,t,r){var n=O(e);return-.5*(1+Math.sin(n))*r};var D=function(e){return l(b[0]+m*Math.cos(e),b[1]-m*Math.sin(e))};f=function(e){return D(O(e))};var z=function(e){var t=O(e);return D(t)+"rotate("+-u(t)+")"};if(s=p.calcTicks(o),d=p.getTickSigns(o)[2],o.visible){d="inside"===o.ticks?-1:1;var F=(o.linewidth||1)/2;p.drawTicks(e,o,{vals:s,layer:A,path:"M"+d*F+",0h"+d*o.ticklen,transFn:z}),p.drawLabels(e,o,{vals:s,layer:A,transFn:f,labelFns:I})}var N=[y].concat(h.gauge.steps),B=_.selectAll("g.bg-arc").data(N);B.enter().append("g").classed("bg-arc",!0).append("path"),B.select("path").call(P).call(k),B.exit().remove();var j=L(h.gauge.bar.thickness),U=_.selectAll("g.value-arc").data([h.gauge.bar]);U.enter().append("g").classed("value-arc",!0).append("path");var q,V,H,G=U.select("path");w(M)?(G.transition().duration(M.duration).ease(M.easing).each("end",(function(){S&&S()})).each("interrupt",(function(){S&&S()})).attrTween("d",(q=j,V=C(r[0].lastY),H=C(r[0].y),function(){var e=i(V,H);return function(t){return q.endAngle(e(t))()}})),h._lastValue=r[0].y):G.attr("d","number"===typeof r[0].y?j.endAngle(C(r[0].y)):"M0,0Z"),G.call(k),U.exit().remove(),N=[];var W=h.gauge.threshold.value;(W||0===W)&&N.push({range:[W,W],color:h.gauge.threshold.color,line:{color:h.gauge.threshold.line.color,width:h.gauge.threshold.line.width},thickness:h.gauge.threshold.thickness});var Y=_.selectAll("g.threshold-arc").data(N);Y.enter().append("g").classed("threshold-arc",!0).append("path"),Y.select("path").call(P).call(k),Y.exit().remove();var Z=_.selectAll("g.gauge-outline").data([x]);Z.enter().append("g").classed("gauge-outline",!0).append("path"),Z.select("path").call(P).call(k),Z.exit().remove()}(e,0,t,{radius:U,innerRadius:q,gauge:W,layer:Y,size:N,gaugeBg:L,gaugeOutline:P,transitionOpts:r,onComplete:m});var Z=I.selectAll("g.bullet").data(z?t:[]);Z.exit().remove();var X=I.selectAll("g.bulletaxis").data(z?t:[]);X.exit().remove(),z&&function(e,t,r,n){var i,a,o,s,u,c=r[0].trace,f=n.gauge,h=n.layer,v=n.gaugeBg,m=n.gaugeOutline,g=n.size,x=c.domain,b=n.transitionOpts,_=n.onComplete;f.enter().append("g").classed("bullet",!0),f.attr("transform",l(g.l,g.t)),h.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),h.selectAll("g.xbulletaxistick,path,text").remove();var A=g.h,M=c.gauge.bar.thickness*A,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(c._hasNumber||c._hasDelta?1-d.bulletNumberDomainSize:1);function C(e){e.attr("width",(function(e){return Math.max(0,i.c2p(e.range[1])-i.c2p(e.range[0]))})).attr("x",(function(e){return i.c2p(e.range[0])})).attr("y",(function(e){return.5*(1-e.thickness)*A})).attr("height",(function(e){return e.thickness*A}))}(i=T(e,c.gauge.axis))._id="xbulletaxis",i.domain=[S,E],i.setScale(),a=p.calcTicks(i),o=p.makeTransTickFn(i),s=p.getTickSigns(i)[2],u=g.t+g.h,i.visible&&(p.drawTicks(e,i,{vals:"inside"===i.ticks?p.clipEnds(i,a):a,layer:h,path:p.makeTickPath(i,u,s),transFn:o}),p.drawLabels(e,i,{vals:a,layer:h,transFn:o,labelFns:p.makeLabelFns(i,u)}));var L=[v].concat(c.gauge.steps),P=f.selectAll("g.bg-bullet").data(L);P.enter().append("g").classed("bg-bullet",!0).append("rect"),P.select("rect").call(C).call(k),P.exit().remove();var O=f.selectAll("g.value-bullet").data([c.gauge.bar]);O.enter().append("g").classed("value-bullet",!0).append("rect"),O.select("rect").attr("height",M).attr("y",(A-M)/2).call(k),w(b)?O.select("rect").transition().duration(b.duration).ease(b.easing).each("end",(function(){_&&_()})).each("interrupt",(function(){_&&_()})).attr("width",Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],r[0].y)))):O.select("rect").attr("width","number"===typeof r[0].y?Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],r[0].y))):0),O.exit().remove();var I=r.filter((function(){return c.gauge.threshold.value||0===c.gauge.threshold.value})),R=f.selectAll("g.threshold-bullet").data(I);R.enter().append("g").classed("threshold-bullet",!0).append("line"),R.select("line").attr("x1",i.c2p(c.gauge.threshold.value)).attr("x2",i.c2p(c.gauge.threshold.value)).attr("y1",(1-c.gauge.threshold.thickness)/2*A).attr("y2",(1-(1-c.gauge.threshold.thickness)/2)*A).call(y.stroke,c.gauge.threshold.line.color).style("stroke-width",c.gauge.threshold.line.width),R.exit().remove();var D=f.selectAll("g.gauge-outline").data([m]);D.enter().append("g").classed("gauge-outline",!0).append("rect"),D.select("rect").call(C).call(k),D.exit().remove()}(e,0,t,{gauge:Z,layer:X,size:N,gaugeBg:L,gaugeOutline:P,transitionOpts:r,onComplete:m});var K=I.selectAll("text.title").data(t);K.exit().remove(),K.enter().append("text").classed("title",!0),K.attr("text-anchor",(function(){return z?x.right:x[O.title.align]})).text(O.title.text).call(f.font,O.title.font).call(h.convertToTspans,e),K.attr("transform",(function(){var e,t=N.l+N.w*b[O.title.align],r=d.titlePadding,n=f.bBox(K.node());return R?(D&&(e=O.gauge.axis.visible?f.bBox(Y.node()).top-r-n.bottom:N.t+N.h/2-U/2-n.bottom-r),z&&(e=E-(n.top+n.bottom)/2,t=N.l-d.bulletPadding*N.w)):e=O._numbersTop-r-n.bottom,l(t,e)}))}))}},50048:function(e,t,r){"use strict";var n=r(49084),i=r(29736).axisHoverFormat,a=r(21776).Ks,o=r(52948),s=r(45464),l=r(92880).extendFlat,u=r(67824).overrideAll,c=e.exports=u(l({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:a(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),valuehoverformat:i("value",1),showlegend:l({},s.showlegend,{dflt:!1})},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),"calc","nested");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},62624:function(e,t,r){"use strict";var n=r(47128),i=r(3832).processGrid,a=r(3832).filter;e.exports=function(e,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=a(t.x,t._len),t._y=a(t.y,t._len),t._z=a(t.z,t._len),t._value=a(t.value,t._len);var r=i(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n-1}function z(e,t){return null===e?t:e}function F(t,r,n){L();var i,a,o,l=[r],u=[n];if(s>=1)l=[r],u=[n];else if(s>0){var c=function(e,t){var r=e[0],n=e[1],i=e[2],a=function(e,t,r){for(var n=[],i=0;i-1?n[h]:C(p,v,g);d[h]=x>-1?x:O(p,v,g,z(t,y))}i=d[0],a=d[1],o=d[2],e._meshI.push(i),e._meshJ.push(a),e._meshK.push(o),++m}}function N(e,t,r,n){var i=e[3];in&&(i=n);for(var a=(e[3]-i)/(e[3]-t[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*e[s]+a*t[s];return o}function B(e,t,r){return e>=t&&e<=r}function j(e){var t=.001*(E-S);return e>=S-t&&e<=E+t}function U(t){for(var r=[],n=0;n<4;n++){var i=t[n];r.push([e._x[i],e._y[i],e._z[i],e._value[i]])}return r}var q=3;function V(e,t,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[B(t[0][3],n,i),B(t[1][3],n,i),B(t[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(e,t,r){return j(t[0][3])&&j(t[1][3])&&j(t[2][3])?(F(e,t,r),!0):aMath.abs(k-M)?[A,k]:[k,M];ee(r,C[0],C[1])}}var L=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];["x","y","z"].forEach((function(r){for(var n=[],i=0;i0&&(f.push(p.id),"x"===r?d.push([p.distRatio,0,0]):"y"===r?d.push([0,p.distRatio,0]):d.push([0,0,p.distRatio]))}else c=ie(1,"x"===r?b-1:"y"===r?_-1:w-1);f.length>0&&(n[a]="x"===r?te(t,f,o,s,d,n[a]):"y"===r?re(t,f,o,s,d,n[a]):ne(t,f,o,s,d,n[a]),a++),c.length>0&&(n[a]="x"===r?K(t,c,o,s,n[a]):"y"===r?J(t,c,o,s,n[a]):$(t,c,o,s,n[a]),a++)}var v=e.caps[r];v.show&&v.fill&&(R(v.fill),n[a]="x"===r?K(t,[0,b-1],o,s,n[a]):"y"===r?J(t,[0,_-1],o,s,n[a]):$(t,[0,w-1],o,s,n[a]),a++)}})),0===m&&P(),e._meshX=n,e._meshY=i,e._meshZ=a,e._meshIntensity=o,e._Xs=g,e._Ys=y,e._Zs=x}(),e}e.exports={findNearestOnAxis:u,generateIsoMeshes:h,createIsosurfaceTrace:function(e,t){var r=e.glplot.gl,i=n({gl:r}),a=new c(e,i,t.uid);return i._trace=a,a.update(t),e.glplot.add(i),a}}},70548:function(e,t,r){"use strict";var n=r(3400),i=r(24040),a=r(50048),o=r(27260);function s(e,t,r,n,a){var s=a("isomin"),l=a("isomax");void 0!==l&&null!==l&&void 0!==s&&null!==s&&s>l&&(t.isomin=null,t.isomax=null);var u=a("x"),c=a("y"),f=a("z"),d=a("value");u&&u.length&&c&&c.length&&f&&f.length&&d&&d.length?(i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach((function(e){a(e+"hoverformat");var t="caps."+e;a(t+".show")&&a(t+".fill");var r="slices."+e;a(r+".show")&&(a(r+".fill"),a(r+".locations"))})),a("spaceframe.show")&&a("spaceframe.fill"),a("surface.show")&&(a("surface.count"),a("surface.fill"),a("surface.pattern")),a("contour.show")&&(a("contour.color"),a("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach((function(e){a(e)})),o(e,t,n,a,{prefix:"",cLetter:"c"}),t._length=null):t.visible=!1}e.exports={supplyDefaults:function(e,t,r,i){s(e,t,0,i,(function(r,i){return n.coerce(e,t,a,r,i)}))},supplyIsoDefaults:s}},6296:function(e,t,r){"use strict";e.exports={attributes:r(50048),supplyDefaults:r(70548).supplyDefaults,calc:r(62624),colorbar:{min:"cmin",max:"cmax"},plot:r(31460).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:r(12536),categories:["gl3d","showLegend"],meta:{}}},52948:function(e,t,r){"use strict";var n=r(49084),i=r(29736).axisHoverFormat,a=r(21776).Ks,o=r(16716),s=r(45464),l=r(92880).extendFlat;e.exports=l({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"}),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:"calc"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:"calc"},lighting:l({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:"calc"}),showlegend:l({},s.showlegend,{dflt:!1})})},1876:function(e,t,r){"use strict";var n=r(47128);e.exports=function(e,t){t.intensity&&n(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}},576:function(e,t,r){"use strict";var n=r(67792).gl_mesh3d,i=r(67792).delaunay_triangulate,a=r(67792).alpha_shape,o=r(67792).convex_hull,s=r(33040).parseColorScale,l=r(3400).isArrayOrTypedArray,u=r(43080),c=r(8932).extractOpts,f=r(52094);function d(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var h=d.prototype;function p(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}h.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return l(r)&&void 0!==r[t]?e.textLabel=r[t]:r&&(e.textLabel=r),!0}},h.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n,l=e.x.length,d=f(v(r.xaxis,e.x,t.dataScale[0],e.xcalendar),v(r.yaxis,e.y,t.dataScale[1],e.ycalendar),v(r.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,l)||!g(e.j,l)||!g(e.k,l))return;n=f(m(e.i),m(e.j),m(e.k))}else n=0===e.alphahull?o(d):e.alphahull>0?a(e.alphahull,d):function(e,t){for(var r=["x","y","z"].indexOf(e),n=[],a=t.length,o=0;og):m=A>w,g=A;var M=u(w,k,T,A);M.pos=_,M.yc=(w+A)/2,M.i=b,M.dir=m?"increasing":"decreasing",M.x=M.pos,M.y=[T,k],y&&(M.orig_p=r[b]),p&&(M.tx=t.text[b]),v&&(M.htx=t.hovertext[b]),x.push(M)}else x.push({pos:_,empty:!0})}return t._extremes[l._id]=a.findExtremes(l,n.concat(d,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(e,"open:")+" ",high:i(e,"high:")+" ",low:i(e,"low:")+" ",close:i(e,"close:")+" "}}),x}e.exports={calc:function(e,t){var r=a.getFromId(e,t.xaxis),i=a.getFromId(e,t.yaxis),s=function(e,t,r){var i=r._minDiff;if(!i){var a,s=e._fullData,l=[];for(i=1/0,a=0;a"+u.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},d)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=u.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),y.name="",f.push(y),m[b]=y)}return f}function d(e,t,r,i){var a=e.cd,o=e.ya,l=a[0].trace,f=a[0].t,d=c(e,t,r,i);if(!d)return[];var h=a[d.index],p=d.index=h.i,v=h.dir;function m(e){return f.labels[e]+n.hoverLabelText(o,l[e][p],l.yhoverformat)}var g=h.hi||l.hoverinfo,y=g.split("+"),x="all"===g,b=x||-1!==y.indexOf("y"),_=x||-1!==y.indexOf("text"),w=b?[m("open"),m("high"),m("low"),m("close")+" "+u[v]]:[];return _&&s(h,l,w),d.extraText=w.join("
"),d.y0=d.y1=o.c2p(h.yc,!0),[d]}e.exports={hoverPoints:function(e,t,r,n){return e.cd[0].trace.hoverlabel.split?f(e,t,r,n):d(e,t,r,n)},hoverSplit:f,hoverOnPoints:d}},65456:function(e,t,r){"use strict";e.exports={moduleType:"trace",name:"ohlc",basePlotModule:r(57952),categories:["cartesian","svg","showLegend"],meta:{},attributes:r(20279),supplyDefaults:r(23860),calc:r(42812).calc,plot:r(36664),style:r(14008),hoverPoints:r(18720).hoverPoints,selectPoints:r(97384)}},52744:function(e,t,r){"use strict";var n=r(24040),i=r(3400);e.exports=function(e,t,r,a){var o=r("x"),s=r("open"),l=r("high"),u=r("low"),c=r("close");if(r("hoverlabel.split"),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x"],a),s&&l&&u&&c){var f=Math.min(s.length,l.length,u.length,c.length);return o&&(f=Math.min(f,i.minRowLength(o))),t._length=f,f}}},36664:function(e,t,r){"use strict";var n=r(33428),i=r(3400);e.exports=function(e,t,r,a){var o=t.yaxis,s=t.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,"trace ohlc").each((function(e){var t=n.select(this),r=e[0],a=r.t;if(!0!==r.trace.visible||a.empty)t.remove();else{var u=a.tickLen,c=t.selectAll("path").data(i.identity);c.enter().append("path"),c.exit().remove(),c.attr("d",(function(e){if(e.empty)return"M0,0Z";var t=s.c2p(e.pos-u,!0),r=s.c2p(e.pos+u,!0),n=l?(t+r)/2:s.c2p(e.pos,!0);return"M"+t+","+o.c2p(e.o,!0)+"H"+n+"M"+n+","+o.c2p(e.h,!0)+"V"+o.c2p(e.l,!0)+"M"+r+","+o.c2p(e.c,!0)+"H"+n}))}}))}},97384:function(e){"use strict";e.exports=function(e,t){var r,n=e.cd,i=e.xaxis,a=e.yaxis,o=[],s=n[0].t.bPos||0;if(!1===t)for(r=0;r=e.length)return!1;if(void 0!==t[e[r]])return!1;t[e[r]]=!0}return!0}(r))for(t=0;t0||c(s);u&&(o="array");var f=r("categoryorder",o);"array"===f?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),u||"array"!==f||(t.categoryorder="trace")}}e.exports=function(e,t,r,c){function d(r,i){return n.coerce(e,t,l,r,i)}var h=s(e,t,{name:"dimensions",handleItemDefaults:f}),p=function(e,t,r,o,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",o.colorway[0]);if(i(e,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=r}return 1/0}(e,t,r,c,d);o(t,c,d),Array.isArray(h)&&h.length||(t.visible=!1),u(t,h,"values",p),d("hoveron"),d("hovertemplate"),d("arrangement"),d("bundlecolors"),d("sortpaths"),d("counts");var v=c.font;n.coerceFont(d,"labelfont",v,{overrideDflt:{size:Math.round(v.size)}}),n.coerceFont(d,"tickfont",v,{autoShadowDflt:!0,overrideDflt:{size:Math.round(v.size/1.2)}})}},22020:function(e,t,r){"use strict";e.exports={attributes:r(72140),supplyDefaults:r(76671),calc:r(69136),plot:r(60268),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:r(91800),categories:["noOpacity"],meta:{}}},51036:function(e,t,r){"use strict";var n=r(33428),i=r(67756).Gz,a=r(36424),o=r(93024),s=r(3400),l=s.strTranslate,u=r(43616),c=r(49760),f=r(72736);function d(e,t,r,i){var a=t._context.staticPlot,o=e.map(F.bind(0,t,r)),c=i.selectAll("g.parcatslayer").data([null]);c.enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all");var d=c.selectAll("g.trace.parcats").data(o,h),y=d.enter().append("g").attr("class","trace parcats");d.attr("transform",(function(e){return l(e.x,e.y)})),y.append("g").attr("class","paths");var x=d.select("g.paths").selectAll("path.path").data((function(e){return e.paths}),h);x.attr("fill",(function(e){return e.model.color}));var w=x.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(e){return e.model.color})).attr("fill-opacity",0);_(w),x.attr("d",(function(e){return e.svgD})),w.empty()||x.sort(v),x.exit().remove(),x.on("mouseover",m).on("mouseout",g).on("click",b),y.append("g").attr("class","dimensions");var A=d.select("g.dimensions").selectAll("g.dimension").data((function(e){return e.dimensions}),h);A.enter().append("g").attr("class","dimension"),A.attr("transform",(function(e){return l(e.x,0)})),A.exit().remove();var M=A.selectAll("g.category").data((function(e){return e.categories}),h),S=M.enter().append("g").attr("class","category");M.attr("transform",(function(e){return l(0,e.y)})),S.append("rect").attr("class","catrect").attr("pointer-events","none"),M.select("rect.catrect").attr("fill","none").attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})),k(S);var E=M.selectAll("rect.bandrect").data((function(e){return e.bands}),h);E.each((function(){s.raiseToTop(this)})),E.attr("fill",(function(e){return e.color}));var R=E.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(e){return e.color})).attr("fill-opacity",0);E.attr("fill",(function(e){return e.color})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).attr("y",(function(e){return e.y})).attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"perpendicular"===e.parcatsViewModel.arrangement?"ns-resize":"move"})),T(R),E.exit().remove(),S.append("text").attr("class","catlabel").attr("pointer-events","none"),M.select("text.catlabel").attr("text-anchor",(function(e){return p(e)?"start":"end"})).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",(function(e){return p(e)?e.width+5:-5})).attr("y",(function(e){return e.height/2})).text((function(e){return e.model.categoryLabel})).each((function(e){u.font(n.select(this),e.parcatsViewModel.categorylabelfont),f.convertToTspans(n.select(this),t)})),S.append("text").attr("class","dimlabel"),M.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(e){return e.width/2})).attr("y",-5).text((function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null})).each((function(e){u.font(n.select(this),e.parcatsViewModel.labelfont)})),M.selectAll("rect.bandrect").on("mouseover",C).on("mouseout",L),M.exit().remove(),A.call(n.behavior.drag().origin((function(e){return{x:e.x,y:0}})).on("dragstart",P).on("drag",O).on("dragend",I)),d.each((function(e){e.traceSelection=n.select(this),e.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),e.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),d.exit().remove()}function h(e){return e.key}function p(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function v(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),C=n.mouse(f)[0];o.loneHover({trace:d,x:b-p.left+v.left,y:_-p.top+v.top,text:E,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:k,idealAlign:C1&&d.displayInd===f.dimensions.length-1?(i=u.left,a="left"):(i=u.left+u.width,a="right");var v=c.model.count,m=c.model.categoryLabel,g=v/c.parcatsViewModel.model.count,y={countLabel:v,categoryLabel:m,probabilityLabel:g.toFixed(3)},x=[];-1!==c.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",y.countLabel].join(" ")),-1!==c.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var b=x.join("
");return{trace:h,x:o*(i-t.left),y:s*(p-t.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:h.hovertemplate,hovertemplateLabels:y,eventData:[{data:h._input,fullData:h,count:v,category:m,probability:g}]}}function C(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var t,r=e.parcatsViewModel.graphDiv,i=r._fullLayout,a=i._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.hoveron,u=this;"color"===l?(function(e){var t=n.select(e).datum(),r=A(t);w(r),r.each((function(){s.raiseToTop(this)})),n.select(e.parentNode).selectAll("rect.bandrect").filter((function(e){return e.color===t.color})).each((function(){s.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(u),S(u,"plotly_hover",n.event)):(function(e){n.select(e.parentNode).selectAll("rect.bandrect").each((function(e){var t=A(e);w(t),t.each((function(){s.raiseToTop(this)}))})),n.select(e.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(u),M(u,"plotly_hover",n.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===l?t=E(r,a,u):"color"===l?t=function(e,t,r){e._fullLayout._calcInverseTransform(e);var i,a,o=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=r.getBoundingClientRect(),u=n.select(r).datum(),f=u.categoryViewModel,d=f.parcatsViewModel,h=d.model.dimensions[f.model.dimensionInd],p=d.trace,v=l.y+l.height/2;d.dimensions.length>1&&h.displayInd===d.dimensions.length-1?(i=l.left,a="left"):(i=l.left+l.width,a="right");var m=f.model.categoryLabel,g=u.parcatsViewModel.model.count,y=0;u.categoryViewModel.bands.forEach((function(e){e.color===u.color&&(y+=e.count)}));var x=f.model.count,b=0;d.pathSelection.each((function(e){e.model.color===u.color&&(b+=e.model.count)}));var _=y/g,w=y/b,k=y/x,T={countLabel:y,categoryLabel:m,probabilityLabel:_.toFixed(3)},A=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf("count")&&A.push(["Count:",T.countLabel].join(" ")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(A.push("P(color \u2229 "+m+"): "+T.probabilityLabel),A.push("P("+m+" | color): "+w.toFixed(3)),A.push("P(color | "+m+"): "+k.toFixed(3)));var M=A.join("
"),S=c.mostReadable(u.color,["black","white"]);return{trace:p,x:o*(i-t.left),y:s*(v-t.top),text:M,color:u.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:T,eventData:[{data:p._input,fullData:p,category:m,count:g,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,a,u):"dimension"===l&&(t=function(e,t,r){var i=[];return n.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){i.push(E(e,t,this))})),i}(r,a,u)),t&&o.loneHover(t,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r}))}}function L(e){var t=e.parcatsViewModel;t.dragDimension||(_(t.pathSelection),k(t.dimensionSelection.selectAll("g.category")),T(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),o.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(v),-1!==t.hoverinfoItems.indexOf("skip"))||("color"===e.parcatsViewModel.hoveron?S(this,"plotly_unhover",n.event):M(this,"plotly_unhover",n.event))}function P(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each((function(t){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=i&&i<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map((function(e){return e.displayInd})),t.model.dragY=t.y,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each((function(t){t.yf.y+f.height/2&&(o.model.displayInd=f.model.displayInd,f.model.displayInd=l),e.dragCategoryDisplayInd=o.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){a.model.dragX=n.event.x;var d=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[i];void 0!==d&&a.model.dragXh.x&&(a.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=a.model.displayInd}j(e.parcatsViewModel),B(e.parcatsViewModel),z(e.parcatsViewModel),D(e.parcatsViewModel)}}function I(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var t={},r=R(e.parcatsViewModel),i=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),o=e.initialDragDimensionDisplayInds.some((function(e,t){return e!==i[t]}));o&&i.forEach((function(r,n){var i=e.parcatsViewModel.model.dimensions[n].containerInd;t["dimensions["+i+"].displayindex"]=r}));var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map((function(e){return e.displayInd}));if(s=e.initialDragCategoryDisplayInds.some((function(e,t){return e!==l[t]}))){var u=e.model.categories.slice().sort((function(e,t){return e.displayInd-t.displayInd})),c=u.map((function(e){return e.categoryValue})),f=u.map((function(e){return e.categoryLabel}));t["dimensions["+e.model.containerInd+"].categoryarray"]=[c],t["dimensions["+e.model.containerInd+"].ticktext"]=[f],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?S(e.potentialClickBand,"plotly_click",n.event.sourceEvent):M(e.potentialClickBand,"plotly_click",n.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd&&(e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null),e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,j(e.parcatsViewModel),B(e.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each((function(){z(e.parcatsViewModel,!0),D(e.parcatsViewModel,!0)})).each("end",(function(){(o||s)&&a.restyle(e.parcatsViewModel.graphDiv,t,[r])}))}}function R(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;s--)c+="C"+u[s]+","+(t[s+1]+n)+" "+l[s]+","+(t[s]+n)+" "+(e[s]+r[s])+","+(t[s]+n),c+="l-"+r[s]+",0 ";return c+="Z"}function B(e){var t=e.dimensions,r=e.model,n=t.map((function(e){return e.categories.map((function(e){return e.y}))})),i=e.model.dimensions.map((function(e){return e.categories.map((function(e){return e.displayInd}))})),a=e.model.dimensions.map((function(e){return e.displayInd})),o=e.dimensions.map((function(e){return e.model.dimensionInd})),s=t.map((function(e){return e.x})),l=t.map((function(e){return e.width})),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(e){var t=e.categoryInds.map((function(e,t){return i[t][e]}));return o.map((function(e){return t[e]}))}u.sort((function(t,r){var n=f(t),i=f(r);return"backward"===e.sortpaths&&(n.reverse(),i.reverse()),n.push(t.valueInds[0]),i.push(r.valueInds[0]),e.bundlecolors&&(n.unshift(t.rawColor),i.unshift(r.rawColor)),ni?1:0}));for(var d=new Array(u.length),h=t[0].model.count,p=t[0].categories.map((function(e){return e.height})).reduce((function(e,t){return e+t})),v=0;v0?p*(g.count/h):0;for(var y,x=new Array(n.length),b=0;b1?(e.width-80-16)/(n-1):0)*i;var a,o,s,l,u,c=[],f=e.model.maxCats,d=t.categories.length,h=t.count,p=e.height-8*(f-1),v=8*(f-d)/2,m=t.categories.map((function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}}));for(m.sort((function(e,t){return e.displayInd-t.displayInd})),u=0;u0?o.count/h*p:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:v,bands:[],parcatsViewModel:e},v=v+a+8,c.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:r,y:0,width:16,model:t,categories:c,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(e,t,r,n){d(r,e,n,t)}},60268:function(e,t,r){"use strict";var n=r(51036);e.exports=function(e,t,r,i){var a=e._fullLayout,o=a._paper,s=a._size;n(e,o,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,i)}},82296:function(e,t,r){"use strict";var n=r(49084),i=r(94724),a=r(25376),o=r(86968).u,s=r(92880).extendFlat,l=r(31780).templatedArray;e.exports={domain:o({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:a({editType:"plot"}),tickfont:a({autoShadowDflt:!0,editType:"plot"}),rangefont:a({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},i.tickvals,{editType:"plot"}),ticktext:s({},i.ticktext,{editType:"plot"}),tickformat:s({},i.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:s({editType:"calc"},n("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},71864:function(e,t,r){"use strict";var n=r(30140),i=r(33428),a=r(71688).keyFun,o=r(71688).repeat,s=r(3400).sorterAsc,l=r(3400).strTranslate,u=n.bar.snapRatio;function c(e,t){return e*(1-u)+t*u}var f=n.bar.snapClose;function d(e,t){return e*(1-f)+t*f}function h(e,t,r,n){if(function(e,t){for(var r=0;r=t[r][0]&&e<=t[r][1])return!0;return!1}(r,n))return r;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var l=t[a],u=l,f=a;i*ft){d=r;break}}if(a=c,isNaN(a)&&(a=isNaN(f)||isNaN(d)?isNaN(f)?d:f:t-u[f][1]e[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(p,t);v&&(o.interval=l[a],o.intervalPix=p,o.region=v)}}if(e.ordinal&&!o.region){var m=e.unitTickvals,y=e.unitToPaddedPx.invert(t);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(e,t){i.event.sourceEvent.stopPropagation();var r=t.height-i.mouse(e)[1]-2*n.verticalPadding,a=t.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(t.unitToPaddedPx.invert):a.newExtent=[a.startExtent,t.unitToPaddedPx.invert(r)].sort(s),t.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(t),b(e.parentNode)}function k(e,t){var r=_(t,t.height-i.mouse(e)[1]-2*n.verticalPadding),a="crosshair";r.clickableOrdinalRange?a="pointer":r.region&&(a=r.region+"-resize"),i.select(document.body).style("cursor",a)}function T(e){e.on("mousemove",(function(e){i.event.preventDefault(),e.parent.inBrushDrag||k(this,e)})).on("mouseleave",(function(e){e.parent.inBrushDrag||y()})).call(i.behavior.drag().on("dragstart",(function(e){!function(e,t){i.event.sourceEvent.stopPropagation();var r=t.height-i.mouse(e)[1]-2*n.verticalPadding,a=t.unitToPaddedPx.invert(r),o=t.brush,s=_(t,r),l=s.interval,u=o.svgBrush;if(u.wasDragged=!1,u.grabbingBar="ns"===s.region,u.grabbingBar){var c=l.map(t.unitToPaddedPx);u.grabPoint=r-c[0]-n.verticalPadding,u.barLength=c[1]-c[0]}u.clickableOrdinalRange=s.clickableOrdinalRange,u.stayingIntervals=t.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(u.stayingIntervals=u.stayingIntervals.filter((function(e){return e[0]!==l[0]&&e[1]!==l[1]}))),u.startExtent=s.region?l["s"===s.region?1:0]:a,t.parent.inBrushDrag=!0,u.brushStartCallback()}(this,e)})).on("drag",(function(e){w(this,e)})).on("dragend",(function(e){!function(e,t){var r=t.brush,n=r.filter,a=r.svgBrush;a._dragging||(k(e,t),w(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(t),b(e.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(u?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(t),u?b(e.parentNode,s):(s(),b(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,e)})))}function A(e,t){return e[0]-t[0]}function M(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function S(e){for(var t,r=e.slice(),n=[],i=r.shift();i;){for(t=i.slice();(i=r.shift())&&i[0]<=t[1];)t[1]=Math.max(t[1],i[1]);n.push(t)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(e,t,r,n,i,a){var o,l=function(){var e,t,r=[];return{set:function(n){1===(r=n.map((function(e){return e.slice().sort(s)})).sort(A)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),e=S(r),t=r.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return e},getBounds:function(){return t}}}();return l.set(r),{filter:l,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(e){var t=e.brush,r=function(e){return e.svgBrush.extent.map((function(e){return e.slice()}))}(t),n=r.slice();t.filter.set(n),o()}),brushEndCallback:a}}},ensureAxisBrush:function(e,t,r){var i=e.selectAll("."+n.cn.axisBrush).data(o,a);i.enter().append("g").classed(n.cn.axisBrush,!0),function(e,t,r){var i=r._context.staticPlot,a=e.selectAll(".background").data(o);a.enter().append("rect").classed("background",!0).call(p).call(v).style("pointer-events",i?"none":"auto").attr("transform",l(0,n.verticalPadding)),a.call(T).attr("height",(function(e){return e.height-n.verticalPadding}));var s=e.selectAll(".highlight-shadow").data(o);s.enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",t).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),s.attr("y1",(function(e){return e.height})).call(x);var u=e.selectAll(".highlight").data(o);u.enter().append("line").classed("highlight",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width-n.bar.strokeWidth).attr("stroke",n.bar.fillColor).attr("opacity",n.bar.fillOpacity).attr("stroke-linecap","butt"),u.attr("y1",(function(e){return e.height})).call(x)}(i,t,r)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map((function(e){return e.sort(s)})),e=t.multiselect?S(e.sort(A)):[e[0]]):e=[e.sort(s)],t.tickvals){var r=t.tickvals.slice().sort(s);if(!(e=e.map((function(e){var t=[h(0,r,e[0],[]),h(1,r,e[1],[])];if(t[1]>t[0])return t})).filter((function(e){return e}))).length)return}return e.length>1?e:e[0]}}},61664:function(e,t,r){"use strict";e.exports={attributes:r(82296),supplyDefaults:r(60664),calc:r(95044),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:r(19976),categories:["gl","regl","noOpacity","noHover"],meta:{}}},19976:function(e,t,r){"use strict";var n=r(33428),i=r(84888)._M,a=r(24196),o=r(9616);t.name="parcoords",t.plot=function(e){var t=i(e.calcdata,"parcoords")[0];t.length&&a(e,t)},t.clean=function(e,t,r,n){var i=n._has&&n._has("parcoords"),a=t._has&&t._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},t.toSVG=function(e){var t=e._fullLayout._glimages,r=n.select(e).selectAll(".svg-container");r.filter((function(e,t){return t===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this,r=e.toDataURL("image/png");t.append("svg:image").attr({xmlns:o.svg,"xlink:href":r,preserveAspectRatio:"none",x:0,y:0,width:e.style.width,height:e.style.height})})),window.setTimeout((function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},95044:function(e,t,r){"use strict";var n=r(3400).isArrayOrTypedArray,i=r(8932),a=r(71688).wrap;e.exports=function(e,t){var r,o;return i.hasColorscale(t,"line")&&n(t.line.color)?(r=t.line.color,o=i.extractOpts(t.line).colorscale,i.calc(e,t,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(e){for(var t=new Array(e),r=0;rf&&(n.log("parcoords traces support up to "+f+" dimensions at the moment"),p.splice(f));var v=s(e,t,{name:"dimensions",layout:l,handleItemDefaults:h}),m=function(e,t,r,o,s){var l=s("line.color",r);if(i(e,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=r}return 1/0}(e,t,r,l,c);o(t,l,c),Array.isArray(v)&&v.length||(t.visible=!1),d(t,v,"values",m);var g=n.extendFlat({},l.font,{size:Math.round(l.font.size/1.2)});n.coerceFont(c,"labelfont",g),n.coerceFont(c,"tickfont",g,{autoShadowDflt:!0}),n.coerceFont(c,"rangefont",g),c("labelangle"),c("labelside"),c("unselected.line.color"),c("unselected.line.opacity")}},95724:function(e,t,r){"use strict";var n=r(3400).isTypedArray;t.convertTypedArray=function(e){return n(e)?Array.prototype.slice.call(e):e},t.isOrdinal=function(e){return!!e.tickvals},t.isVisible=function(e){return e.visible||!("visible"in e)}},29928:function(e,t,r){"use strict";var n=r(61664);n.plot=r(24196),e.exports=n},51352:function(e,t,r){"use strict";var n=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join("\n"),i=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join("\n"),a=r(30140).maxDimensionCount,o=r(3400),s=1e-6,l=2048,u=new Uint8Array(4),c=new Uint8Array(4),f={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function d(e,t,r,n,i){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function h(e,t,r,n,i,a){var o=a.key;r.drawCompleted||(function(e){e.read({x:0,y:0,width:1,height:1,data:u})}(e),r.drawCompleted=!0),function s(l){var u=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],d(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*u,a.offset=2*l*n,t(a),l*n+u>>8*t)%256/255}function m(e,t,r){for(var n=new Array(8*t),i=0,a=0;ac&&(c=e[i].dim1.canvasX,o=i);0===s&&d(A,0,0,r.canvasWidth,r.canvasHeight);var f=function(e){var t,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!e&&ns._length&&(E=E.slice(0,s._length));var L,P=s.tickvals;function O(e,t){return{val:e,text:L[t]}}function I(e,t){return e.val-t.val}if(a(P)&&P.length){i.isTypedArray(P)&&(P=Array.from(P)),L=s.ticktext,a(L)&&L.length?L.length>P.length?L=L.slice(0,P.length):P.length>L.length&&(P=P.slice(0,L.length)):L=P.map(o(s.tickformat));for(var R=1;R=r||l>=i)return;var u=e.lineLayer.readPixel(s,i-1-l),c=0!==u[3],f=c?u[2]+256*(u[1]+256*u[0]):null,d={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:f};f!==F&&(c?a.hover(d):a.unhover&&a.unhover(d),F=f)}})),E.style("opacity",(function(e){return e.pick?0:1})),h.style("background","rgba(255, 255, 255, 0)");var N=h.selectAll("."+x.cn.parcoords).data(S,v);N.exit().remove(),N.enter().append("g").classed(x.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),N.attr("transform",(function(e){return c(e.model.translateX,e.model.translateY)}));var B=N.selectAll("."+x.cn.parcoordsControlView).data(m,v);B.enter().append("g").classed(x.cn.parcoordsControlView,!0),B.attr("transform",(function(e){return c(e.model.pad.l,e.model.pad.t)}));var j=B.selectAll("."+x.cn.yAxis).data((function(e){return e.dimensions}),v);j.enter().append("g").classed(x.cn.yAxis,!0),B.each((function(e){R(j,e,w)})),E.each((function(e){if(e.viewModel){!e.lineLayer||a?e.lineLayer=_(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||a;e.lineLayer.render(e.viewModel.panels,t)}})),j.attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),j.call(n.behavior.drag().origin((function(e){return e})).on("drag",(function(e){var t=e.parent;M.linePickActive(!1),e.x=Math.max(-x.overdrag,Math.min(e.model.width+x.overdrag,n.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,j.sort((function(e,t){return e.x-t.x})).each((function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio})),R(j,t,w),j.filter((function(t){return 0!==Math.abs(e.xIndex-t.xIndex)})).attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),n.select(this).attr("transform",c(e.x,0)),j.each((function(r,n,i){i===e.parent.key&&(t.dimensions[n]=r)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!C(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)})).on("dragend",(function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,R(j,t,w),n.select(this).attr("transform",(function(e){return c(e.x,0)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!C(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),M.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(t.key,t.dimensions.map((function(e){return e.crossfilterDimensionIndex})))}))),j.exit().remove();var U=j.selectAll("."+x.cn.axisOverlays).data(m,v);U.enter().append("g").classed(x.cn.axisOverlays,!0),U.selectAll("."+x.cn.axis).remove();var q=U.selectAll("."+x.cn.axis).data(m,v);q.enter().append("g").classed(x.cn.axis,!0),q.each((function(e){var t=e.model.height/e.model.tickDistance,r=e.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?i:null).tickFormat((function(t){return y.isOrdinal(e)?t:D(e.model.dimensions[e.visibleIndex],t)})).scale(r)),d.font(q.selectAll("text"),e.model.tickFont)})),q.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),q.selectAll("text").style("cursor","default");var V=U.selectAll("."+x.cn.axisHeading).data(m,v);V.enter().append("g").classed(x.cn.axisHeading,!0);var H=V.selectAll("."+x.cn.axisTitle).data(m,v);H.enter().append("text").classed(x.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",o?"none":"auto"),H.text((function(e){return e.label})).each((function(t){var r=n.select(this);d.font(r,t.model.labelFont),f.convertToTspans(r,e)})).attr("transform",(function(e){var t=I(e.model.labelAngle,e.model.labelSide),r=x.axisTitleOffset;return(t.dir>0?"":c(0,2*r+e.model.height))+u(t.degrees)+c(-r*t.dx,-r*t.dy)})).attr("text-anchor",(function(e){var t=I(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"}));var G=U.selectAll("."+x.cn.axisExtent).data(m,v);G.enter().append("g").classed(x.cn.axisExtent,!0);var W=G.selectAll("."+x.cn.axisExtentTop).data(m,v);W.enter().append("g").classed(x.cn.axisExtentTop,!0),W.attr("transform",c(0,-x.axisExtentOffset));var Y=W.selectAll("."+x.cn.axisExtentTopText).data(m,v);Y.enter().append("text").classed(x.cn.axisExtentTopText,!0).call(O),Y.text((function(e){return z(e,!0)})).each((function(e){d.font(n.select(this),e.model.rangeFont)}));var Z=G.selectAll("."+x.cn.axisExtentBottom).data(m,v);Z.enter().append("g").classed(x.cn.axisExtentBottom,!0),Z.attr("transform",(function(e){return c(0,e.model.height+x.axisExtentOffset)}));var X=Z.selectAll("."+x.cn.axisExtentBottomText).data(m,v);X.enter().append("text").classed(x.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(O),X.text((function(e){return z(e,!1)})).each((function(e){d.font(n.select(this),e.model.rangeFont)})),b.ensureAxisBrush(U,T,e)}},24196:function(e,t,r){"use strict";var n=r(36336),i=r(5048),a=r(95724).isVisible,o={};function s(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return-1===i&&(i+=t.length),i}(e.exports=function(e,t){var r=e._fullLayout;if(i(e,[],o)){var l={},u={},c={},f={},d=r._size;t.forEach((function(t,r){var n=t[0].trace;c[r]=n.index;var i=f[r]=n._fullInput.index;l[r]=e.data[i].dimensions,u[r]=e.data[i].dimensions.slice()})),n(e,t,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{filterChanged:function(t,n,i){var a=u[t][n],o=i.map((function(e){return e.slice()})),s="dimensions["+n+"].constraintrange",l=r._tracePreGUI[e._fullData[c[t]]._fullInput.uid];if(void 0===l[s]){var d=a.constraintrange;l[s]=d||null}var h=e._fullData[c[t]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,h.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete h.constraintrange,o=null);var p={};p[s]=o,e.emit("plotly_restyle",[p,[f[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,r){var n=function(e,t){return function(r,n){return s(e,t,r)-s(e,t,n)}}(r,u[t].filter(a));l[t].sort(n),u[t].filter((function(e){return!a(e)})).sort((function(e){return u[t].indexOf(e)})).forEach((function(e){l[t].splice(l[t].indexOf(e),1),l[t].splice(u[t].indexOf(e),0,e)})),e.emit("plotly_restyle",[{dimensions:[l[t]]},[f[t]]])}})}}).reglPrecompiled=o},74996:function(e,t,r){"use strict";var n=r(45464),i=r(86968).u,a=r(25376),o=r(22548),s=r(21776).Ks,l=r(21776).Gw,u=r(92880).extendFlat,c=r(98192).c,f=a({editType:"plot",arrayOk:!0,colorEditType:"plot"});e.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:c,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:u({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:u({},f,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:u({},f,{}),outsidetextfont:u({},f,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:u({},f,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:i({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:u({},f,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},80036:function(e,t,r){"use strict";var n=r(7316);t.name="pie",t.plot=function(e,r,i,a){n.plotBasePlot(t.name,e,r,i,a)},t.clean=function(e,r,i,a){n.cleanBasePlot(t.name,e,r,i,a)}},45768:function(e,t,r){"use strict";var n=r(38248),i=r(49760),a=r(76308),o={};function s(e){return function(t,r){return!!t&&!!(t=i(t)).isValid()&&(t=a.addOpacity(t,t.getAlpha()),e[r]||(e[r]=t),t)}}function l(e,t){var r,n=JSON.stringify(e),a=t[n];if(!a){for(a=e.slice(),r=0;r=0})),("funnelarea"===t.type?g:t.sort)&&a.sort((function(e,t){return t.v-e.v})),a[0]&&(a[0].vTotal=m),a},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,i=e.calcdata,a=n[r+"colorway"],s=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(a=l(a,o));for(var u=0,c=0;c0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}function c(e,t,r,n,i){n("marker.line.width")&&n("marker.line.color",i?void 0:r.paper_bgcolor);var a=n("marker.colors");l(n,"marker.pattern",a),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}e.exports={handleLabelsAndValues:u,handleMarkerDefaults:c,supplyDefaults:function(e,t,r,n){function l(r,n){return i.coerce(e,t,a,r,n)}var f=u(l("labels"),l("values")),d=f.len;if(t._hasLabels=f.hasLabels,t._hasValues=f.hasValues,!t._hasLabels&&t._hasValues&&(l("label0"),l("dlabel")),d){t._length=d,c(e,t,n,l,!0),l("scalegroup");var h,p=l("text"),v=l("texttemplate");if(v||(h=l("textinfo",i.isArrayOrTypedArray(p)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),v||h&&"none"!==h){var m=l("textposition");s(e,t,n,l,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(m)||"auto"===m||"outside"===m)&&l("automargin"),("inside"===m||"auto"===m||Array.isArray(m))&&l("insidetextorientation")}else"none"===h&&l("textposition","none");o(t,n,l);var g=l("hole");if(l("title.text")){var y=l("title.position",g?"middle center":"top center");g||"middle center"!==y||(t.title.position="top center"),i.coerceFont(l,"title.font",n.font)}l("sort"),l("direction"),l("rotation"),l("pull")}else t.visible=!1}}},53644:function(e,t,r){"use strict";var n=r(10624).appendArrayMultiPointValues;e.exports=function(e,t){var r={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return 1===e.pts.length&&(r.pointNumber=r.i=e.pts[0]),n(r,t,e.pts),"funnelarea"===t.type&&(delete r.v,delete r.i),r}},21552:function(e,t,r){"use strict";var n=r(43616),i=r(76308);e.exports=function(e,t,r,a){var o=r.marker.pattern;o&&o.shape?n.pointStyle(e,r,a,t):i.fill(e,t.color)}},69656:function(e,t,r){"use strict";var n=r(3400);function i(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}t.formatPiePercent=function(e,t){var r=i((100*e).toPrecision(3));return n.numSeparate(r,t)+"%"},t.formatPieValue=function(e,t){var r=i(e.toPrecision(10));return n.numSeparate(r,t)},t.getFirstFilled=function(e,t){if(n.isArrayOrTypedArray(e))for(var r=0;r"),name:f.hovertemplate||-1!==d.indexOf("name")?f.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:m.castOption(_.bgcolor,e.pts)||e.color,borderColor:m.castOption(_.bordercolor,e.pts),fontFamily:m.castOption(w.family,e.pts),fontSize:m.castOption(w.size,e.pts),fontColor:m.castOption(w.color,e.pts),nameLength:m.castOption(_.namelength,e.pts),textAlign:m.castOption(_.align,e.pts),hovertemplate:m.castOption(f.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[g(e,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t,inOut_bbox:k}),e.bbox=k[0],u._hasHoverLabel=!0}u._hasHoverEvent=!0,t.emit("plotly_hover",{points:[g(e,f)],event:n.event})}})),e.on("mouseout",(function(e){var r=t._fullLayout,i=t._fullData[u.index],o=n.select(this).datum();u._hasHoverEvent&&(e.originalEvent=n.event,t.emit("plotly_unhover",{points:[g(o,i)],event:n.event}),u._hasHoverEvent=!1),u._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),u._hasHoverLabel=!1)})),e.on("click",(function(e){var r=t._fullLayout,i=t._fullData[u.index];t._dragging||!1===r.hovermode||(t._hoverdata=[g(e,i)],a.click(t,n.event))}))}function b(e,t,r){var n=m.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=m.castOption(e._input.textfont.color,t.pts));var i=m.castOption(e.insidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||r.family,a=m.castOption(e.insidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||r.size,s=m.castOption(e.insidetextfont.weight,t.pts)||m.castOption(e.textfont.weight,t.pts)||r.weight,l=m.castOption(e.insidetextfont.style,t.pts)||m.castOption(e.textfont.style,t.pts)||r.style,u=m.castOption(e.insidetextfont.variant,t.pts)||m.castOption(e.textfont.variant,t.pts)||r.variant,c=m.castOption(e.insidetextfont.textcase,t.pts)||m.castOption(e.textfont.textcase,t.pts)||r.textcase,f=m.castOption(e.insidetextfont.lineposition,t.pts)||m.castOption(e.textfont.lineposition,t.pts)||r.lineposition,d=m.castOption(e.insidetextfont.shadow,t.pts)||m.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||o.contrast(t.color),family:i,size:a,weight:s,style:l,variant:u,textcase:c,lineposition:f,shadow:d}}function _(e,t){for(var r,n,i=0;it&&t>n||r=-4;m-=2)g(Math.PI*m,"tan");for(m=4;m>=-4;m-=2)g(Math.PI*(m+1),"tan")}if(f||h){for(m=4;m>=-4;m-=2)g(Math.PI*(m+1.5),"rad");for(m=4;m>=-4;m-=2)g(Math.PI*(m+.5),"rad")}}if(s||p||f){var y=Math.sqrt(e.width*e.width+e.height*e.height);if((a={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,a.scale>=1)return a;v.push(a)}(p||h)&&((a=k(e,n,o,l,u)).textPosAngle=(t.startangle+t.stopangle)/2,v.push(a)),(p||d)&&((a=T(e,n,o,l,u)).textPosAngle=(t.startangle+t.stopangle)/2,v.push(a));for(var x=0,b=0,_=0;_=1)break}return v[x]}function k(e,t,r,n,i){t=Math.max(0,t-2*v);var a=e.width/e.height,o=S(a,n,t,r);return{scale:2*o/e.height,rCenter:A(a,o/t),rotate:M(i)}}function T(e,t,r,n,i){t=Math.max(0,t-2*v);var a=e.height/e.width,o=S(a,n,t,r);return{scale:2*o/e.width,rCenter:A(a,o/t),rotate:M(i+Math.PI/2)}}function A(e,t){return Math.cos(t)-e*t}function M(e){return(180/Math.PI*e+720)%180-90}function S(e,t,r,n){var i=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(e*e+n/2)+e))}function E(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function C(e,t){var r=t.pxmid[0],n=t.pxmid[1],i=e.width/2,a=e.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function L(e,t){var r,n,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=O(a),-1!==a.title.position.indexOf("top")?(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height):-1!==a.title.position.indexOf("bottom")&&(o.y+=(1+i)*e.r);var l,u,c=(l=e.r,u=e.trace.aspectratio,l/(void 0===u?1:u)),f=t.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf("left")?(f+=c,o.x-=(1+i)*c,s.tx+=e.titleBox.width/2):-1!==a.title.position.indexOf("center")?f*=2:-1!==a.title.position.indexOf("right")&&(f+=c,o.x+=(1+i)*c,s.tx-=e.titleBox.width/2),r=f/e.titleBox.width,n=P(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function P(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function O(e){var t,r=e.pull;if(!r)return 0;if(l.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function I(e,t){for(var r=[],n=0;n1?c=(u=r.r)/i.aspectratio:u=(c=r.r)*i.aspectratio,l=(u*=(1+i.baseratio)/2)*c}o=Math.min(o,l/r.vTotal)}for(n=0;n")}if(a){var x=l.castOption(i,t.i,"texttemplate");if(x){var b=function(e){return{label:e.label,value:e.v,valueLabel:m.formatPieValue(e.v,n.separators),percent:e.v/r.vTotal,percentLabel:m.formatPiePercent(e.v/r.vTotal,n.separators),color:e.color,text:e.text,customdata:l.castOption(i,e.i,"customdata")}}(t),_=m.getFirstFilled(i.text,t.pts);(y(_)||""===_)&&(b.text=_),t.text=l.texttemplateString(x,b,e._fullLayout._d3locale,b,i._meta||{})}else t.text=""}}function z(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*n-o*i,e.textY=a*i+o*n,e.noCenter=!0}e.exports={plot:function(e,t){var r=e._context.staticPlot,a=e._fullLayout,d=a._size;p("pie",a),_(t,e),I(t,d);var v=l.makeTraceGroups(a._pielayer,t,"trace").each((function(t){var p=n.select(this),v=t[0],g=v.trace;!function(e){var t,r,n,i=e[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,u="px0",c="px1";if("counterclockwise"===o.direction){for(t=0;ti.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))}(t),p.attr("stroke-linejoin","round"),p.each((function(){var y=n.select(this).selectAll("g.slice").data(t);y.enter().append("g").classed("slice",!0),y.exit().remove();var _=[[[],[]],[[],[]]],k=!1;y.each((function(i,o){if(i.hidden)n.select(this).selectAll("path,g").remove();else{i.pointNumber=i.i,i.curveNumber=g.index,_[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var u=v.cx,c=v.cy,d=n.select(this),p=d.selectAll("path.surface").data([i]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),d.call(x,e,t),g.pull){var y=+m.castOption(g.pull,i.pts)||0;y>0&&(u+=y*i.pxmid[0],c+=y*i.pxmid[1])}i.cxFinal=u,i.cyFinal=c;var T=g.hole;if(i.v===v.vTotal){var A="M"+(u+i.px0[0])+","+(c+i.px0[1])+P(i.px0,i.pxmid,!0,1)+P(i.pxmid,i.px0,!0,1)+"Z";T?p.attr("d","M"+(u+T*i.px0[0])+","+(c+T*i.px0[1])+P(i.px0,i.pxmid,!1,T)+P(i.pxmid,i.px0,!1,T)+"Z"+A):p.attr("d",A)}else{var M=P(i.px0,i.px1,!0,1);if(T){var S=1-T;p.attr("d","M"+(u+T*i.px1[0])+","+(c+T*i.px1[1])+P(i.px1,i.px0,!1,T)+"l"+S*i.px0[0]+","+S*i.px0[1]+M+"Z")}else p.attr("d","M"+u+","+c+"l"+i.px0[0]+","+i.px0[1]+M+"Z")}D(e,i,v);var E=m.castOption(g.textposition,i.pts),L=d.selectAll("g.slicetext").data(i.text&&"none"!==E?[0]:[]);L.enter().append("g").classed("slicetext",!0),L.exit().remove(),L.each((function(){var r=l.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),d=l.ensureUniformFontSize(e,"outside"===E?function(e,t,r){var n=m.castOption(e.outsidetextfont.color,t.pts)||m.castOption(e.textfont.color,t.pts)||r.color,i=m.castOption(e.outsidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||r.family,a=m.castOption(e.outsidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||r.size,o=m.castOption(e.outsidetextfont.weight,t.pts)||m.castOption(e.textfont.weight,t.pts)||r.weight,s=m.castOption(e.outsidetextfont.style,t.pts)||m.castOption(e.textfont.style,t.pts)||r.style,l=m.castOption(e.outsidetextfont.variant,t.pts)||m.castOption(e.textfont.variant,t.pts)||r.variant,u=m.castOption(e.outsidetextfont.textcase,t.pts)||m.castOption(e.textfont.textcase,t.pts)||r.textcase,c=m.castOption(e.outsidetextfont.lineposition,t.pts)||m.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=m.castOption(e.outsidetextfont.shadow,t.pts)||m.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}(g,i,a.font):b(g,i,a.font));r.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,d).call(f.convertToTspans,e);var p,y=s.bBox(r.node());if("outside"===E)p=C(y,i);else if(p=w(y,i,v),"auto"===E&&p.scale<1){var x=l.ensureUniformFontSize(e,g.outsidetextfont);r.call(s.font,x),p=C(y=s.bBox(r.node()),i)}var _=p.textPosAngle,T=void 0===_?i.pxmid:R(v.r,_);if(p.targetX=u+T[0]*p.rCenter+(p.x||0),p.targetY=c+T[1]*p.rCenter+(p.y||0),z(p,y),p.outside){var A=p.targetY;i.yLabelMin=A-y.height/2,i.yLabelMid=A,i.yLabelMax=A+y.height/2,i.labelExtraX=0,i.labelExtraY=0,k=!0}p.fontSize=d.size,h(g.type,p,a),t[o].transform=p,l.setTransormAndDisplay(r,p)}))}function P(e,t,r,n){var a=n*(t[0]-e[0]),o=n*(t[1]-e[1]);return"a"+n*v.r+","+n*v.r+" 0 "+i.largeArc+(r?" 1 ":" 0 ")+a+","+o}}));var T=n.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);if(T.enter().append("g").classed("titletext",!0),T.exit().remove(),T.each((function(){var t,r=l.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),i=g.title.text;g._meta&&(i=l.templateString(i,g._meta)),r.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,g.title.font).call(f.convertToTspans,e),t="middle center"===g.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(v):L(v,d),r.attr("transform",c(t.x,t.y)+u(Math.min(1,t.scale))+c(t.tx,t.ty))})),k&&function(e,t){var r,n,i,a,o,s,u,c,f,d,h,p,v;function g(e,t){return e.pxmid[1]-t.pxmid[1]}function y(e,t){return t.pxmid[1]-e.pxmid[1]}function x(e,r){r||(r={});var i,c,f,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),v=n?e.yLabelMin:e.yLabelMax,g=n?e.yLabelMax:e.yLabelMin,y=e.cyFinal+o(e.px0[1],e.px1[1]),x=p-v;if(x*u>0&&(e.labelExtraY=x),l.isArrayOrTypedArray(t.pull))for(c=0;c=(m.castOption(t.pull,f.pts)||0)||((e.pxmid[1]-f.pxmid[1])*u>0?(x=f.cyFinal+o(f.px0[1],f.px1[1])-v-e.labelExtraY)*u>0&&(e.labelExtraY+=x):(g+e.labelExtraY-y)*u>0&&(i=3*s*Math.abs(c-d.indexOf(e)),(h=f.cxFinal+a(f.px0[0],f.px1[0])+i-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*s>0&&(e.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?g:y,o=n?Math.max:Math.min,u=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,(c=e[n][r]).sort(i),f=e[1-n][r],d=f.concat(c),p=[],h=0;hMath.abs(f)?s+="l"+f*e.pxmid[0]/e.pxmid[1]+","+f+"H"+(a+e.labelExtraX+u):s+="l"+e.labelExtraX+","+c+"v"+(f-c)+"h"+u}else s+="V"+(e.yLabelMid+e.labelExtraY)+"h"+u;l.ensureSingle(r,"path","textline").call(o.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})}else r.select("path.textline").remove()}))}(y,g),k&&g.automargin){var A=s.bBox(p.node()),M=g.domain,S=d.w*(M.x[1]-M.x[0]),E=d.h*(M.y[1]-M.y[0]),P=(.5*S-v.r)/d.w,O=(.5*E-v.r)/d.h;i.autoMargin(e,"pie."+g.uid+".automargin",{xl:M.x[0]-P,xr:M.x[1]+P,yb:M.y[0]-O,yt:M.y[1]+O,l:Math.max(v.cx-v.r-A.left,0),r:Math.max(A.right-(v.cx+v.r),0),b:Math.max(A.bottom-(v.cy+v.r),0),t:Math.max(v.cy-v.r-A.top,0),pad:5})}}))}));setTimeout((function(){v.selectAll("tspan").each((function(){var e=n.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:D,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:L,prerenderTitles:_,layoutAreas:I,attachFxHandlers:x,computeTransform:z}},22152:function(e,t,r){"use strict";var n=r(33428),i=r(10528),a=r(82744).resizeText;e.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");a(e,t,"pie"),t.each((function(t){var r=t[0].trace,a=n.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each((function(t){n.select(this).call(i,t,r,e)}))}))}},10528:function(e,t,r){"use strict";var n=r(76308),i=r(69656).castOption,a=r(21552);e.exports=function(e,t,r,o){var s=r.marker.line,l=i(s.color,t.pts)||n.defaultLine,u=i(s.width,t.pts)||0;e.call(a,t,r,o).style("stroke-width",u).call(n.stroke,l)}},35484:function(e,t,r){"use strict";var n=r(52904);e.exports={x:n.x,y:n.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:n.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},11072:function(e,t,r){"use strict";var n=r(67792).gl_pointcloud2d,i=r(3400).isArrayOrTypedArray,a=r(43080),o=r(19280).findExtremes,s=r(44928);function l(e,t){this.scene=e,this.uid=t,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(e.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var u=l.prototype;u.handlePick=function(e){var t=this.idToIndex[e.pointId];return{trace:this,dataCoord:e.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*t],this.pickXYData[2*t+1]]:[this.pickXData[t],this.pickYData[t]],textLabel:i(this.textLabels)?this.textLabels[t]:this.textLabels,color:this.color,name:this.name,pointIndex:t,hoverinfo:this.hoverinfo}},u.update=function(e){this.index=e.index,this.textLabels=e.text,this.name=e.name,this.hoverinfo=e.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(e),this.color=s(e,{})},u.updateFast=function(e){var t,r,n,i,s,l,u=this.xData=this.pickXData=e.x,c=this.yData=this.pickYData=e.y,f=this.pickXYData=e.xy,d=e.xbounds&&e.ybounds,h=e.indices,p=this.bounds;if(f){if(n=f,t=f.length>>>1,d)p[0]=e.xbounds[0],p[2]=e.xbounds[1],p[1]=e.ybounds[0],p[3]=e.ybounds[1];else for(l=0;lp[2]&&(p[2]=i),sp[3]&&(p[3]=s);if(h)r=h;else for(r=new Int32Array(t),l=0;lp[2]&&(p[2]=i),sp[3]&&(p[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var v=a(e.marker.color),m=a(e.marker.border.color),g=e.opacity*e.marker.opacity;v[3]*=g,this.pointcloudOptions.color=v;var y=e.marker.blend;null===y&&(y=u.length<100||c.length<100),this.pointcloudOptions.blend=y,m[3]*=g,this.pointcloudOptions.borderColor=m;var x=e.marker.sizemin,b=Math.max(e.marker.sizemax,e.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=e.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;e._extremes[_._id]=o(_,[p[0],p[2]],{ppad:k}),e._extremes[w._id]=o(w,[p[1],p[3]],{ppad:k})},u.dispose=function(){this.pointcloud.dispose()},e.exports=function(e,t){var r=new l(e,t.uid);return r.update(t),r}},41904:function(e,t,r){"use strict";var n=r(3400),i=r(35484);e.exports=function(e,t,r){function a(r,a){return n.coerce(e,t,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),e.xy&&e.xy instanceof Float32Array&&(t.xy=e.xy),e.indices&&e.indices instanceof Int32Array&&(t.indices=e.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio"),t._length=null}},156:function(e,t,r){"use strict";["*pointcloud* trace is deprecated!","Please consider switching to the *scattergl* trace type."].join(" "),e.exports={attributes:r(35484),supplyDefaults:r(41904),calc:r(41484),plot:r(11072),moduleType:"trace",name:"pointcloud",basePlotModule:r(39952),categories:["gl","gl2d","showLegend"],meta:{}}},41440:function(e,t,r){"use strict";var n=r(25376),i=r(45464),a=r(22548),o=r(55756),s=r(86968).u,l=r(21776).Ks,u=r(49084),c=r(31780).templatedArray,f=r(29736).descriptionOnlyNumbers,d=r(92880).extendFlat,h=r(67824).overrideAll;(e.exports=h({hoverinfo:d({},i.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:f("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:n({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]}),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]}),colorscales:c("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:d(u().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},10760:function(e,t,r){"use strict";var n=r(67824).overrideAll,i=r(84888)._M,a=r(59596),o=r(65460),s=r(93972),l=r(86476),u=r(22676).prepSelect,c=r(3400),f=r(24040),d="sankey";function h(e,t){var r=e._fullData[t],n=e._fullLayout,i=n.dragmode,a="pan"===n.dragmode?"move":"crosshair",o=r._bgRect;if(o&&"pan"!==i&&"zoom"!==i){s(o,a);var d={_id:"x",c2p:c.identity,_offset:r._sankey.translateX,_length:r._sankey.width},h={_id:"y",c2p:c.identity,_offset:r._sankey.translateY,_length:r._sankey.height},p={gd:e,element:o.node(),plotinfo:{id:t,xaxis:d,yaxis:h,fillRangeItems:c.noop},subplot:t,xaxes:[d],yaxes:[h],doneFnCompleted:function(r){var n,i=e._fullData[t],a=i.node.groups.slice(),o=[];function s(e){for(var t=i._sankey.graph.nodes,r=0;rx&&(x=a.source[t]),a.target[t]>x&&(x=a.target[t]);var b,_=x+1;e.node._count=_;var w=e.node.groups,k={};for(t=0;t0&&s(C,_)&&s(L,_)&&(!k.hasOwnProperty(C)||!k.hasOwnProperty(L)||k[C]!==k[L])){k.hasOwnProperty(L)&&(L=k[L]),k.hasOwnProperty(C)&&(C=k[C]),L=+L,h[C=+C]=h[L]=!0;var P="";a.label&&a.label[t]&&(P=a.label[t]);var O=null;P&&p.hasOwnProperty(P)&&(O=p[P]),u.push({pointNumber:t,label:P,color:c?a.color[t]:a.color,hovercolor:f?a.hovercolor[t]:a.hovercolor,customdata:d?a.customdata[t]:a.customdata,concentrationscale:O,source:C,target:L,value:+E}),S.source.push(C),S.target.push(L)}}var I=_+w.length,R=o(r.color),D=o(r.customdata),z=[];for(t=0;t_-1,childrenNodes:[],pointNumber:t,label:F,color:R?r.color[t]:r.color,customdata:D?r.customdata[t]:r.customdata})}var N=!1;return function(e,t,r){for(var a=i.init2dArray(e,0),o=0;o1}))}(I,S.source,S.target)&&(N=!0),{circular:N,links:u,nodes:z,groups:w,groupLookup:k}}e.exports=function(e,t){var r=u(t);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},11820:function(e){"use strict";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},47140:function(e,t,r){"use strict";var n=r(3400),i=r(41440),a=r(76308),o=r(49760),s=r(86968).Q,l=r(16132),u=r(31780),c=r(51272);function f(e,t){function r(r,a){return n.coerce(e,t,i.link.colorscales,r,a)}r("label"),r("cmin"),r("cmax"),r("colorscale")}e.exports=function(e,t,r,d){function h(r,a){return n.coerce(e,t,i,r,a)}var p=n.extendDeep(d.hoverlabel,e.hoverlabel),v=e.node,m=u.newContainer(t,"node");function g(e,t){return n.coerce(v,m,i.node,e,t)}g("label"),g("groups"),g("x"),g("y"),g("pad"),g("thickness"),g("line.color"),g("line.width"),g("hoverinfo",e.hoverinfo),l(v,m,g,p),g("hovertemplate"),g("align");var y=d.colorway;g("color",m.label.map((function(e,t){return a.addOpacity(function(e){return y[e%y.length]}(t),.8)}))),g("customdata");var x=e.link||{},b=u.newContainer(t,"link");function _(e,t){return n.coerce(x,b,i.link,e,t)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",e.hoverinfo),l(x,b,_,p),_("hovertemplate");var w,k=o(d.paper_bgcolor).getLuminance()<.333,T=_("color",k?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)");function A(e){var t=o(e);if(!t.isValid())return e;var r=t.getAlpha();return r<=.8?t.setAlpha(r+.2):t=k?t.brighten():t.darken(),t.toRgbString()}_("hovercolor",Array.isArray(T)?T.map(A):A(T)),_("customdata"),c(x,b,{name:"colorscales",handleItemDefaults:f}),s(t,d,h),h("orientation"),h("valueformat"),h("valuesuffix"),m.x.length&&m.y.length&&(w="freeform"),h("arrangement",w),n.coerceFont(h,"textfont",d.font,{autoShadowDflt:!0}),t._length=null}},45499:function(e,t,r){"use strict";e.exports={attributes:r(41440),supplyDefaults:r(47140),calc:r(48068),plot:r(59596),moduleType:"trace",name:"sankey",basePlotModule:r(10760),selectPoints:r(81128),categories:["noOpacity"],meta:{}}},59596:function(e,t,r){"use strict";var n=r(33428),i=r(3400),a=i.numberFormat,o=r(83248),s=r(93024),l=r(76308),u=r(11820).cn,c=i._;function f(e){return""!==e}function d(e,t){return e.filter((function(e){return e.key===t.traceId}))}function h(e,t){n.select(e).select("path").style("fill-opacity",t),n.select(e).select("rect").style("fill-opacity",t)}function p(e){n.select(e).select("text.name").style("fill","black")}function v(e){return function(t){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(e){return function(t){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(e,t,r){t&&r&&d(r,t).selectAll("."+u.sankeyLink).filter(v(t)).call(x.bind(0,t,r,!1))}function y(e,t,r){t&&r&&d(r,t).selectAll("."+u.sankeyLink).filter(v(t)).call(b.bind(0,t,r,!1))}function x(e,t,r,n){n.style("fill",(function(e){if(!e.link.concentrationscale)return e.tinyColorHoverHue})).style("fill-opacity",(function(e){if(!e.link.concentrationscale)return e.tinyColorHoverAlpha})),n.each((function(r){var n=r.link.label;""!==n&&d(t,e).selectAll("."+u.sankeyLink).filter((function(e){return e.link.label===n})).style("fill",(function(e){if(!e.link.concentrationscale)return e.tinyColorHoverHue})).style("fill-opacity",(function(e){if(!e.link.concentrationscale)return e.tinyColorHoverAlpha}))})),r&&d(t,e).selectAll("."+u.sankeyNode).filter(m(e)).call(g)}function b(e,t,r,n){n.style("fill",(function(e){return e.tinyColorHue})).style("fill-opacity",(function(e){return e.tinyColorAlpha})),n.each((function(r){var n=r.link.label;""!==n&&d(t,e).selectAll("."+u.sankeyLink).filter((function(e){return e.link.label===n})).style("fill",(function(e){return e.tinyColorHue})).style("fill-opacity",(function(e){return e.tinyColorAlpha}))})),r&&d(t,e).selectAll(u.sankeyNode).filter(m(e)).call(y)}function _(e,t){var r=e.hoverlabel||{},n=i.nestedProperty(r,t).get();return!Array.isArray(n)&&n}e.exports=function(e,t){for(var r=e._fullLayout,i=r._paper,d=r._size,v=0;v"),color:_(o,"bgcolor")||l.addOpacity(v.color,1),borderColor:_(o,"bordercolor"),fontFamily:_(o,"font.family"),fontSize:_(o,"font.size"),fontColor:_(o,"font.color"),fontWeight:_(o,"font.weight"),fontStyle:_(o,"font.style"),fontVariant:_(o,"font.variant"),fontTextcase:_(o,"font.textcase"),fontLineposition:_(o,"font.lineposition"),fontShadow:_(o,"font.shadow"),nameLength:_(o,"namelength"),textAlign:_(o,"align"),idealAlign:n.event.x"),color:_(o,"bgcolor")||i.tinyColorHue,borderColor:_(o,"bordercolor"),fontFamily:_(o,"font.family"),fontSize:_(o,"font.size"),fontColor:_(o,"font.color"),fontWeight:_(o,"font.weight"),fontStyle:_(o,"font.style"),fontVariant:_(o,"font.variant"),fontTextcase:_(o,"font.textcase"),fontLineposition:_(o,"font.lineposition"),fontShadow:_(o,"font.shadow"),nameLength:_(o,"namelength"),textAlign:_(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e});h(w,.85),p(w)}}},unhover:function(t,i,a){!1!==e._fullLayout.hovermode&&(n.select(t).call(y,i,a),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,e.emit("plotly_unhover",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(t,r,i){var a=r.node;a.originalEvent=n.event,e._hoverdata=[a],n.select(t).call(y,r,i),s.click(e,{target:!0})}}})}},83248:function(e,t,r){"use strict";var n=r(49812),i=r(67756).Gz,a=r(33428),o=r(26800),s=r(48932),l=r(11820),u=r(49760),c=r(76308),f=r(43616),d=r(3400),h=d.strTranslate,p=d.strRotate,v=r(71688),m=v.keyFun,g=v.repeat,y=v.unwrap,x=r(72736),b=r(24040),_=r(84284),w=_.CAP_SHIFT,k=_.LINE_SPACING;function T(e,t,r){var n,i=y(t),a=i.trace,c=a.domain,f="h"===a.orientation,h=a.node.pad,p=a.node.thickness,v={justify:o.sankeyJustify,left:o.sankeyLeft,right:o.sankeyRight,center:o.sankeyCenter}[a.node.align],m=e.width*(c.x[1]-c.x[0]),g=e.height*(c.y[1]-c.y[0]),x=i._nodes,b=i._links,_=i.circular;(n=_?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(f?[m,g]:[g,m]).nodeWidth(p).nodePadding(h).nodeId((function(e){return e.pointNumber})).nodeAlign(v).nodes(x).links(b);var w,k,T,A=n();for(var M in n.nodePadding()=i||(r=i-t.y0)>1e-6&&(t.y0+=r,t.y1+=r),i=t.y1+h}))}(function(e){var t,r,n=e.map((function(e,t){return{x0:e.x0,index:t}})).sort((function(e,t){return e.x0-t.x0})),i=[],a=-1,o=-1/0;for(w=0;wo+p&&(a+=1,t=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=t-s.x0,s.x0+=r,s.x1+=r}return i}(x=A.nodes)),n.update(A)}return{circular:_,key:r,trace:a,guid:d.randstr(),horizontal:f,width:m,height:g,nodePad:a.node.pad,nodeLineColor:a.node.line.color,nodeLineWidth:a.node.line.width,linkLineColor:a.link.line.color,linkLineWidth:a.link.line.width,linkArrowLength:a.link.arrowlen,valueFormat:a.valueformat,valueSuffix:a.valuesuffix,textFont:a.textfont,translateX:c.x[0]*e.width+e.margin.l,translateY:e.height-c.y[1]*e.height+e.margin.t,dragParallel:f?g:m,dragPerpendicular:f?m:g,arrangement:a.arrangement,sankey:n,graph:A,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(e,t,r){var n=u(t.color),i=u(t.hovercolor),a=t.source.label+"|"+t.target.label+"__"+r;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:a,traceId:e.key,pointNumber:t.pointNumber,link:t,tinyColorHue:c.tinyRGB(n),tinyColorAlpha:n.getAlpha(),tinyColorHoverHue:c.tinyRGB(i),tinyColorHoverAlpha:i.getAlpha(),linkPath:M,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function M(){return function(e){var t=e.linkArrowLength;if(e.link.circular)return function(e,t){var r=e.width/2,n=e.circularPathData;return"top"===e.circularLinkType?"M "+(n.targetX-t)+" "+(n.targetY+r)+" L"+(n.rightInnerExtent-t)+" "+(n.targetY+r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 1 "+(n.rightFullExtent-r-t)+" "+(n.targetY-n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r-t)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 1 "+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent-r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 1 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY-n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.leftInnerExtent+" "+(n.sourceY-r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 0 "+(n.leftFullExtent-r)+" "+(n.sourceY-n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"L"+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent+r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 0 "+(n.rightFullExtent+r-t)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r-t)+" "+(n.targetY-n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 0 "+(n.rightInnerExtent-t)+" "+(n.targetY-r)+"L"+(n.targetX-t)+" "+(n.targetY-r)+(t>0?"L"+n.targetX+" "+n.targetY:"")+"Z":"M "+(n.targetX-t)+" "+(n.targetY-r)+" L"+(n.rightInnerExtent-t)+" "+(n.targetY-r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 0 "+(n.rightFullExtent-r-t)+" "+(n.targetY+n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r-t)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 0 "+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent+r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 0 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY+n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.leftInnerExtent+" "+(n.sourceY+r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 1 "+(n.leftFullExtent-r)+" "+(n.sourceY+n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"L"+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent-r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 1 "+(n.rightFullExtent+r-t)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r-t)+" "+(n.targetY+n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 1 "+(n.rightInnerExtent-t)+" "+(n.targetY+r)+"L"+(n.targetX-t)+" "+(n.targetY+r)+(t>0?"L"+n.targetX+" "+n.targetY:"")+"Z"}(e.link,t);var r=Math.abs((e.link.target.x0-e.link.source.x1)/2);t>r&&(t=r);var n=e.link.source.x1,a=e.link.target.x0-t,o=i(n,a),s=o(.5),l=o(.5),u=e.link.y0-e.link.width/2,c=e.link.y0+e.link.width/2,f=e.link.y1-e.link.width/2,d=e.link.y1+e.link.width/2,h="M"+n+","+u,p="C"+s+","+u+" "+l+","+f+" "+a+","+f,v="C"+l+","+d+" "+s+","+c+" "+n+","+c,m=t>0?"L"+(a+t)+","+(f+e.link.width/2):"";return h+p+(m+="L"+a+","+d)+v+"Z"}}function S(e,t){var r=u(t.color),n=l.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,o=Math.max(.5,t.dy),s="node_"+t.pointNumber;return t.group&&(s=d.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:c.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join("_"),interactionState:e.interactionState,figure:e}}function E(e){e.attr("transform",(function(e){return h(e.node.x0.toFixed(3),e.node.y0.toFixed(3))}))}function C(e){e.call(E)}function L(e,t){e.call(C),t.attr("d",M())}function P(e){e.attr("width",(function(e){return e.node.x1-e.node.x0})).attr("height",(function(e){return e.visibleHeight}))}function O(e){return e.link.width>1||e.linkLineWidth>0}function I(e){return h(e.translateX,e.translateY)+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function R(e,t,r){e.on(".basic",null).on("mouseover.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.hover(this,e,t),e.interactionState.hovered=[this,e])})).on("mousemove.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.follow(this,e),e.interactionState.hovered=[this,e])})).on("mouseout.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.unhover(this,e,t),e.interactionState.hovered=!1)})).on("click.basic",(function(e){e.interactionState.hovered&&(r.unhover(this,e,t),e.interactionState.hovered=!1),e.interactionState.dragInProgress||e.partOfGroup||r.select(this,e,t)}))}function D(e,t,r,i){var o=a.behavior.drag().origin((function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}})).on("dragstart",(function(a){if("fixed"!==a.arrangement&&(d.ensureSingle(i._fullLayout._infolayer,"g","dragcover",(function(e){i._fullLayout._dragCover=e})),d.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),"snap"===a.arrangement)){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(e,t,r,i){!function(e){for(var t=0;t0&&n.forceLayouts[t].alpha(0)}}(0,t,a,r)).stop()}(0,o,a),function(e,t,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,z(r,i)}}))}(e,t,a,o,i)}})).on("drag",(function(r){if("fixed"!==r.arrangement){var n=a.event.x,i=a.event.y;"snap"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):("freeform"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),F(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),L(e.filter(N(r)),t))}})).on("dragend",(function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;tl&&L[g].gap;)g--;for(x=L[g].s,v=L.length-1;v>g;v--)L[v].s=x;for(;lS[f]&&f=0;f--){var d=e[f];if("scatter"===d.type&&d.xaxis===u.xaxis&&d.yaxis===u.yaxis){d.opacity=void 0;break}}}}}},18800:function(e,t,r){"use strict";var n=r(3400),i=r(24040),a=r(52904),o=r(88200),s=r(43028),l=r(43980),u=r(31147),c=r(43912),f=r(74428),d=r(66828),h=r(11731),p=r(124),v=r(70840),m=r(3400).coercePattern;e.exports=function(e,t,r,g){function y(r,i){return n.coerce(e,t,a,r,i)}var x=l(e,t,g,y);if(x||(t.visible=!1),t.visible){u(e,t,g,y),y("xhoverformat"),y("yhoverformat"),y("zorder");var b=c(e,t,g,y);"group"===g.scattermode&&void 0===t.orientation&&y("orientation","v");var _=!b&&x=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,a=Math.abs(d.c2p(e.x)-p);return a=Math.min(t,r)&&v<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,a=Math.abs(h.c2p(e.y)-v);return ar!==(u=i[n][1])>=r&&(o=i[n-1][0],s=i[n][0],u-l&&(a=o+(s-o)*(r-l)/(u-l),f=Math.min(f,a),p=Math.max(p,a)));return{x0:f=Math.max(f,0),x1:p=Math.min(p,d._length),y0:r,y1:r}}(f._polygons);null===O&&(O={x0:m[0],x1:m[0],y0:m[1],y1:m[1]});var I=s.defaultLine;return s.opacity(f.fillcolor)?I=f.fillcolor:s.opacity((f.line||{}).color)&&(I=f.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1,color:I,hovertemplate:!1}),delete e.index,f.text&&!n.isArrayOrTypedArray(f.text)?e.text=String(f.text):e.text=f.name,[e]}}},65875:function(e,t,r){"use strict";var n=r(43028);e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(52904),layoutAttributes:r(55308),supplyDefaults:r(18800),crossTraceDefaults:r(35036),supplyLayoutDefaults:r(59748),calc:r(16356).calc,crossTraceCalc:r(96664),arraysToCalcdata:r(20148),plot:r(96504),colorbar:r(5528),formatLabels:r(76688),style:r(49224).style,styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(98723),selectPoints:r(91560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(57952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},55308:function(e){"use strict";e.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},59748:function(e,t,r){"use strict";var n=r(3400),i=r(55308);e.exports=function(e,t){var r,a,o="group"===t.barmode;"group"===t.scattermode&&(r="scattergap",a=o?t.bargap:.2,n.coerce(e,t,i,r,a))}},66828:function(e,t,r){"use strict";var n=r(3400).isArrayOrTypedArray,i=r(94288).hasColorscale,a=r(27260);e.exports=function(e,t,r,o,s,l){l||(l={});var u=(e.marker||{}).color;u&&u._inputArray&&(u=u._inputArray),s("line.color",r),i(e,"line")?a(e,t,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(u)&&u||r),s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},52340:function(e,t,r){"use strict";var n=r(43616),i=r(39032),a=i.BADNUM,o=i.LOG_CLIP,s=o+.5,l=o-.5,u=r(3400),c=u.segmentsIntersect,f=u.constrain,d=r(88200);e.exports=function(e,t){var r,i,o,h,p,v,m,g,y,x,b,_,w,k,T,A,M,S,E=t.trace||{},C=t.xaxis,L=t.yaxis,P="log"===C.type,O="log"===L.type,I=C._length,R=L._length,D=t.backoff,z=E.marker,F=t.connectGaps,N=t.baseTolerance,B=t.shape,j="linear"===B,U=E.fill&&"none"!==E.fill,q=[],V=d.minTolerance,H=e.length,G=new Array(H),W=0;function Y(r){var n=e[r];if(!n)return!1;var i=t.linearized?C.l2p(n.x):C.c2p(n.x),o=t.linearized?L.l2p(n.y):L.c2p(n.y);if(i===a){if(P&&(i=C.c2p(n.x,!0)),i===a)return!1;O&&o===a&&(i*=Math.abs(C._m*R*(C._m>0?s:l)/(L._m*I*(L._m>0?s:l)))),i*=1e3}if(o===a){if(O&&(o=L.c2p(n.y,!0)),o===a)return!1;o*=1e3}return[i,o]}function Z(e,t,r,n){var i=r-e,a=n-t,o=.5-e,s=.5-t,l=i*i+a*a,u=i*o+a*s;if(u>0&&uoe||e[1]le)return[f(e[0],ae,oe),f(e[1],se,le)]}function fe(e,t){return e[0]===t[0]&&(e[0]===ae||e[0]===oe)||e[1]===t[1]&&(e[1]===se||e[1]===le)||void 0}function de(e,t,r){return function(n,i){var a=ce(n),o=ce(i),s=[];if(a&&o&&fe(a,o))return s;a&&s.push(a),o&&s.push(o);var l=2*u.constrain((n[e]+i[e])/2,t,r)-((a||n)[e]+(o||i)[e]);return l&&((a&&o?l>0===a[e]>o[e]?a:o:a||o)[e]+=l),s}}function he(e){var t=e[0],r=e[1],n=t===G[W-1][0],i=r===G[W-1][1];if(!n||!i)if(W>1){var a=t===G[W-2][0],o=r===G[W-2][1];n&&(t===ae||t===oe)&&a?o?W--:G[W-1]=e:i&&(r===se||r===le)&&o?a?W--:G[W-1]=e:G[W++]=e}else G[W++]=e}function pe(e){G[W-1][0]!==e[0]&&G[W-1][1]!==e[1]&&he([Q,ee]),he(e),te=null,Q=ee=0}"linear"===B||"spline"===B?ne=function(e,t){for(var r=[],n=0,i=0;i<4;i++){var a=ue[i],o=c(e[0],e[1],t[0],t[1],a[0],a[1],a[2],a[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&&K(o,e)oe?oe:0,$=t[1]le?le:0,J||$){if(W)if(te){var n=ne(te,t);n.length>1&&(pe(n[0]),G[W++]=n[1])}else re=ne(G[W-1],t)[0],G[W++]=re;else G[W++]=[J||t[0],$||t[1]];var i=G[W-1];J&&$&&(i[0]!==J||i[1]!==$)?(te&&(Q!==J&&ee!==$?he(Q&&ee?function(e,t){var r=t[0]-e[0],n=(t[1]-e[1])/r;return(e[1]*t[0]-t[1]*e[0])/r>0?[n>0?ae:oe,le]:[n>0?oe:ae,se]}(te,t):[Q||J,ee||$]):Q&&ee&&he([Q,ee])),he([J,$])):Q-J&&ee-$&&he([J||Q,$||ee]),te=t,Q=J,ee=$}else te&&pe(ne(te,t)[0]),G[W++]=t}for(r=0;rX(v,ge))break;o=v,(w=y[0]*g[0]+y[1]*g[1])>b?(b=w,h=v,m=!1):w<_&&(_=w,p=v,m=!0)}if(m?(me(h),o!==p&&me(p)):(p!==i&&me(p),o!==h&&me(h)),me(o),r>=e.length||!v)break;me(v),i=v}}else me(h)}te&&he([Q||te[0],ee||te[1]]),q.push(G.slice(0,W))}var ye=B.slice(B.length-1);if(D&&"h"!==ye&&"v"!==ye){for(var xe=!1,be=-1,_e=[],we=0;we=0?l=h:(l=h=d,d++),l0?Math.max(r,a):0}}},5528:function(e){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},74428:function(e,t,r){"use strict";var n=r(76308),i=r(94288).hasColorscale,a=r(27260),o=r(43028);e.exports=function(e,t,r,s,l,u){var c=o.isBubble(e),f=(e.line||{}).color;u=u||{},f&&(r=f),l("marker.symbol"),l("marker.opacity",c?.7:1),l("marker.size"),u.noAngle||(l("marker.angle"),u.noAngleRef||l("marker.angleref"),u.noStandOff||l("marker.standoff")),l("marker.color",r),i(e,"marker")&&a(e,t,s,l,{prefix:"marker.",cLetter:"c"}),u.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),u.noLine||(l("marker.line.color",f&&!Array.isArray(f)&&t.marker.color!==f?f:c?n.background:n.defaultLine),i(e,"marker.line")&&a(e,t,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",c?1:0)),c&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),u.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},31147:function(e,t,r){"use strict";var n=r(3400).dateTick0,i=r(39032).ONEWEEK;function a(e,t){return n(t,e%i===0?1:0)}e.exports=function(e,t,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",a(o,t.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",a(s,t.ycalendar)),n("yperiodalignment"))}}},96504:function(e,t,r){"use strict";var n=r(33428),i=r(24040),a=r(3400),o=a.ensureSingle,s=a.identity,l=r(43616),u=r(43028),c=r(52340),f=r(14328),d=r(92065).tester;function h(e,t,r,f,h,p,v){var m,g=e._context.staticPlot;!function(e,t,r,i,o){var s=r.xaxis,l=r.yaxis,c=n.extent(a.simpleMap(s.range,s.r2c)),f=n.extent(a.simpleMap(l.range,l.r2c)),d=i[0].trace;if(u.hasMarkers(d)){var h=d.marker.maxdisplayed;if(0!==h){var p=i.filter((function(e){return e.x>=c[0]&&e.x<=c[1]&&e.y>=f[0]&&e.y<=f[1]})),v=Math.ceil(p.length/h),m=0;o.forEach((function(e,r){var n=e[0].trace;u.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function x(e){return y?e.transition():e}var b=r.xaxis,_=r.yaxis,w=f[0].trace,k=w.line,T=n.select(p),A=o(T,"g","errorbars"),M=o(T,"g","lines"),S=o(T,"g","points"),E=o(T,"g","text");if(i.getComponentMethod("errorbars","plot")(e,A,r,v),!0===w.visible){var C,L;x(T).style("opacity",w.opacity);var P,O,I=w.fill.charAt(w.fill.length-1);"x"!==I&&"y"!==I&&(I=""),"y"===I?(P=1,O=_.c2p(0,!0)):"x"===I&&(P=0,O=b.c2p(0,!0)),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=T;var R,D,z="",F=[],N=w._prevtrace,B=null,j=null;N&&(z=N._prevRevpath||"",L=N._nextFill,F=N._ownPolygons,B=N._fillsegments,j=N._fillElement);var U,q,V,H,G,W,Y="",Z="",X=[];w._polygons=[];var K=[],J=[],$=a.noop;if(C=w._ownFill,u.hasLines(w)||"none"!==w.fill){L&&L.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(k.shape)?(U=l.steps(k.shape),q=l.steps(k.shape.split("").reverse().join(""))):U=q="spline"===k.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?l.smoothclosed(e.slice(1),k.smoothing):l.smoothopen(e,k.smoothing)}:function(e){return"M"+e.join("L")},V=function(e){return q(e.reverse())},J=c(f,{xaxis:b,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(k.width||1,3)/4,shape:k.shape,backoff:k.backoff,simplify:k.simplify,fill:w.fill}),K=new Array(J.length);var Q=0;for(m=0;m0,m=f(e,t,r);(c=i.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),c.order(),function(e,t,r){t.each((function(t){var i=o(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,e);var a=t[0].trace,u=[];a._ownfill&&u.push("_ownFill"),a._nexttrace&&u.push("_nextFill");var c=i.selectAll("g").data(u,s);c.enter().append("g"),c.exit().each((function(e){a[e]=null})).remove(),c.order().each((function(e){a[e]=o(n.select(this),"path","js-fill")}))}))}(e,c,t),v?(u&&(d=u()),n.transition().duration(a.duration).ease(a.easing).each("end",(function(){d&&d()})).each("interrupt",(function(){d&&d()})).each((function(){i.selectAll("g.trace").each((function(r,n){h(e,n,t,r,m,this,a)}))}))):c.each((function(r,n){h(e,n,t,r,m,this,a)})),p&&c.exit().remove(),i.selectAll("path:not([d])").remove()}},91560:function(e,t,r){"use strict";var n=r(43028);e.exports=function(e,t){var r,i,a,o,s=e.cd,l=e.xaxis,u=e.yaxis,c=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===t)for(r=0;r0){var d=i.c2l(c);i._lowerLogErrorBound||(i._lowerLogErrorBound=d),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,d)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(e,t,r){var n=[i(e.x,e.error_x,t[0],r.xaxis),i(e.y,e.error_y,t[1],r.yaxis),i(e.z,e.error_z,t[2],r.zaxis)],a=function(e){for(var t=0;t-1?-1:e.indexOf("right")>-1?1:0}function b(e){return null===e||void 0===e?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function _(e,t){return t(4*e)}function w(e){return h[e]}function k(e,t,r,n,i){var a=null;if(l.isArrayOrTypedArray(e)){a=[];for(var o=0;o=0){var v=function(e,t,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f("surfacecolor",h||p);for(var v=["x","y","z"],m=0;m<3;++m){var g="projection."+v[m];f(g+".show")&&(f(g+".opacity"),f(g+".scale"))}var y=n.getComponentMethod("errorbars","supplyDefaults");y(e,t,h||p||r,{axis:"z"}),y(e,t,h||p||r,{axis:"y",inherit:"z"}),y(e,t,h||p||r,{axis:"x",inherit:"z"})}else t.visible=!1}},3296:function(e,t,r){"use strict";e.exports={plot:r(41064),attributes:r(91592),markerSymbols:r(87792),supplyDefaults:r(83484),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:r(41484),moduleType:"trace",name:"scatter3d",basePlotModule:r(12536),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},90372:function(e,t,r){"use strict";var n=r(98304),i=r(52904),a=r(45464),o=r(21776).Ks,s=r(21776).Gw,l=r(49084),u=r(92880).extendFlat,c=i.marker,f=i.line,d=c.line;e.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:u({},i.mode,{dflt:"markers"}),text:u({},i.text,{}),texttemplate:s({editType:"plot"},{keys:["a","b","text"]}),hovertext:u({},i.hovertext,{}),line:{color:f.color,width:f.width,dash:f.dash,backoff:f.backoff,shape:u({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:i.connectgaps,fill:u({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:n(),marker:u({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,angle:c.angle,angleref:c.angleref,standoff:c.standoff,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:u({width:d.width,editType:"calc"},l("marker.line")),gradient:c.gradient,editType:"calc"},l("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:u({},a.hoverinfo,{flags:["a","b","text","name"]}),hoveron:i.hoveron,hovertemplate:o(),zorder:i.zorder}},48228:function(e,t,r){"use strict";var n=r(38248),i=r(90136),a=r(20148),o=r(4500),s=r(16356).calcMarkerSize,l=r(50948);e.exports=function(e,t){var r=t._carpetTrace=l(e,t);if(r&&r.visible&&"legendonly"!==r.visible){var u;t.xaxis=r.xaxis,t.yaxis=r.yaxis;var c,f,d=t._length,h=new Array(d),p=!1;for(u=0;u")}return o}function y(e,t){var r;r=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,m.push(r+": "+t.toFixed(3)+e.labelsuffix)}}},4184:function(e,t,r){"use strict";e.exports={attributes:r(90372),supplyDefaults:r(6176),colorbar:r(5528),formatLabels:r(52364),calc:r(48228),plot:r(20036),style:r(49224).style,styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(58960),selectPoints:r(91560),eventData:r(89307),moduleType:"trace",name:"scattercarpet",basePlotModule:r(57952),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},20036:function(e,t,r){"use strict";var n=r(96504),i=r(54460),a=r(43616);e.exports=function(e,t,r,o){var s,l,u,c=r[0][0].carpet,f=i.getFromId(e,c.xaxis||"x"),d=i.getFromId(e,c.yaxis||"y"),h={xaxis:f,yaxis:d,plot:t.plot};for(s=0;s")}function h(e){return e+"\xb0"}}(u,v,e,l[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}}},36952:function(e,t,r){"use strict";e.exports={attributes:r(6096),supplyDefaults:r(86188),colorbar:r(5528),formatLabels:r(56696),calc:r(25212),calcGeoJSON:r(48691).calcGeoJSON,plot:r(48691).plot,style:r(25064),styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(64292),eventData:r(58544),selectPoints:r(8796),moduleType:"trace",name:"scattergeo",basePlotModule:r(10816),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},48691:function(e,t,r){"use strict";var n=r(33428),i=r(3400),a=r(59972).getTopojsonFeatures,o=r(44808),s=r(27144),l=r(19280).findExtremes,u=r(39032).BADNUM,c=r(16356).calcMarkerSize,f=r(43028),d=r(25064);e.exports={calcGeoJSON:function(e,t){var r,n,o=e[0].trace,f=t[o.geo],d=f._subplot,h=o._length;if(i.isArrayOrTypedArray(o.locations)){var p=o.locationmode,v="geojson-id"===p?s.extractTraceFeature(e):a(o,d.topojson);for(r=0;r=m,w=2*b,k={},T=l.makeCalcdata(t,"x"),A=y.makeCalcdata(t,"y"),M=s(t,l,"x",T),S=s(t,y,"y",A),E=M.vals,C=S.vals;t._x=E,t._y=C,t.xperiodalignment&&(t._origX=T,t._xStarts=M.starts,t._xEnds=M.ends),t.yperiodalignment&&(t._origY=A,t._yStarts=S.starts,t._yEnds=S.ends);var L=new Array(w),P=new Array(b);for(r=0;r1&&i.extendFlat(s.line,h.linePositions(e,r,n)),s.errorX||s.errorY){var l=h.errorBarPositions(e,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}return s.text&&(i.extendFlat(s.text,{positions:n},h.textPosition(e,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},h.textPosition(e,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},h.textPosition(e,r,s.text,s.markerUnsel))),s}(e,0,t,L,E,C),R=p(e,x);return f(o,t),_?I.marker&&(O=I.marker.sizeAvg||Math.max(I.marker.size,3)):O=u(t,b),c(e,t,l,y,E,C,O),I.errorX&&g(t,l,I.errorX),I.errorY&&g(t,y,I.errorY),I.fill&&!R.fill2d&&(R.fill2d=!0),I.marker&&!R.scatter2d&&(R.scatter2d=!0),I.line&&!R.line2d&&(R.line2d=!0),!I.errorX&&!I.errorY||R.error2d||(R.error2d=!0),I.text&&!R.glText&&(R.glText=!0),I.marker&&(I.marker.snap=b),R.lineOptions.push(I.line),R.errorXOptions.push(I.errorX),R.errorYOptions.push(I.errorY),R.fillOptions.push(I.fill),R.markerOptions.push(I.marker),R.markerSelectedOptions.push(I.markerSel),R.markerUnselectedOptions.push(I.markerUnsel),R.textOptions.push(I.text),R.textSelectedOptions.push(I.textSel),R.textUnselectedOptions.push(I.textUnsel),R.selectBatch.push([]),R.unselectBatch.push([]),k._scene=R,k.index=R.count,k.x=E,k.y=C,k.positions=L,R.count++,[{x:!1,y:!1,t:k,trace:t}]}},67072:function(e){"use strict";e.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},84236:function(e,t,r){"use strict";var n=r(38248),i=r(20472),a=r(72160),o=r(24040),s=r(3400),l=s.isArrayOrTypedArray,u=r(43616),c=r(79811),f=r(33040).formatColor,d=r(43028),h=r(7152),p=r(80088),v=r(67072),m=r(13448).DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},y=r(10624).appendArrayPointValue;function x(e,t){var r,i=e._fullLayout,a=t._length,o=t.textfont,u=t.textposition,c=l(u)?u:[u],f=o.color,d=o.size,h=o.family,p=o.weight,v=o.style,m=o.variant,g={},x=e._context.plotGlPixelRatio,_=t.texttemplate;if(_){g.text=[];var w=i._d3locale,k=Array.isArray(_),T=k?Math.min(_.length,a):a,A=k?function(e){return _[e]}:function(){return _};for(r=0;r500?"bold":"normal":e}function _(e,t){var r,n,i=t._length,o=t.marker,s={},u=l(o.symbol),c=l(o.angle),d=l(o.color),v=l(o.line.color),m=l(o.opacity),g=l(o.size),y=l(o.line.width);if(u||(n=p.isOpenSymbol(o.symbol)),u||d||v||m||c){s.symbols=new Array(i),s.angles=new Array(i),s.colors=new Array(i),s.borderColors=new Array(i);var x=o.symbol,b=o.angle,_=f(o,o.opacity,i),w=f(o.line,o.opacity,i);if(!l(w[0])){var k=w;for(w=Array(i),r=0;rv.TOO_MANY_POINTS||d.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=n[0],h=n[1];for(i=0;i1?u[i]:u[0]:u,v=l(c)?c.length>1?c[i]:c[0]:c,m=g[p],y=g[v],x=f?f/.8+1:0,b=-y*x-.5*y;o.offset[i]=[m*x/h,b/h]}}return o}}},80220:function(e,t,r){"use strict";var n=r(3400),i=r(24040),a=r(80088),o=r(2876),s=r(88200),l=r(43028),u=r(43980),c=r(31147),f=r(74428),d=r(66828),h=r(70840),p=r(124);e.exports=function(e,t,r,v){function m(r,i){return n.coerce(e,t,o,r,i)}var g=!!e.marker&&a.isOpenSymbol(e.marker.symbol),y=l.isBubble(e),x=u(e,t,v,m);if(x){c(e,t,v,m),m("xhoverformat"),m("yhoverformat");var b=x100},t.isDotSymbol=function(e){return"string"===typeof e?n.DOT_RE.test(e):e>200}},41272:function(e,t,r){"use strict";var n=r(24040),i=r(3400),a=r(44928);function o(e,t,r,o){var s=e.xa,l=e.ya,u=e.distance,c=e.dxy,f=e.index,d={pointNumber:f,x:t[f],y:r[f]};d.tx=i.isArrayOrTypedArray(o.text)?o.text[f]:o.text,d.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,d.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,d.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var h=o.textfont;h&&(d.ts=i.isArrayOrTypedArray(h.size)?h.size[f]:h.size,d.tc=i.isArrayOrTypedArray(h.color)?h.color[f]:h.color,d.tf=Array.isArray(h.family)?h.family[f]:h.family,d.tw=Array.isArray(h.weight)?h.weight[f]:h.weight,d.ty=Array.isArray(h.style)?h.style[f]:h.style,d.tv=Array.isArray(h.variant)?h.variant[f]:h.variant);var p=o.marker;p&&(d.ms=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,d.mo=i.isArrayOrTypedArray(p.opacity)?p.opacity[f]:p.opacity,d.mx=i.isArrayOrTypedArray(p.symbol)?p.symbol[f]:p.symbol,d.ma=i.isArrayOrTypedArray(p.angle)?p.angle[f]:p.angle,d.mc=i.isArrayOrTypedArray(p.color)?p.color[f]:p.color);var v=p&&p.line;v&&(d.mlc=Array.isArray(v.color)?v.color[f]:v.color,d.mlw=i.isArrayOrTypedArray(v.width)?v.width[f]:v.width);var m=p&&p.gradient;m&&"none"!==m.type&&(d.mgt=Array.isArray(m.type)?m.type[f]:m.type,d.mgc=Array.isArray(m.color)?m.color[f]:m.color);var g=s.c2p(d.x,!0),y=l.c2p(d.y,!0),x=d.mrc||1,b=o.hoverlabel;b&&(d.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,d.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,d.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,d.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,d.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,d.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(d.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(d.ht=Array.isArray(w)?w[f]:w);var k={};k[e.index]=d;var T=o._origX,A=o._origY,M=i.extendFlat({},e,{color:a(o,d),x0:g-x,x1:g+x,xLabelVal:T?T[f]:d.x,y0:y-x,y1:y+x,yLabelVal:A?A[f]:d.y,cd:k,distance:u,spikeDistance:c,hovertemplate:d.ht});return d.htx?M.text=d.htx:d.tx?M.text=d.tx:o.text&&(M.text=o.text),i.fillText(d,o,M),n.getComponentMethod("errorbars","hoverInfo")(d,o,M),M}e.exports={hoverPoints:function(e,t,r,n){var i,a,s,l,u,c,f,d,h,p,v=e.cd,m=v[0].t,g=v[0].trace,y=e.xa,x=e.ya,b=m.x,_=m.y,w=y.c2p(t),k=x.c2p(r),T=e.distance;if(m.tree){var A=y.p2c(w-T),M=y.p2c(w+T),S=x.p2c(k-T),E=x.p2c(k+T);i="x"===n?m.tree.range(Math.min(A,M),Math.min(x._rl[0],x._rl[1]),Math.max(A,M),Math.max(x._rl[0],x._rl[1])):m.tree.range(Math.min(A,M),Math.min(S,E),Math.max(A,M),Math.max(S,E))}else i=m.ids;var C=T;if("x"===n){var L=!!g.xperiodalignment,P=!!g.yperiodalignment;for(c=0;c=Math.min(O,I)&&w<=Math.max(O,I)?0:1/0}if(f=Math.min(R,D)&&k<=Math.max(R,D)?0:1/0}p=Math.sqrt(f*f+d*d),s=i[c]}}}else for(c=i.length-1;c>-1;c--)l=b[a=i[c]],u=_[a],f=y.c2p(l)-w,d=x.c2p(u)-k,(h=Math.sqrt(f*f+d*d))y.glText.length){var k=_-y.glText.length;for(v=0;vr&&(isNaN(t[n])||isNaN(t[n+1]));)n-=2;e.positions=t.slice(r,n+2)}return e})),y.line2d.update(y.lineOptions)),y.error2d){var A=(y.errorXOptions||[]).concat(y.errorYOptions||[]);y.error2d.update(A)}y.scatter2d&&y.scatter2d.update(y.markerOptions),y.fillOrder=s.repeat(null,_),y.fill2d&&(y.fillOptions=y.fillOptions.map((function(e,t){var n=r[t];if(e&&n&&n[0]&&n[0].trace){var i,a,o=n[0],s=o.trace,l=o.t,u=y.lineOptions[t],c=[];s._ownfill&&c.push(t),s._nexttrace&&c.push(t+1),c.length&&(y.fillOrder[t]=c);var f,d,h=[],p=u&&u.positions||l.positions;if("tozeroy"===s.fill){for(f=0;ff&&isNaN(p[d+1]);)d-=2;0!==p[f+1]&&(h=[p[f],0]),h=h.concat(p.slice(f,d+2)),0!==p[d+1]&&(h=h.concat([p[d],0]))}else if("tozerox"===s.fill){for(f=0;ff&&isNaN(p[d]);)d-=2;0!==p[f]&&(h=[0,p[f+1]]),h=h.concat(p.slice(f,d+2)),0!==p[d]&&(h=h.concat([0,p[d+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(h=[],i=0,e.splitNull=!0,a=0;a-1;for(v=0;v<_;v++){var C=r[v][0],L=C.trace,P=C.t,O=P.index,I=L._length,R=P.x,D=P.y;if(L.selectedpoints||S||E){if(S||(S=!0),L.selectedpoints){var z=y.selectBatch[O]=s.selIndices2selPoints(L),F={};for(m=0;m850?" Black":i>750?" Extra Bold":i>650?" Bold":i>550?" Semi Bold":i>450?" Medium":i>350?" Regular":i>250?" Light":i>150?" Extra Light":" Thin"):"Open Sans"===a.slice(0,2).join(" ")?(s="Open Sans",s+=i>750?" Extrabold":i>650?" Bold":i>550?" Semibold":i>350?" Regular":" Light"):"Klokantech Noto Sans"===a.slice(0,3).join(" ")&&(s="Klokantech Noto Sans","CJK"===a[3]&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),"Open Sans Regular Italic"===s?s="Open Sans Italic":"Open Sans Regular Bold"===s?s="Open Sans Bold":"Open Sans Regular Bold Italic"===s?s="Open Sans Bold Italic":"Klokantech Noto Sans Regular Italic"===s&&(s="Klokantech Noto Sans Italic"),f(s)||(s=r),s.split(", ")}e.exports=function(e,t){var r,a=t[0].trace,f=!0===a.visible&&0!==a._length,w="none"!==a.fill,k=c.hasLines(a),T=c.hasMarkers(a),A=c.hasText(a),M=T&&"circle"===a.marker.symbol,S=T&&"circle"!==a.marker.symbol,E=a.cluster&&a.cluster.enabled,C=m("fill"),L=m("line"),P=m("circle"),O=m("symbol"),I={fill:C,line:L,circle:P,symbol:O};if(!f)return I;if((w||k)&&(r=o.calcTraceToLineCoords(t)),w&&(C.geojson=o.makePolygon(r),C.layout.visibility="visible",i.extendFlat(C.paint,{"fill-color":a.fillcolor})),k&&(L.geojson=o.makeLine(r),L.layout.visibility="visible",i.extendFlat(L.paint,{"line-width":a.line.width,"line-color":a.line.color,"line-opacity":a.opacity})),M){var R=function(e){var t,r,a,o,c=e[0].trace,f=c.marker,d=c.selectedpoints,h=i.isArrayOrTypedArray(f.color),p=i.isArrayOrTypedArray(f.size),v=i.isArrayOrTypedArray(f.opacity);function m(e){return c.opacity*e}function g(e){return e/2}h&&(r=s.hasColorscale(c,"marker")?s.makeColorScaleFuncFromTrace(f):i.identity),p&&(a=u(c)),v&&(o=function(e){return m(n(e)?+i.constrain(e,0,1):0)});var y,b=[];for(t=0;t")}function c(e){return e+"\xb0"}}e.exports={hoverPoints:function(e,t,r){var o=e.cd,c=o[0].trace,f=e.xa,d=e.ya,h=e.subplot,p=[],v=l+c.uid+"-circle",m=c.cluster&&c.cluster.enabled;if(m){var g=h.map.queryRenderedFeatures(null,{layers:[v]});p=g.map((function(e){return e.id}))}var y=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),x=t-y;if(n.getClosest(o,(function(e){var t=e.lonlat;if(t[0]===s)return 1/0;if(m&&-1===p.indexOf(e.i+1))return 1/0;var n=i.modHalf(t[0],360),a=t[1],o=h.project([n,a]),l=o.x-f.c2p([x,a]),u=o.y-d.c2p([n,r]),c=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+u*u)-c,1-3/c)}),e),!1!==e.index){var b=o[e.index],_=b.lonlat,w=[i.modHalf(_[0],360)+y,_[1]],k=f.c2p(w),T=d.c2p(w),A=b.mrc||1;e.x0=k-A,e.x1=k+A,e.y0=T-A,e.y1=T+A;var M={};M[c.subplot]={_subplot:h};var S=c._module.formatLabels(b,c,M);return e.lonLabel=S.lonLabel,e.latLabel=S.latLabel,e.color=a(c,b),e.extraText=u(c,b,o[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}},getExtraText:u}},11572:function(e,t,r){"use strict";e.exports={attributes:r(31512),supplyDefaults:r(15752),colorbar:r(5528),formatLabels:r(11960),calc:r(25212),plot:r(9660),hoverPoints:r(63312).hoverPoints,eventData:r(37920),selectPoints:r(404),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.update(t)},moduleType:"trace",name:"scattermapbox",basePlotModule:r(33688),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},9660:function(e,t,r){"use strict";var n=r(3400),i=r(59392),a=r(47552).traceLayerPrefix,o={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function s(e,t,r,n){this.type="scattermapbox",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:a+t+"-fill",line:a+t+"-line",circle:a+t+"-circle",symbol:a+t+"-symbol",cluster:a+t+"-cluster",clusterCount:a+t+"-cluster-count"},this.below=null}var l=s.prototype;l.addSource=function(e,t,r){var i={type:"geojson",data:t.geojson};r&&r.enabled&&n.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom});var a=this.subplot.map.getSource(this.sourceIds[e]);a?a.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],i)},l.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)},l.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i,a=this.layerIds[e],o=this.subplot.getMapLayers(),s=0;s=0;r--){var i=t[r];n.removeLayer(c.layerIds[i])}e||n.removeSource(c.sourceIds.circle)}(e):function(e){for(var t=o.nonCluster,r=t.length-1;r>=0;r--){var i=t[r];n.removeLayer(c.layerIds[i]),e||n.removeSource(c.sourceIds[i])}}(e)}function d(e){l?function(e){e||c.addSource("circle",a.circle,t.cluster);for(var r=o.cluster,n=0;n=0;r--){var n=t[r];e.removeLayer(this.layerIds[n]),e.removeSource(this.sourceIds[n])}},e.exports=function(e,t){var r,n,a,l=t[0].trace,u=l.cluster&&l.cluster.enabled,c=!0!==l.visible,f=new s(e,l.uid,u,c),d=i(e.gd,t),h=f.below=e.belowLookup["trace-"+l.uid];if(u)for(f.addSource("circle",d.circle,l.cluster),r=0;r")}}e.exports={hoverPoints:function(e,t,r,a){var o=n(e,t,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,u=s.cd[s.index],c=s.trace;if(l.isPtInside(u))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(u,c,l,s),s.hovertemplate=c.hovertemplate,o}},makeHoverPointText:i}},76924:function(e,t,r){"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:r(40872),categories:["polar","symbols","showLegend","scatter-like"],attributes:r(8319),supplyDefaults:r(85968).supplyDefaults,colorbar:r(5528),formatLabels:r(22852),calc:r(58320),plot:r(43456),style:r(49224).style,styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(8504).hoverPoints,selectPoints:r(91560),meta:{}}},43456:function(e,t,r){"use strict";var n=r(96504),i=r(39032).BADNUM;e.exports=function(e,t,r){for(var a=t.layers.frontplot.select("g.scatterlayer"),o=t.xaxis,s=t.yaxis,l={xaxis:o,yaxis:s,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},u=t.radialAxis,c=t.angularAxis,f=0;f=u&&(y.marker.cluster=p.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(e,h,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(e,h,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(e,h,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(e,h,y.text,y.markerUnsel))),y.fill&&!d.fill2d&&(d.fill2d=!0),y.marker&&!d.scatter2d&&(d.scatter2d=!0),y.line&&!d.line2d&&(d.line2d=!0),y.text&&!d.glText&&(d.glText=!0),d.lineOptions.push(y.line),d.fillOptions.push(y.fill),d.markerOptions.push(y.marker),d.markerSelectedOptions.push(y.markerSel),d.markerUnselectedOptions.push(y.markerUnsel),d.textOptions.push(y.text),d.textSelectedOptions.push(y.textSel),d.textUnselectedOptions.push(y.textUnsel),d.selectBatch.push([]),d.unselectBatch.push([]),p.x=w,p.y=k,p.rawx=w,p.rawy=k,p.r=m,p.theta=g,p.positions=_,p._scene=d,p.index=d.count,d.count++}})),a(e,t,r)}},e.exports.reglPrecompiled={}},69496:function(e,t,r){"use strict";var n=r(21776).Ks,i=r(21776).Gw,a=r(92880).extendFlat,o=r(98304),s=r(52904),l=r(45464),u=s.line;e.exports={mode:s.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:s.text,texttemplate:i({editType:"plot"},{keys:["real","imag","text"]}),hovertext:s.hovertext,line:{color:u.color,width:u.width,dash:u.dash,backoff:u.backoff,shape:a({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:s.connectgaps,marker:s.marker,cliponaxis:a({},s.cliponaxis,{dflt:!1}),textposition:s.textposition,textfont:s.textfont,fill:a({},s.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o(),hoverinfo:a({},l.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:s.hoveron,hovertemplate:n(),selected:s.selected,unselected:s.unselected}},47507:function(e,t,r){"use strict";var n=r(38248),i=r(39032).BADNUM,a=r(90136),o=r(20148),s=r(4500),l=r(16356).calcMarkerSize;e.exports=function(e,t){for(var r=e._fullLayout,u=t.subplot,c=r[u].realaxis,f=r[u].imaginaryaxis,d=c.makeCalcdata(t,"real"),h=f.makeCalcdata(t,"imag"),p=t._length,v=new Array(p),m=0;m")}}e.exports={hoverPoints:function(e,t,r,a){var o=n(e,t,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,u=s.cd[s.index],c=s.trace;if(l.isPtInside(u))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(u,c,l,s),s.hovertemplate=c.hovertemplate,o}},makeHoverPointText:i}},95443:function(e,t,r){"use strict";e.exports={moduleType:"trace",name:"scattersmith",basePlotModule:r(47788),categories:["smith","symbols","showLegend","scatter-like"],attributes:r(69496),supplyDefaults:r(76716),colorbar:r(5528),formatLabels:r(49504),calc:r(47507),plot:r(34927),style:r(49224).style,styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(25292).hoverPoints,selectPoints:r(91560),meta:{}}},34927:function(e,t,r){"use strict";var n=r(96504),i=r(39032).BADNUM,a=r(36416).smith;e.exports=function(e,t,r){for(var o=t.layers.frontplot.select("g.scatterlayer"),s=t.xaxis,l=t.yaxis,u={xaxis:s,yaxis:l,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},c=0;c"),o.hovertemplate=d.hovertemplate,a}function x(e,t){g.push(e._hovertitle+": "+t)}}},34864:function(e,t,r){"use strict";e.exports={attributes:r(5896),supplyDefaults:r(84256),colorbar:r(5528),formatLabels:r(90404),calc:r(34335),plot:r(88776),style:r(49224).style,styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(26596),selectPoints:r(91560),eventData:r(97476),moduleType:"trace",name:"scatterternary",basePlotModule:r(19352),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},88776:function(e,t,r){"use strict";var n=r(96504);e.exports=function(e,t,r){var i=t.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var a=t.xaxis,o=t.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:t._hasClipOnAxisFalse?t.clipIdRelative:null},l=t.layers.frontplot.select("g.scatterlayer"),u=0;ud?b.sizeAvg||Math.max(b.size,3):a(t,x),h=0;ha&&l||i-1,P=!0;if(o(x)||h.selectedpoints||L){var O=h._length;if(h.selectedpoints){v.selectBatch=h.selectedpoints;var I=h.selectedpoints,R={};for(l=0;l1&&(c=v[y-1],d=m[y-1],p=g[y-1]),t=0;tc?"-":"+")+"x")).replace("y",(f>d?"-":"+")+"y")).replace("z",(h>p?"-":"+")+"z");var C=function(){y=0,M=[],S=[],E=[]};(!y||y2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function h(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function p(e,t){var r=e.fullSceneLayout,i=e.dataScale,c=t._len,f={};function p(e,t){var n=r[t],o=i[u[t]];return a.simpleMap(e,(function(e){return n.d2l(e)*o}))}if(f.vectors=l(p(t._u,"xaxis"),p(t._v,"yaxis"),p(t._w,"zaxis"),c),!c)return{positions:[],cells:[]};var v=p(t._Xs,"xaxis"),m=p(t._Ys,"yaxis"),g=p(t._Zs,"zaxis");if(f.meshgrid=[v,m,g],f.gridFill=t._gridFill,t._slen)f.startingPositions=l(p(t._startsX,"xaxis"),p(t._startsY,"yaxis"),p(t._startsZ,"zaxis"));else{for(var y=m[0],x=d(v),b=d(g),_=new Array(x.length*b.length),w=0,k=0;k=0};y?(r=Math.min(g.length,b.length),l=function(e){return M(g[e])&&S(e)},f=function(e){return String(g[e])}):(r=Math.min(x.length,b.length),l=function(e){return M(x[e])&&S(e)},f=function(e){return String(x[e])}),w&&(r=Math.min(r,_.length));for(var E=0;E1){for(var O=a.randstr(),I=0;I=0){t.i=s.i;var c=r.marker;c.pattern&&c.colors&&c.pattern.shape||(c.color=u,t.color=u),n.pointStyle(e,r,a,t)}else i.fill(e,u)}},45716:function(e,t,r){"use strict";var n=r(33428),i=r(24040),a=r(10624).appendArrayPointValue,o=r(93024),s=r(3400),l=r(95924),u=r(78176),c=r(69656).formatPieValue;function f(e,t,r){for(var n=e.data.data,i={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},o=0;o"),name:A||R("name")?y.name:void 0,color:T("hoverlabel.bgcolor")||x.color,borderColor:T("hoverlabel.bordercolor"),fontFamily:T("hoverlabel.font.family"),fontSize:T("hoverlabel.font.size"),fontColor:T("hoverlabel.font.color"),fontWeight:T("hoverlabel.font.weight"),fontStyle:T("hoverlabel.font.style"),fontVariant:T("hoverlabel.font.variant"),nameLength:T("hoverlabel.namelength"),textAlign:T("hoverlabel.align"),hovertemplate:A,hovertemplateLabels:P,eventData:l};m&&(F.x0=E-i.rInscribed*i.rpx1,F.x1=E+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?"left":"right"),g&&(F.x=E,F.idealAlign=E<0?"left":"right");var N=[];o.loneHover(F,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r,inOut_bbox:N}),l[0].bbox=N[0],p._hasHoverLabel=!0}if(g){var B=e.select("path.surface");d.styleOne(B,i,y,r,{hovered:!0})}p._hasHoverEvent=!0,r.emit("plotly_hover",{points:l||[f(i,y,d.eventDataKeys)],event:n.event})}})),e.on("mouseout",(function(t){var i=r._fullLayout,a=r._fullData[p.index],s=n.select(this).datum();if(p._hasHoverEvent&&(t.originalEvent=n.event,r.emit("plotly_unhover",{points:[f(s,a,d.eventDataKeys)],event:n.event}),p._hasHoverEvent=!1),p._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),p._hasHoverLabel=!1),g){var l=e.select("path.surface");d.styleOne(l,s,a,r,{hovered:!1})}})),e.on("click",(function(e){var t=r._fullLayout,a=r._fullData[p.index],s=m&&(u.isHierarchyRoot(e)||u.isLeaf(e)),c=u.getPtId(e),h=u.isEntry(e)?u.findEntryWithChild(v,c):u.findEntryWithLevel(v,c),g=u.getPtId(h),y={points:[f(e,a,d.eventDataKeys)],event:n.event};s||(y.nextLevel=g);var x=l.triggerHandler(r,"plotly_"+p.type+"click",y);if(!1!==x&&t.hovermode&&(r._hoverdata=[f(e,a,d.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call("_storeDirectGUIEdit",a,t._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:g}],traces:[p.index]},_={frame:{redraw:!1,duration:d.transitionTime},transition:{duration:d.transitionTime,easing:d.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(t._hoverlayer.node()),i.call("animate",r,b,_)}}))}},78176:function(e,t,r){"use strict";var n=r(3400),i=r(76308),a=r(93972),o=r(69656);function s(e){return e.data.data.pid}t.findEntryWithLevel=function(e,r){var n;return r&&e.eachAfter((function(e){if(t.getPtId(e)===r)return n=e.copy()})),n||e},t.findEntryWithChild=function(e,r){var n;return e.eachAfter((function(e){for(var i=e.children||[],a=0;a0)},t.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},t.isHeader=function(e,r){return!(t.isLeaf(e)||e.depth===r._maxDepth-1)},t.getParent=function(e,r){return t.findEntryWithLevel(e,s(r))},t.listPath=function(e,r){var n=e.parent;if(!n)return[];var i=r?[n.data[r]]:[n];return t.listPath(n,r).concat(i)},t.getPath=function(e){return t.listPath(e,"label").join("/")+"/"},t.formatValue=o.formatPieValue,t.formatPercent=function(e,t){var r=n.formatPercent(e,0);return"0%"===r&&(r=o.formatPiePercent(e,t)),r}},5621:function(e,t,r){"use strict";e.exports={moduleType:"trace",name:"sunburst",basePlotModule:r(54904),categories:[],animatable:!0,attributes:r(424),layoutAttributes:r(84920),supplyDefaults:r(25244),supplyLayoutDefaults:r(28732),calc:r(3776).calc,crossTraceCalc:r(3776).crossTraceCalc,plot:r(96488).plot,style:r(85676).style,colorbar:r(5528),meta:{}}},84920:function(e){"use strict";e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},28732:function(e,t,r){"use strict";var n=r(3400),i=r(84920);e.exports=function(e,t){function r(r,a){return n.coerce(e,t,i,r,a)}r("sunburstcolorway",t.colorway),r("extendsunburstcolors")}},96488:function(e,t,r){"use strict";var n=r(33428),i=r(74148),a=r(67756).qy,o=r(43616),s=r(3400),l=r(72736),u=r(82744),c=u.recordMinTextSize,f=u.clearMinTextSize,d=r(37820),h=r(69656).getRotationAngle,p=d.computeTransform,v=d.transformInsideText,m=r(85676).styleOne,g=r(60100).resizeText,y=r(45716),x=r(27328),b=r(78176);function _(e,r,u,f){var d=e._context.staticPlot,g=e._fullLayout,_=!g.uniformtext.mode&&b.hasTransition(f),k=n.select(u).selectAll("g.slice"),T=r[0],A=T.trace,M=T.hierarchy,S=b.findEntryWithLevel(M,A.level),E=b.getMaxDepth(A),C=g._size,L=A.domain,P=C.w*(L.x[1]-L.x[0]),O=C.h*(L.y[1]-L.y[0]),I=.5*Math.min(P,O),R=T.cx=C.l+C.w*(L.x[1]+L.x[0])/2,D=T.cy=C.t+C.h*(1-L.y[0])-O/2;if(!S)return k.remove();var z=null,F={};_&&k.each((function(e){F[b.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!z&&b.isEntry(e)&&(z=e)}));var N=function(e){return i.partition().size([2*Math.PI,e.height+1])(e)}(S).descendants(),B=S.height+1,j=0,U=E;T.hasMultipleRoots&&b.isHierarchyRoot(S)&&(N=N.slice(1),B-=1,j=1,U+=1),N=N.filter((function(e){return e.y1<=U}));var q=h(A.rotation);q&&N.forEach((function(e){e.x0+=q,e.x1+=q}));var V=Math.min(B,E),H=function(e){return(e-j)/V*I},G=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},W=function(e){return s.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,R,D)},Y=function(e){return R+w(e)[0]*(e.transform.rCenter||0)+(e.transform.x||0)},Z=function(e){return D+w(e)[1]*(e.transform.rCenter||0)+(e.transform.y||0)};(k=k.data(N,b.getPtId)).enter().append("g").classed("slice",!0),_?k.exit().transition().each((function(){var e=n.select(this);e.select("path.surface").transition().attrTween("d",(function(e){var t=function(e){var t,r=b.getPtId(e),n=F[r],i=F[b.getPtId(S)];if(i){var o=(e.x1>i.x1?2*Math.PI:0)+q;t=e.rpx1X?2*Math.PI:0)+q;t={x0:i,x1:i}}else t={rpx0:I,rpx1:I},s.extendFlat(t,$(e));else t={rpx0:0,rpx1:0};else t={x0:q,x1:q};return a(t,n)}(e);return function(e){return W(t(e))}})):f.attr("d",W),u.call(y,S,e,r,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),f.call(m,i,A,e);var h=s.ensureSingle(u,"g","slicetext"),w=s.ensureSingle(h,"text","",(function(e){e.attr("data-notex",1)})),k=s.ensureUniformFontSize(e,b.determineTextFont(A,i,g.font));w.text(t.formatSliceLabel(i,S,A,r,g)).classed("slicetext",!0).attr("text-anchor","middle").call(o.font,k).call(l.convertToTspans,e);var M=o.bBox(w.node());i.transform=v(M,i,T),i.transform.targetX=Y(i),i.transform.targetY=Z(i);var E=function(e,t){var r=e.transform;return p(r,t),r.fontSize=k.size,c(A.type,r,g),s.getTextTransform(r)};_?w.transition().attrTween("transform",(function(e){var t=function(e){var t,r=F[b.getPtId(e)],n=e.transform;if(r)t=r;else if(t={rpx1:e.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},z)if(e.parent)if(X){var i=e.x1>X?2*Math.PI:0;t.x0=t.x1=i}else s.extendFlat(t,$(e));else t.x0=t.x1=q;else t.x0=t.x1=q;var o=a(t.transform.textPosAngle,e.transform.textPosAngle),l=a(t.rpx1,e.rpx1),u=a(t.x0,e.x0),f=a(t.x1,e.x1),d=a(t.transform.scale,n.scale),h=a(t.transform.rotate,n.rotate),p=0===n.rCenter?3:0===t.transform.rCenter?1/3:1,v=a(t.transform.rCenter,n.rCenter),m=function(e){return v(Math.pow(e,p))};return function(e){var t=l(e),r=u(e),i=f(e),a=m(e),s={pxmid:G(t,(r+i)/2),rpx1:t,transform:{textPosAngle:o(e),rCenter:a,x:n.x,y:n.y}};return c(A.type,n,g),{transform:{targetX:Y(s),targetY:Z(s),scale:d(e),rotate:h(e),rCenter:a}}}}(e);return function(e){return E(t(e),M)}})):w.attr("transform",E(i,M))}))}function w(e){return t=e.rpx1,r=e.transform.textPosAngle,[t*Math.sin(r),-t*Math.cos(r)];var t,r}t.plot=function(e,t,r,i){var a,o,s=e._fullLayout,l=s._sunburstlayer,u=!r,c=!s.uniformtext.mode&&b.hasTransition(r);f("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),c?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){l.selectAll("g.trace").each((function(t){_(e,t,this,r)}))}))):(a.each((function(t){_(e,t,this,r)})),s.uniformtext.mode&&g(e,s._sunburstlayer.selectAll(".trace"),"sunburst")),u&&a.exit().remove()},t.formatSliceLabel=function(e,t,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||"none"===o))return"";var l=i.separators,u=n[0],c=e.data.data,f=u.hierarchy,d=b.isHierarchyRoot(e),h=b.getParent(f,e),p=b.getValue(e);if(!a){var v,m=o.split("+"),g=function(e){return-1!==m.indexOf(e)},y=[];if(g("label")&&c.label&&y.push(c.label),c.hasOwnProperty("v")&&g("value")&&y.push(b.formatValue(c.v,l)),!d){g("current path")&&y.push(b.getPath(e.data));var x=0;g("percent parent")&&x++,g("percent entry")&&x++,g("percent root")&&x++;var _=x>1;if(x){var w,k=function(e){v=b.formatPercent(w,l),_&&(v+=" of "+e),y.push(v)};g("percent parent")&&!d&&(w=p/b.getValue(h),k("parent")),g("percent entry")&&(w=p/b.getValue(t),k("entry")),g("percent root")&&(w=p/b.getValue(f),k("root"))}}return g("text")&&(v=s.castOption(r,c.i,"text"),s.isValidTextValue(v)&&y.push(v)),y.join("
")}var T=s.castOption(r,c.i,"texttemplate");if(!T)return"";var A={};c.label&&(A.label=c.label),c.hasOwnProperty("v")&&(A.value=c.v,A.valueLabel=b.formatValue(c.v,l)),A.currentPath=b.getPath(e.data),d||(A.percentParent=p/b.getValue(h),A.percentParentLabel=b.formatPercent(A.percentParent,l),A.parent=b.getPtLabel(h)),A.percentEntry=p/b.getValue(t),A.percentEntryLabel=b.formatPercent(A.percentEntry,l),A.entry=b.getPtLabel(t),A.percentRoot=p/b.getValue(f),A.percentRootLabel=b.formatPercent(A.percentRoot,l),A.root=b.getPtLabel(f),c.hasOwnProperty("color")&&(A.color=c.color);var M=s.castOption(r,c.i,"text");return(s.isValidTextValue(M)||""===M)&&(A.text=M),A.customdata=s.castOption(r,c.i,"customdata"),s.texttemplateString(T,A,i._d3locale,A,r._meta||{})}},85676:function(e,t,r){"use strict";var n=r(33428),i=r(76308),a=r(3400),o=r(82744).resizeText,s=r(60404);function l(e,t,r,n){var o=t.data.data,l=!t.children,u=o.i,c=a.castOption(r,u,"marker.line.color")||i.defaultLine,f=a.castOption(r,u,"marker.line.width")||0;e.call(s,t,r,n).style("stroke-width",f).call(i.stroke,c).style("opacity",l?r.leaf.opacity:null)}e.exports={style:function(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");o(e,t,"sunburst"),t.each((function(t){var r=n.select(this),i=t[0].trace;r.style("opacity",i.opacity),r.selectAll("path.surface").each((function(t){n.select(this).call(l,t,i,e)}))}))},styleOne:l}},16716:function(e,t,r){"use strict";var n=r(76308),i=r(49084),a=r(29736).axisHoverFormat,o=r(21776).Ks,s=r(45464),l=r(92880).extendFlat,u=r(67824).overrideAll;function c(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:n.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:n.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var f=e.exports=u(l({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:o(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:c(),y:c(),z:c()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),"calc","nested");f.x.editType=f.y.editType=f.z.editType="calc+clearAxisTypes",f.transforms=void 0},56576:function(e,t,r){"use strict";var n=r(47128);e.exports=function(e,t){t.surfacecolor?n(e,t,{vals:t.surfacecolor,containerStr:"",cLetter:"c"}):n(e,t,{vals:t.z,containerStr:"",cLetter:"c"})}},79164:function(e,t,r){"use strict";var n=r(67792).gl_surface3d,i=r(67792).ndarray,a=r(67792).ndarray_linear_interpolate.d2,o=r(70448),s=r(11240),l=r(3400).isArrayOrTypedArray,u=r(33040).parseColorScale,c=r(43080),f=r(8932).extractOpts;function d(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var h=d.prototype;h.getXat=function(e,t,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return void 0===r?i:n.d2l(i,0,r)},h.getYat=function(e,t,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return void 0===r?i:n.d2l(i,0,r)},h.getZat=function(e,t,r,n){var i=this.data.z[t][e];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),void 0===r?i:n.d2l(i,0,r)},h.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,i],e.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],e.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];null!==o&&void 0!==o&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return l(s)&&s[i]&&void 0!==s[i][n]?e.textLabel=s[i][n]:e.textLabel=s||"",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};var p=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function v(e,t){if(e0){r=p[n];break}return r}function y(e,t){if(!(e<1||t<1)){for(var r=m(e),n=m(t),i=1,a=0;a_;)r--,r/=g(r),++r1?n:1},h.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,n=e[0].shape[0],a=e[0].shape[1],o=0|Math.floor(e[0].shape[0]*t+1),s=0|Math.floor(e[0].shape[1]*r+1),l=1+n+1,u=1+a+1,c=i(new Float32Array(l*u),[l,u]),f=[1/t,0,0,0,1/r,0,0,0,1],d=0;d0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(i[e]=!0,t=this.contourStart[e];ta&&(this.minValues[t]=a),this.maxValues[t]",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},55992:function(e,t,r){"use strict";var n=r(23536),i=r(92880).extendFlat,a=r(38248),o=r(38116).isTypedArray,s=r(38116).isArrayOrTypedArray;function l(e){if(s(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=u+1,a=0);return n}e.exports=function(e,t){var r=c(t.cells.values),o=function(e){return e.slice(t.header.values.length,e.length)},v=c(t.header.values);v.length&&!v[0].length&&(v[0]=[""],v=c(v));var m=v.concat(o(r).map((function(){return f((v[0]||[""]).length)}))),g=t.domain,y=Math.floor(e._fullLayout._size.w*(g.x[1]-g.x[0])),x=Math.floor(e._fullLayout._size.h*(g.y[1]-g.y[0])),b=t.header.values.length?m[0].map((function(){return t.header.height})):[n.emptyHeaderHeight],_=r.length?r[0].map((function(){return t.cells.height})):[],w=b.reduce(u,0),k=p(_,x-w+n.uplift),T=h(p(b,w),[]),A=h(k,T),M={},S=t._fullInput.columnorder;s(S)&&(S=Array.from(S)),S=S.concat(o(r.map((function(e,t){return t}))));var E=m.map((function(e,r){var n=s(t.columnwidth)?t.columnwidth[Math.min(r,t.columnwidth.length-1)]:t.columnwidth;return a(n)?Number(n):1})),C=E.reduce(u,0);E=E.map((function(e){return e/C*y}));var L=Math.max(l(t.header.line.width),l(t.cells.line.width)),P={key:t.uid+e._context.staticPlot,translateX:g.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-g.y[1]),size:e._fullLayout._size,width:y,maxLineWidth:L,height:x,columnOrder:S,groupHeight:x,rowBlocks:A,headerRowBlocks:T,scrollY:0,cells:i({},t.cells,{values:r}),headerCells:i({},t.header,{values:m}),gdColumns:m.map((function(e){return e[0]})),gdColumnsOriginalOrder:m.map((function(e){return e[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:m.map((function(e,t){var r=M[e];return M[e]=(r||0)+1,{key:e+"__"+M[e],label:e,specIndex:t,xIndex:S[t],xScale:d,x:void 0,calcdata:void 0,columnWidth:E[t]}}))};return P.columns.forEach((function(e){e.calcdata=P,e.x=d(e)})),P}},53056:function(e,t,r){"use strict";var n=r(92880).extendFlat;t.splitToPanels=function(e){var t=[0,0],r=n({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:n({},e.calcdata,{cells:e.calcdata.headerCells})});return[n({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),r]},t.splitToCells=function(e){var t=function(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}(e);return(e.values||[]).slice(t[0],t[1]).map((function(r,n){return{keyWithinBlock:n+("string"===typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}}))}},53212:function(e,t,r){"use strict";var n=r(3400),i=r(60520),a=r(86968).Q;e.exports=function(e,t,r,o){function s(r,a){return n.coerce(e,t,i,r,a)}a(t,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),n.coerceFont(s,"header.font",o.font),function(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort((function(e,t){return e-t})),o=i.map((function(e){return a.indexOf(e)})),s=o.length;s/i),l=!a||s;e.mayHaveMarkup=a&&i.match(/[<&>]/);var u,c="string"===typeof(u=i)&&u.match(n.latexCheck);e.latex=c;var f,d,h=c?"":T(e.calcdata.cells.prefix,t,r)||"",p=c?"":T(e.calcdata.cells.suffix,t,r)||"",v=c?null:T(e.calcdata.cells.format,t,r)||null,m=h+(v?o(v)(e.value):e.value)+p;if(e.wrappingNeeded=!e.wrapped&&!l&&!c&&(f=k(m)),e.cellHeightMayIncrease=s||c||e.mayHaveMarkup||(void 0===f?k(m):f),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var g=(" "===n.wrapSplitCharacter?m.replace(/i&&n.push(a),i+=l}return n}(i,l,s);1===u.length&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each((function(e,t){e.page=u[t],e.scrollY=l})),t.attr("transform",(function(e){var t=z(e.rowBlocks,e.page)-e.scrollY;return f(0,t)})),e&&(P(e,r,t,u,n.prevPages,n,0),P(e,r,t,u,n.prevPages,n,1),b(r,e))}}function L(e,t,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=t.filter((function(e){return s.key===e.key})),u=r||s.scrollbarState.dragMultiplier,c=s.scrollY;s.scrollY=void 0===a?s.scrollY+u*i.event.dy:a;var f=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(M);return C(e,f,l),s.scrollY===c}}function P(e,t,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout((function(){var a=r.filter((function(e,t){return t===o&&n[t]!==i[t]}));_(e,t,a,r),i[o]=n[o]})))}function O(e,t,r,a){return function(){var o=i.select(t.parentNode);o.each((function(e){var t=e.fragments;o.selectAll("tspan.line").each((function(e,r){t[r].width=this.getComputedTextLength()}));var r,i,a=t[t.length-1].width,s=t.slice(0,-1),l=[],u=0,c=e.column.columnWidth-2*n.cellPad;for(e.value="";s.length;)u+(i=(r=s.shift()).width+a)>c&&(e.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],u=0),l.push(r.text),u+=i;u&&(e.value+=l.join(n.wrapSpacer)),e.wrapped=!0})),o.selectAll("tspan.line").remove(),w(o.select("."+n.cn.cellText),r,e,a),i.select(t.parentNode.parentNode).call(D)}}function I(e,t,r,a,o){return function(){if(!o.settledY){var s=i.select(t.parentNode),l=B(o),u=o.key-l.firstRowIndex,c=l.rows[u].rowHeight,d=o.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*n.cellPad:c,h=Math.max(d,c);h-l.rows[u].rowHeight&&(l.rows[u].rowHeight=h,e.selectAll("."+n.cn.columnCell).call(D),C(null,e.filter(M),0),b(r,a,!0)),s.attr("transform",(function(){var e=this,t=e.parentNode.getBoundingClientRect(),r=i.select(e.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),a=e.transform.baseVal.consolidate(),s=r.top-t.top+(a?a.matrix.f:n.cellPad);return f(R(o,i.select(e.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width),s)})),o.settledY=!0}}}function R(e,t){switch(e.align){case"left":default:return n.cellPad;case"right":return e.column.columnWidth-(t||0)-n.cellPad;case"center":return(e.column.columnWidth-(t||0))/2}}function D(e){e.attr("transform",(function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce((function(e,t){return e+F(t,1/0)}),0),r=F(B(e),e.key);return f(0,r+t)})).selectAll("."+n.cn.cellRect).attr("height",(function(e){return(t=B(e),r=e.key,t.rows[r-t.firstRowIndex]).rowHeight;var t,r}))}function z(e,t){for(var r=0,n=t-1;n>=0;n--)r+=N(e[n]);return r}function F(e,t){for(var r=0,n=0;n","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:c({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:u.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:c({},s.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}},79516:function(e,t,r){"use strict";var n=r(7316);t.name="treemap",t.plot=function(e,r,i,a){n.plotBasePlot(t.name,e,r,i,a)},t.clean=function(e,r,i,a){n.cleanBasePlot(t.name,e,r,i,a)}},97840:function(e,t,r){"use strict";var n=r(3776);t.r=function(e,t){return n.calc(e,t)},t.q=function(e){return n._runCrossTraceCalc("treemap",e)}},32984:function(e){"use strict";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},34092:function(e,t,r){"use strict";var n=r(3400),i=r(40516),a=r(76308),o=r(86968).Q,s=r(31508).handleText,l=r(78048).TEXTPAD,u=r(74174).handleMarkerDefaults,c=r(8932),f=c.hasColorscale,d=c.handleDefaults;e.exports=function(e,t,r,c){function h(r,a){return n.coerce(e,t,i,r,a)}var p=h("labels"),v=h("parents");if(p&&p.length&&v&&v.length){var m=h("values");m&&m.length?h("branchvalues"):h("count"),h("level"),h("maxdepth"),"squarify"===h("tiling.packing")&&h("tiling.squarifyratio"),h("tiling.flip"),h("tiling.pad");var g=h("text");h("texttemplate"),t.texttemplate||h("textinfo",n.isArrayOrTypedArray(g)?"text+label":"label"),h("hovertext"),h("hovertemplate");var y=h("pathbar.visible");s(e,t,c,h,"auto",{hasPathbar:y,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var x=-1!==t.textposition.indexOf("bottom");u(e,t,c,h),(t._hasColorscale=f(e,"marker","colors")||(e.marker||{}).coloraxis)?d(e,t,c,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(t.marker.colors||[]).length);var b=2*t.textfont.size;h("marker.pad.t",x?b/4:b),h("marker.pad.l",b/4),h("marker.pad.r",b/4),h("marker.pad.b",x?b:b/4),h("marker.cornerradius"),t._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},y&&(h("pathbar.thickness",t.pathbar.textfont.size+2*l),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),o(t,c,h),t._length=null}else t.visible=!1}},95808:function(e,t,r){"use strict";var n=r(33428),i=r(78176),a=r(82744).clearMinTextSize,o=r(60100).resizeText,s=r(52960);e.exports=function(e,t,r,l,u){var c,f,d=u.type,h=u.drawDescendants,p=e._fullLayout,v=p["_"+d+"layer"],m=!r;a(d,p),(c=v.selectAll("g.trace."+d).data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed(d,!0),c.order(),!p.uniformtext.mode&&i.hasTransition(r)?(l&&(f=l()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){f&&f()})).each("interrupt",(function(){f&&f()})).each((function(){v.selectAll("g.trace").each((function(t){s(e,t,this,r,h)}))}))):(c.each((function(t){s(e,t,this,r,h)})),p.uniformtext.mode&&o(e,v.selectAll(".trace"),d)),m&&c.exit().remove()}},27336:function(e,t,r){"use strict";var n=r(33428),i=r(3400),a=r(43616),o=r(72736),s=r(13832),l=r(66192).styleOne,u=r(32984),c=r(78176),f=r(45716),d=!0;e.exports=function(e,t,r,h,p){var v=p.barDifY,m=p.width,g=p.height,y=p.viewX,x=p.viewY,b=p.pathSlice,_=p.toMoveInsideSlice,w=p.strTransform,k=p.hasTransition,T=p.handleSlicesExit,A=p.makeUpdateSliceInterpolator,M=p.makeUpdateTextInterpolator,S={},E=e._context.staticPlot,C=e._fullLayout,L=t[0],P=L.trace,O=L.hierarchy,I=m/P._entryDepth,R=c.listPath(r.data,"id"),D=s(O.copy(),[m,g],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(D=D.filter((function(e){var t=R.indexOf(e.data.id);return-1!==t&&(e.x0=I*t,e.x1=I*(t+1),e.y0=v,e.y1=v+g,e.onPathbar=!0,!0)}))).reverse(),(h=h.data(D,c.getPtId)).enter().append("g").classed("pathbar",!0),T(h,d,S,[m,g],b),h.order();var z=h;k&&(z=z.transition().each("end",(function(){var t=n.select(this);c.setSliceCursor(t,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),z.each((function(s){s._x0=y(s.x0),s._x1=y(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=y(s.x1-Math.min(m,g)/2),s._hoverY=x(s.y1-g/2);var h=n.select(this),p=i.ensureSingle(h,"path","surface",(function(e){e.style("pointer-events",E?"none":"all")}));k?p.transition().attrTween("d",(function(e){var t=A(e,d,S,[m,g]);return function(e){return b(t(e))}})):p.attr("d",b),h.call(f,r,e,t,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),p.call(l,s,P,e,{hovered:!1}),s._text=(c.getPtLabel(s)||"").split("
").join(" ")||"";var v=i.ensureSingle(h,"g","slicetext"),T=i.ensureSingle(v,"text","",(function(e){e.attr("data-notex",1)})),L=i.ensureUniformFontSize(e,c.determineTextFont(P,s,C.font,{onPathbar:!0}));T.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(a.font,L).call(o.convertToTspans,e),s.textBB=a.bBox(T.node()),s.transform=_(s,{fontSize:L.size,onPathbar:!0}),s.transform.fontSize=L.size,k?T.transition().attrTween("transform",(function(e){var t=M(e,d,S,[m,g]);return function(e){return w(t(e))}})):T.attr("transform",w(s))}))}},76477:function(e,t,r){"use strict";var n=r(33428),i=r(3400),a=r(43616),o=r(72736),s=r(13832),l=r(66192).styleOne,u=r(32984),c=r(78176),f=r(45716),d=r(96488).formatSliceLabel,h=!1;e.exports=function(e,t,r,p,v){var m=v.width,g=v.height,y=v.viewX,x=v.viewY,b=v.pathSlice,_=v.toMoveInsideSlice,w=v.strTransform,k=v.hasTransition,T=v.handleSlicesExit,A=v.makeUpdateSliceInterpolator,M=v.makeUpdateTextInterpolator,S=v.prevEntry,E=e._context.staticPlot,C=e._fullLayout,L=t[0].trace,P=-1!==L.textposition.indexOf("left"),O=-1!==L.textposition.indexOf("right"),I=-1!==L.textposition.indexOf("bottom"),R=!I&&!L.marker.pad.t||I&&!L.marker.pad.b,D=s(r,[m,g],{packing:L.tiling.packing,squarifyratio:L.tiling.squarifyratio,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1,pad:{inner:L.tiling.pad,top:L.marker.pad.t,left:L.marker.pad.l,right:L.marker.pad.r,bottom:L.marker.pad.b}}).descendants(),z=1/0,F=-1/0;D.forEach((function(e){var t=e.depth;t>=L._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(z=Math.min(z,t),F=Math.max(F,t))})),p=p.data(D,c.getPtId),L._maxVisibleLayers=isFinite(F)?F-z+1:0,p.enter().append("g").classed("slice",!0),T(p,h,{},[m,g],b),p.order();var N=null;if(k&&S){var B=c.getPtId(S);p.each((function(e){null===N&&c.getPtId(e)===B&&(N={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var j=function(){return N||{x0:0,x1:m,y0:0,y1:g}},U=p;return k&&(U=U.transition().each("end",(function(){var t=n.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),U.each((function(s){var p=c.isHeader(s,L);s._x0=y(s.x0),s._x1=y(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=y(s.x1-L.marker.pad.r),s._hoverY=x(I?s.y1-L.marker.pad.b/2:s.y0+L.marker.pad.t/2);var v=n.select(this),T=i.ensureSingle(v,"path","surface",(function(e){e.style("pointer-events",E?"none":"all")}));k?T.transition().attrTween("d",(function(e){var t=A(e,h,j(),[m,g]);return function(e){return b(t(e))}})):T.attr("d",b),v.call(f,r,e,t,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),T.call(l,s,L,e,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=p?R?"":c.getPtLabel(s)||"":d(s,r,L,t,C)||"";var S=i.ensureSingle(v,"g","slicetext"),D=i.ensureSingle(S,"text","",(function(e){e.attr("data-notex",1)})),z=i.ensureUniformFontSize(e,c.determineTextFont(L,s,C.font)),F=s._text||" ",N=p&&-1===F.indexOf("
");D.text(F).classed("slicetext",!0).attr("text-anchor",O?"end":P||N?"start":"middle").call(a.font,z).call(o.convertToTspans,e),s.textBB=a.bBox(D.node()),s.transform=_(s,{fontSize:z.size,isHeader:p}),s.transform.fontSize=z.size,k?D.transition().attrTween("transform",(function(e){var t=M(e,h,j(),[m,g]);return function(e){return w(t(e))}})):D.attr("transform",w(s))})),N}},83024:function(e){"use strict";e.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var a=t.children;if(a)for(var o=0;o-1?L+I:-(O+I):0,D={x0:P,x1:P,y0:R,y1:R+O},z=function(e,t,r){var n=g.tiling.pad,i=function(e){return e-n<=t.x0},a=function(e){return e+n>=t.x1},o=function(e){return e-n<=t.y0},s=function(e){return e+n>=t.y1};return e.x0===t.x0&&e.x1===t.x1&&e.y0===t.y0&&e.y1===t.y1?{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1}:{x0:i(e.x0-n)?0:a(e.x0-n)?r[0]:e.x0,x1:i(e.x1+n)?0:a(e.x1+n)?r[0]:e.x1,y0:o(e.y0-n)?0:s(e.y0-n)?r[1]:e.y0,y1:o(e.y1+n)?0:s(e.y1+n)?r[1]:e.y1}},F=null,N={},B={},j=null,U=function(e,t){return t?N[d(e)]:B[d(e)]},q=function(e,t,r,n){if(t)return N[d(x)]||D;var i=B[g.level]||r;return function(e){return e.data.depth-b.data.depth=(n-=(y?te:te.r)-s)){var h=(r+n)/2;r=h,n=h}var p;oe?i<(p=a-(y?te:te.b))&&p"===ee?(l.x-=a,u.x-=a,c.x-=a,f.x-=a):"/"===ee?(c.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):"\\"===ee?(l.x-=a,u.x-=a,o.x-=a/2,s.x-=a/2):"<"===ee&&(o.x-=a,s.x-=a),Q(l),Q(f),Q(o),Q(u),Q(c),Q(s),"M"+J(l.x,l.y)+"L"+J(u.x,u.y)+"L"+J(s.x,s.y)+"L"+J(c.x,c.y)+"L"+J(f.x,f.y)+"L"+J(o.x,o.y)+"Z"},toMoveInsideSlice:se,makeUpdateSliceInterpolator:ue,makeUpdateTextInterpolator:ce,handleSlicesExit:fe,hasTransition:A,strTransform:de}):w.remove()}},66192:function(e,t,r){"use strict";var n=r(33428),i=r(76308),a=r(3400),o=r(78176),s=r(82744).resizeText,l=r(60404);function u(e,t,r,n,s){var u,c,f=(s||{}).hovered,d=t.data.data,h=d.i,p=d.color,v=o.isHierarchyRoot(t),m=1;if(f)u=r._hovered.marker.line.color,c=r._hovered.marker.line.width;else if(v&&p===r.root.color)m=100,u="rgba(0,0,0,0)",c=0;else if(u=a.castOption(r,h,"marker.line.color")||i.defaultLine,c=a.castOption(r,h,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var g=r.marker.depthfade;if(g){var y,x=i.combine(i.addOpacity(r._backgroundColor,.75),p);if(!0===g){var b=o.getMaxDepth(r);y=isFinite(b)?o.isLeaf(t)?0:r._maxVisibleLayers-(t.data.depth-r._entryDepth):t.data.height+1}else y=t.data.depth-r._entryDepth,r._atRootLevel||y++;if(y>0)for(var _=0;_0){var b,_,w,k,T,A=e.xa,M=e.ya;"h"===p.orientation?(T=t,b="y",w=M,_="x",k=A):(T=r,b="x",w=A,_="y",k=M);var S=h[e.index];if(T>=S.span[0]&&T<=S.span[1]){var E=i.extendFlat({},e),C=k.c2p(T,!0),L=s.getKdeValue(S,p,T),P=s.getPositionOnKdePath(S,p,C),O=w._offset,I=w._length;E[b+"0"]=P[0],E[b+"1"]=P[1],E[_+"0"]=E[_+"1"]=C,E[_+"Label"]=_+": "+a.hoverLabelText(k,T,p[_+"hoverformat"])+", "+h[0].t.labels.kde+" "+L.toFixed(3);for(var R=0,D=0;D")),c.color=function(e,t){var r=e[t.dir].marker,n=r.color,a=r.line.color,o=r.line.width;return i(n)?n:i(a)&&o?a:void 0}(d,m),[c]}function T(e){return n(v,e,d[p+"hoverformat"])}}},95952:function(e,t,r){"use strict";e.exports={attributes:r(65776),layoutAttributes:r(91352),supplyDefaults:r(24224).supplyDefaults,crossTraceDefaults:r(24224).crossTraceDefaults,supplyLayoutDefaults:r(59464),calc:r(73540),crossTraceCalc:r(50152),plot:r(64488),style:r(12252).style,hoverPoints:r(94196),eventData:r(53256),selectPoints:r(45784),moduleType:"trace",name:"waterfall",basePlotModule:r(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},91352:function(e){"use strict";e.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},59464:function(e,t,r){"use strict";var n=r(3400),i=r(91352);e.exports=function(e,t,r){var a=!1;function o(r,a){return n.coerce(e,t,i,r,a)}for(var s=0;s0&&(m+=d?"M"+f[0]+","+p[1]+"V"+p[0]:"M"+f[1]+","+p[0]+"H"+f[0]),"between"!==h&&(r.isSum||s path").each((function(e){if(!e.isBlank){var t=s[e.dir].marker;n.select(this).call(a.fill,t.color).call(a.stroke,t.line.color).call(i.dashLine,t.line.dash,t.line.width).style("opacity",s.selectedpoints&&!e.selected?o:1)}})),u(r,s,e),r.selectAll(".lines").each((function(){var e=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},84224:function(e,t,r){"use strict";var n=r(54460),i=r(3400),a=r(73060),o=r(60468).W,s=r(39032).BADNUM;t.moduleType="transform",t.name="aggregate";var l=t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},u=l.aggregations;function c(e,t,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(t,o),u=l.get(),c=function(e,t){var r=e.func,n=t.d2c,a=t.c2d;switch(r){case"count":return f;case"first":return d;case"last":return h;case"sum":return function(e,t){for(var r=0,i=0;ii&&(i=c,o=u)}}return i?a(o):s};case"rms":return function(e,t){for(var r=0,i=0,o=0;o":return function(e){return h(e)>f};case">=":return function(e){return h(e)>=f};case"[]":return function(e){var t=h(e);return t>=f[0]&&t<=f[1]};case"()":return function(e){var t=h(e);return t>f[0]&&t=f[0]&&tf[0]&&t<=f[1]};case"][":return function(e){var t=h(e);return t<=f[0]||t>=f[1]};case")(":return function(e){var t=h(e);return tf[1]};case"](":return function(e){var t=h(e);return t<=f[0]||t>f[1]};case")[":return function(e){var t=h(e);return t=f[1]};case"{}":return function(e){return-1!==f.indexOf(h(e))};case"}{":return function(e){return-1===f.indexOf(h(e))}}}(r,a.getDataToCoordFunc(e,t,s,i),d),x={},b={},_=0;p?(m=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set(new Array(f))},g=function(e,t){var r=x[e.astr][t];e.get()[t]=r}):(m=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set([])},g=function(e,t){var r=x[e.astr][t];e.get().push(r)}),T(m);for(var w=o(t.transforms,r),k=0;k1?"%{group} (%{trace})":"%{group}");var l=e.styles,u=o.styles=[];if(l)for(a=0;ah)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,v.prototype),t}function v(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return y(e)}return m(e,t,r)}function m(e,t,r){if("string"===typeof e)return function(e,t){if("string"===typeof t&&""!==t||(t="utf8"),!v.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|w(e,t),n=p(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(re(e,Uint8Array)){var t=new Uint8Array(e);return b(t.buffer,t.byteOffset,t.byteLength)}return x(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+u(e));if(re(e,ArrayBuffer)||e&&re(e.buffer,ArrayBuffer))return b(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(re(e,SharedArrayBuffer)||e&&re(e.buffer,SharedArrayBuffer)))return b(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return v.from(n,t,r);var i=function(e){if(v.isBuffer(e)){var t=0|_(e.length),r=p(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!==typeof e.length||ne(e.length)?p(0):x(e):"Buffer"===e.type&&Array.isArray(e.data)?x(e.data):void 0}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return v.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+u(e))}function g(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function y(e){return g(e),p(e<0?0:0|_(e))}function x(e){for(var t=e.length<0?0:0|_(e.length),r=p(t),n=0;n=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return 0|e}function w(e,t){if(v.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||re(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+u(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ee(e).length;default:if(i)return n?-1:Q(e).length;t=(""+t).toLowerCase(),i=!0}}function k(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return F(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return D(this,t,r);case"latin1":case"binary":return z(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function T(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function A(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),ne(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=v.from(t,n)),v.isBuffer(t))return 0===t.length?-1:M(e,t,r,n,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):M(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function M(e,t,r,n,i){var a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,d=0;di&&(n=i):n=i;var a,o=t.length;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:a>223?3:a>191?2:1;if(i+s<=r){var l=void 0,u=void 0,c=void 0,f=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:128===(192&(l=e[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(f=(15&a)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(f=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn.length?(v.isBuffer(a)||(a=v.from(a)),a.copy(n,i)):Uint8Array.prototype.set.call(n,a,i);else{if(!v.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i)}i+=a.length}return n},v.byteLength=w,v.prototype._isBuffer=!0,v.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},d&&(v.prototype[d]=v.prototype.inspect),v.prototype.compare=function(e,t,r,n,i){if(re(e,Uint8Array)&&(e=v.from(e,e.offset,e.byteLength)),!v.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+u(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),l=this.slice(n,i),c=e.slice(t,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return C(this,e,t,r);case"base64":return L(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function D(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,a){if(!v.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function U(e,t,r,n,i){X(t,n,i,e,r,7);var a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function q(e,t,r,n,i){X(t,n,i,e,r,7);var a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function V(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function H(e,t,r,n,i){return t=+t,r>>>=0,i||V(e,0,r,4),f.write(e,t,r,n,23,4),r+4}function G(e,t,r,n,i){return t=+t,r>>>=0,i||V(e,0,r,8),f.write(e,t,r,n,52,8),r+8}v.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,a=0;++a>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},v.prototype.readUint8=v.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},v.prototype.readBigUInt64LE=ae((function(e){K(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);var n=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),i=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);var n=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],i=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},v.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},v.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},v.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},v.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},v.prototype.readBigInt64LE=ae((function(e){K(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);var n=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);var n=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(n)<>>=0,t||B(e,4,this.length),f.read(this,e,!0,23,4)},v.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),f.read(this,e,!1,23,4)},v.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),f.read(this,e,!0,52,8)},v.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),f.read(this,e,!1,52,8)},v.prototype.writeUintLE=v.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},v.prototype.writeUint8=v.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},v.prototype.writeBigUInt64LE=ae((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),v.prototype.writeBigUInt64BE=ae((function(e){return q(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),v.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},v.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},v.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},v.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},v.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},v.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},v.prototype.writeBigInt64LE=ae((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),v.prototype.writeBigInt64BE=ae((function(e){return q(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),v.prototype.writeFloatLE=function(e,t,r){return H(this,e,t,!0,r)},v.prototype.writeFloatBE=function(e,t,r){return H(this,e,t,!1,r)},v.prototype.writeDoubleLE=function(e,t,r){return G(this,e,t,!0,r)},v.prototype.writeDoubleBE=function(e,t,r){return G(this,e,t,!1,r)},v.prototype.copy=function(e,t,r,n){if(!v.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(a=t;a=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function X(e,t,r,n,i,a){if(e>r||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(a+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(a+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(a+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(r).concat(s),new W.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){K(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||J(t,e.length-(r+1))}(n,i,a)}function K(e,t){if("number"!==typeof e)throw new W.ERR_INVALID_ARG_TYPE(t,"number",e)}function J(e,t,r){if(Math.floor(e)!==e)throw K(e,r),new W.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}Y("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),Y("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(u(t))}),TypeError),Y("ERR_OUT_OF_RANGE",(function(e,t,r){var n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=Z(String(r)):"bigint"===typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=Z(i)),i+="n"),n+=" It must be ".concat(t,". Received ").concat(i)}),RangeError);var $=/[^+/0-9A-Za-z-_]/g;function Q(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function ee(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function te(e,t,r,n){var i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function re(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function ne(e){return e!==e}var ie=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}();function ae(e){return"undefined"===typeof BigInt?oe:e}function oe(){throw new Error("BigInt not supported")}},9216:function(e){"use strict";e.exports=i,e.exports.isMobile=i,e.exports.default=i;var t=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(e){e||(e={});var i=e.ua;if(i||"undefined"===typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"===typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!==typeof i)return!1;var a=t.test(i)&&!r.test(i)||!!e.tablet&&n.test(i);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(a=!0),a}},6296:function(e,t,r){"use strict";e.exports=function(e){var t=(e=e||{}).eye||[0,0,1],r=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],u=e.mode||"turntable",c=n(),f=i(),d=a();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,t,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,t,r,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,t,r,s),new o({turntable:c,orbit:f,matrix:d},u)};var n=r(7261),i=r(9977),a=r(4192);function o(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map((function(t){return e[t]})),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(e){for(var t=this._controllerList,r=0;r0?o-4:o;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;su?u:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,a,o=[],s=t;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3865:function(e,t,r){"use strict";var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[1]).add(t[0].mul(e[1])),e[1].mul(t[1]))}},1318:function(e){"use strict";e.exports=function(e,t){return e[0].mul(t[1]).cmp(t[0].mul(e[1]))}},8697:function(e,t,r){"use strict";var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[1]),e[1].mul(t[0]))}},7842:function(e,t,r){"use strict";var n=r(6330),i=r(1533),a=r(2651),o=r(4387),s=r(869),l=r(8697);e.exports=function e(t,r){if(n(t))return r?l(t,e(r)):[t[0].clone(),t[1].clone()];var u,c,f=0;if(i(t))u=t.clone();else if("string"===typeof t)u=o(t);else{if(0===t)return[a(0),a(1)];if(t===Math.floor(t))u=a(t);else{for(;t!==Math.floor(t);)t*=Math.pow(2,256),f-=256;u=a(t)}}if(n(r))u.mul(r[1]),c=r[0].clone();else if(i(r))c=r.clone();else if("string"===typeof r)c=o(r);else if(r)if(r===Math.floor(r))c=a(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),f+=256;c=a(r)}else c=a(1);return f>0?u=u.ushln(f):f<0&&(c=c.ushln(-f)),s(u,c)}},6330:function(e,t,r){"use strict";var n=r(1533);e.exports=function(e){return Array.isArray(e)&&2===e.length&&n(e[0])&&n(e[1])}},5716:function(e,t,r){"use strict";var n=r(6859);e.exports=function(e){return e.cmp(new n(0))}},1369:function(e,t,r){"use strict";var n=r(5716);e.exports=function(e){var t=e.length,r=e.words,i=0;if(1===t)i=r[0];else if(2===t)i=r[0]+67108864*r[1];else for(var a=0;a20?52:r+32}},1533:function(e,t,r){"use strict";r(6859),e.exports=function(e){return e&&"object"===typeof e&&Boolean(e.words)}},2651:function(e,t,r){"use strict";var n=r(6859),i=r(2361);e.exports=function(e){var t=i.exponent(e);return t<52?new n(e):new n(e*Math.pow(2,52-t)).ushln(t-52)}},869:function(e,t,r){"use strict";var n=r(2651),i=r(5716);e.exports=function(e,t){var r=i(e),a=i(t);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(e=e.neg(),t=t.neg());var o=e.gcd(t);return o.cmpn(1)?[e.div(o),t.div(o)]:[e,t]}},4387:function(e,t,r){"use strict";var n=r(6859);e.exports=function(e){return new n(e)}},6504:function(e,t,r){"use strict";var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[0]),e[1].mul(t[1]))}},7721:function(e,t,r){"use strict";var n=r(5716);e.exports=function(e){return n(e[0])*n(e[1])}},5572:function(e,t,r){"use strict";var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},946:function(e,t,r){"use strict";var n=r(1369),i=r(4025);e.exports=function(e){var t=e[0],r=e[1];if(0===t.cmpn(0))return 0;var a=t.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,u=t.negative!==r.negative?-1:1;if(0===l.cmpn(0))return u*s;if(s){var c=i(s)+4;return u*(s+(d=n(l.ushln(c).divRound(r)))*Math.pow(2,-c))}var f=r.bitLength()-l.bitLength()+53,d=n(l.ushln(f).divRound(r));return f<1023?u*d*Math.pow(2,-f):u*(d*=Math.pow(2,-1023))*Math.pow(2,1023-f)}},2478:function(e){"use strict";function t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,i=o-1):n=o+1}return a}function r(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,i=o-1):n=o+1}return a}function n(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,n=o+1):i=o-1}return a}function i(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,n=o+1):i=o-1}return a}function a(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function o(e,t,r,n,i,a){return"function"===typeof r?a(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):a(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}e.exports={ge:function(e,r,n,i,a){return o(e,r,n,i,a,t)},gt:function(e,t,n,i,a){return o(e,t,n,i,a,r)},lt:function(e,t,r,i,a){return o(e,t,r,i,a,n)},le:function(e,t,r,n,a){return o(e,t,r,n,a,i)},eq:function(e,t,r,n,i){return o(e,t,r,n,i,a)}}},8828:function(e,t){"use strict";function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=2147483647,t.INT_MIN=-1<<31,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},6859:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(7790).Buffer}catch(A){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=l(e,t,n)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,l=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,f=67108863&l,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;c+=(o=(i=0|e.words[p])*(a=0|t.words[h])+f)/67108864|0,f=67108863&o}r.words[u]=0|f,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?v+r:c[u-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n("undefined"!==typeof o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===t,u=new e(a),c=this.clone();if(l){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,h=0|o[1],p=8191&h,v=h>>>13,m=0|o[2],g=8191&m,y=m>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],k=8191&w,T=w>>>13,A=0|o[5],M=8191&A,S=A>>>13,E=0|o[6],C=8191&E,L=E>>>13,P=0|o[7],O=8191&P,I=P>>>13,R=0|o[8],D=8191&R,z=R>>>13,F=0|o[9],N=8191&F,B=F>>>13,j=0|s[0],U=8191&j,q=j>>>13,V=0|s[1],H=8191&V,G=V>>>13,W=0|s[2],Y=8191&W,Z=W>>>13,X=0|s[3],K=8191&X,J=X>>>13,$=0|s[4],Q=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],le=8191&se,ue=se>>>13,ce=0|s[8],fe=8191&ce,de=ce>>>13,he=0|s[9],pe=8191&he,ve=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,U)|0))<<13)|0;u=((a=Math.imul(d,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,q))+Math.imul(v,U)|0,a=Math.imul(v,q);var ge=(u+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,H)|0))<<13)|0;u=((a=a+Math.imul(d,G)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,U),i=(i=Math.imul(g,q))+Math.imul(y,U)|0,a=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(v,H)|0,a=a+Math.imul(v,G)|0;var ye=(u+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,Y)|0))<<13)|0;u=((a=a+Math.imul(d,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,q))+Math.imul(_,U)|0,a=Math.imul(_,q),n=n+Math.imul(g,H)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,Z)|0;var xe=(u+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(d,K)|0))<<13)|0;u=((a=a+Math.imul(d,J)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,q))+Math.imul(T,U)|0,a=Math.imul(T,q),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(y,Y)|0,a=a+Math.imul(y,Z)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,K)|0,a=a+Math.imul(v,J)|0;var be=(u+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,q))+Math.imul(S,U)|0,a=Math.imul(S,q),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(T,H)|0,a=a+Math.imul(T,G)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,Z)|0,n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(y,K)|0,a=a+Math.imul(y,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,ee)|0;var _e=(u+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;u=((a=a+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,q))+Math.imul(L,U)|0,a=Math.imul(L,q),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,Z)|0,n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(_,K)|0,a=a+Math.imul(_,J)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,a=a+Math.imul(v,ne)|0;var we=(u+(n=n+Math.imul(f,ae)|0)|0)+((8191&(i=(i=i+Math.imul(f,oe)|0)+Math.imul(d,ae)|0))<<13)|0;u=((a=a+Math.imul(d,oe)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,q))+Math.imul(I,U)|0,a=Math.imul(I,q),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,Z)|0,n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(T,K)|0,a=a+Math.imul(T,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,oe)|0;var ke=(u+(n=n+Math.imul(f,le)|0)|0)+((8191&(i=(i=i+Math.imul(f,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((a=a+Math.imul(d,ue)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,q))+Math.imul(z,U)|0,a=Math.imul(z,q),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(I,H)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,Z)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(S,K)|0,a=a+Math.imul(S,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(T,Q)|0,a=a+Math.imul(T,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0,n=n+Math.imul(g,ae)|0,i=(i=i+Math.imul(g,oe)|0)+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,ue)|0;var Te=(u+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;u=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,q))+Math.imul(B,U)|0,a=Math.imul(B,q),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(z,H)|0,a=a+Math.imul(z,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(I,Y)|0,a=a+Math.imul(I,Z)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(L,K)|0,a=a+Math.imul(L,J)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(T,re)|0,a=a+Math.imul(T,ne)|0,n=n+Math.imul(b,ae)|0,i=(i=i+Math.imul(b,oe)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(y,le)|0,a=a+Math.imul(y,ue)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(v,fe)|0,a=a+Math.imul(v,de)|0;var Ae=(u+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ve)|0)+Math.imul(d,pe)|0))<<13)|0;u=((a=a+Math.imul(d,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(N,H),i=(i=Math.imul(N,G))+Math.imul(B,H)|0,a=Math.imul(B,G),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(z,Y)|0,a=a+Math.imul(z,Z)|0,n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(I,K)|0,a=a+Math.imul(I,J)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(T,ae)|0,a=a+Math.imul(T,oe)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,ue)|0)+Math.imul(_,le)|0,a=a+Math.imul(_,ue)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0;var Me=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;u=((a=a+Math.imul(v,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,Z))+Math.imul(B,Y)|0,a=Math.imul(B,Z),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(z,K)|0,a=a+Math.imul(z,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(T,le)|0,a=a+Math.imul(T,ue)|0,n=n+Math.imul(b,fe)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,de)|0;var Se=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ve)|0)+Math.imul(y,pe)|0))<<13)|0;u=((a=a+Math.imul(y,ve)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,J))+Math.imul(B,K)|0,a=Math.imul(B,J),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(z,Q)|0,a=a+Math.imul(z,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(I,re)|0,a=a+Math.imul(I,ne)|0,n=n+Math.imul(C,ae)|0,i=(i=i+Math.imul(C,oe)|0)+Math.imul(L,ae)|0,a=a+Math.imul(L,oe)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,ue)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(T,fe)|0,a=a+Math.imul(T,de)|0;var Ee=(u+(n=n+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ve)|0)+Math.imul(_,pe)|0))<<13)|0;u=((a=a+Math.imul(_,ve)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,ee))+Math.imul(B,Q)|0,a=Math.imul(B,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(z,re)|0,a=a+Math.imul(z,ne)|0,n=n+Math.imul(O,ae)|0,i=(i=i+Math.imul(O,oe)|0)+Math.imul(I,ae)|0,a=a+Math.imul(I,oe)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,ue)|0)+Math.imul(L,le)|0,a=a+Math.imul(L,ue)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,de)|0;var Ce=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,ve)|0)+Math.imul(T,pe)|0))<<13)|0;u=((a=a+Math.imul(T,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,re),i=(i=Math.imul(N,ne))+Math.imul(B,re)|0,a=Math.imul(B,ne),n=n+Math.imul(D,ae)|0,i=(i=i+Math.imul(D,oe)|0)+Math.imul(z,ae)|0,a=a+Math.imul(z,oe)|0,n=n+Math.imul(O,le)|0,i=(i=i+Math.imul(O,ue)|0)+Math.imul(I,le)|0,a=a+Math.imul(I,ue)|0,n=n+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0;var Le=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ve)|0)+Math.imul(S,pe)|0))<<13)|0;u=((a=a+Math.imul(S,ve)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(N,ae),i=(i=Math.imul(N,oe))+Math.imul(B,ae)|0,a=Math.imul(B,oe),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,ue)|0)+Math.imul(z,le)|0,a=a+Math.imul(z,ue)|0,n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(I,fe)|0,a=a+Math.imul(I,de)|0;var Pe=(u+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ve)|0)+Math.imul(L,pe)|0))<<13)|0;u=((a=a+Math.imul(L,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(N,le),i=(i=Math.imul(N,ue))+Math.imul(B,le)|0,a=Math.imul(B,ue),n=n+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(z,fe)|0,a=a+Math.imul(z,de)|0;var Oe=(u+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,ve)|0)+Math.imul(I,pe)|0))<<13)|0;u=((a=a+Math.imul(I,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(N,fe),i=(i=Math.imul(N,de))+Math.imul(B,fe)|0,a=Math.imul(B,de);var Ie=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ve)|0)+Math.imul(z,pe)|0))<<13)|0;u=((a=a+Math.imul(z,ve)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Re=(u+(n=Math.imul(N,pe))|0)+((8191&(i=(i=Math.imul(N,ve))+Math.imul(B,pe)|0))<<13)|0;return u=((a=Math.imul(B,ve))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,l[0]=me,l[1]=ge,l[2]=ye,l[3]=xe,l[4]=be,l[5]=_e,l[6]=we,l[7]=ke,l[8]=Te,l[9]=Ae,l[10]=Me,l[11]=Se,l[12]=Ee,l[13]=Ce,l[14]=Le,l[15]=Pe,l[16]=Oe,l[17]=Ie,l[18]=Re,0!==u&&(l[19]=u,r.length++),r};function v(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=h),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):v(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var f=0|this.words[u];this.words[u]=c<<26-a|f>>>a,c=f&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==t){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var u=0;u=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var p=0,v=1;0===(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(f)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(l)):(r.isub(t),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0===(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var f=0,d=1;0===(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(i=0===t.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new k(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(x,y),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new b;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return g[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var f=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=o;0!==h.cmp(s);){for(var v=h,m=0;0!==v.cmp(s);m++)v=v.redSqr();n(m=0;n--){for(var u=t.words[n],c=l-1;c>=0;c--){var f=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new T(e)},i(T,k),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6204:function(e){"use strict";e.exports=function(e){var t,r,n,i=e.length,a=0;for(t=0;t>>1;if(!(c<=0)){var f,d=i.mallocDouble(2*c*s),h=i.mallocInt32(s);if((s=l(e,c,d,h))>0){if(1===c&&n)a.init(s),f=a.sweepComplete(c,r,0,s,d,h,0,s,d,h);else{var p=i.mallocDouble(2*c*u),v=i.mallocInt32(u);(u=l(t,c,p,v))>0&&(a.init(s+u),f=1===c?a.sweepBipartite(c,r,0,s,d,h,0,u,p,v):o(c,r,n,s,d,h,u,p,v),i.free(p),i.free(v))}i.free(d),i.free(h)}return f}}}function c(e,t){n.push([e,t])}},2455:function(e,t){"use strict";function r(e){return e?function(e,t,r,n,i,a,o,s,l,u,c){return i-n>l-s?function(e,t,r,n,i,a,o,s,l,u,c){for(var f=2*e,d=n,h=f*n;du-l?n?function(e,t,r,n,i,a,o,s,l,u,c){for(var f=2*e,d=n,h=f*n;d0;){var R=(O-=1)*b,D=w[R],z=w[R+1],F=w[R+2],N=w[R+3],B=w[R+4],j=w[R+5],U=O*_,q=k[U],V=k[U+1],H=1&j,G=!!(16&j),W=c,Y=S,Z=C,X=L;if(H&&(W=C,Y=L,Z=c,X=S),!(2&j&&z>=(F=m(e,D,z,F,W,Y,V)))&&!(4&j&&(z=g(e,D,z,F,W,Y,q))>=F)){var K=F-z,J=B-N;if(G){if(e*K*(K+J)=p0)&&!(p1>=hi)"),v=c("lo===p0"),m=c("lo>>1,d=2*e,h=f,p=s[d*f+t];u=x?(h=y,p=x):g>=_?(h=m,p=g):(h=b,p=_):x>=_?(h=y,p=x):_>=g?(h=m,p=g):(h=b,p=_);for(var w=d*(c-1),k=d*h,T=0;Tr&&i[f+t]>u;--c,f-=o){for(var d=f,h=f+o,p=0;pd;++d,l+=s)if(i[l+f]===o)if(c===d)c+=1,u+=s;else{for(var h=0;s>h;++h){var p=i[l+h];i[l+h]=i[u],i[u++]=p}var v=a[d];a[d]=a[c],a[c++]=v}return c},"lod;++d,l+=s)if(i[l+f]h;++h){var p=i[l+h];i[l+h]=i[u],i[u++]=p}var v=a[d];a[d]=a[c],a[c++]=v}return c},"lo<=p0":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,u=l,c=r,f=e+t,d=r;n>d;++d,l+=s)if(i[l+f]<=o)if(c===d)c+=1,u+=s;else{for(var h=0;s>h;++h){var p=i[l+h];i[l+h]=i[u],i[u++]=p}var v=a[d];a[d]=a[c],a[c++]=v}return c},"hi<=p0":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,u=l,c=r,f=e+t,d=r;n>d;++d,l+=s)if(i[l+f]<=o)if(c===d)c+=1,u+=s;else{for(var h=0;s>h;++h){var p=i[l+h];i[l+h]=i[u],i[u++]=p}var v=a[d];a[d]=a[c],a[c++]=v}return c},"loh;++h,l+=s){var p=i[l+f],v=i[l+d];if(pm;++m){var g=i[l+m];i[l+m]=i[u],i[u++]=g}var y=a[h];a[h]=a[c],a[c++]=y}}return c},"lo<=p0&&p0<=hi":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,u=l,c=r,f=t,d=e+t,h=r;n>h;++h,l+=s){var p=i[l+f],v=i[l+d];if(p<=o&&o<=v)if(c===h)c+=1,u+=s;else{for(var m=0;s>m;++m){var g=i[l+m];i[l+m]=i[u],i[u++]=g}var y=a[h];a[h]=a[c],a[c++]=y}}return c},"!(lo>=p0)&&!(p1>=hi)":function(e,t,r,n,i,a,o,s){for(var l=2*e,u=l*r,c=u,f=r,d=t,h=e+t,p=r;n>p;++p,u+=l){var v=i[u+d],m=i[u+h];if(!(v>=o)&&!(s>=m))if(f===p)f+=1,c+=l;else{for(var g=0;l>g;++g){var y=i[u+g];i[u+g]=i[c],i[c++]=y}var x=a[p];a[p]=a[f],a[f++]=x}}return f}}},1811:function(e){"use strict";e.exports=function(e,n){n<=4*t?r(0,n-1,e):u(0,n-1,e)};var t=32;function r(e,t,r){for(var n=2*(e+1),i=e+1;i<=t;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >e;){var u=r[l-2],c=r[l-1];if(ur[t+1])}function l(e,t,r,n){var i=n[e*=2];return i>1,m=v-d,g=v+d,y=h,x=m,b=v,_=g,w=p,k=e+1,T=c-1,A=0;s(y,x,f)&&(A=y,y=x,x=A),s(_,w,f)&&(A=_,_=w,w=A),s(y,b,f)&&(A=y,y=b,b=A),s(x,b,f)&&(A=x,x=b,b=A),s(y,_,f)&&(A=y,y=_,_=A),s(b,_,f)&&(A=b,b=_,_=A),s(x,w,f)&&(A=x,x=w,w=A),s(x,b,f)&&(A=x,x=b,b=A),s(_,w,f)&&(A=_,_=w,w=A);for(var M=f[2*x],S=f[2*x+1],E=f[2*_],C=f[2*_+1],L=2*y,P=2*b,O=2*w,I=2*h,R=2*v,D=2*p,z=0;z<2;++z){var F=f[L+z],N=f[P+z],B=f[O+z];f[I+z]=F,f[R+z]=N,f[D+z]=B}i(m,e,f),i(g,c,f);for(var j=k;j<=T;++j)if(l(j,M,S,f))j!==k&&n(j,k,f),++k;else if(!l(j,E,C,f))for(;;){if(l(T,E,C,f)){l(T,M,S,f)?(a(j,k,T,f),++k,--T):(n(j,T,f),--T);break}if(--T>>1;a(p,S);var E=0,C=0;for(k=0;k=o)v(c,f,C--,L=L-o|0);else if(L>=0)v(l,u,E--,L);else if(L<=-o){L=-L-o|0;for(var P=0;P>>1;a(p,E);var C=0,L=0,P=0;for(T=0;T>1===p[2*T+3]>>1&&(I=2,T+=1),O<0){for(var R=-(O>>1)-1,D=0;D>1)-1,0===I?v(l,u,C--,R):1===I?v(c,f,L--,R):2===I&&v(d,h,P--,R)}},scanBipartite:function(e,t,r,n,i,s,c,f,d,h,g,y){var x=0,b=2*e,_=t,w=t+e,k=1,T=1;n?T=o:k=o;for(var A=i;A>>1;a(p,C);var L=0;for(A=0;A=o?(O=!n,M-=o):(O=!!n,M-=1),O)m(l,u,L++,M);else{var I=y[M],R=b*M,D=g[R+t+1],z=g[R+t+1+e];e:for(var F=0;F>>1;a(p,k);var T=0;for(x=0;x=o)l[T++]=b-o;else{var M=h[b-=1],S=m*b,E=d[S+t+1],C=d[S+t+1+e];e:for(var L=0;L=0;--L)if(l[L]===b){for(R=L+1;R0;){for(var h=r.pop(),p=(c=-1,f=-1,l=o[s=r.pop()],1);p=0||(t.flip(s,h),i(e,t,r,c,s,f),i(e,t,r,s,f,c),i(e,t,r,f,h,c),i(e,t,r,h,c,f))}}},5023:function(e,t,r){"use strict";var n=r(2478);function i(e,t,r,n,i,a,o){this.cells=e,this.neighbor=t,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function a(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}e.exports=function(e,t,r){var n=function(e,t){for(var r=e.cells(),n=r.length,o=0;o0||l.length>0;){for(;s.length>0;){var h=s.pop();if(u[h]!==-o){u[h]=o,c[h];for(var p=0;p<3;++p){var v=d[3*h+p];v>=0&&0===u[v]&&(f[3*h+p]?l.push(v):(s.push(v),u[v]=o))}}}var m=l;l=s,s=m,l.length=0,o=-o}var g=function(e,t,r){for(var n=0,i=0;i1&&i(r[d[h-2]],r[d[h-1]],a)>0;)e.push([d[h-1],d[h-2],o]),h-=1;d.length=h,d.push(o);var p=f.upperIds;for(h=p.length;h>1&&i(r[p[h-2]],r[p[h-1]],a)<0;)e.push([p[h-2],p[h-1],o]),h-=1;p.length=h,p.push(o)}}function f(e,t){var r;return(r=e.a[0]v[0]&&i.push(new s(v,p,2,u),new s(p,v,1,u))}i.sort(l);for(var m=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),g=[new o([m,1],[m,0],-1,[],[],[],[])],y=[],x=(u=0,i.length);u=0}}(),a.removeTriangle=function(e,t,r){var n=this.stars;o(n[e],t,r),o(n[t],r,e),o(n[r],e,t)},a.addTriangle=function(e,t,r){var n=this.stars;n[e].push(t,r),n[t].push(r,e),n[r].push(e,t)},a.opposite=function(e,t){for(var r=this.stars[t],n=1,i=r.length;nt[2]?1:0)}function g(e,t,r){if(0!==e.length){if(t)for(var n=0;n=0;--a){var x=t[c=(S=n[a])[0]],b=x[0],_=x[1],w=e[b],k=e[_];if((w[0]-k[0]||w[1]-k[1])<0){var T=b;b=_,_=T}x[0]=b;var A,M=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===c;){var S,E=(S=n[--a])[1];i?t.push([M,E,A]):t.push([M,E]),M=E}i?t.push([M,_,A]):t.push([M,_])}return d}(e,t,d,m,r),x=p(e,y);return g(t,x,r),!!x||d.length>0||m.length>0}},3637:function(e,t,r){"use strict";e.exports=function(e,t,r,n){var a=s(t,e),f=s(n,r),d=c(a,f);if(0===o(d))return null;var h=s(e,r),p=c(f,h),v=i(p,d),m=u(a,v);return l(e,m)};var n=r(6504),i=r(8697),a=r(5572),o=r(7721),s=r(544),l=r(2653),u=r(8987);function c(e,t){return a(n(e[0],t[1]),n(e[1],t[0]))}},3642:function(e){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},6729:function(e,t,r){"use strict";var n=r(3642),i=r(395);function a(e){return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function o(e){for(var t,r="#",n=0;n<3;++n)r+=("00"+(t=(t=e[n]).toString(16))).substr(t.length);return r}function s(e){return"rgba("+e.join(",")+")"}e.exports=function(e){var t,r,l,u,c,f,d,h,p,v;if(e||(e={}),h=(e.nshades||72)-1,d=e.format||"hex",(f=e.colormap)||(f="jet"),"string"===typeof f){if(f=f.toLowerCase(),!n[f])throw Error(f+" not a supported colorscale");c=n[f]}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);c=f.slice()}if(c.length>h+1)throw new Error(f+" map requires nshades to be at least size "+c.length);p=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"===typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=c.map((function(e){return Math.round(e.index*h)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var m=c.map((function(e,t){var r=c[t].index,n=c[t].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=p[0]+(p[1]-p[0])*r),n})),g=[];for(v=0;v0||l(e,t,a)?-1:1:0===s?u>0||l(e,t,r)?1:-1:i(u-s)}var f=n(e,t,r);return f>0?o>0&&n(e,t,a)>0?1:-1:f<0?o>0||n(e,t,a)>0?1:-1:n(e,t,a)>0||l(e,t,r)?1:-1};var n=r(3250),i=r(8572),a=r(9362),o=r(5382),s=r(8210);function l(e,t,r){var n=a(e[0],-t[0]),i=a(e[1],-t[1]),l=a(r[0],-t[0]),u=a(r[1],-t[1]),c=s(o(n,l),o(i,u));return c[c.length-1]>=0}},8572:function(e){"use strict";e.exports=function(e){return e<0?-1:e>0?1:0}},8507:function(e){e.exports=function(e,n){var i=e.length,a=e.length-n.length;if(a)return a;switch(i){case 0:return 0;case 1:return e[0]-n[0];case 2:return e[0]+e[1]-n[0]-n[1]||t(e[0],e[1])-t(n[0],n[1]);case 3:var o=e[0]+e[1],s=n[0]+n[1];if(a=o+e[2]-(s+n[2]))return a;var l=t(e[0],e[1]),u=t(n[0],n[1]);return t(l,e[2])-t(u,n[2])||t(l+e[2],o)-t(u+n[2],s);case 4:var c=e[0],f=e[1],d=e[2],h=e[3],p=n[0],v=n[1],m=n[2],g=n[3];return c+f+d+h-(p+v+m+g)||t(c,f,d,h)-t(p,v,m,g,p)||t(c+f,c+d,c+h,f+d,f+h,d+h)-t(p+v,p+m,p+g,v+m,v+g,m+g)||t(c+f+d,c+f+h,c+d+h,f+d+h)-t(p+v+m,p+v+g,p+m+g,v+m+g);default:for(var y=e.slice().sort(r),x=n.slice().sort(r),b=0;be[r][0]&&(r=n);return tr?[[r],[t]]:[[t]]}},4750:function(e,t,r){"use strict";e.exports=function(e){var t=n(e),r=t.length;if(r<=2)return[];for(var i=new Array(r),a=t[r-1],o=0;o=t[l]&&(s+=1);a[o]=s}}return e}(n(a,!0),r)}};var n=r(8954),i=r(3952)},4769:function(e){"use strict";e.exports=function(e,t,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,f=s*(3-2*i),d=s*o;if(e.length){a||(a=new Array(e.length));for(var h=e.length-1;h>=0;--h)a[h]=u*e[h]+c*t[h]+f*r[h]+d*n[h];return a}return u*e+c*t+f*r+d*n},e.exports.derivative=function(e,t,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(e.length){a||(a=new Array(e.length));for(var c=e.length-1;c>=0;--c)a[c]=o*e[c]+s*t[c]+l*r[c]+u*n[c];return a}return o*e+s*t+l*r[c]+u*n}},7642:function(e,t,r){"use strict";var n=r(8954),i=r(1682);function a(e,t){this.point=e,this.index=t}function o(e,t){for(var r=e.point,n=t.point,i=r.length,a=0;a=2)return!1;e[r]=n}return!0})):_.filter((function(e){for(var t=0;t<=s;++t){var r=g[e[t]];if(r<0)return!1;e[t]=r}return!0})),1&s)for(c=0;c<_.length;++c)d=(b=_[c])[0],b[0]=b[1],b[1]=d;return _}},2361:function(e){var t=!1;if("undefined"!==typeof Float64Array){var r=new Float64Array(1),n=new Uint32Array(r.buffer);r[0]=1,t=!0,1072693248===n[1]?(e.exports=function(e){return r[0]=e,[n[0],n[1]]},e.exports.pack=function(e,t){return n[0]=e,n[1]=t,r[0]},e.exports.lo=function(e){return r[0]=e,n[0]},e.exports.hi=function(e){return r[0]=e,n[1]}):1072693248===n[0]?(e.exports=function(e){return r[0]=e,[n[1],n[0]]},e.exports.pack=function(e,t){return n[1]=e,n[0]=t,r[0]},e.exports.lo=function(e){return r[0]=e,n[1]},e.exports.hi=function(e){return r[0]=e,n[0]}):t=!1}if(!t){var i=new Buffer(8);e.exports=function(e){return i.writeDoubleLE(e,0,!0),[i.readUInt32LE(0,!0),i.readUInt32LE(4,!0)]},e.exports.pack=function(e,t){return i.writeUInt32LE(e,0,!0),i.writeUInt32LE(t,4,!0),i.readDoubleLE(0,!0)},e.exports.lo=function(e){return i.writeDoubleLE(e,0,!0),i.readUInt32LE(0,!0)},e.exports.hi=function(e){return i.writeDoubleLE(e,0,!0),i.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}},1338:function(e){"use strict";function t(e,r,n){var i=0|e[n];if(i<=0)return[];var a,o=new Array(i);if(n===e.length-1)for(a=0;a0)return function(e,t){var r,n;for(r=new Array(e),n=0;n=r-1){d=l.length-1;var p=e-t[r-1];for(h=0;h=r-1)for(var c=s.length-1,f=(t[r-1],0);f=0;--r)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),r=this.dimension;if(!(e0;--f)n.push(a(l[f-1],u[f-1],arguments[f])),i.push(0)}},s.push=function(e){var t=this.lastT(),r=this.dimension;if(!(e1e-6?1/s:0;this._time.push(e);for(var d=r;d>0;--d){var h=a(u[d-1],c[d-1],arguments[d]);n.push(h),i.push((h-n[o++])*f)}}},s.set=function(e){var t=this.dimension;if(!(e0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(e){var t=this.lastT(),r=this.dimension;if(!(e<=t||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=e-t,f=c>1e-6?1/c:0;this._time.push(e);for(var d=r;d>0;--d){var h=arguments[d];n.push(a(l[d-1],u[d-1],n[o++]+h)),i.push(h*f)}}},s.idle=function(e){var t=this.lastT();if(!(e=0;--f)n.push(a(l[f],u[f],n[o]+c*i[o])),i.push(0),o+=1}}},3840:function(e){"use strict";function t(e,t,r,n,i,a){this._color=e,this.key=t,this.value=r,this.left=n,this.right=i,this._count=a}function r(e){return new t(e._color,e.key,e.value,e.left,e.right,e._count)}function n(e,r){return new t(e,r.key,r.value,r.left,r.right,r._count)}function i(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function a(e,t){this._compare=e,this.root=t}e.exports=function(e){return new a(e||h,null)};var o=a.prototype;function s(e,t){var r;return t.left&&(r=s(e,t.left))?r:(r=e(t.key,t.value))||(t.right?s(e,t.right):void 0)}function l(e,t,r,n){if(t(e,n.key)<=0){var i;if(n.left&&(i=l(e,t,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return l(e,t,r,n.right)}function u(e,t,r,n,i){var a,o=r(e,i.key),s=r(t,i.key);if(o<=0){if(i.left&&(a=u(e,t,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return u(e,t,r,n,i.right)}function c(e,t){this.tree=e,this._stack=t}Object.defineProperty(o,"keys",{get:function(){var e=[];return this.forEach((function(t,r){e.push(t)})),e}}),Object.defineProperty(o,"values",{get:function(){var e=[];return this.forEach((function(t,r){e.push(r)})),e}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(e,r){for(var o=this._compare,s=this.root,l=[],u=[];s;){var c=o(e,s.key);l.push(s),u.push(c),s=c<=0?s.left:s.right}l.push(new t(0,e,r,null,null,1));for(var f=l.length-2;f>=0;--f)s=l[f],u[f]<=0?l[f]=new t(s._color,s.key,s.value,l[f+1],s.right,s._count+1):l[f]=new t(s._color,s.key,s.value,s.left,l[f+1],s._count+1);for(f=l.length-1;f>1;--f){var d=l[f-1];if(s=l[f],1===d._color||1===s._color)break;var h=l[f-2];if(h.left===d)if(d.left===s){if(!(p=h.right)||0!==p._color){h._color=0,h.left=d.right,d._color=1,d.right=h,l[f-2]=d,l[f-1]=s,i(h),i(d),f>=3&&((v=l[f-3]).left===h?v.left=d:v.right=d);break}d._color=1,h.right=n(1,p),h._color=0,f-=1}else{if(!(p=h.right)||0!==p._color){d.right=s.left,h._color=0,h.left=s.right,s._color=1,s.left=d,s.right=h,l[f-2]=s,l[f-1]=d,i(h),i(d),i(s),f>=3&&((v=l[f-3]).left===h?v.left=s:v.right=s);break}d._color=1,h.right=n(1,p),h._color=0,f-=1}else if(d.right===s){if(!(p=h.left)||0!==p._color){h._color=0,h.right=d.left,d._color=1,d.left=h,l[f-2]=d,l[f-1]=s,i(h),i(d),f>=3&&((v=l[f-3]).right===h?v.right=d:v.left=d);break}d._color=1,h.left=n(1,p),h._color=0,f-=1}else{var p;if(!(p=h.left)||0!==p._color){var v;d.left=s.right,h._color=0,h.right=s.left,s._color=1,s.right=d,s.left=h,l[f-2]=s,l[f-1]=d,i(h),i(d),i(s),f>=3&&((v=l[f-3]).right===h?v.right=s:v.left=s);break}d._color=1,h.left=n(1,p),h._color=0,f-=1}}return l[0]._color=1,new a(o,l[0])},o.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return s(e,this.root);case 2:return l(t,this._compare,e,this.root);case 3:if(this._compare(t,r)>=0)return;return u(t,r,this._compare,e,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new c(this,e)}}),Object.defineProperty(o,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new c(this,e)}}),o.at=function(e){if(e<0)return new c(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e=t.right._count)break;t=t.right}return new c(this,[])},o.ge=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new c(this,n)},o.gt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new c(this,n)},o.lt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new c(this,n)},o.le=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new c(this,n)},o.find=function(e){for(var t=this._compare,r=this.root,n=[];r;){var i=t(e,r.key);if(n.push(r),0===i)return new c(this,n);r=i<=0?r.left:r.right}return new c(this,[])},o.remove=function(e){var t=this.find(e);return t?t.remove():this},o.get=function(e){for(var t=this._compare,r=this.root;r;){var n=t(e,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var f=c.prototype;function d(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function h(e,t){return et?1:0}Object.defineProperty(f,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(f,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),f.clone=function(){return new c(this.tree,this._stack.slice())},f.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var o=new Array(e.length),s=e[e.length-1];o[o.length-1]=new t(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=e.length-2;l>=0;--l)(s=e[l]).left===e[l+1]?o[l]=new t(s._color,s.key,s.value,o[l+1],s.right,s._count):o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count);if((s=o[o.length-1]).left&&s.right){var u=o.length;for(s=s.left;s.right;)o.push(s),s=s.right;var c=o[u-1];for(o.push(new t(s._color,c.key,c.value,s.left,s.right,s._count)),o[u-1].key=s.key,o[u-1].value=s.value,l=o.length-2;l>=u;--l)s=o[l],o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count);o[u-1].left=o[u]}if(0===(s=o[o.length-1])._color){var f=o[o.length-2];for(f.left===s?f.left=null:f.right===s&&(f.right=null),o.pop(),l=0;l=0;--l){if(t=e[l],0===l)return void(t._color=1);if((a=e[l-1]).left===t){if((o=a.right).right&&0===o.right._color)return s=(o=a.right=r(o)).right=r(o.right),a.right=o.left,o.left=a,o.right=s,o._color=a._color,t._color=1,a._color=1,s._color=1,i(a),i(o),l>1&&((u=e[l-2]).left===a?u.left=o:u.right=o),void(e[l-1]=o);if(o.left&&0===o.left._color)return s=(o=a.right=r(o)).left=r(o.left),a.right=s.left,o.left=s.right,s.left=a,s.right=o,s._color=a._color,a._color=1,o._color=1,t._color=1,i(a),i(o),i(s),l>1&&((u=e[l-2]).left===a?u.left=s:u.right=s),void(e[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.right=n(0,o));a.right=n(0,o);continue}o=r(o),a.right=o.left,o.left=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((u=e[l-2]).left===a?u.left=o:u.right=o),e[l-1]=o,e[l]=a,l+11&&((u=e[l-2]).right===a?u.right=o:u.left=o),void(e[l-1]=o);if(o.right&&0===o.right._color)return s=(o=a.left=r(o)).right=r(o.right),a.left=s.right,o.right=s.left,s.right=a,s.left=o,s._color=a._color,a._color=1,o._color=1,t._color=1,i(a),i(o),i(s),l>1&&((u=e[l-2]).right===a?u.right=s:u.left=s),void(e[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.left=n(0,o));a.left=n(0,o);continue}var u;o=r(o),a.left=o.right,o.right=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((u=e[l-2]).right===a?u.right=o:u.left=o),e[l-1]=o,e[l]=a,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(f,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(f,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var n=t.length-2;n>=0;--n)t[n+1]===t[n].right&&(++e,t[n].left&&(e+=t[n].left._count));return e},enumerable:!0}),f.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(f,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),f.update=function(e){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new t(i._color,i.key,e,i.left,i.right,i._count);for(var o=r.length-2;o>=0;--o)(i=r[o]).left===r[o+1]?n[o]=new t(i._color,i.key,i.value,n[o+1],i.right,i._count):n[o]=new t(i._color,i.key,i.value,i.left,n[o+1],i._count);return new a(this.tree._compare,n[0])},f.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(f,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},3837:function(e,t,r){"use strict";e.exports=function(e,t){var r=new h(e);return r.update(t),r};var n=r(4935),i=r(501),a=r(5304),o=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),u=ArrayBuffer,c=DataView;function f(e){return Array.isArray(e)||function(e){return u.isView(e)&&!(e instanceof c)}(e)}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function h(e){this.gl=e,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(e)}var p=h.prototype;function v(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}p.update=function(e){function t(t,r,n){if(n in e){var i,a=e[n],o=this[n];(t?f(a)&&f(a[0]):f(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}e=e||{};var r,a=t.bind(this,!1,Number),o=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),u=t.bind(this,!0,(function(e){if(f(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]})),c=!1,d=!1;if("bounds"in e)for(var h=e.bounds,p=0;p<2;++p)for(var v=0;v<3;++v)h[p][v]!==this.bounds[p][v]&&(d=!0),this.bounds[p][v]=h[p][v];if("ticks"in e)for(r=e.ticks,c=!0,this.autoTicks=!1,p=0;p<3;++p)this.tickSpacing[p]=0;else a("tickSpacing")&&(this.autoTicks=!0,d=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),d=!0,c=!0,this._firstInit=!1),d&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),c=!0),c){for(p=0;p<3;++p)r[p].sort((function(e,t){return e.x-t.x}));s.equal(r,this.ticks)?c=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(c=!0),l("tickFontStyle")&&(c=!0),l("tickFontWeight")&&(c=!0),l("tickFontVariant")&&(c=!0),a("tickSize"),a("tickAngle"),a("tickPad"),u("tickColor");var m=l("labels");l("labelFont")&&(m=!0),l("labelFontStyle")&&(m=!0),l("labelFontWeight")&&(m=!0),l("labelFontVariant")&&(m=!0),o("labelEnable"),a("labelSize"),a("labelPad"),u("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),u("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),u("lineTickColor"),o("gridEnable"),a("gridWidth"),u("gridColor"),o("zeroEnable"),u("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),u("backgroundColor");var g=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],y=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(m||c)&&this._text.update(this.bounds,this.labels,g,this.ticks,y):this._text=n(this.gl,this.bounds,this.labels,g,this.ticks,y),this._lines&&c&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var m=[new v,new v,new v];function g(e,t,r,n,i){for(var a=e.primalOffset,o=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,u=n[t],c=0;c<3;++c)if(t!==c){var f=a,d=s,h=o,p=l;u&1<0?(h[c]=-1,p[c]=0):(h[c]=0,p[c]=1)}}var y=[0,0,0],x={model:l,view:l,projection:l,_ortho:!1};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(e){};var b=[0,0,0],_=[0,0,0],w=[0,0,0];p.draw=function(e){e=e||x;for(var t=this.gl,r=e.model||l,n=e.view||l,i=e.projection||l,a=this.bounds,s=e._ortho||!1,u=o(r,n,i,a,s),c=u.cubeEdges,f=u.axis,h=n[12],p=n[13],v=n[14],k=n[15],T=(s?2:1)*this.pixelRatio*(i[3]*h+i[7]*p+i[11]*v+i[15]*k)/t.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=c[A],this.lastCubeProps.axis[A]=f[A];var M=m;for(A=0;A<3;++A)g(m[A],A,this.bounds,c,f);t=this.gl;var S,E,C,L=y;for(A=0;A<3;++A)this.backgroundEnable[A]?L[A]=f[A]:L[A]=0;for(this._background.draw(r,n,i,a,L,this.backgroundColor),this._lines.bind(r,n,i,this),A=0;A<3;++A){var P=[0,0,0];f[A]>0?P[A]=a[1][A]:P[A]=a[0][A];for(var O=0;O<2;++O){var I=(A+1+O)%3,R=(A+1+(1^O))%3;this.gridEnable[I]&&this._lines.drawGrid(I,R,this.bounds,P,this.gridColor[I],this.gridWidth[I]*this.pixelRatio)}for(O=0;O<2;++O)I=(A+1+O)%3,R=(A+1+(1^O))%3,this.zeroEnable[R]&&Math.min(a[0][R],a[1][R])<=0&&Math.max(a[0][R],a[1][R])>=0&&this._lines.drawZero(I,R,this.bounds,P,this.zeroLineColor[R],this.zeroLineWidth[R]*this.pixelRatio)}for(A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);var D=d(b,M[A].primalMinor),z=d(_,M[A].mirrorMinor),F=this.lineTickLength;for(O=0;O<3;++O){var N=T/r[5*O];D[O]*=F[O]*N,z[O]*=F[O]*N}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,M[A].primalOffset,D,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,M[A].mirrorOffset,z,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}function B(e){(C=[0,0,0])[e]=1}function j(e,t,r){var n=(e+1)%3,i=(e+2)%3,a=t[n],o=t[i],s=r[n],l=r[i];a>0&&l>0||a>0&&l<0||a<0&&l>0||a<0&&l<0?B(n):(o>0&&s>0||o>0&&s<0||o<0&&s>0||o<0&&s<0)&&B(i)}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),A=0;A<3;++A){var U=M[A].primalMinor,q=M[A].mirrorMinor,V=d(w,M[A].primalOffset);for(O=0;O<3;++O)this.lineTickEnable[A]&&(V[O]+=T*U[O]*Math.max(this.lineTickLength[O],0)/r[5*O]);var H=[0,0,0];if(H[A]=1,this.tickEnable[A]){for(-3600===this.tickAngle[A]?(this.tickAngle[A]=0,this.tickAlign[A]="auto"):this.tickAlign[A]=-1,E=1,"auto"===(S=[this.tickAlign[A],.5,E])[0]?S[0]=0:S[0]=parseInt(""+S[0]),C=[0,0,0],j(A,U,q),O=0;O<3;++O)V[O]+=T*U[O]*this.tickPad[O]/r[5*O];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],V,this.tickColor[A],H,C,S)}if(this.labelEnable[A]){for(E=0,C=[0,0,0],this.labels[A].length>4&&(B(A),E=1),"auto"===(S=[this.labelAlign[A],.5,E])[0]?S[0]=0:S[0]=parseInt(""+S[0]),O=0;O<3;++O)V[O]+=T*U[O]*this.labelPad[O]/r[5*O];V[A]+=.5*(a[0][A]+a[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],V,this.labelColor[A],[0,0,0],C,S)}}this._text.unbind()},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(e,t,r){"use strict";e.exports=function(e){for(var t=[],r=[],s=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,f=[0,0,0],d=[0,0,0],h=-1;h<=1;h+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=h,d[l]=h;for(var p=-1;p<=1;p+=2){f[u]=p;for(var v=-1;v<=1;v+=2)f[c]=v,t.push(f[0],f[1],f[2],d[0],d[1],d[2]),s+=1}var m=u;u=c,c=m}var g=n(e,new Float32Array(t)),y=n(e,new Uint16Array(r),e.ELEMENT_ARRAY_BUFFER),x=i(e,[{buffer:g,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:g,type:e.FLOAT,size:3,offset:12,stride:24}],y),b=a(e);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(e,g,x,b)};var n=r(2762),i=r(8116),a=r(1879).bg;function o(e,t,r,n){this.gl=e,this.buffer=t,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(e,t,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:e,view:t,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429:function(e,t,r){"use strict";e.exports=function(e,t,r,a,h){i(s,t,e),i(s,r,s);for(var y=0,x=0;x<2;++x){c[2]=a[x][2];for(var b=0;b<2;++b){c[1]=a[b][1];for(var _=0;_<2;++_)c[0]=a[_][0],d(l[y],c,s),y+=1}}var w=-1;for(x=0;x<8;++x){for(var k=l[x][3],T=0;T<3;++T)u[x][T]=l[x][T]/k;h&&(u[x][2]*=-1),k<0&&(w<0||u[x][2]E&&(w|=1<E&&(w|=1<u[x][1])&&(z=x);var F=-1;for(x=0;x<3;++x)(B=z^1<u[N][0]&&(N=B))}var j=v;j[0]=j[1]=j[2]=0,j[n.log2(F^z)]=z&F,j[n.log2(z^N)]=z&N;var U=7^N;U===w||U===D?(U=7^F,j[n.log2(N^U)]=U&N):j[n.log2(F^U)]=U&F;var q=m,V=w;for(A=0;A<3;++A)q[A]=V&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}\n"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);t.Q=function(e){return i(e,s,l,null,[{name:"position",type:"vec3"}])};var u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * (view * (model * vec4(nPosition, 1.0)));\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}\n"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);t.bg=function(e){return i(e,u,c,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(e,t,r){"use strict";e.exports=function(e,t,r,n,o,l){var u=i(e),f=a(e,[{buffer:u,size:3}]),d=s(e);d.attributes.position.location=0;var h=new c(e,d,u,f);return h.update(t,r,n,o,l),h};var i=r(2762),a=r(8116),o=r(4359),s=r(1879).Q,l=window||n.global||{},u=l.__TEXT_CACHE||{};function c(e,t,r,n){this.gl=e,this.shader=t,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}l.__TEXT_CACHE={};var f=c.prototype,d=[0,0];f.bind=function(e,t,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=e,i.view=t,i.projection=r,i.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},f.unbind=function(){this.vao.unbind()},f.update=function(e,t,r,n,i){var a=[];function s(e,t,r,n,i,s){var l=[r.style,r.weight,r.variant,r.family].join("_"),c=u[l];c||(c=u[l]={});var f=c[t];f||(f=c[t]=function(e,t){try{return o(e,t)}catch(r){return console.warn('error vectorizing text:"'+e+'" error:',r),{cells:[],positions:[]}}}(t,{triangles:!0,font:r.family,fontStyle:r.style,fontWeight:r.weight,fontVariant:r.variant,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var d=(n||12)/12,h=f.positions,p=f.cells,v=0,m=p.length;v=0;--y){var x=h[g[y]];a.push(d*x[0],-d*x[1],e)}}for(var l=[0,0,0],c=[0,0,0],f=[0,0,0],d=[0,0,0],h={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){f[p]=a.length/3|0,s(.5*(e[0][p]+e[1][p]),t[p],r[p],12,1.25,h),d[p]=(a.length/3|0)-f[p],l[p]=a.length/3|0;for(var v=0;v=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(e*t*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,u=o%a;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=""+l;if(o<0&&(c="-"+c),i){for(var f=""+u;f.length=e[0][i];--o)a.push({x:o*t[i],text:r(t[i],o)});n.push(a)}return n},t.equal=function(e,t){for(var r=0;r<3;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,a,i),r}function c(e,t){for(var r=n.malloc(e.length,t),i=e.length,a=0;a=0;--n){if(t[n]!==r)return!1;r*=e[n]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=u(this.gl,this.type,this.length,this.usage,e.data,t):this.length=u(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var s=n.malloc(e.size,r),l=a(s,e.shape);i.assign(l,e),this.length=u(this.gl,this.type,this.length,this.usage,t<0?s:s.subarray(0,e.size),t),n.free(s)}}else if(Array.isArray(e)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?c(e,"uint16"):c(e,"float32"),this.length=u(this.gl,this.type,this.length,this.usage,t<0?f:f.subarray(0,e.length),t),n.free(f)}else if("object"===typeof e&&"number"===typeof e.length)this.length=u(this.gl,this.type,this.length,this.usage,e,t);else{if("number"!==typeof e&&void 0!==e)throw new Error("gl-buffer: Invalid data type");if(t>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}},e.exports=function(e,t,r,n){if(r=r||e.ARRAY_BUFFER,n=n||e.DYNAMIC_DRAW,r!==e.ARRAY_BUFFER&&r!==e.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==e.DYNAMIC_DRAW&&n!==e.STATIC_DRAW&&n!==e.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=e.createBuffer(),a=new s(e,r,i,0,n);return a.update(t),a}},6405:function(e,t,r){"use strict";var n=r(2931);e.exports=function(e,t){var r=e.positions,i=e.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,u=1/0,c=-1/0,f=1/0,d=-1/0,h=null,p=null,v=[],m=1/0,g=!1,y="raw"===e.coneSizemode,x=0;xo&&(o=n.length(_)),x&&!y){var w=2*n.distance(h,b)/(n.length(p)+n.length(_));w?(m=Math.min(m,w),g=!1):g=!0}g||(h=b,p=_),v.push(_)}var k=[s,u,f],T=[l,c,d];t&&(t[0]=k,t[1]=T),0===o&&(o=1);var A=1/o;isFinite(m)||(m=1),a.vectorScale=m;var M=e.coneSize||(y?1:.5);e.absoluteConeSize&&(M=e.absoluteConeSize*A),a.coneScale=M,x=0;for(var S=0;x=1},h.isTransparent=function(){return this.opacity<1},h.pickSlots=1,h.setPickBase=function(e){this.pickId=e},h.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=c({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=t[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var r=e.cells,n=e.positions,i=e.vectors;if(n&&r&&i){var a=[],o=[],s=[],l=[],f=[];this.cells=r,this.positions=n,this.vectors=i;var d=e.meshColor||[1,1,1,1],h=e.vertexIntensity,p=1/0,v=-1/0;if(h)if(e.vertexIntensityBounds)p=+e.vertexIntensityBounds[0],v=+e.vertexIntensityBounds[1];else for(var m=0;m0){var v=this.triShader;v.bind(),v.uniforms=u,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},h.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||f,n=e.view||f,i=e.projection||f,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},h.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=t),i},h.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},e.exports=function(e,t,r){var s=r.shaders;1===arguments.length&&(e=(t=e).gl);var l=function(e,t){var r=n(e,t.meshShader.vertex,t.meshShader.fragment,null,t.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(e,s),c=function(e,t){var r=n(e,t.pickShader.vertex,t.pickShader.fragment,null,t.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(e,s),f=o(e,u(new Uint8Array([255,255,255,255]),[1,1,4]));f.generateMipmap(),f.minFilter=e.LINEAR_MIPMAP_LINEAR,f.magFilter=e.LINEAR;var h=i(e),p=i(e),v=i(e),m=i(e),g=i(e),y=new d(e,f,l,c,h,p,g,v,m,a(e,[{buffer:h,type:e.FLOAT,size:4},{buffer:g,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:v,type:e.FLOAT,size:4},{buffer:m,type:e.FLOAT,size:2},{buffer:p,type:e.FLOAT,size:4}]),r.traceType||"cone");return y.update(t),y}},614:function(e,t,r){var n=r(3236),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * (view * conePosition);\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(e){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(e,t,r){var n=r(737);e.exports=function(e){return n[e]}},9165:function(e,t,r){"use strict";e.exports=function(e){var t=e.gl,r=n(t),o=i(t,[{buffer:r,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:t.FLOAT,size:3,offset:28,stride:40}]),l=a(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var u=new s(t,r,o,l);return u.update(e),u};var n=r(2762),i=r(8116),a=r(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,n){this.gl=e,this.shader=n,this.buffer=t,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function u(e,t){for(var r=0;r<3;++r)e[0][r]=Math.min(e[0][r],t[r]),e[1][r]=Math.max(e[1][r],t[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=e.view||o,i=r.projection=e.projection||o;r.model=e.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],u=n[15],c=(e._ortho?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*u)/t.drawingBufferHeight;this.vao.bind();for(var f=0;f<3;++f)t.lineWidth(this.lineWidth[f]*this.pixelRatio),r.capSize=this.capSize[f]*c,this.lineCount[f]&&t.drawArrays(t.LINES,this.lineOffset[f],this.lineCount[f]);this.vao.unbind()};var c=function(){for(var e=new Array(3),t=0;t<3;++t){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+t)%3]=i,r.push(a)}e[t]=r}return e}();function f(e,t,r,n){for(var i=c[n],a=0;a0&&((h=c.slice())[s]+=p[1][s],i.push(c[0],c[1],c[2],v[0],v[1],v[2],v[3],0,0,0,h[0],h[1],h[2],v[0],v[1],v[2],v[3],0,0,0),u(this.bounds,h),o+=2+f(i,h,v,s))}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(e,t,r){"use strict";var n=r(3236),i=r(9405),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * (view * worldPosition);\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);e.exports=function(e){return i(e,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(e,t,r){"use strict";var n=r(7766);e.exports=function(e,t,r,n){i||(i=e.FRAMEBUFFER_UNSUPPORTED,a=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var u=e.getExtension("WEBGL_draw_buffers");if(!l&&u&&function(e,t){var r=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;ac||r<0||r>c)throw new Error("gl-fbo: Parameters are too large for FBO");var f=1;if("color"in(n=n||{})){if((f=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(f>1){if(!u)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(f>e.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+f+" draw buffers")}}var d=e.UNSIGNED_BYTE,h=e.getExtension("OES_texture_float");if(n.float&&f>0){if(!h)throw new Error("gl-fbo: Context does not support floating point textures");d=e.FLOAT}else n.preferFloat&&f>0&&h&&(d=e.FLOAT);var v=!0;"depth"in n&&(v=!!n.depth);var m=!1;return"stencil"in n&&(m=!!n.stencil),new p(e,t,r,d,f,v,m,u)};var i,a,o,s,l=null;function u(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function c(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function f(e){switch(e){case i:throw new Error("gl-fbo: Framebuffer unsupported");case a:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function d(e,t,r,i,a,o){if(!i)return null;var s=n(e,t,r,a,i);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,o,e.TEXTURE_2D,s.handle,0),s}function h(e,t,r,n,i){var a=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,a),e.renderbufferStorage(e.RENDERBUFFER,n,t,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,a),a}function p(e,t,r,n,i,a,o,s){this.gl=e,this._shape=[0|t,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var p=0;p1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension("WEBGL_depth_texture");y?p?e.depth=d(r,i,a,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):v&&(e.depth=d(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):v&&p?e._depth_rb=h(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):v?e._depth_rb=h(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):p&&(e._depth_rb=h(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(e._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(r.deleteRenderbuffer(e._depth_rb),e._depth_rb=null),g=0;gi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=r;for(var a=u(n),o=0;o>8*h&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=e,p.pickOffset=t,p.shape=this.shape;var v=i.attributes;return this.positionBuffer.bind(),v.position.pointer(),this.weightBuffer.bind(),v.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),v.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),c.pick=function(e,t,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},c.update=function(e){var t=(e=e||{}).shape||[0,0],r=e.x||i(t[0]),o=e.y||i(t[1]),s=e.z||new Float32Array(t[0]*t[1]),l=!1!==e.zsmooth;this.xData=r,this.yData=o;var u,c,d,h,p=e.colorLevels||[0],v=e.colorValues||[0,0,0,1],m=p.length,g=this.bounds;l?(u=g[0]=r[0],c=g[1]=o[0],d=g[2]=r[r.length-1],h=g[3]=o[o.length-1]):(u=g[0]=r[0]+(r[1]-r[0])/2,c=g[1]=o[0]+(o[1]-o[0])/2,d=g[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,h=g[3]=o[o.length-1]+(o[o.length-1]-o[o.length-2])/2);var y=1/(d-u),x=1/(h-c),b=t[0],_=t[1];this.shape=[b,_];var w=(l?(b-1)*(_-1):b*_)*(f.length>>>1);this.numVertices=w;for(var k=a.mallocUint8(4*w),T=a.mallocFloat32(2*w),A=a.mallocUint8(2*w),M=a.mallocUint32(w),S=0,E=l?b-1:b,C=l?_-1:_,L=0;L max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];t.createShader=function(e){return i(e,a,o,null,l)},t.createPickShader=function(e){return i(e,a,s,null,l)}},5714:function(e,t,r){"use strict";e.exports=function(e){var t=e.gl||e.scene&&e.scene.gl,r=f(t);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=d(t);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(t),l=i(t,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),c=u(new Array(1024),[256,1,4]),h=0;h<1024;++h)c.data[h]=255;var p=a(t,c);p.wrap=t.REPEAT;var v=new g(t,r,o,s,l,p);return v.update(e),v};var n=r(2762),i=r(8116),a=r(7766),o=new Uint8Array(4),s=new Float32Array(o.buffer),l=r(2478),u=r(9618),c=r(7319),f=c.createShader,d=c.createPickShader,h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(e,t){for(var r=0,n=0;n<3;++n){var i=e[n]-t[n];r+=i*i}return Math.sqrt(r)}function v(e){for(var t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)t[0][r]=Math.max(e[0][r],t[0][r]),t[1][r]=Math.min(e[1][r],t[1][r]);return t}function m(e,t,r,n){this.arcLength=e,this.position=t,this.index=r,this.dataCoordinate=n}function g(e,t,r,n,i,a){this.gl=e,this.shader=t,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var y=g.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(e){this.pickId=e},y.drawTransparent=y.draw=function(e){if(this.vertexCount){var t=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:e.model||h,view:e.view||h,projection:e.projection||h,clipBounds:v(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.drawPick=function(e){if(this.vertexCount){var t=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:e.model||h,view:e.view||h,projection:e.projection||h,pickId:this.pickId,clipBounds:v(this.clipBounds),screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.update=function(e){var t,r;this.dirty=!0;var n=!!e.connectGaps;"dashScale"in e&&(this.dashScale=e.dashScale),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],a=[],o=[],s=0,c=0,f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],d=e.position||e.positions;if(d){var h=e.color||e.colors||[0,0,0,1],v=e.lineWidth||1,m=!1;e:for(t=1;t0){for(var w=0;w<24;++w)i.push(i[i.length-12]);c+=2,m=!0}continue e}f[0][r]=Math.min(f[0][r],b[r],_[r]),f[1][r]=Math.max(f[1][r],b[r],_[r])}Array.isArray(h[0])?(g=h.length>t-1?h[t-1]:h.length>0?h[h.length-1]:[0,0,0,1],y=h.length>t?h[t]:h.length>0?h[h.length-1]:[0,0,0,1]):g=y=h,3===g.length&&(g=[g[0],g[1],g[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&g[3]<1&&(this.hasAlpha=!0),x=Array.isArray(v)?v.length>t-1?v[t-1]:v.length>0?v[v.length-1]:[0,0,0,1]:v;var k=s;if(s+=p(b,_),m){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,g[0],g[1],g[2],g[3]);c+=2,m=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,g[0],g[1],g[2],g[3],b[0],b[1],b[2],_[0],_[1],_[2],k,-x,g[0],g[1],g[2],g[3],_[0],_[1],_[2],b[0],b[1],b[2],s,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],s,x,y[0],y[1],y[2],y[3]),c+=4}}if(this.buffer.update(i),a.push(s),o.push(d[d.length-1].slice()),this.bounds=f,this.vertexCount=c,this.points=o,this.arcLength=a,"dashes"in e){var T=e.dashes.slice();for(T.unshift(0),t=1;t1.0001)return null;g+=m[f]}return Math.abs(g-1)>.001?null:[d,s(e,m),m]}},840:function(e,t,r){var n=r(3236),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * (view * (model * vec4(p, 1.0)));\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n f_id = id;\n f_position = position;\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:d,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:h,fragment:p,attributes:[{name:"position",type:"vec3"}]}},7201:function(e,t,r){"use strict";var n=r(9405),i=r(2762),a=r(8116),o=r(7766),s=r(8406),l=r(6760),u=r(7608),c=r(9618),f=r(6729),d=r(7765),h=r(1888),p=r(840),v=r(7626),m=p.meshShader,g=p.wireShader,y=p.pointShader,x=p.pickShader,b=p.pointPickShader,_=p.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(e,t,r,n,i,a,o,s,l,u,c,f,d,h,p,v,m,g,y,x,b,_,k,T,A,M,S){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=d,this.triangleUVs=f,this.triangleIds=u,this.triangleVAO=h,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=m,this.edgeUVs=g,this.edgeIds=v,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=k,this.pointSizes=T,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var T=k.prototype;function A(e,t){if(!t)return 1;if(!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}function M(e){var t=n(e,y.vertex,y.fragment);return t.attributes.position.location=0,t.attributes.color.location=2,t.attributes.uv.location=3,t.attributes.pointSize.location=4,t}function S(e){var t=n(e,x.vertex,x.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t}function E(e){var t=n(e,b.vertex,b.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t.attributes.pointSize.location=4,t}function C(e){var t=n(e,_.vertex,_.fragment);return t.attributes.position.location=0,t}T.isOpaque=function(){return!this.hasAlpha},T.isTransparent=function(){return this.hasAlpha},T.pickSlots=1,T.setPickBase=function(e){this.pickId=e},T.highlight=function(e){if(e&&this.contourEnable){for(var t=d(this.cells,this.intensity,e.intensity),r=t.cells,n=t.vertexIds,i=t.vertexWeights,a=r.length,o=h.mallocFloat32(6*a),s=0,l=0;l0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind())},T.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||w,n=e.view||w,i=e.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind())},T.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions,i=new Array(r.length),a=0;al[T]&&(a.uniforms.dataAxis=e,a.uniforms.screenOffset=t,a.uniforms.color=m[n],a.uniforms.angle=g[n],u.drawArrays(u.TRIANGLES,l[T],l[A]-l[T]))),y[n]&&k&&(t[1^n]-=M*h*x[n],a.uniforms.dataAxis=r,a.uniforms.screenOffset=t,a.uniforms.color=b[n],a.uniforms.angle=_[n],u.drawArrays(u.TRIANGLES,w,k)),t[1^n]=M*c[2+(1^n)]-1,p[n+2]&&(t[1^n]+=M*h*v[n+2],Tl[T]&&(a.uniforms.dataAxis=e,a.uniforms.screenOffset=t,a.uniforms.color=m[n+2],a.uniforms.angle=g[n+2],u.drawArrays(u.TRIANGLES,l[T],l[A]-l[T]))),y[n+2]&&k&&(t[1^n]+=M*h*x[n+2],a.uniforms.dataAxis=r,a.uniforms.screenOffset=t,a.uniforms.color=b[n+2],a.uniforms.angle=_[n+2],u.drawArrays(u.TRIANGLES,w,k))}}(),u.drawTitle=function(){var e=[0,0],t=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,u=r.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)t[c]=2*(o[c]*u-a[c])/(a[2+c]-a[c])-1;n.bind(),n.uniforms.dataAxis=e,n.uniforms.screenOffset=t,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),u.bind=function(){var e=[0,0],t=[0,0],r=[0,0];return function(){var n=this.plot,i=this.shader,a=n._tickBounds,o=n.dataBox,s=n.screenBox,l=n.viewBox;i.bind();for(var u=0;u<2;++u){var c=a[u],f=a[u+2]-c,d=.5*(o[u+2]+o[u]),h=o[u+2]-o[u],p=l[u],v=l[u+2]-p,m=s[u],g=s[u+2]-m;t[u]=2*f/h*v/g,e[u]=2*(c-d)/h*v/g}r[1]=2*n.pixelRatio/(s[3]-s[1]),r[0]=r[1]*(s[3]-s[1])/(s[2]-s[0]),i.uniforms.dataScale=t,i.uniforms.dataShift=e,i.uniforms.textScale=r,this.vbo.bind(),i.attributes.textCoordinate.pointer()}}(),u.update=function(e){var t,r,n,i,o,s=[],l=e.ticks,u=e.bounds;for(o=0;o<2;++o){var c=[Math.floor(s.length/3)],f=[-1/0],d=l[o];for(t=0;t=0){var v=t[p]-n[p]*(t[p+2]-t[p])/(n[p+2]-n[p]);0===p?o.drawLine(v,t[1],v,t[3],h[p],d[p]):o.drawLine(t[0],v,t[2],v,h[p],d[p])}}for(p=0;p=0;--e)this.objects[e].dispose();for(this.objects.length=0,e=this.overlays.length-1;e>=0;--e)this.overlays[e].dispose();this.overlays.length=0,this.gl=null},u.addObject=function(e){this.objects.indexOf(e)<0&&(this.objects.push(e),this.setDirty())},u.removeObject=function(e){for(var t=this.objects,r=0;rMath.abs(t))u.rotate(a,0,0,-e*r*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var o=-p.zoomSpeed*i*t/window.innerHeight*(a-u.lastT())/20;u.pan(a,0,0,f*(Math.exp(o)-1))}}}),!0)},p.enableMouseListeners(),p};var n=r(3025),i=r(6296),a=r(351),o=r(8512),s=r(24),l=r(7520)},799:function(e,t,r){var n=r(3236),i=r(9405),a=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);e.exports=function(e){return i(e,a,o,null,[{name:"position",type:"vec2"}])}},4100:function(e,t,r){"use strict";var n=r(4437),i=r(3837),a=r(5445),o=r(4449),s=r(3589),l=r(2260),u=r(7169),c=r(351),f=r(4772),d=r(4040),h=r(799),p=r(9216)({tablet:!0,featureDetect:!0});function v(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function m(e){var t=Math.round(Math.log(Math.abs(e))/Math.log(10));if(t<0){var r=Math.round(Math.pow(10,-t));return Math.ceil(e*r)/r}return t>0?(r=Math.round(Math.pow(10,t)),Math.ceil(e/r)*r):Math.ceil(e)}function g(e){return"boolean"!==typeof e||e}e.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;t||(t=document.createElement("canvas"),e.container?e.container.appendChild(t):document.body.appendChild(t));var r=e.gl;if(r||(e.glOptions&&(p=!!e.glOptions.preserveDrawingBuffer),r=function(e,t){var r=null;try{(r=e.getContext("webgl",t))||(r=e.getContext("experimental-webgl",t))}catch(n){return null}return r}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p})),!r)throw new Error("webgl not supported");var y=e.bounds||[[-10,-10,-10],[10,10,10]],x=new v,b=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!p}),_=h(r),w=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,k={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:w},T=e.axes||{},A=i(r,T);A.enable=!T.disable;var M=e.spikes||{},S=o(r,M),E=[],C=[],L=[],P=[],O=!0,I=!0,R=new Array(16),D=new Array(16),z={view:null,projection:R,model:D,_ortho:!1},F=(I=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),N=e.cameraObject||n(t,k),B={gl:r,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:x,camera:N,axes:A,axesPixels:null,spikes:S,bounds:y,objects:E,shape:F,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:g(e.autoResize),autoBounds:g(e.autoBounds),autoScale:!!e.autoScale,autoCenter:g(e.autoCenter),clipToBounds:g(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.onclick||null,cameraParams:z,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z,I=!0},setBounds:function(e,t){this.bounds[0][e]=t.min,this.bounds[1][e]=t.max},setClearColor:function(e){this.clearColor=e},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},j=[r.drawingBufferWidth/B.pixelRatio|0,r.drawingBufferHeight/B.pixelRatio|0];function U(){if(!B._stopped&&B.autoResize){var e=t.parentNode,r=1,n=1;e&&e!==document.body?(r=e.clientWidth,n=e.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*B.pixelRatio),a=0|Math.ceil(n*B.pixelRatio);if(i!==t.width||a!==t.height){t.width=i,t.height=a;var o=t.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",O=!0}}}function q(){for(var e=E.length,t=P.length,n=0;n0&&0===L[t-1];)L.pop(),P.pop().dispose()}function V(){if(B.contextLost)return!0;r.isContextLost()&&(B.contextLost=!0,B.mouseListener.enabled=!1,B.selection.object=null,B.oncontextloss&&B.oncontextloss())}B.autoResize&&U(),window.addEventListener("resize",U),B.update=function(e){B._stopped||(e=e||{},O=!0,I=!0)},B.add=function(e){B._stopped||(e.axes=A,E.push(e),C.push(-1),O=!0,I=!0,q())},B.remove=function(e){if(!B._stopped){var t=E.indexOf(e);t<0||(E.splice(t,1),C.pop(),O=!0,I=!0,q())}},B.dispose=function(){if(!B._stopped&&(B._stopped=!0,window.removeEventListener("resize",U),t.removeEventListener("webglcontextlost",V),B.mouseListener.enabled=!1,!B.contextLost)){A.dispose(),S.dispose();for(var e=0;ex.distance)continue;for(var u=0;u 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),t.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),t.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},4696:function(e,t,r){"use strict";var n=r(9405),i=r(2762),a=r(1888),o=r(6640);function s(e,t,r,n,i){this.plot=e,this.offsetBuffer=t,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(e,t){var r=e.gl,a=i(r),l=i(r),u=n(r,o.pointVertex,o.pointFragment),c=n(r,o.pickVertex,o.pickFragment),f=new s(e,a,l,u,c);return f.update(t),e.addObject(f),f};var l=s.prototype;l.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},l.update=function(e){var t;function r(t,r){return t in e?e[t]:r}e=e||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=e.positions.length>>>1,i=e.positions instanceof Float32Array,o=e.idToIndex instanceof Int32Array&&e.idToIndex.length>=n,s=e.positions,l=i?s:a.mallocFloat32(s.length),u=o?e.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),t=0;t>>1;for(r=0;r=t[0]&&a<=t[2]&&o>=t[1]&&o<=t[3]&&n++}return n}(this.points,o),c=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(u,.33333)));e[0]=2/s,e[4]=2/l,e[6]=-2*o[0]/s-1,e[7]=-2*o[1]/l-1,this.offsetBuffer.bind(),i.bind(),i.attributes.position.pointer(),i.uniforms.matrix=e,i.uniforms.color=this.color,i.uniforms.borderColor=this.borderColor,i.uniforms.pointCloud=c<5,i.uniforms.pointSize=c,i.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),n&&(t[0]=255&r,t[1]=r>>8&255,t[2]=r>>16&255,t[3]=r>>24&255,this.pickBuffer.bind(),i.attributes.pickId.pointer(a.UNSIGNED_BYTE),i.uniforms.pickOffset=t,this.pickOffset=r);var f=a.getParameter(a.BLEND),d=a.getParameter(a.DITHER);return f&&!this.blend&&a.disable(a.BLEND),d&&a.disable(a.DITHER),a.drawArrays(a.POINTS,0,this.pointCount),f&&!this.blend&&a.enable(a.BLEND),d&&a.enable(a.DITHER),r+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(e,t,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},783:function(e){e.exports=function(e,t,r,n){var i,a,o,s,l,u=t[0],c=t[1],f=t[2],d=t[3],h=r[0],p=r[1],v=r[2],m=r[3];return(a=u*h+c*p+f*v+d*m)<0&&(a=-a,h=-h,p=-p,v=-v,m=-m),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),e[0]=s*u+l*h,e[1]=s*c+l*p,e[2]=s*f+l*v,e[3]=s*d+l*m,e}},5964:function(e){"use strict";e.exports=function(e){return e||0===e?e.toString():""}},9366:function(e,t,r){"use strict";var n=r(4359);e.exports=function(e,t,r){var a=[t.style,t.weight,t.variant,t.family].join("_"),o=i[a];if(o||(o=i[a]={}),e in o)return o[e];var s={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t.family,fontStyle:t.style,fontWeight:t.weight,fontVariant:t.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},l=n(e,s);s.triangles=!1;var u,c,f=n(e,s);if(r&&1!==r){for(u=0;u max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * (view * (model * vec4(position, 1)));\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1)));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),u=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),c=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],f={vertex:a,fragment:l,attributes:c},d={vertex:o,fragment:l,attributes:c},h={vertex:s,fragment:l,attributes:c},p={vertex:a,fragment:u,attributes:c},v={vertex:o,fragment:u,attributes:c},m={vertex:s,fragment:u,attributes:c};function g(e,t){var r=n(e,t),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}t.createPerspective=function(e){return g(e,f)},t.createOrtho=function(e){return g(e,d)},t.createProject=function(e){return g(e,h)},t.createPickPerspective=function(e){return g(e,p)},t.createPickOrtho=function(e){return g(e,v)},t.createPickProject=function(e){return g(e,m)}},8418:function(e,t,r){"use strict";var n=r(5219),i=r(2762),a=r(8116),o=r(1888),s=r(6760),l=r(1283),u=r(9366),c=r(5964),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],d=ArrayBuffer,h=DataView;function p(e){return Array.isArray(e)||function(e){return d.isView(e)&&!(e instanceof h)}(e)}function v(e,t){var r=e[0],n=e[1],i=e[2],a=e[3];return e[0]=t[0]*r+t[4]*n+t[8]*i+t[12]*a,e[1]=t[1]*r+t[5]*n+t[9]*i+t[13]*a,e[2]=t[2]*r+t[6]*n+t[10]*i+t[14]*a,e[3]=t[3]*r+t[7]*n+t[11]*i+t[15]*a,e}function m(e,t,r,n){return v(n,n),v(n,n),v(n,n)}function g(e,t){this.index=e,this.dataCoordinate=this.position=t}function y(e){return!0===e||e>1?1:e}function x(e,t,r,n,i,a,o,s,l,u,c,f){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=u,this.pickOrthoShader=c,this.pickProjectShader=f,this.points=[],this._selectResult=new g(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(e){var t=e.gl,r=l.createPerspective(t),n=l.createOrtho(t),o=l.createProject(t),s=l.createPickPerspective(t),u=l.createPickOrtho(t),c=l.createPickProject(t),f=i(t),d=i(t),h=i(t),p=i(t),v=a(t,[{buffer:f,size:3,type:t.FLOAT},{buffer:d,size:4,type:t.FLOAT},{buffer:h,size:2,type:t.FLOAT},{buffer:p,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),m=new x(t,r,n,o,f,d,h,p,v,s,u,c);return m.update(e),m};var b=x.prototype;b.pickSlots=1,b.setPickBase=function(e){this.pickId=e},b.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},b.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var _=[0,0],w=[0,0,0],k=[0,0,0],T=[0,0,0,1],A=[0,0,0,1],M=f.slice(),S=[0,0,0],E=[[0,0,0],[0,0,0]];function C(e){return e[0]=e[1]=e[2]=0,e}function L(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function P(e,t,r,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[r]=n,e}function O(e,t,r,n){var i,a=t.axesProject,o=t.gl,l=e.uniforms,u=r.model||f,c=r.view||f,d=r.projection||f,h=t.axesBounds,p=function(e){for(var t=E,r=0;r<2;++r)for(var n=0;n<3;++n)t[r][n]=Math.max(Math.min(e[r][n],1e8),-1e8);return t}(t.clipBounds);i=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],_[0]=2/o.drawingBufferWidth,_[1]=2/o.drawingBufferHeight,e.bind(),l.view=c,l.projection=d,l.screenSize=_,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=p,l.pickGroup=t.pickId/255,l.pixelRatio=n;for(var v=0;v<3;++v)if(a[v]){l.scale=t.projectScale[v],l.opacity=t.projectOpacity[v];for(var g=M,y=0;y<16;++y)g[y]=0;for(y=0;y<4;++y)g[5*y]=1;g[5*v]=0,i[v]<0?g[12+v]=h[0][v]:g[12+v]=h[1][v],s(g,u,g),l.model=g;var x=(v+1)%3,b=(v+2)%3,O=C(w),I=C(k);O[x]=1,I[b]=1;var R=m(0,0,0,L(T,O)),D=m(0,0,0,L(A,I));if(Math.abs(R[1])>Math.abs(D[1])){var z=R;R=D,D=z,z=O,O=I,I=z;var F=x;x=b,b=F}R[0]<0&&(O[x]=-1),D[1]>0&&(I[b]=-1);var N=0,B=0;for(y=0;y<4;++y)N+=Math.pow(u[4*x+y],2),B+=Math.pow(u[4*b+y],2);O[x]/=Math.sqrt(N),I[b]/=Math.sqrt(B),l.axes[0]=O,l.axes[1]=I,l.fragClipBounds[0]=P(S,p[0],v,-1e8),l.fragClipBounds[1]=P(S,p[1],v,1e8),t.vao.bind(),t.vao.draw(o.TRIANGLES,t.vertexCount),t.lineWidth>0&&(o.lineWidth(t.lineWidth*n),t.vao.draw(o.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}var I=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function R(e,t,r,n,i,a,o){var s=r.gl;if((a===r.projectHasAlpha||o)&&O(t,r,n,i),a===r.hasAlpha||o){e.bind();var l=e.uniforms;l.model=n.model||f,l.view=n.view||f,l.projection=n.projection||f,_[0]=2/s.drawingBufferWidth,_[1]=2/s.drawingBufferHeight,l.screenSize=_,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=I,l.clipBounds=r.axes.bounds,l.opacity=r.opacity,l.pickGroup=r.pickId/255,l.pixelRatio=i,r.vao.bind(),r.vao.draw(s.TRIANGLES,r.vertexCount),r.lineWidth>0&&(s.lineWidth(r.lineWidth*i),r.vao.draw(s.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function D(e,t,r,i){var a;a=p(e)?t=this.pointCount||t<0)return null;var r=this.points[t],n=this._selectResult;n.index=t;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},b.highlight=function(e){if(e){var t=e.index,r=255&t,n=t>>8&255,i=t>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},b.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(p(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(p(e.projectScale))this.projectScale=e.projectScale.slice();else{var r=+e.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in e){p(e.projectOpacity)?this.projectOpacity=e.projectOpacity.slice():(r=+e.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=y(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=y(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=e.position,l={family:e.font||"normal",style:e.fontStyle||"normal",weight:e.fontWeight||"normal",variant:e.fontVariant||"normal"},u=e.alignment||[0,0];if(2===u.length)i=u[0],a=u[1];else for(i=[],a=[],n=0;n0){var I=0,R=b,z=[0,0,0,1],F=[0,0,0,1],N=p(h)&&p(h[0]),B=p(g)&&p(g[0]);e:for(n=0;n0?1-S[0][0]:Y<0?1+S[1][0]:1,Z*=Z>0?1-S[0][1]:Z<0?1+S[1][1]:1],K=A.cells||[],J=A.positions||[];for(T=0;T0){var g=r*c;o.drawBox(f-g,d-g,h+g,d+g,a),o.drawBox(f-g,p-g,h+g,p+g,a),o.drawBox(f-g,d-g,f+g,p+g,a),o.drawBox(h-g,d-g,h+g,p+g,a)}}}},s.update=function(e){e=e||{},this.innerFill=!!e.innerFill,this.outerFill=!!e.outerFill,this.innerColor=(e.innerColor||[0,0,0,.5]).slice(),this.outerColor=(e.outerColor||[0,0,0,.5]).slice(),this.borderColor=(e.borderColor||[0,0,0,1]).slice(),this.borderWidth=e.borderWidth||0,this.selectBox=(e.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},3589:function(e,t,r){"use strict";e.exports=function(e,t){var r=t[0],a=t[1],o=n(e,r,a,{}),s=i.mallocUint8(r*a*4);return new l(e,o,s)};var n=r(2260),i=r(1888),a=r(9618),o=r(8828).nextPow2;function s(e,t,r,n,i){this.coord=[e,t],this.id=r,this.value=n,this.distance=i}function l(e,t,r){this.gl=e,this.fbo=t,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(t.bind(),e.readPixels(0,0,t.shape[0],t.shape[1],e.RGBA,e.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var u=l.prototype;Object.defineProperty(u,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(e){if(this.gl){this.fbo.shape=e;var t=this.fbo.shape[0],r=this.fbo.shape[1];if(r*t*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*t*4)),a=0;ar)for(e=r;et)for(e=t;e=0){for(var k=0|w.type.charAt(w.type.length-1),T=new Array(k),A=0;A=0;)M+=1;_[y]=M}var S=new Array(r.length);function E(){d.program=o.program(h,d._vref,d._fref,b,_);for(var e=0;e=0){if((p=d.charCodeAt(d.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+f+": "+d);s(e,t,h[0],i,p,a,f)}else{if(!(d.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+f+": "+d);var p;if((p=d.charCodeAt(d.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+f+": "+d);l(e,t,h,i,p,a,f)}}}return a};var n=r(8866);function i(e,t,r,n,i,a){this._gl=e,this._wrapper=t,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;a.pointer=function(e,t,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,e||a.FLOAT,!!t,r||0,n||0),a.enableVertexAttribArray(o)},a.set=function(e,t,r,n){return this._constFunc(this._locations[this._index],e,t,r,n)},Object.defineProperty(a,"location",{get:function(){return this._locations[this._index]},set:function(e){return e!==this._locations[this._index]&&(this._locations[this._index]=0|e,this._wrapper.program=null),0|e}});var o=[function(e,t,r){return void 0===r.length?e.vertexAttrib1f(t,r):e.vertexAttrib1fv(t,r)},function(e,t,r,n){return void 0===r.length?e.vertexAttrib2f(t,r,n):e.vertexAttrib2fv(t,r)},function(e,t,r,n,i){return void 0===r.length?e.vertexAttrib3f(t,r,n,i):e.vertexAttrib3fv(t,r)},function(e,t,r,n,i,a){return void 0===r.length?e.vertexAttrib4f(t,r,n,i,a):e.vertexAttrib4fv(t,r)}];function s(e,t,r,n,a,s,l){var u=o[a],c=new i(e,t,r,n,a,u);Object.defineProperty(s,l,{set:function(t){return e.disableVertexAttribArray(n[r]),u(e,n[r],t),t},get:function(){return c},enumerable:!0})}function l(e,t,r,n,i,a,o){for(var l=new Array(i),u=new Array(i),c=0;c4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+y);e["uniformMatrix"+g+"fv"](s[f],!1,d);break}throw new i("","Unknown uniform data type for "+name+": "+y)}if((g=y.charCodeAt(y.length-1)-48)<2||g>4)throw new i("","Invalid data type");switch(y.charAt(0)){case"b":case"i":e["uniform"+g+"iv"](s[f],d);break;case"v":e["uniform"+g+"fv"](s[f],d);break;default:throw new i("","Unrecognized data type for vector "+name+": "+y)}}}}}}function u(e,t){if("object"!==typeof t)return[[e,t]];var r=[];for(var n in t){var i=t[n],a=e;parseInt(n)+""===n?a+="["+n+"]":a+="."+n,"object"===typeof i?r.push.apply(r,u(a,i)):r.push([a,i])}return r}function c(e,t,n){if("object"===typeof n){var u=f(n);Object.defineProperty(e,t,{get:a(u),set:l(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(e,t,{get:(c=n,function(e,t,r){return e.getUniform(t.program,r[c])}),set:l(n),enumerable:!0,configurable:!1}):e[t]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===e.charAt(0)?o(r,!1):o(r,0)}if(0===e.indexOf("mat")&&4===e.length){var r;if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+e);return o(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+e)}}(r[n].type);var c}function f(e){var t;if(Array.isArray(e)){t=new Array(e.length);for(var r=0;r1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;l1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * (view * tubePosition);\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(e,t,r){"use strict";var n=r(2931),i=r(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(e,t,r,a){for(var o=0,s=0;s0)for(k=0;k<8;k++){var T=(k+1)%8;u.push(d[k],h[k],h[T],h[T],d[T],d[k]),f.push(y,g,g,g,y,y),p.push(v,m,m,m,v,v);var A=u.length;c.push([A-6,A-5,A-4],[A-3,A-2,A-1])}var M=d;d=h,h=M;var S=y;y=g,g=S;var E=v;v=m,m=E}return{positions:u,cells:c,vectors:f,vertexIntensity:p}}(e,r,a,o)})),f=[],d=[],h=[],p=[];for(s=0;st)return r-1}return r},l=function(e,t,r){return er?r:e},u=function(e){var t=1/0;e.sort((function(e,t){return e-t}));for(var r=e.length,n=1;nf-1||y>d-1||x>h-1)return n.create();var b,_,w,k,T,A,M=a[0][p],S=a[0][g],E=a[1][v],C=a[1][y],L=a[2][m],P=(o-M)/(S-M),O=(u-E)/(C-E),I=(c-L)/(a[2][x]-L);switch(isFinite(P)||(P=.5),isFinite(O)||(O=.5),isFinite(I)||(I=.5),r.reversedX&&(p=f-1-p,g=f-1-g),r.reversedY&&(v=d-1-v,y=d-1-y),r.reversedZ&&(m=h-1-m,x=h-1-x),r.filled){case 5:T=m,A=x,w=v*h,k=y*h,b=p*h*d,_=g*h*d;break;case 4:T=m,A=x,b=p*h,_=g*h,w=v*h*f,k=y*h*f;break;case 3:w=v,k=y,T=m*d,A=x*d,b=p*d*h,_=g*d*h;break;case 2:w=v,k=y,b=p*d,_=g*d,T=m*d*f,A=x*d*f;break;case 1:b=p,_=g,T=m*f,A=x*f,w=v*f*h,k=y*f*h;break;default:b=p,_=g,w=v*f,k=y*f,T=m*f*d,A=x*f*d}var R=i[b+w+T],D=i[b+w+A],z=i[b+k+T],F=i[b+k+A],N=i[_+w+T],B=i[_+w+A],j=i[_+k+T],U=i[_+k+A],q=n.create(),V=n.create(),H=n.create(),G=n.create();n.lerp(q,R,N,P),n.lerp(V,D,B,P),n.lerp(H,z,j,P),n.lerp(G,F,U,P);var W=n.create(),Y=n.create();n.lerp(W,q,H,O),n.lerp(Y,V,G,O);var Z=n.create();return n.lerp(Z,W,Y,I),Z}(t,e,h)},v=e.getDivergence||function(e,t){var r=n.create(),i=1e-4;n.add(r,e,[i,0,0]);var a=p(r);n.subtract(a,a,t),n.scale(a,a,1/i),n.add(r,e,[0,i,0]);var o=p(r);n.subtract(o,o,t),n.scale(o,o,1/i),n.add(r,e,[0,0,i]);var s=p(r);return n.subtract(s,s,t),n.scale(s,s,1/i),n.add(r,a,o),n.add(r,r,s),r},m=[],g=t[0][0],y=t[0][1],x=t[0][2],b=t[1][0],_=t[1][1],w=t[1][2],k=function(e){var t=e[0],r=e[1],n=e[2];return!(tb||r_||nw)},T=10*n.distance(t[0],t[1])/i,A=T*T,M=1,S=0,E=r.length;E>1&&(M=function(e){for(var t=[],r=[],n=[],i={},a={},o={},s=e.length,l=0;lS&&(S=F),D.push(F),m.push({points:P,velocities:O,divergences:D});for(var N=0;N<100*i&&P.lengthA&&n.scale(B,B,T/Math.sqrt(j)),n.add(B,B,L),I=p(B),n.squaredDistance(R,B)-A>-1e-4*A&&(P.push(B),R=B,O.push(I),z=v(B,I),F=n.length(z),isFinite(F)&&F>S&&(S=F),D.push(F)),L=B}}var U=o(m,e.colormap,S,M);return f?U.tubeScale=f:(0===S&&(S=1),U.tubeScale=.5*c*M/S),U};var c=r(6740),f=r(6405).createMesh;e.exports.createTubeMesh=function(e,t){return f(e,t,{shaders:c,traceType:"streamtube"})}},990:function(e,t,r){var n=r(9405),i=r(3236),a=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform vec3 objectOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 localCoordinate = vec3(uv.zw, f.x);\n worldCoordinate = objectOffset + localCoordinate;\n mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0);\n vec4 clipPosition = projection * (view * worldPosition);\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * (view * worldPosition);\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);t.createShader=function(e){var t=n(e,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createPickShader=function(e){var t=n(e,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createContourShader=function(e){var t=n(e,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},t.createPickContourShader=function(e){var t=n(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},9499:function(e,t,r){"use strict";e.exports=function(e){var t=e.gl,r=y(t),n=b(t),s=x(t),l=_(t),u=i(t),c=a(t,[{buffer:u,size:4,stride:w,offset:0},{buffer:u,size:3,stride:w,offset:16},{buffer:u,size:3,stride:w,offset:28}]),f=i(t),d=a(t,[{buffer:f,size:4,stride:20,offset:0},{buffer:f,size:1,stride:20,offset:16}]),h=i(t),p=a(t,[{buffer:h,size:2,type:t.FLOAT}]),v=o(t,1,S,t.RGBA,t.UNSIGNED_BYTE);v.minFilter=t.LINEAR,v.magFilter=t.LINEAR;var m=new E(t,[0,0],[[0,0,0],[0,0,0]],r,n,u,c,v,s,l,f,d,h,p,[0,0,0]),g={levels:[[],[],[]]};for(var k in e)g[k]=e[k];return g.colormap=g.colormap||"jet",m.update(g),m};var n=r(8828),i=r(2762),a=r(8116),o=r(7766),s=r(1888),l=r(6729),u=r(5298),c=r(9994),f=r(9618),d=r(3711),h=r(6760),p=r(7608),v=r(2478),m=r(6199),g=r(990),y=g.createShader,x=g.createContourShader,b=g.createPickShader,_=g.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function M(e,t,r,n,i){this.position=e,this.index=t,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var e=0;e<3;++e){var t=A[e],r=(e+2)%3;t[(e+1)%3+0]=1,t[r+3]=1,t[e+6]=1}}();var S=256;function E(e,t,r,n,i,a,o,l,u,c,d,h,p,v,m){this.gl=e,this.shape=t,this.bounds=r,this.objectOffset=m,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=d,this._contourVAO=h,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new M([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=p,this._dynamicVAO=v,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var C=E.prototype;C.genColormap=function(e,t){var r=!1,n=c([l({colormap:e,nshades:S,format:"rgba"}).map((function(e,n){var i=t?function(e,t){if(!t)return 1;if(!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}(n/255,t):e[3];return i<1&&(r=!0),[e[0],e[1],e[2],255*i]}))]);return u.divseq(n,255),this.hasAlphaScale=r,n},C.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},C.isOpaque=function(){return!this.isTransparent()},C.pickSlots=1,C.setPickBase=function(e){this.pickId=e};var L=[0,0,0],P={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(e,t){var r,n,i,a=t.axes&&t.axes.lastCubeProps.axis||L,o=t.showSurface,s=t.showContour;for(r=0;r<3;++r)for(o=o||t.surfaceProject[r],n=0;n<3;++n)s=s||t.contourProject[r][n];for(r=0;r<3;++r){var l=P.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=t.axesBounds[+(a[r]>0)][r],h(l,e.model,l);var u=P.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)u[i][n]=e.clipBounds[i][n];u[0][r]=-1e8,u[1][r]=1e8}return P.showSurface=o,P.showContour=s,P}var I={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},R=k.slice(),D=[1,0,0,0,1,0,0,0,1];function z(e,t){e=e||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=I;n.model=e.model||k,n.view=e.view||k,n.projection=e.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=p(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=D,n.vertexColor=this.vertexColor;var s=R;for(h(s,n.view,n.model),h(s,n.projection,s),p(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var u=s[12+i];for(o=0;o<3;++o)u+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=u/l}var c=O(n,this);if(c.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=c.projections[i],this._shader.uniforms.clipBounds=c.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(c.showContour){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var d=this._contourVAO;for(d.bind(),i=0;i<3;++i)for(f.uniforms.permutation=A[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),o=0;o>4)/16)/255,i=Math.floor(n),a=n-i,o=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var f=c?a:1-a,d=0;d<2;++d)for(var h=i+c,p=s+d,m=f*(d?l:1-l),g=0;g<3;++g)u[g]+=this._field[g].get(h,p)*m;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=v.le(this.contourLevels[x],u[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]Math.abs(_-u[x])&&(y[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/t[0],r.uv[1]=o/t[1],g=0;g<3;++g)r.dataCoordinate[g]=this._field[g].get(r.index[0],r.index[1]);return r},C.padField=function(e,t){var r=t.shape.slice(),n=e.shape.slice();u.assign(e.lo(1,1).hi(r[0],r[1]),t),u.assign(e.lo(1).hi(r[0],1),t.hi(r[0],1)),u.assign(e.lo(1,n[1]-1).hi(r[0],1),t.lo(0,r[1]-1).hi(r[0],1)),u.assign(e.lo(0,1).hi(1,r[1]),t.hi(1)),u.assign(e.lo(n[0]-1,1).hi(1,r[1]),t.lo(r[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,n[1]-1,t.get(0,r[1]-1)),e.set(n[0]-1,0,t.get(r[0]-1,0)),e.set(n[0]-1,n[1]-1,t.get(r[0]-1,r[1]-1))},C.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=N(e.contourWidth,Number)),"showContour"in e&&(this.showContour=N(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=N(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=j(e.contourColor)),"contourProject"in e&&(this.contourProject=N(e.contourProject,(function(e){return N(e,Boolean)}))),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=j(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=N(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=N(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"opacityscale"in e&&(this.opacityscale=e.opacityscale),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=e.vertexColor?1:0),"colormap"in e&&this._colorMap.setPixels(this.genColormap(e.colormap,this.opacityscale));var t=e.field||e.coords&&e.coords[2]||null,r=!1;if(t||(t=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in e||"coords"in e){var i=(t.shape[0]+2)*(t.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=f(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2]);if(e.coords){var l=e.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var u=l[o];for(g=0;g<2;++g)if(u.shape[g]!==a[g])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],u)}}else if(e.ticks){var c=e.ticks;if(!Array.isArray(c)||2!==c.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var h=c[o];if((Array.isArray(h)||h.length)&&(h=f(h)),h.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var p=f(h.data,a);p.stride[o]=h.stride[0],p.stride[1^o]=0,this.padField(this._field[o],p)}}else{for(o=0;o<2;++o){var v=[0,0];v[o]=1,this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2],v,0)}this._field[0].set(0,0,0);for(var g=0;g0){for(var xe=0;xe<5;++xe)$.pop();U-=1}continue e}$.push(ne[0],ne[1],oe[0],oe[1],ne[2]),U+=1}}re.push(U)}this._contourOffsets[Q]=te,this._contourCounts[Q]=re}var be=s.mallocFloat($.length);for(o=0;o<$.length;++o)be[o]=$[o];this._contourBuffer.update(be),s.freeFloat(be)}},C.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var e=0;e<3;++e)s.freeFloat(this._field[e].data)},C.highlight=function(e){var t,r;if(!e)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(t=0;t<3;++t)this.enableHighlight[t]?this.highlightLevel[t]=e.level[t]:this.highlightLevel[t]=-1;for(r=this.snapToData?e.dataCoordinate:e.position,t=0;t<3;++t)r[t]-=this.objectOffset[t];if(this.enableDynamic[0]&&r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&r[2]!==this.dynamicLevel[2]){for(var n=0,i=this.shape,a=s.mallocFloat(12*i[0]*i[1]),o=0;o<3;++o)if(this.enableDynamic[o]){this.dynamicLevel[o]=r[o];var l=(o+1)%3,u=(o+2)%3,c=this._field[o],f=this._field[l],h=this._field[u],p=d(c,r[o]),v=p.cells,m=p.positions;for(this._dynamicOffsets[o]=n,t=0;ts||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=p(o,t.stride.slice()),u=0;"float32"===r?u=e.FLOAT:"float64"===r?(u=e.FLOAT,l=!1,r="float32"):"uint8"===r?u=e.UNSIGNED_BYTE:(u=e.UNSIGNED_BYTE,l=!1,r="uint8");var f,h,m=0;if(2===o.length)m=e.LUMINANCE,o=[o[0],o[1],1],t=n(t.data,o,[t.stride[0],t.stride[1],1],t.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])m=e.ALPHA;else if(2===o[2])m=e.LUMINANCE_ALPHA;else if(3===o[2])m=e.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");m=e.RGBA}}u!==e.FLOAT||e.getExtension("OES_texture_float")||(u=e.UNSIGNED_BYTE,l=!1);var g=t.size;if(l)f=0===t.offset&&t.data.length===g?t.data:t.data.subarray(t.offset,t.offset+g);else{var y=[o[2],o[2]*o[0],1];h=a.malloc(g,r);var x=n(h,o,y,0);"float32"!==r&&"float64"!==r||u!==e.UNSIGNED_BYTE?i.assign(x,t):c(x,t),f=h.subarray(0,g)}var b=v(e);return e.texImage2D(e.TEXTURE_2D,0,m,o[0],o[1],0,m,u,f),l||a.free(h),new d(e,b,o[0],o[1],m,u)}(e,t)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function u(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&e instanceof ImageData}var c=function(e,t){i.muls(e,t,255)};function f(e,t,r){var n=e.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(t<0||t>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),n.texImage2D(n.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function d(e,t,r,n,i,a){this.gl=e,this.handle=t,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(e){return o.wrapS=e}},{get:function(){return o._wrapT},set:function(e){return o.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(e){return o.width=e}},{get:function(){return o._shape[1]},set:function(e){return o.height=e}}]),this._shapeVector=l}var h=d.prototype;function p(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function v(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function m(e,t,r,n,i){var a=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===e.FLOAT&&!e.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=v(e);return e.texImage2D(e.TEXTURE_2D,0,n,t,r,0,n,i,null),new d(e,o,t,r,n,i)}Object.defineProperties(h,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(l.indexOf(e[t])<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw new Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return f(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return f(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,f(this,this._shape[0],e),e}}}),h.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},h.dispose=function(){this.gl.deleteTexture(this.handle)},h.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)this._mipLevels.indexOf(t)<0&&this._mipLevels.push(t)},h.setPixels=function(e,t,r,o){var s=this.gl;this.bind(),Array.isArray(t)?(o=r,r=0|t[1],t=0|t[0]):(t=t||0,r=r||0),o=o||0;var l=u(e)?e:e.raw;if(l)this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,t,r,this.format,this.type,l);else{if(!(e.shape&&e.stride&&e.data))throw new Error("gl-texture2d: Unsupported data type");if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>o||r+e.shape[0]>this._shape[0]>>>o||t<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,r,o,s,l,u,f){var d=f.dtype,h=f.shape.slice();if(h.length<2||h.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var v=0,m=0,g=p(h,f.stride.slice());if("float32"===d?v=e.FLOAT:"float64"===d?(v=e.FLOAT,g=!1,d="float32"):"uint8"===d?v=e.UNSIGNED_BYTE:(v=e.UNSIGNED_BYTE,g=!1,d="uint8"),2===h.length)m=e.LUMINANCE,h=[h[0],h[1],1],f=n(f.data,h,[f.stride[0],f.stride[1],1],f.offset);else{if(3!==h.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===h[2])m=e.ALPHA;else if(2===h[2])m=e.LUMINANCE_ALPHA;else if(3===h[2])m=e.RGB;else{if(4!==h[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");m=e.RGBA}h[2]}if(m!==e.LUMINANCE&&m!==e.ALPHA||s!==e.LUMINANCE&&s!==e.ALPHA||(m=s),m!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=f.size,x=u.indexOf(o)<0;if(x&&u.push(o),v===l&&g)0===f.offset&&f.data.length===y?x?e.texImage2D(e.TEXTURE_2D,o,s,h[0],h[1],0,s,l,f.data):e.texSubImage2D(e.TEXTURE_2D,o,t,r,h[0],h[1],s,l,f.data):x?e.texImage2D(e.TEXTURE_2D,o,s,h[0],h[1],0,s,l,f.data.subarray(f.offset,f.offset+y)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,h[0],h[1],s,l,f.data.subarray(f.offset,f.offset+y));else{var b;b=l===e.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=n(b,h,[h[2],h[2]*h[0],1]);v===e.FLOAT&&l===e.UNSIGNED_BYTE?c(_,f):i.assign(_,f),x?e.texImage2D(e.TEXTURE_2D,o,s,h[0],h[1],0,s,l,b.subarray(0,y)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,h[0],h[1],s,l,b.subarray(0,y)),l===e.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,t,r,o,this.format,this.type,this._mipLevels,e)}}},1433:function(e){"use strict";e.exports=function(e,t,r){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var n=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=r(2825),i=r(3536),a=r(244)},9226:function(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},3126:function(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},3990:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},1091:function(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},5911:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=i*l-a*s,e[1]=a*o-n*l,e[2]=n*s-i*o,e}},5455:function(e,t,r){e.exports=r(7056)},7056:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}},4008:function(e,t,r){e.exports=r(6690)},6690:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}},244:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},2613:function(e){e.exports=1e-6},9922:function(e,t,r){e.exports=function(e,t){var r=e[0],i=e[1],a=e[2],o=t[0],s=t[1],l=t[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=r(2613)},9265:function(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},2681:function(e){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},5137:function(e,t,r){e.exports=function(e,t,r,i,a,o){var s,l;for(t||(t=3),r||(r=0),l=i?Math.min(i*t+r,e.length):e.length,s=r;s0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e}},7636:function(e){e.exports=function(e,t){t=t||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e}},6894:function(e){e.exports=function(e,t,r,n){var i=r[1],a=r[2],o=t[1]-i,s=t[2]-a,l=Math.sin(n),u=Math.cos(n);return e[0]=t[0],e[1]=i+o*u-s*l,e[2]=a+o*l+s*u,e}},109:function(e){e.exports=function(e,t,r,n){var i=r[0],a=r[2],o=t[0]-i,s=t[2]-a,l=Math.sin(n),u=Math.cos(n);return e[0]=i+s*l+o*u,e[1]=t[1],e[2]=a+s*u-o*l,e}},8692:function(e){e.exports=function(e,t,r,n){var i=r[0],a=r[1],o=t[0]-i,s=t[1]-a,l=Math.sin(n),u=Math.cos(n);return e[0]=i+o*u-s*l,e[1]=a+o*l+s*u,e[2]=t[2],e}},2447:function(e){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},6621:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}},8489:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}},1463:function(e){e.exports=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}},6141:function(e,t,r){e.exports=r(2953)},5486:function(e,t,r){e.exports=r(3066)},2953:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}},3066:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}},2229:function(e,t,r){e.exports=r(6843)},6843:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}},492:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e}},5673:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,e}},264:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,f=u*i+l*n-o*a,d=u*a+o*i-s*n,h=-o*n-s*i-l*a;return e[0]=c*u+h*-o+f*-l-d*-s,e[1]=f*u+h*-s+d*-o-c*-l,e[2]=d*u+h*-l+c*-s-f*-o,e}},4361:function(e){e.exports=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}},2335:function(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},2933:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},7536:function(e){e.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},4691:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},1373:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}},3750:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},3390:function(e){e.exports=function(e,t,r,n){var i=new Float32Array(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}},9970:function(e,t,r){e.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},6808:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)}},2573:function(e){e.exports=function(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e[3]=s+n*(r[3]-s),e}},160:function(e){e.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}},2334:function(e){e.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}},3576:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}},1498:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},5177:function(e){e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=i*o,e[3]=a*o),e}},9131:function(e,t,r){var n=r(5177),i=r(9288);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),n(e,e),i(e,e,t),e}},9288:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}},4844:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}},4578:function(e){e.exports=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}},7960:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+i*i+a*a}},483:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}},6860:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}},5352:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e}},4041:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,f=u*i+l*n-o*a,d=u*a+o*i-s*n,h=-o*n-s*i-l*a;return e[0]=c*u+h*-o+f*-l-d*-s,e[1]=f*u+h*-s+d*-o-c*-l,e[2]=d*u+h*-l+c*-s-f*-o,e[3]=t[3],e}},1848:function(e,t,r){var n=r(4905),i=r(6468);e.exports=function(e){for(var t=Array.isArray(e)?e:n(e),r=0;r0)continue;r=e.slice(0,1).join("")}return B(r),P+=r.length,(S=S.slice(r.length)).length}}function Y(){return/[^a-fA-F0-9]/.test(t)?(B(S.join("")),M=l,T):(S.push(t),r=t,T+1)}function Z(){return"."===t||/[eE]/.test(t)?(S.push(t),M=v,r=t,T+1):"x"===t&&1===S.length&&"0"===S[0]?(M=_,S.push(t),r=t,T+1):/[^\d]/.test(t)?(B(S.join("")),M=l,T):(S.push(t),r=t,T+1)}function X(){return"f"===t&&(S.push(t),r=t,T+=1),/[eE]/.test(t)?(S.push(t),r=t,T+1):("-"!==t&&"+"!==t||!/[eE]/.test(r))&&/[^\d]/.test(t)?(B(S.join("")),M=l,T):(S.push(t),r=t,T+1)}function K(){if(/[^\d\w_]/.test(t)){var e=S.join("");return M=N[e]?y:F[e]?g:m,B(S.join("")),M=l,T}return S.push(t),r=t,T+1}};var n=r(620),i=r(7827),a=r(6852),o=r(7932),s=r(3508),l=999,u=9999,c=0,f=1,d=2,h=3,p=4,v=5,m=6,g=7,y=8,x=9,b=10,_=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(e,t,r){var n=r(6852);n=n.slice().filter((function(e){return!/^(gl\_|texture)/.test(e)})),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(e){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(e,t,r){var n=r(620);e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(e){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(e,t,r){var n=r(5874);e.exports=function(e,t){var r=n(t),i=[];return i=(i=i.concat(r(e))).concat(r(null))}},3236:function(e){e.exports=function(e){"string"===typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n>1,c=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=d,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=d,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),a-=u}return(h?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(o=o<0;e[r+h]=255&o,h+=p,o/=256,u-=8);e[r+h-p]|=128*v}},8954:function(e,t,r){"use strict";e.exports=function(e,t){var r=e.length;if(0===r)throw new Error("Must have at least d+1 points");var i=e[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var o=e.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw new Error("Input not in general position");for(var l=new Array(i+1),c=0;c<=i;++c)l[c]=c;s<0&&(l[0]=1,l[1]=0);var f=new a(l,new Array(i+1),!1),d=f.adjacent,h=new Array(i+2);for(c=0;c<=i;++c){for(var p=l.slice(),v=0;v<=i;++v)v===c&&(p[v]=-1);var m=p[0];p[0]=p[1],p[1]=m;var g=new a(p,new Array(i+1),!0);d[c]=g,h[c]=g}for(h[i+1]=f,c=0;c<=i;++c){p=d[c].vertices;var y=d[c].adjacent;for(v=0;v<=i;++v){var x=p[v];if(x<0)y[v]=f;else for(var b=0;b<=i;++b)d[b].vertices.indexOf(x)<0&&(y[v]=d[b])}}var _=new u(i,o,h),w=!!t;for(c=i+1;c0;)for(var s=(e=o.pop()).adjacent,l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,f=0;f<=r;++f){var d=c[f];i[f]=d<0?t:a[d]}var h=this.orient();if(h>0)return u;u.lastVisited=-n,0===h&&o.push(u)}}return null},c.walk=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];e:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)a[c]=i[l[c]];for(s.lastVisited=r,c=0;c<=n;++c){var f=u[c];if(!(f.lastVisited>=r)){var d=a[c];a[c]=e;var h=this.orient();if(a[c]=d,h<0){s=f;continue e}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},c.addPeaks=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,f=[t];t.lastVisited=r,t.vertices[t.vertices.indexOf(-1)]=r,t.boundary=!1,u.push(t);for(var d=[];f.length>0;){var h=(t=f.pop()).vertices,p=t.adjacent,v=h.indexOf(r);if(!(v<0))for(var m=0;m<=n;++m)if(m!==v){var g=p[m];if(g.boundary&&!(g.lastVisited>=r)){var y=g.vertices;if(g.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=e):l[b]=i[y[b]];if(this.orient()>0){y[x]=r,g.boundary=!1,u.push(g),f.push(g),g.lastVisited=r;continue}g.lastVisited=-r}var _=g.adjacent,w=h.slice(),k=p.slice(),T=new a(w,k,!0);c.push(T);var A=_.indexOf(t);if(!(A<0))for(_[A]=T,k[v]=g,w[m]=-1,k[m]=t,p[m]=T,T.flip(),b=0;b<=n;++b){var M=w[b];if(!(M<0||M===r)){for(var S=new Array(n-1),E=0,C=0;C<=n;++C){var L=w[C];L<0||C===b||(S[E++]=L)}d.push(new o(S,T,b))}}}}}for(d.sort(s),m=0;m+1=0?o[l++]=s[c]:u=1&c;if(u===(1&e)){var f=o[0];o[0]=o[1],o[1]=f}t.push(o)}}return t}},3352:function(e,t,r){"use strict";var n=r(2478);function i(e,t,r,n,i){this.mid=e,this.left=t,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(t?t.count:0)+(r?r.count:0)+n.length}e.exports=function(e){return e&&0!==e.length?new g(m(e)):new g(null)};var a=i.prototype;function o(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function s(e,t){var r=m(t);e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function l(e,t){var r=e.intervals([]);r.push(t),s(e,r)}function u(e,t){var r=e.intervals([]),n=r.indexOf(t);return n<0?0:(r.splice(n,1),s(e,r),1)}function c(e,t,r){for(var n=0;n=0&&e[n][1]>=t;--n){var i=r(e[n]);if(i)return i}}function d(e,t){for(var r=0;r>1],a=[],o=[],s=[];for(r=0;r3*(t+1)?l(this,e):this.left.insert(e):this.left=m([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?l(this,e):this.right.insert(e):this.right=m([e]);else{var r=n.ge(this.leftPoints,e,p),i=n.ge(this.rightPoints,e,v);this.leftPoints.splice(r,0,e),this.rightPoints.splice(i,0,e)}},a.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?u(this,e):2===(s=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?u(this,e):2===(s=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var a=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=a,i.right=s}o(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(a=n.ge(this.leftPoints,e,p);athis.mid?this.right&&(r=this.right.queryPoint(e,t))?r:f(this.rightPoints,e,t):d(this.leftPoints,t);var r},a.queryInterval=function(e,t,r){var n;return ethis.mid&&this.right&&(n=this.right.queryInterval(e,t,r))?n:tthis.mid?f(this.rightPoints,e,r):d(this.leftPoints,r)};var y=g.prototype;y.insert=function(e){this.root?this.root.insert(e):this.root=new i(e[0],null,null,[e],[e])},y.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},y.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},y.queryInterval=function(e,t,r){if(e<=t&&this.root)return this.root.queryInterval(e,t,r)},Object.defineProperty(y,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(y,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},7762:function(e){"use strict";e.exports=function(e){for(var t=new Array(e),r=0;r13)&&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}},395:function(e){e.exports=function(e,t,r){return e*(1-r)+t*r}},2652:function(e,t,r){var n=r(4335),i=r(6864),a=r(1903),o=r(9921),s=r(7608),l=r(5665),u={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},c=i(),f=i(),d=[0,0,0,0],h=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function v(e,t,r,n,i){e[0]=t[0]*n+r[0]*i,e[1]=t[1]*n+r[1]*i,e[2]=t[2]*n+r[2]*i}e.exports=function(e,t,r,i,m,g){if(t||(t=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),m||(m=[0,0,0,1]),g||(g=[0,0,0,1]),!n(c,e))return!1;if(a(f,c),f[3]=0,f[7]=0,f[11]=0,f[15]=1,Math.abs(o(f)<1e-8))return!1;var y,x,b=c[3],_=c[7],w=c[11],k=c[12],T=c[13],A=c[14],M=c[15];if(0!==b||0!==_||0!==w){if(d[0]=b,d[1]=_,d[2]=w,d[3]=M,!s(f,f))return!1;l(f,f),function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o}(m,d,f)}else m[0]=m[1]=m[2]=0,m[3]=1;if(t[0]=k,t[1]=T,t[2]=A,x=c,(y=h)[0][0]=x[0],y[0][1]=x[1],y[0][2]=x[2],y[1][0]=x[4],y[1][1]=x[5],y[1][2]=x[6],y[2][0]=x[8],y[2][1]=x[9],y[2][2]=x[10],r[0]=u.length(h[0]),u.normalize(h[0],h[0]),i[0]=u.dot(h[0],h[1]),v(h[1],h[1],h[0],1,-i[0]),r[1]=u.length(h[1]),u.normalize(h[1],h[1]),i[0]/=r[1],i[1]=u.dot(h[0],h[2]),v(h[2],h[2],h[0],1,-i[1]),i[2]=u.dot(h[1],h[2]),v(h[2],h[2],h[1],1,-i[2]),r[2]=u.length(h[2]),u.normalize(h[2],h[2]),i[1]/=r[2],i[2]/=r[2],u.cross(p,h[1],h[2]),u.dot(h[0],p)<0)for(var S=0;S<3;S++)r[S]*=-1,h[S][0]*=-1,h[S][1]*=-1,h[S][2]*=-1;return g[0]=.5*Math.sqrt(Math.max(1+h[0][0]-h[1][1]-h[2][2],0)),g[1]=.5*Math.sqrt(Math.max(1-h[0][0]+h[1][1]-h[2][2],0)),g[2]=.5*Math.sqrt(Math.max(1-h[0][0]-h[1][1]+h[2][2],0)),g[3]=.5*Math.sqrt(Math.max(1+h[0][0]+h[1][1]+h[2][2],0)),h[2][1]>h[1][2]&&(g[0]=-g[0]),h[0][2]>h[2][0]&&(g[1]=-g[1]),h[1][0]>h[0][1]&&(g[2]=-g[2]),!0}},4335:function(e){e.exports=function(e,t){var r=t[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)e[i]=t[i]*n;return!0}},7442:function(e,t,r){var n=r(6658),i=r(7182),a=r(2652),o=r(9921),s=r(8648),l=f(),u=f(),c=f();function f(){return{translate:d(),scale:d(1),skew:d(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function d(e){return[e||0,e||0,e||0]}e.exports=function(e,t,r,f){if(0===o(t)||0===o(r))return!1;var d=a(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),h=a(r,u.translate,u.scale,u.skew,u.perspective,u.quaternion);return!(!d||!h)&&(n(c.translate,l.translate,u.translate,f),n(c.skew,l.skew,u.skew,f),n(c.scale,l.scale,u.scale,f),n(c.perspective,l.perspective,u.perspective,f),s(c.quaternion,l.quaternion,u.quaternion,f),i(e,c.translate,c.scale,c.skew,c.perspective,c.quaternion),!0)}},7182:function(e,t,r){var n={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},i=(n.create(),n.create());e.exports=function(e,t,r,a,o,s){return n.identity(e),n.fromRotationTranslation(e,s,t),e[3]=o[0],e[7]=o[1],e[11]=o[2],e[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(e,e,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(e,e,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(e,e,i)),n.scale(e,e,r),e}},4192:function(e,t,r){"use strict";var n=r(2478),i=r(7442),a=r(7608),o=r(5567),s=r(2408),l=r(7089),u=r(6582),c=r(7656),f=(r(2504),r(3536)),d=[0,0,0];function h(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(e){return new h((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=h.prototype;p.recalcMatrix=function(e){var t=this._time,r=n.le(t,e),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===t.length-1)for(var l=16*r,u=0;u<16;++u)o[u]=s[l++];else{var c=t[r+1]-t[r],d=(l=16*r,this.prevMatrix),h=!0;for(u=0;u<16;++u)d[u]=s[l++];var p=this.nextMatrix;for(u=0;u<16;++u)p[u]=s[l++],h=h&&d[u]===p[u];if(c<1e-6||h)for(u=0;u<16;++u)o[u]=d[u];else i(o,d,p,(e-t[r])/c)}var v=this.computedUp;v[0]=o[1],v[1]=o[5],v[2]=o[9],f(v,v);var m=this.computedInverse;a(m,o);var g=this.computedEye,y=m[15];g[0]=m[12]/y,g[1]=m[13]/y,g[2]=m[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(u=0;u<3;++u)x[u]=g[u]-o[2+4*u]*b}},p.idle=function(e){if(!(e1&&n(e[o[c-2]],e[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&n(e[s[c-2]],e[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var f=0,d=(i=0,o.length);i0;--h)r[f++]=s[h];return r};var n=r(3250)[3]},351:function(e,t,r){"use strict";e.exports=function(e,t){t||(t=e,e=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function u(e,s){var u=n.x(s),c=n.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||u!==i||c!==a||l(s))&&(r=0|e,i=u||0,a=c||0,t&&t(r,i,a,o))}function c(e){u(0,e)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,t&&t(0,0,0,o))}function d(e){l(e)&&t&&t(r,i,a,o)}function h(e){0===n.buttons(e)?u(0,e):u(r,e)}function p(e){u(r|n.buttons(e),e)}function v(e){u(r&~n.buttons(e),e)}function m(){s||(s=!0,e.addEventListener("mousemove",h),e.addEventListener("mousedown",p),e.addEventListener("mouseup",v),e.addEventListener("mouseleave",c),e.addEventListener("mouseenter",c),e.addEventListener("mouseout",c),e.addEventListener("mouseover",c),e.addEventListener("blur",f),e.addEventListener("keyup",d),e.addEventListener("keydown",d),e.addEventListener("keypress",d),e!==window&&(window.addEventListener("blur",f),window.addEventListener("keyup",d),window.addEventListener("keydown",d),window.addEventListener("keypress",d)))}m();var g={element:e};return Object.defineProperties(g,{enabled:{get:function(){return s},set:function(t){t?m():s&&(s=!1,e.removeEventListener("mousemove",h),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",v),e.removeEventListener("mouseleave",c),e.removeEventListener("mouseenter",c),e.removeEventListener("mouseout",c),e.removeEventListener("mouseover",c),e.removeEventListener("blur",f),e.removeEventListener("keyup",d),e.removeEventListener("keydown",d),e.removeEventListener("keypress",d),e!==window&&(window.removeEventListener("blur",f),window.removeEventListener("keyup",d),window.removeEventListener("keydown",d),window.removeEventListener("keypress",d)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),g};var n=r(4687)},24:function(e){var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i,a=e.clientX||0,o=e.clientY||0,s=(i=r)===window||i===document||i===document.body?t:i.getBoundingClientRect();return n[0]=a-s.left,n[1]=o-s.top,n}},4687:function(e,t){"use strict";function r(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"===typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1< 0"),"function"!==typeof e.vertex&&t("Must specify vertex creation function"),"function"!==typeof e.cell&&t("Must specify cell creation function"),"function"!==typeof e.phase&&t("Must specify phase function");for(var s=e.getters||[],l=new Array(a),u=0;u=0?l[u]=!0:l[u]=!1;return function(e,t,r,a,o,s){var l=[s,o].join(",");return(0,i[l])(e,t,r,n.mallocUint32,n.freeUint32)}(e.vertex,e.cell,e.phase,0,r,l)};var i={"false,0,1":function(e,t,r,n,i){return function(a,o,s,l){var u,c=0|a.shape[0],f=0|a.shape[1],d=a.data,h=0|a.offset,p=0|a.stride[0],v=0|a.stride[1],m=h,g=0|-p,y=0,x=0|-v,b=0,_=-p-v|0,w=0,k=0|p,T=v-p*c|0,A=0,M=0,S=0,E=2*c|0,C=n(E),L=n(E),P=0,O=0,I=-1,R=-1,D=0,z=0|-c,F=0|c,N=0,B=-c-1|0,j=c-1|0,U=0,q=0,V=0;for(A=0;A0){if(M=1,C[P++]=r(d[m],o,s,l),m+=k,c>0)for(A=1,u=d[m],O=C[P]=r(u,o,s,l),D=C[P+I],N=C[P+z],U=C[P+B],O===D&&O===N&&O===U||(y=d[m+g],b=d[m+x],w=d[m+_],e(A,M,u,y,b,w,O,D,N,U,o,s,l),q=L[P]=S++),P+=1,m+=k,A=2;A0)for(A=1,u=d[m],O=C[P]=r(u,o,s,l),D=C[P+I],N=C[P+z],U=C[P+B],O===D&&O===N&&O===U||(y=d[m+g],b=d[m+x],w=d[m+_],e(A,M,u,y,b,w,O,D,N,U,o,s,l),q=L[P]=S++,U!==N&&t(L[P+z],q,b,w,N,U,o,s,l)),P+=1,m+=k,A=2;A0){if(A=1,C[P++]=r(d[m],o,s,l),m+=k,f>0)for(M=1,u=d[m],O=C[P]=r(u,o,s,l),N=C[P+z],D=C[P+I],U=C[P+B],O===N&&O===D&&O===U||(y=d[m+g],b=d[m+x],w=d[m+_],e(A,M,u,y,b,w,O,N,D,U,o,s,l),q=L[P]=S++),P+=1,m+=k,M=2;M0)for(M=1,u=d[m],O=C[P]=r(u,o,s,l),N=C[P+z],D=C[P+I],U=C[P+B],O===N&&O===D&&O===U||(y=d[m+g],b=d[m+x],w=d[m+_],e(A,M,u,y,b,w,O,N,D,U,o,s,l),q=L[P]=S++,U!==N&&t(L[P+z],q,w,y,U,N,o,s,l)),P+=1,m+=k,M=2;M2&&a[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(i.pick(0,-1).lo(1).hi(a[1]-2),e.pick(0,-1,1).lo(1).hi(a[1]-2)),t(e.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(i.pick(a[0]-1,-1).lo(1).hi(a[1]-2),e.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),t(e.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(i.pick(-1,0).lo(1).hi(a[0]-2),e.pick(-1,0,0).lo(1).hi(a[0]-2)),t(e.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(i.pick(-1,a[1]-1).lo(1).hi(a[0]-2),e.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),t(e.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),e.set(0,0,0,0),e.set(0,0,1,0),e.set(a[0]-1,0,0,0),e.set(a[0]-1,0,1,0),e.set(0,a[1]-1,0,0),e.set(0,a[1]-1,1,0),e.set(a[0]-1,a[1]-1,0,0),e.set(a[0]-1,a[1]-1,1,0),e}}e.exports=function(e,t,r){return Array.isArray(r)||(r=n(t.dimension,"string"===typeof r?r:"clamp")),0===t.size?e:0===t.dimension?(e.set(0),e):function(e){var t=e.join();if(a=c[t])return a;for(var r=e.length,n=[f,d],i=1;i<=r;++i)n.push(h(i));var a=p.apply(void 0,n);return c[t]=a,a}(r)(e,t)}},4317:function(e){"use strict";function t(e,t){var r=Math.floor(t),n=t-r,i=0<=r&&r0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|e[1];b>0;){b<64?(u=b,b=0):(u=64,b-=64),n=g+x*f+b*d,o=y+x*p+b*v;var _=0,w=0,k=0,T=h,A=f-c*h,M=d-l*f,S=m,E=p-c*m,C=v-l*p;for(k=0;k0;){v<64?(l=v,v=0):(l=64,v-=64);for(var m=0|e[0];m>0;){m<64?(s=m,m=0):(s=64,m-=64),n=h+v*c+m*u,o=p+v*d+m*f;var g=0,y=0,x=c,b=u-l*c,_=d,w=f-l*d;for(y=0;y0;){y<64?(u=y,y=0):(u=64,y-=64);for(var x=0|e[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|e[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),n=m+y*d+x*c+b*f,o=g+y*v+x*h+b*p;var _=0,w=0,k=0,T=d,A=c-u*d,M=f-s*c,S=v,E=h-u*v,C=p-s*h;for(k=0;kr;){g=0,y=v-o;t:for(m=0;mb)break t;y+=f,g+=d}for(g=v,y=v-o,m=0;m>1,H=V-j,G=V+j,W=U,Y=H,Z=V,X=G,K=q,J=i+1,$=a-1,Q=!0,ee=0,te=0,re=0,ne=f,ie=t(ne),ae=t(ne);A=l*W,M=l*Y,B=s;e:for(T=0;T0){m=W,W=Y,Y=m;break e}if(re<0)break e;B+=h}A=l*X,M=l*K,B=s;e:for(T=0;T0){m=X,X=K,K=m;break e}if(re<0)break e;B+=h}A=l*W,M=l*Z,B=s;e:for(T=0;T0){m=W,W=Z,Z=m;break e}if(re<0)break e;B+=h}A=l*Y,M=l*Z,B=s;e:for(T=0;T0){m=Y,Y=Z,Z=m;break e}if(re<0)break e;B+=h}A=l*W,M=l*X,B=s;e:for(T=0;T0){m=W,W=X,X=m;break e}if(re<0)break e;B+=h}A=l*Z,M=l*X,B=s;e:for(T=0;T0){m=Z,Z=X,X=m;break e}if(re<0)break e;B+=h}A=l*Y,M=l*K,B=s;e:for(T=0;T0){m=Y,Y=K,K=m;break e}if(re<0)break e;B+=h}A=l*Y,M=l*Z,B=s;e:for(T=0;T0){m=Y,Y=Z,Z=m;break e}if(re<0)break e;B+=h}A=l*X,M=l*K,B=s;e:for(T=0;T0){m=X,X=K,K=m;break e}if(re<0)break e;B+=h}for(A=l*W,M=l*Y,S=l*Z,E=l*X,C=l*K,L=l*U,P=l*V,O=l*q,N=0,B=s,T=0;T0)){if(re<0){for(A=l*b,M=l*J,S=l*$,B=s,T=0;T0)for(;;){for(_=s+$*l,N=0,T=0;T0)){for(_=s+$*l,N=0,T=0;Tq){e:for(;;){for(_=s+J*l,N=0,B=s,T=0;T1&&n?s(r,n[0],n[1]):s(r)}(e,t,l);return n(l,u)}},446:function(e,t,r){"use strict";var n=r(7640),i={};e.exports=function(e){var t=e.order,r=e.dtype,a=[t,r].join(":"),o=i[a];return o||(i[a]=o=n(t,r)),o(e),e}},9618:function(e,t,r){var n=r(7163),i="undefined"!==typeof Float64Array;function a(e,t){return e[0]-t[0]}function o(){var e,t=this.stride,r=new Array(t.length);for(e=0;e=0&&(t+=a*(r=0|e),i-=r),new n(this.data,i,a,t)},i.step=function(e){var t=this.shape[0],r=this.stride[0],i=this.offset,a=0,o=Math.ceil;return"number"===typeof e&&((a=0|e)<0?(i+=r*(t-1),t=o(-t/a)):t=o(t/a),r*=a),new n(this.data,t,r,i)},i.transpose=function(e){e=void 0===e?0:0|e;var t=this.shape,r=this.stride;return new n(this.data,t[e],r[e],this.offset)},i.pick=function(e){var r=[],n=[],i=this.offset;return"number"===typeof e&&e>=0?i=i+this.stride[0]*e|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,t[r.length+1])(this.data,r,n,i)},function(e,t,r,i){return new n(e,t[0],r[0],i)}},2:function(e,t,r){function n(e,t,r,n,i,a){this.data=e,this.shape=[t,r],this.stride=[n,i],this.offset=0|a}var i=n.prototype;return i.dtype=e,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(t,r,n){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]=n},i.get=function(t,r){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]},i.index=function(e,t){return this.offset+this.stride[0]*e+this.stride[1]*t},i.hi=function(e,t){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,this.stride[0],this.stride[1],this.offset)},i.lo=function(e,t){var r=this.offset,i=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"===typeof e&&e>=0&&(r+=s*(i=0|e),a-=i),"number"===typeof t&&t>=0&&(r+=l*(i=0|t),o-=i),new n(this.data,a,o,s,l,r)},i.step=function(e,t){var r=this.shape[0],i=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,u=Math.ceil;return"number"===typeof e&&((l=0|e)<0?(s+=a*(r-1),r=u(-r/l)):r=u(r/l),a*=l),"number"===typeof t&&((l=0|t)<0?(s+=o*(i-1),i=u(-i/l)):i=u(i/l),o*=l),new n(this.data,r,i,a,o,s)},i.transpose=function(e,t){e=void 0===e?0:0|e,t=void 0===t?1:0|t;var r=this.shape,i=this.stride;return new n(this.data,r[e],r[t],i[e],i[t],this.offset)},i.pick=function(e,r){var n=[],i=[],a=this.offset;return"number"===typeof e&&e>=0?a=a+this.stride[0]*e|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"===typeof r&&r>=0?a=a+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,t[n.length+1])(this.data,n,i,a)},function(e,t,r,i){return new n(e,t[0],t[1],r[0],r[1],i)}},3:function(e,t,r){function n(e,t,r,n,i,a,o,s){this.data=e,this.shape=[t,r,n],this.stride=[i,a,o],this.offset=0|s}var i=n.prototype;return i.dtype=e,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var e=Math.abs(this.stride[0]),t=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return e>t?t>r?[2,1,0]:e>r?[1,2,0]:[1,0,2]:e>r?[2,0,1]:r>t?[0,1,2]:[0,2,1]}}),i.set=function(t,r,n,i){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(t,r,n){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]},i.index=function(e,t,r){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r},i.hi=function(e,t,r){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"number"!==typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(e,t,r){var i=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],u=this.stride[0],c=this.stride[1],f=this.stride[2];return"number"===typeof e&&e>=0&&(i+=u*(a=0|e),o-=a),"number"===typeof t&&t>=0&&(i+=c*(a=0|t),s-=a),"number"===typeof r&&r>=0&&(i+=f*(a=0|r),l-=a),new n(this.data,o,s,l,u,c,f,i)},i.step=function(e,t,r){var i=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],u=this.stride[2],c=this.offset,f=0,d=Math.ceil;return"number"===typeof e&&((f=0|e)<0?(c+=s*(i-1),i=d(-i/f)):i=d(i/f),s*=f),"number"===typeof t&&((f=0|t)<0?(c+=l*(a-1),a=d(-a/f)):a=d(a/f),l*=f),"number"===typeof r&&((f=0|r)<0?(c+=u*(o-1),o=d(-o/f)):o=d(o/f),u*=f),new n(this.data,i,a,o,s,l,u,c)},i.transpose=function(e,t,r){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r;var i=this.shape,a=this.stride;return new n(this.data,i[e],i[t],i[r],a[e],a[t],a[r],this.offset)},i.pick=function(e,r,n){var i=[],a=[],o=this.offset;return"number"===typeof e&&e>=0?o=o+this.stride[0]*e|0:(i.push(this.shape[0]),a.push(this.stride[0])),"number"===typeof r&&r>=0?o=o+this.stride[1]*r|0:(i.push(this.shape[1]),a.push(this.stride[1])),"number"===typeof n&&n>=0?o=o+this.stride[2]*n|0:(i.push(this.shape[2]),a.push(this.stride[2])),(0,t[i.length+1])(this.data,i,a,o)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],r[0],r[1],r[2],i)}},4:function(e,t,r){function n(e,t,r,n,i,a,o,s,l,u){this.data=e,this.shape=[t,r,n,i],this.stride=[a,o,s,l],this.offset=0|u}var i=n.prototype;return i.dtype=e,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(t,r,n,i,a){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=a},i.get=function(t,r,n,i){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(e,t,r,n){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n},i.hi=function(e,t,r,i){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"number"!==typeof r||r<0?this.shape[2]:0|r,"number"!==typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(e,t,r,i){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],u=this.shape[2],c=this.shape[3],f=this.stride[0],d=this.stride[1],h=this.stride[2],p=this.stride[3];return"number"===typeof e&&e>=0&&(a+=f*(o=0|e),s-=o),"number"===typeof t&&t>=0&&(a+=d*(o=0|t),l-=o),"number"===typeof r&&r>=0&&(a+=h*(o=0|r),u-=o),"number"===typeof i&&i>=0&&(a+=p*(o=0|i),c-=o),new n(this.data,s,l,u,c,f,d,h,p,a)},i.step=function(e,t,r,i){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],u=this.stride[0],c=this.stride[1],f=this.stride[2],d=this.stride[3],h=this.offset,p=0,v=Math.ceil;return"number"===typeof e&&((p=0|e)<0?(h+=u*(a-1),a=v(-a/p)):a=v(a/p),u*=p),"number"===typeof t&&((p=0|t)<0?(h+=c*(o-1),o=v(-o/p)):o=v(o/p),c*=p),"number"===typeof r&&((p=0|r)<0?(h+=f*(s-1),s=v(-s/p)):s=v(s/p),f*=p),"number"===typeof i&&((p=0|i)<0?(h+=d*(l-1),l=v(-l/p)):l=v(l/p),d*=p),new n(this.data,a,o,s,l,u,c,f,d,h)},i.transpose=function(e,t,r,i){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var a=this.shape,o=this.stride;return new n(this.data,a[e],a[t],a[r],a[i],o[e],o[t],o[r],o[i],this.offset)},i.pick=function(e,r,n,i){var a=[],o=[],s=this.offset;return"number"===typeof e&&e>=0?s=s+this.stride[0]*e|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"===typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"===typeof n&&n>=0?s=s+this.stride[2]*n|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"===typeof i&&i>=0?s=s+this.stride[3]*i|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,t[a.length+1])(this.data,a,o,s)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],r[0],r[1],r[2],r[3],i)}},5:function(e,t,r){function n(e,t,r,n,i,a,o,s,l,u,c,f){this.data=e,this.shape=[t,r,n,i,a],this.stride=[o,s,l,u,c],this.offset=0|f}var i=n.prototype;return i.dtype=e,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(t,r,n,i,a,o){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]=o},i.get=function(t,r,n,i,a){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]},i.index=function(e,t,r,n,i){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(e,t,r,i,a){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"number"!==typeof r||r<0?this.shape[2]:0|r,"number"!==typeof i||i<0?this.shape[3]:0|i,"number"!==typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(e,t,r,i,a){var o=this.offset,s=0,l=this.shape[0],u=this.shape[1],c=this.shape[2],f=this.shape[3],d=this.shape[4],h=this.stride[0],p=this.stride[1],v=this.stride[2],m=this.stride[3],g=this.stride[4];return"number"===typeof e&&e>=0&&(o+=h*(s=0|e),l-=s),"number"===typeof t&&t>=0&&(o+=p*(s=0|t),u-=s),"number"===typeof r&&r>=0&&(o+=v*(s=0|r),c-=s),"number"===typeof i&&i>=0&&(o+=m*(s=0|i),f-=s),"number"===typeof a&&a>=0&&(o+=g*(s=0|a),d-=s),new n(this.data,l,u,c,f,d,h,p,v,m,g,o)},i.step=function(e,t,r,i,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],u=this.shape[3],c=this.shape[4],f=this.stride[0],d=this.stride[1],h=this.stride[2],p=this.stride[3],v=this.stride[4],m=this.offset,g=0,y=Math.ceil;return"number"===typeof e&&((g=0|e)<0?(m+=f*(o-1),o=y(-o/g)):o=y(o/g),f*=g),"number"===typeof t&&((g=0|t)<0?(m+=d*(s-1),s=y(-s/g)):s=y(s/g),d*=g),"number"===typeof r&&((g=0|r)<0?(m+=h*(l-1),l=y(-l/g)):l=y(l/g),h*=g),"number"===typeof i&&((g=0|i)<0?(m+=p*(u-1),u=y(-u/g)):u=y(u/g),p*=g),"number"===typeof a&&((g=0|a)<0?(m+=v*(c-1),c=y(-c/g)):c=y(c/g),v*=g),new n(this.data,o,s,l,u,c,f,d,h,p,v,m)},i.transpose=function(e,t,r,i,a){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new n(this.data,o[e],o[t],o[r],o[i],o[a],s[e],s[t],s[r],s[i],s[a],this.offset)},i.pick=function(e,r,n,i,a){var o=[],s=[],l=this.offset;return"number"===typeof e&&e>=0?l=l+this.stride[0]*e|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"===typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"===typeof n&&n>=0?l=l+this.stride[2]*n|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"===typeof i&&i>=0?l=l+this.stride[3]*i|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"===typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,t[o.length+1])(this.data,o,s,l)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],t[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(e,t){var r=-1===t?"T":String(t),n=s[r];return-1===t?n(e):0===t?n(e,u[e][0]):n(e,u[e],o)}var u={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(e,t,r,a){if(void 0===e)return(0,u.array[0])([]);"number"===typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var o=t.length;if(void 0===r){r=new Array(o);for(var s=o-1,c=1;s>=0;--s)r[s]=c,c*=t[s]}if(void 0===a)for(a=0,s=0;s>>0;e.exports=function(e,t){if(isNaN(e)||isNaN(t))return NaN;if(e===t)return e;if(0===e)return t<0?-i:i;var r=n.hi(e),o=n.lo(e);return t>e===e>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1,n.pack(o,r)}},8406:function(e,t){t.vertexNormals=function(e,t,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa){var b=i[u],_=1/Math.sqrt(m*y);for(x=0;x<3;++x){var w=(x+1)%3,k=(x+2)%3;b[x]+=_*(g[w]*v[k]-g[k]*v[w])}}}for(o=0;oa)for(_=1/Math.sqrt(T),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return i},t.faceNormals=function(e,t,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(h):0,u=0;u<3;++u)d[u]*=h;i[o]=d}return i}},4081:function(e){"use strict";e.exports=function(e,t,r,n,i,a,o,s,l,u){var c=t+a+u;if(f>0){var f=Math.sqrt(c+1);e[0]=.5*(o-l)/f,e[1]=.5*(s-n)/f,e[2]=.5*(r-a)/f,e[3]=.5*f}else{var d=Math.max(t,a,u);f=Math.sqrt(2*d-c+1),t>=d?(e[0]=.5*f,e[1]=.5*(i+r)/f,e[2]=.5*(s+n)/f,e[3]=.5*(o-l)/f):a>=d?(e[0]=.5*(r+i)/f,e[1]=.5*f,e[2]=.5*(l+o)/f,e[3]=.5*(s-n)/f):(e[0]=.5*(n+s)/f,e[1]=.5*(o+l)/f,e[2]=.5*f,e[3]=.5*(r-i)/f)}return e}},9977:function(e,t,r){"use strict";e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.rotation||[0,0,0,1],n=e.radius||1;t=[].slice.call(t,0,3),c(r=[].slice.call(r,0,4),r);var i=new f(r,t,Math.log(n));return i.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&i.lookAt(0,e.eye,e.center,e.up),i};var n=r(9215),i=r(6582),a=r(7399),o=r(7608),s=r(4081);function l(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function u(e,t,r,n){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2)+Math.pow(n,2))}function c(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=u(r,n,i,a);o>1e-6?(e[0]=r/o,e[1]=n/o,e[2]=i/o,e[3]=a/o):(e[0]=e[1]=e[2]=0,e[3]=1)}function f(e,t,r){this.radius=n([r]),this.center=n(t),this.rotation=n(e),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var d=f.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;c(t,t);var r=this.computedMatrix;a(r,t);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,f=0;f<3;++f)u+=r[l+4*f]*i[f];r[12+l]=-u}},d.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r},d.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},d.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},d.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],u=l(a,o,s);a/=u,o/=u,s/=u;var c=i[0],f=i[4],d=i[8],h=c*a+f*o+d*s,p=l(c-=a*h,f-=o*h,d-=s*h);c/=p,f/=p,d/=p;var v=i[2],m=i[6],g=i[10],y=v*a+m*o+g*s,x=v*c+m*f+g*d,b=l(v-=y*a+x*c,m-=y*o+x*f,g-=y*s+x*d);v/=b,m/=b,g/=b;var _=c*t+a*r,w=f*t+o*r,k=d*t+s*r;this.center.move(e,_,w,k);var T=Math.exp(this.computedRadius[0]);T=Math.max(1e-4,T+n),this.radius.set(e,Math.log(T))},d.rotate=function(e,t,r,n){this.recalcMatrix(e),t=t||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],c=i[1],f=i[5],d=i[9],h=i[2],p=i[6],v=i[10],m=t*a+r*c,g=t*o+r*f,y=t*s+r*d,x=-(p*y-v*g),b=-(v*m-h*y),_=-(h*g-p*m),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),k=u(x,b,_,w);k>1e-6?(x/=k,b/=k,_/=k,w/=k):(x=b=_=0,w=1);var T=this.computedRotation,A=T[0],M=T[1],S=T[2],E=T[3],C=A*w+E*x+M*_-S*b,L=M*w+E*b+S*x-A*_,P=S*w+E*_+A*b-M*x,O=E*w-A*x-M*b-S*_;if(n){x=h,b=p,_=v;var I=Math.sin(n)/l(x,b,_);x*=I,b*=I,_*=I,O=O*(w=Math.cos(t))-(C=C*w+O*x+L*_-P*b)*x-(L=L*w+O*b+P*x-C*_)*b-(P=P*w+O*_+C*b-L*x)*_}var R=u(C,L,P,O);R>1e-6?(C/=R,L/=R,P/=R,O/=R):(C=L=P=0,O=1),this.rotation.set(e,C,L,P,O)},d.lookAt=function(e,t,r,n){this.recalcMatrix(e),r=r||this.computedCenter,t=t||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,t,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),c(o,o),this.rotation.set(e,o[0],o[1],o[2],o[3]);for(var l=0,u=0;u<3;++u)l+=Math.pow(r[u]-t[u],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,r[0],r[1],r[2])},d.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},d.setMatrix=function(e,t){var r=this.computedRotation;s(r,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),c(r,r),this.rotation.set(e,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,t);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,u=n[14]/i;this.recalcMatrix(e);var f=Math.exp(this.computedRadius[0]);this.center.set(e,a-n[2]*f,l-n[6]*f,u-n[10]*f),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},d.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},d.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},d.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},d.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},d.fromJSON=function(e){var t=this.lastT(),r=e.center;r&&this.center.set(t,r[0],r[1],r[2]);var n=e.rotation;n&&this.rotation.set(t,n[0],n[1],n[2],n[3]);var i=e.distance;i&&i>0&&this.radius.set(t,Math.log(i)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},1371:function(e,t,r){"use strict";var n=r(3233);e.exports=function(e,t,r){return n(r="undefined"!==typeof r?r+"":" ",t)+e}},3202:function(e){e.exports=function(e,t){t||(t=[0,""]),e=String(e);var r=parseFloat(e,10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},3088:function(e,t,r){"use strict";e.exports=function(e,t){for(var r=0|t.length,i=e.length,a=[new Array(r),new Array(r)],o=0;o0){o=a[c][r][0],l=c;break}s=o[1^l];for(var f=0;f<2;++f)for(var d=a[f][r],h=0;h0&&(o=p,s=v,l=f)}return i||o&&u(o,l),s}function f(e,r){var i=a[r][e][0],o=[e];u(i,r);for(var s=i[1^r];;){for(;s!==e;)o.push(s),s=c(o[o.length-2],s,!1);if(a[0][e].length+a[1][e].length===0)break;var l=o[o.length-1],f=e,d=o[1],h=c(l,f,!0);if(n(t[l],t[f],t[d],t[h])<0)break;o.push(e),s=c(l,f)}return o}function d(e,t){return t[1]===t[t.length-1]}for(o=0;o0;){a[0][o].length;var v=f(o,h);d(0,v)?p.push.apply(p,v):(p.length>0&&l.push(p),p=v)}p.length>0&&l.push(p)}return l};var n=r(3140)},5609:function(e,t,r){"use strict";e.exports=function(e,t){for(var r=n(e,t.length),i=new Array(t.length),a=new Array(t.length),o=[],s=0;s0;){i[h=o.pop()]=!1;var u=r[h];for(s=0;s0}))).length,m=new Array(v),g=new Array(v);for(h=0;h0;){var N=z.pop(),B=E[N];l(B,(function(e,t){return e-t}));var j,U=B.length,q=F[N];for(0===q&&(j=[V=p[N]]),h=0;h=0||(F[H]=1^q,z.push(H),0===q&&(D(V=p[H])||(V.reverse(),j.push(V))))}0===q&&r.push(j)}return r};var n=r(3134),i=r(3088),a=r(5085),o=r(5250),s=r(8210),l=r(1682),u=r(5609);function c(e,t){for(var r=new Array(e),n=0;n0&&t[i]===r[0]))return 1;a=e[i-1]}for(var s=1;a;){var l=a.key,u=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,a=a.right}else if(u>0)a=a.left;else{if(!(u<0))return 0;s=1,a=a.right}}return s}}(g.slabs,g.coordinates);return 0===a.length?y:function(e,t){return function(r){return e(r[0],r[1])?0:t(r)}}(l(a),y)};var n=r(3250)[3],i=r(4209),a=r(3352),o=r(2478);function s(){return!0}function l(e){for(var t={},r=0;r=u?(T=1,y=u+2*d+p):y=d*(T=-d/u)+p):(T=0,h>=0?(A=0,y=p):-h>=f?(A=1,y=f+2*h+p):y=h*(A=-h/f)+p);else if(A<0)A=0,d>=0?(T=0,y=p):-d>=u?(T=1,y=u+2*d+p):y=d*(T=-d/u)+p;else{var M=1/k;y=(T*=M)*(u*T+c*(A*=M)+2*d)+A*(c*T+f*A+2*h)+p}else T<0?(b=f+h)>(x=c+d)?(_=b-x)>=(w=u-2*c+f)?(T=1,A=0,y=u+2*d+p):y=(T=_/w)*(u*T+c*(A=1-T)+2*d)+A*(c*T+f*A+2*h)+p:(T=0,b<=0?(A=1,y=f+2*h+p):h>=0?(A=0,y=p):y=h*(A=-h/f)+p):A<0?(b=u+d)>(x=c+h)?(_=b-x)>=(w=u-2*c+f)?(A=1,T=0,y=f+2*h+p):y=(T=1-(A=_/w))*(u*T+c*A+2*d)+A*(c*T+f*A+2*h)+p:(A=0,b<=0?(T=1,y=u+2*d+p):d>=0?(T=0,y=p):y=d*(T=-d/u)+p):(_=f+h-c-d)<=0?(T=0,A=1,y=f+2*h+p):_>=(w=u-2*c+f)?(T=1,A=0,y=u+2*d+p):y=(T=_/w)*(u*T+c*(A=1-T)+2*d)+A*(c*T+f*A+2*h)+p;var S=1-T-A;for(l=0;l0){var u=e[r-1];if(0===n(s,u)&&a(u)!==l){r-=1;continue}}e[r++]=s}}return e.length=r,e}},3233:function(e){"use strict";var t,r="";e.exports=function(e,n){if("string"!==typeof e)throw new TypeError("expected a string");if(1===n)return e;if(2===n)return e+e;var i=e.length*n;if(t!==e||"undefined"===typeof t)t=e,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=e),n>>=1,e+=e;return r=(r+=e).substr(0,i)}},3025:function(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(e){"use strict";e.exports=function(e){for(var t=e.length,r=e[e.length-1],n=t,i=t-2;i>=0;--i){var a=r;(l=(s=e[i])-((r=a+s)-a))&&(e[--n]=r,r=l)}var o=0;for(i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(e,t,r)},function(e,t,r,n){var i=e[0]-n[0],a=t[0]-n[0],o=r[0]-n[0],s=e[1]-n[1],l=t[1]-n[1],u=r[1]-n[1],c=e[2]-n[2],f=t[2]-n[2],h=r[2]-n[2],p=a*u,v=o*l,m=o*s,g=i*u,y=i*l,x=a*s,b=c*(p-v)+f*(m-g)+h*(y-x),_=7771561172376103e-31*((Math.abs(p)+Math.abs(v))*Math.abs(c)+(Math.abs(m)+Math.abs(g))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(h));return b>_||-b>_?b:d(e,t,r,n)}];function p(e){var t=h[e.length];return t||(t=h[e.length]=c(e.length)),t.apply(void 0,e)}function v(e,t,r,n,i,a,o){return function(t,r,s,l,u){switch(arguments.length){case 0:case 1:return 0;case 2:return n(t,r);case 3:return i(t,r,s);case 4:return a(t,r,s,l);case 5:return o(t,r,s,l,u)}for(var c=new Array(arguments.length),f=0;f0&&o>0||a<0&&o<0)return!1;var s=n(r,e,t),l=n(i,e,t);return!(s>0&&l>0||s<0&&l<0)&&(0!==a||0!==o||0!==s||0!==l||function(e,t,r,n){for(var i=0;i<2;++i){var a=e[i],o=t[i],s=Math.min(a,o),l=Math.max(a,o),u=r[i],c=n[i],f=Math.min(u,c);if(Math.max(u,c)=n?(i=f,(l+=1)=n?(i=f,(l+=1)>1,u=t[2*l+1];if(u===a)return l;a>1,u=t[2*l+1];if(u===a)return l;a>1,u=t[2*l+1];if(u===a)return l;a0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},2014:function(e,t,r){"use strict";var n=r(3105),i=r(4623);function a(e,t){var r=e.length,n=e.length-t.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:return(s=e[0]+e[1]-t[0]-t[1])||i(e[0],e[1])-i(t[0],t[1]);case 3:var a=e[0]+e[1],o=t[0]+t[1];if(s=a+e[2]-(o+t[2]))return s;var s,l=i(e[0],e[1]),u=i(t[0],t[1]);return(s=i(l,e[2])-i(u,t[2]))||i(l+e[2],a)-i(u+t[2],o);default:var c=e.slice(0);c.sort();var f=t.slice(0);f.sort();for(var d=0;d>1,s=a(e[o],t);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function c(e,t){for(var r=new Array(e.length),i=0,o=r.length;i=e.length||0!==a(e[m],s)););}return r}function f(e,t){if(t<0)return[];for(var r=[],i=(1<>>c&1&&u.push(i[c]);t.push(u)}return s(t)},t.skeleton=f,t.boundary=function(e){for(var t=[],r=0,n=e.length;r>1:(e>>1)-1}function x(e){for(var t=g(e);;){var r=t,n=2*e+1,i=2*(e+1),a=e;if(n0;){var r=y(e);if(!(r>=0&&t0){var e=T[0];return m(0,M-1),M-=1,x(0),e}return-1}function w(e,t){var r=T[e];return u[r]===t?e:(u[r]=-1/0,b(e),_(),u[r]=t,b((M+=1)-1))}function k(e){if(!c[e]){c[e]=!0;var t=s[e],r=l[e];s[r]>=0&&(s[r]=t),l[t]>=0&&(l[t]=r),A[t]>=0&&w(A[t],v(t)),A[r]>=0&&w(A[r],v(r))}}var T=[],A=new Array(a);for(f=0;f>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||u[S]>r)break;k(S)}var E=[];for(f=0;f=0&&r>=0&&t!==r){var n=A[t],i=A[r];n!==i&&L.push([n,i])}})),i.unique(i.normalize(L)),{positions:E,edges:L}};var n=r(3250),i=r(2014)},1303:function(e,t,r){"use strict";e.exports=function(e,t){var r,a,o,s;if(t[0][0]t[1][0]))return i(t,e);r=t[1],a=t[0]}if(e[0][0]e[1][0]))return-i(e,t);o=e[1],s=e[0]}var l=n(r,a,s),u=n(r,a,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=n(s,o,a),u=n(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return a[0]-s[0]};var n=r(3250);function i(e,t){var r,i,a,o;if(t[0][0]t[1][0])){var s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),u=Math.min(t[0][1],t[1][1]),c=Math.max(t[0][1],t[1][1]);return lc?s-c:l-c}r=t[1],i=t[0]}e[0][1]0)if(t[0]!==o[1][0])r=e,e=e.right;else{if(l=u(e.right,t))return l;e=e.left}else{if(t[0]!==o[1][0])return e;var l;if(l=u(e.right,t))return l;e=e.left}}return r}function c(e,t,r,n){this.y=e,this.index=t,this.start=r,this.closed=n}function f(e,t,r,n){this.x=e,this.segment=t,this.create=r,this.index=n}s.prototype.castUp=function(e){var t=n.le(this.coordinates,e[0]);if(t<0)return-1;this.slabs[t];var r=u(this.slabs[t],e),i=-1;if(r&&(i=r.value),this.coordinates[t]===e[0]){var s=null;if(r&&(s=r.key),t>0){var c=u(this.slabs[t-1],e);c&&(s?o(c.key,s)>0&&(s=c.key,i=c.value):(i=c.value,s=c.key))}var f=this.horizontal[t];if(f.length>0){var d=n.ge(f,e[1],l);if(d=f.length)return i;h=f[d]}}if(h.start)if(s){var p=a(s[0],s[1],[e[0],h.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(i=h.index)}else i=h.index;else h.y!==e[1]&&(i=h.index)}}}return i}},5202:function(e,t,r){"use strict";var n=r(1944),i=r(8210);function a(e,t){var r=i(n(e,t),[t[t.length-1]]);return r[r.length-1]}function o(e,t,r,n){var i=-t/(n-t);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=e.length,s=new Array(o),l=0;l0||i>0&&c<0){var f=o(s,c,l,i);r.push(f),n.push(f.slice())}c<0?n.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=c}return{positive:r,negative:n}},e.exports.positive=function(e,t){for(var r=[],n=a(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||n>0&&u<0)&&r.push(o(i,u,s,n)),u>=0&&r.push(s.slice()),n=u}return r},e.exports.negative=function(e,t){for(var r=[],n=a(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||n>0&&u<0)&&r.push(o(i,u,s,n)),u<=0&&r.push(s.slice()),n=u}return r}},3387:function(e,t,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(e){return function(e,t){var r,n,o,s,l,u,c,f,d,h=1,p=e.length,v="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=r:(!i.number.test(s.type)||f&&!s.sign?d="":(d=f?"+":"-",r=r.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",c=s.width-(d+r).length,l=s.width&&c>0?u.repeat(c):"",v+=s.align?d+r+l:"0"===u?d+l+r:l+d+r)}return v}(function(e){if(s[e])return s[e];for(var t,r=e,n=[],a=0;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){a|=1;var o=[],l=t[2],u=[];if(null===(u=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(u[1]);""!==(l=l.substring(u[0].length));)if(null!==(u=i.key_access.exec(l)))o.push(u[1]);else{if(null===(u=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(u[1])}t[2]=o}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return s[e]=n}(e),arguments)}function o(e,t){return a.apply(null,[e].concat(t||[]))}var s=Object.create(null);t.sprintf=a,t.vsprintf=o,"undefined"!==typeof window&&(window.sprintf=a,window.vsprintf=o,void 0===(n=function(){return{sprintf:a,vsprintf:o}}.call(t,r,t,e))||(e.exports=n))}()},3711:function(e,t,r){"use strict";e.exports=function(e,t){if(e.dimension<=0)return{positions:[],cells:[]};if(1===e.dimension)return function(e,t){for(var r=i(e,t),n=r.length,a=new Array(n),o=new Array(n),s=0;sn|0},vertex:function(e,t,r,n,i,a,o,s,l,u,c,f,d){var h=(0|o)+(s<<1)+(l<<2)+(u<<3)|0;if(0!==h&&15!==h)switch(h){case 0:case 15:c.push([e-.5,t-.5]);break;case 1:c.push([e-.25-.25*(n+r-2*d)/(r-n),t-.25-.25*(i+r-2*d)/(r-i)]);break;case 2:c.push([e-.75-.25*(-n-r+2*d)/(n-r),t-.25-.25*(a+n-2*d)/(n-a)]);break;case 3:c.push([e-.5,t-.5-.5*(i+r+a+n-4*d)/(r-i+n-a)]);break;case 4:c.push([e-.25-.25*(a+i-2*d)/(i-a),t-.75-.25*(-i-r+2*d)/(i-r)]);break;case 5:c.push([e-.5-.5*(n+r+a+i-4*d)/(r-n+i-a),t-.5]);break;case 6:c.push([e-.5-.25*(-n-r+a+i)/(n-r+i-a),t-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:c.push([e-.75-.25*(a+i-2*d)/(i-a),t-.75-.25*(a+n-2*d)/(n-a)]);break;case 8:c.push([e-.75-.25*(-a-i+2*d)/(a-i),t-.75-.25*(-a-n+2*d)/(a-n)]);break;case 9:c.push([e-.5-.25*(n+r+-a-i)/(r-n+a-i),t-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:c.push([e-.5-.5*(-n-r-a-i+4*d)/(n-r+a-i),t-.5]);break;case 11:c.push([e-.25-.25*(-a-i+2*d)/(a-i),t-.75-.25*(i+r-2*d)/(r-i)]);break;case 12:c.push([e-.5,t-.5-.5*(-i-r-a-n+4*d)/(i-r+a-n)]);break;case 13:c.push([e-.75-.25*(n+r-2*d)/(r-n),t-.25-.25*(-a-n+2*d)/(a-n)]);break;case 14:c.push([e-.25-.25*(-n-r+2*d)/(n-r),t-.25-.25*(-i-r+2*d)/(i-r)])}},cell:function(e,t,r,n,i,a,o,s,l){i?s.push([e,t]):s.push([t,e])}});return function(e,t){var r=[],i=[];return n(e,r,i,t),{positions:r,cells:i}}}},o={}},529:function(e,t,r){"use strict";e.exports=function e(t,r,n){var a=(n=n||{}).fontStyle||"normal",s=n.fontWeight||"normal",l=n.fontVariant||"normal",u=[a,s,l,t].join("_"),c=o[u];c||(c=o[u]={" ":{data:new Float32Array(0),shape:.2}});var f=c[r];if(!f)if(r.length<=1||!/\d/.test(r))f=c[r]=function(e){for(var t=e.cells,r=e.positions,n=new Float32Array(6*t.length),i=0,a=0,o=0;o0&&(v+=.02);var g=new Float32Array(p),y=0,x=-.5*v;for(m=0;mMath.max(r,n)?i[2]=1:r>Math.max(t,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=e[l]*e[l],o+=i[l]*e[l];for(l=0;l<3;++l)i[l]-=o/a*e[l];return s(i,i),i}function d(e,t,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}var h=d.prototype;h.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},h.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},h.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=t[a]*r[a],n+=t[a]*t[a];var l=Math.sqrt(n),c=0;for(a=0;a<3;++a)r[a]-=t[a]*i/n,c+=r[a]*r[a],t[a]/=l;var f=Math.sqrt(c);for(a=0;a<3;++a)r[a]/=f;var d=this.computedToward;o(d,t,r),s(d,d);var h=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],v=this.computedAngle[1],m=Math.cos(p),g=Math.sin(p),y=Math.cos(v),x=Math.sin(v),b=this.computedCenter,_=m*y,w=g*y,k=x,T=-m*x,A=-g*x,M=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var C=_*r[a]+w*d[a]+k*t[a];E[4*a+1]=T*r[a]+A*d[a]+M*t[a],E[4*a+2]=C,E[4*a+3]=0}var L=E[1],P=E[5],O=E[9],I=E[2],R=E[6],D=E[10],z=P*D-O*R,F=O*I-L*D,N=L*R-P*I,B=u(z,F,N);for(z/=B,F/=B,N/=B,E[0]=z,E[4]=F,E[8]=N,a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*h;for(a=0;a<3;++a){c=0;for(var j=0;j<3;++j)c+=E[a+4*j]*S[j];E[12+a]=-c}E[15]=1},h.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r};var p=[0,0,0];h.rotate=function(e,t,r,n){if(this.angle.move(e,t,r),n){this.recalcMatrix(e);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,u=0;u<3;++u)i[4*u]=o[u],i[4*u+1]=s[u],i[4*u+2]=l[u];for(a(i,i,n,p),u=0;u<3;++u)o[u]=i[4*u],s[u]=i[4*u+1];this.up.set(e,o[0],o[1],o[2]),this.right.set(e,s[0],s[1],s[2])}},h.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=u(a,o,s);a/=l,o/=l,s/=l;var c=i[0],f=i[4],d=i[8],h=c*a+f*o+d*s,p=u(c-=a*h,f-=o*h,d-=s*h),v=(c/=p)*t+a*r,m=(f/=p)*t+o*r,g=(d/=p)*t+s*r;this.center.move(e,v,m,g);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(e,Math.log(y))},h.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},h.setMatrix=function(e,t,r,n){var a=1;"number"===typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var s=t[a],l=t[a+4],f=t[a+8];if(n){var d=Math.abs(s),h=Math.abs(l),p=Math.abs(f),v=Math.max(d,h,p);d===v?(s=s<0?-1:1,l=f=0):p===v?(f=f<0?-1:1,s=l=0):(l=l<0?-1:1,s=f=0)}else{var m=u(s,l,f);s/=m,l/=m,f/=m}var g,y,x=t[o],b=t[o+4],_=t[o+8],w=x*s+b*l+_*f,k=u(x-=s*w,b-=l*w,_-=f*w),T=l*(_/=k)-f*(b/=k),A=f*(x/=k)-s*_,M=s*b-l*x,S=u(T,A,M);if(T/=S,A/=S,M/=S,this.center.jump(e,H,G,W),this.radius.idle(e),this.up.jump(e,s,l,f),this.right.jump(e,x,b,_),2===a){var E=t[1],C=t[5],L=t[9],P=E*x+C*b+L*_,O=E*T+C*A+L*M;g=z<0?-Math.PI/2:Math.PI/2,y=Math.atan2(O,P)}else{var I=t[2],R=t[6],D=t[10],z=I*s+R*l+D*f,F=I*x+R*b+D*_,N=I*T+R*A+D*M;g=Math.asin(c(z)),y=Math.atan2(N,F)}this.angle.jump(e,y,g),this.recalcMatrix(e);var B=t[2],j=t[6],U=t[10],q=this.computedMatrix;i(q,t);var V=q[15],H=q[12]/V,G=q[13]/V,W=q[14]/V,Y=Math.exp(this.computedRadius[0]);this.center.jump(e,H-B*Y,G-j*Y,W-U*Y)},h.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},h.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},h.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},h.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},h.lookAt=function(e,t,r,n){this.recalcMatrix(e),t=t||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=u(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=t[0]-r[0],f=t[1]-r[1],d=t[2]-r[2],h=u(l,f,d);if(!(h<1e-6)){l/=h,f/=h,d/=h;var p=this.computedRight,v=p[0],m=p[1],g=p[2],y=i*v+a*m+o*g,x=u(v-=y*i,m-=y*a,g-=y*o);if(!(x<.01&&(x=u(v=a*d-o*f,m=o*l-i*d,g=i*f-a*l))<1e-6)){v/=x,m/=x,g/=x,this.up.set(e,i,a,o),this.right.set(e,v,m,g),this.center.set(e,r[0],r[1],r[2]),this.radius.set(e,Math.log(h));var b=a*g-o*m,_=o*v-i*g,w=i*m-a*v,k=u(b,_,w),T=i*l+a*f+o*d,A=v*l+m*f+g*d,M=(b/=k)*l+(_/=k)*f+(w/=k)*d,S=Math.asin(c(T)),E=Math.atan2(M,A),C=this.angle._state,L=C[C.length-1],P=C[C.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-E),I=Math.abs(L-E),R=Math.abs(L-2*Math.PI-E);O0?r.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(h(e),0,e)}function v(e){return new Uint16Array(h(2*e),0,e)}function m(e){return new Uint32Array(h(4*e),0,e)}function g(e){return new Int8Array(h(e),0,e)}function y(e){return new Int16Array(h(2*e),0,e)}function x(e){return new Int32Array(h(4*e),0,e)}function b(e){return new Float32Array(h(4*e),0,e)}function _(e){return new Float64Array(h(8*e),0,e)}function w(e){return o?new Uint8ClampedArray(h(e),0,e):p(e)}function k(e){return s?new BigUint64Array(h(8*e),0,e):null}function T(e){return l?new BigInt64Array(h(8*e),0,e):null}function A(e){return new DataView(h(e),0,e)}function M(e){e=n.nextPow2(e);var t=n.log2(e),r=f[t];return r.length>0?r.pop():new a(e)}t.free=function(e){if(a.isBuffer(e))f[n.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,r=0|n.log2(t);c[r].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){d(e.buffer)},t.freeArrayBuffer=d,t.freeBuffer=function(e){f[n.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return h(e);switch(t){case"uint8":return p(e);case"uint16":return v(e);case"uint32":return m(e);case"int8":return g(e);case"int16":return y(e);case"int32":return x(e);case"float":case"float32":return b(e);case"double":case"float64":return _(e);case"uint8_clamped":return w(e);case"bigint64":return T(e);case"biguint64":return k(e);case"buffer":return M(e);case"data":case"dataview":return A(e);default:return null}return null},t.mallocArrayBuffer=h,t.mallocUint8=p,t.mallocUint16=v,t.mallocUint32=m,t.mallocInt8=g,t.mallocInt16=y,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=b,t.mallocFloat64=t.mallocDouble=_,t.mallocUint8Clamped=w,t.mallocBigUint64=k,t.mallocBigInt64=T,t.mallocDataView=A,t.mallocBuffer=M,t.clearCache=function(){for(var e=0;e<32;++e)u.UINT8[e].length=0,u.UINT16[e].length=0,u.UINT32[e].length=0,u.INT8[e].length=0,u.INT16[e].length=0,u.INT32[e].length=0,u.FLOAT[e].length=0,u.DOUBLE[e].length=0,u.BIGUINT64[e].length=0,u.BIGINT64[e].length=0,u.UINT8C[e].length=0,c[e].length=0,f[e].length=0}},1755:function(e){"use strict";function t(e){this.roots=new Array(e),this.ranks=new Array(e);for(var t=0;t0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+"px",n.font].filter((function(e){return e})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",w(function(e,t,r,n,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(k=0;k-1?parseInt(e[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(F(),"?px "),M*=Math.pow(.75,l-s),n=n.replace("?px ",F())),A+=.25*C*(l-s)}if(!0===o.superscripts){var u=e.indexOf(p),f=r.indexOf(p),h=u>-1?parseInt(e[1+u]):0,v=f>-1?parseInt(r[1+f]):0;h!==v&&(n=n.replace(F(),"?px "),M*=Math.pow(.75,v-h),n=n.replace("?px ",F())),A-=.25*C*(v-h)}if(!0===o.bolds){var m=e.indexOf(c)>-1,y=r.indexOf(c)>-1;!m&&y&&(n=x?n.replace("italic ","italic bold "):"bold "+n),m&&!y&&(n=n.replace("bold ",""))}if(!0===o.italics){var x=e.indexOf(d)>-1,b=r.indexOf(d)>-1;!x&&b&&(n="italic "+n),x&&!b&&(n=n.replace("italic ",""))}t.font=n}for(w=0;w",a="",o=i.length,s=a.length,l=t[0]===p||t[0]===g,u=0,c=-s;u>-1&&-1!==(u=r.indexOf(i,u))&&-1!==(c=r.indexOf(a,u+o))&&!(c<=u);){for(var f=u;f=c)n[f]=null,r=r.substr(0,f)+" "+r.substr(f+1);else if(null!==n[f]){var d=n[f].indexOf(t[0]);-1===d?n[f]+=t:l&&(n[f]=n[f].substr(0,d+1)+(1+parseInt(n[f][d+1]))+n[f].substr(d+2))}var h=u+o,v=r.substr(h,c-h).indexOf(i);u=-1!==v?v:c+s}return n}function b(e,t){var r=n(e,128);return t?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function _(e,t,r,n){var i=b(e,n),a=function(e,t,r){for(var n=t.textAlign||"start",i=t.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=e.length,l=0;l=0?t[a]:i}))},has___:{value:x((function(t){var n=y(t);return n?r in n:e.indexOf(t)>=0}))},set___:{value:x((function(n,i){var a,o=y(n);return o?o[r]=i:(a=e.indexOf(n))>=0?t[a]=i:(a=e.length,t[a]=i,e[a]=n),this}))},delete___:{value:x((function(n){var i,a,o=y(n);return o?r in o&&delete o[r]:!((i=e.indexOf(n))<0)&&(a=e.length-1,e[i]=void 0,t[i]=t[a],e[i]=e[a],e.length=a,t.length=a,!0)}))}})};v.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"===typeof r?function(){function n(){this instanceof v||b();var e,n=new r,i=void 0,a=!1;return e=t?function(e,t){return n.set(e,t),n.has(e)||(i||(i=new v),i.set(e,t)),this}:function(e,t){if(a)try{n.set(e,t)}catch(r){i||(i=new v),i.set___(e,t)}else n.set(e,t);return this},Object.create(v.prototype,{get___:{value:x((function(e,t){return i?n.has(e)?n.get(e):i.get___(e,t):n.get(e,t)}))},has___:{value:x((function(e){return n.has(e)||!!i&&i.has___(e)}))},set___:{value:x(e)},delete___:{value:x((function(e){var t=!!n.delete(e);return i&&i.delete___(e)||t}))},permitHostObjects___:{value:x((function(e){if(e!==m)throw new Error("bogus call to permitHostObjects___");a=!0}))}})}t&&"undefined"!==typeof Proxy&&(Proxy=void 0),n.prototype=v.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!==typeof Proxy&&(Proxy=void 0),e.exports=v)}function m(e){e.permitHostObjects___&&e.permitHostObjects___(m)}function g(e){return!(e.substr(0,8)==l&&"___"===e.substr(e.length-3))}function y(e){if(e!==Object(e))throw new TypeError("Not an object: "+e);var t=e[u];if(t&&t.key===e)return t;if(s(e)){t={key:e};try{return o(e,u,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch(r){return}}}function x(e){return e.prototype=null,Object.freeze(e)}function b(){h||"undefined"===typeof console||(h=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(e,t,r){var n=r(8284);e.exports=function(){var e={};return function(t){if(("object"!==typeof t||null===t)&&"function"!==typeof t)throw new Error("Weakmap-shim: Key must be object");var r=t.valueOf(e);return r&&r.identity===e?r:n(t,e)}}},8284:function(e){e.exports=function(e,t){var r={identity:t},n=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?n.apply(this,arguments):r},writable:!0}),r}},606:function(e,t,r){var n=r(236);e.exports=function(){var e=n();return{get:function(t,r){var n=e(t);return n.hasOwnProperty("value")?n.value:r},set:function(t,r){return e(t).value=r,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},3349:function(e){"use strict";var t=function(){return function(e,t,r,n,i,a){var o=e[0],s=r[0],l=[0],u=s;n|=0;var c=0,f=s;for(c=0;c=0!==h>=0&&i.push(l[0]+.5+.5*(d+h)/(d-h)),n+=f,++l[0]}}};e.exports=function(e){return r={funcName:e.funcName},function(e){var t={};return function(r,n,i){var a=r.dtype,o=r.order,s=[a,o.join()].join(),l=t[s];return l||(t[s]=l=e([a,o])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(t.bind(void 0,r));var r}({funcName:"zeroCrossings"})},781:function(e,t,r){"use strict";e.exports=function(e,t){var r=[];return t=+t||0,n(e.hi(e.shape[0]-1),r,t),r};var n=r(3349)},7790:function(){}},r={};function i(e){var n=r[e];if(void 0!==n)return n.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var a=i(1964);e.exports=a}()},33576:function(e,t,r){"use strict";function n(e,t){for(var r=0;rh)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,v.prototype),t}function v(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return y(e)}return m(e,t,r)}function m(e,t,r){if("string"===typeof e)return function(e,t){if("string"===typeof t&&""!==t||(t="utf8"),!v.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|w(e,t),n=p(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(re(e,Uint8Array)){var t=new Uint8Array(e);return b(t.buffer,t.byteOffset,t.byteLength)}return x(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+u(e));if(re(e,ArrayBuffer)||e&&re(e.buffer,ArrayBuffer))return b(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(re(e,SharedArrayBuffer)||e&&re(e.buffer,SharedArrayBuffer)))return b(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return v.from(n,t,r);var i=function(e){if(v.isBuffer(e)){var t=0|_(e.length),r=p(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!==typeof e.length||ne(e.length)?p(0):x(e):"Buffer"===e.type&&Array.isArray(e.data)?x(e.data):void 0}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return v.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+u(e))}function g(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function y(e){return g(e),p(e<0?0:0|_(e))}function x(e){for(var t=e.length<0?0:0|_(e.length),r=p(t),n=0;n=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return 0|e}function w(e,t){if(v.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||re(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+u(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ee(e).length;default:if(i)return n?-1:Q(e).length;t=(""+t).toLowerCase(),i=!0}}function k(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return F(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return D(this,t,r);case"latin1":case"binary":return z(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function T(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function A(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),ne(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=v.from(t,n)),v.isBuffer(t))return 0===t.length?-1:M(e,t,r,n,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):M(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function M(e,t,r,n,i){var a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,d=0;di&&(n=i):n=i;var a,o=t.length;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:a>223?3:a>191?2:1;if(i+s<=r){var l=void 0,u=void 0,c=void 0,f=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:128===(192&(l=e[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(f=(15&a)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(f=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn.length?(v.isBuffer(a)||(a=v.from(a)),a.copy(n,i)):Uint8Array.prototype.set.call(n,a,i);else{if(!v.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i)}i+=a.length}return n},v.byteLength=w,v.prototype._isBuffer=!0,v.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},d&&(v.prototype[d]=v.prototype.inspect),v.prototype.compare=function(e,t,r,n,i){if(re(e,Uint8Array)&&(e=v.from(e,e.offset,e.byteLength)),!v.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+u(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),l=this.slice(n,i),c=e.slice(t,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return C(this,e,t,r);case"base64":return L(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function D(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,a){if(!v.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function U(e,t,r,n,i){X(t,n,i,e,r,7);var a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function q(e,t,r,n,i){X(t,n,i,e,r,7);var a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function V(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function H(e,t,r,n,i){return t=+t,r>>>=0,i||V(e,0,r,4),f.write(e,t,r,n,23,4),r+4}function G(e,t,r,n,i){return t=+t,r>>>=0,i||V(e,0,r,8),f.write(e,t,r,n,52,8),r+8}v.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,a=0;++a>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},v.prototype.readUint8=v.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},v.prototype.readBigUInt64LE=ae((function(e){K(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);var n=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),i=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);var n=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],i=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},v.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},v.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},v.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},v.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},v.prototype.readBigInt64LE=ae((function(e){K(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);var n=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);var n=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(n)<>>=0,t||B(e,4,this.length),f.read(this,e,!0,23,4)},v.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),f.read(this,e,!1,23,4)},v.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),f.read(this,e,!0,52,8)},v.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),f.read(this,e,!1,52,8)},v.prototype.writeUintLE=v.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},v.prototype.writeUint8=v.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},v.prototype.writeBigUInt64LE=ae((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),v.prototype.writeBigUInt64BE=ae((function(e){return q(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),v.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},v.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},v.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},v.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},v.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},v.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},v.prototype.writeBigInt64LE=ae((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),v.prototype.writeBigInt64BE=ae((function(e){return q(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),v.prototype.writeFloatLE=function(e,t,r){return H(this,e,t,!0,r)},v.prototype.writeFloatBE=function(e,t,r){return H(this,e,t,!1,r)},v.prototype.writeDoubleLE=function(e,t,r){return G(this,e,t,!0,r)},v.prototype.writeDoubleBE=function(e,t,r){return G(this,e,t,!1,r)},v.prototype.copy=function(e,t,r,n){if(!v.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(a=t;a=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function X(e,t,r,n,i,a){if(e>r||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(a+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(a+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(a+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(r).concat(s),new W.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){K(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||J(t,e.length-(r+1))}(n,i,a)}function K(e,t){if("number"!==typeof e)throw new W.ERR_INVALID_ARG_TYPE(t,"number",e)}function J(e,t,r){if(Math.floor(e)!==e)throw K(e,r),new W.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}Y("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),Y("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(u(t))}),TypeError),Y("ERR_OUT_OF_RANGE",(function(e,t,r){var n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=Z(String(r)):"bigint"===typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=Z(i)),i+="n"),n+=" It must be ".concat(t,". Received ").concat(i)}),RangeError);var $=/[^+/0-9A-Za-z-_]/g;function Q(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function ee(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function te(e,t,r,n){var i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function re(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function ne(e){return e!==e}var ie=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}();function ae(e){return"undefined"===typeof BigInt?oe:e}function oe(){throw new Error("BigInt not supported")}},25928:function(e){"use strict";e.exports=i,e.exports.isMobile=i,e.exports.default=i;var t=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(e){e||(e={});var i=e.ua;if(i||"undefined"===typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"===typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!==typeof i)return!1;var a=t.test(i)&&!r.test(i)||!!e.tablet&&n.test(i);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(a=!0),a}},48932:function(e,t,r){"use strict";r.r(t),r.d(t,{sankeyCenter:function(){return d},sankeyCircular:function(){return L},sankeyJustify:function(){return f},sankeyLeft:function(){return u},sankeyRight:function(){return c}});var n=r(84706),i=r(34712),a=r(10132),o=r(6688),s=r.n(o);function l(e){return e.target.depth}function u(e){return e.depth}function c(e,t){return t-1-e.height}function f(e,t){return e.sourceLinks.length?e.depth:t-1}function d(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?(0,n.SY)(e.sourceLinks,l)-1:0}function h(e){return function(){return e}}var p="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function v(e,t){return g(e.source,t.source)||e.index-t.index}function m(e,t){return g(e.target,t.target)||e.index-t.index}function g(e,t){return e.partOfCycle===t.partOfCycle?e.y0-t.y0:"top"===e.circularLinkType||"bottom"===t.circularLinkType?-1:1}function y(e){return e.value}function x(e){return(e.y0+e.y1)/2}function b(e){return x(e.source)}function _(e){return x(e.target)}function w(e){return e.index}function k(e){return e.nodes}function T(e){return e.links}function A(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function M(e,t){return t(e)}var S=25,E=10,C=.3;function L(){var e,t,r=0,a=0,o=1,l=1,u=24,c=w,d=f,M=k,L=T,O=32,R=2,D=null;function F(){var f={nodes:M.apply(null,arguments),links:L.apply(null,arguments)};!function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=(0,i.kH)(e.nodes,c);e.links.forEach((function(e,r){e.index=r;var n=e.source,i=e.target;"object"!==("undefined"===typeof n?"undefined":p(n))&&(n=e.source=A(t,n)),"object"!==("undefined"===typeof i?"undefined":p(i))&&(i=e.target=A(t,i)),n.sourceLinks.push(e),i.targetLinks.push(e)}))}(f),function(e,t,r){var n=0;if(null===r){for(var i=[],a=0;a0;--p)m(h*=.99,f),w();function v(i){if(t){var c=1/0;d.forEach((function(e){var r=l*t/(e.length+1);c=r0?t+S+E:t,bottom:r=r>0?r+S+E:r,left:a=a>0?a+S+E:a,right:i=i>0?i+S+E:i}}(s),p=function(e,t){var i=(0,n.kv)(e.nodes,(function(e){return e.column})),s=o-r,c=l-a,f=s+t.right+t.left,d=c+t.top+t.bottom,h=s/f,p=c/d;return r=r*h+t.left,o=0==t.right?o:o*h,a=a*p+t.top,l*=p,e.nodes.forEach((function(e){e.x0=r+e.column*((o-r-u)/i),e.x1=e.x0+u})),p}(s,h);f*=p,s.links.forEach((function(e){e.width=e.value*f})),d.forEach((function(e){var t=e.length;e.forEach((function(e,r){e.depth==d.length-1&&1==t||0==e.depth&&1==t?(e.y0=l/2-e.value*f,e.y1=e.y0+e.value*f):e.partOfCycle?0==I(e,i)?(e.y0=l/2+r,e.y1=e.y0+e.value*f):"top"==e.circularLinkType?(e.y0=a+r,e.y1=e.y0+e.value*f):(e.y0=l-e.value*f-r,e.y1=e.y0+e.value*f):0==h.top||0==h.bottom?(e.y0=(l-a)/t*r,e.y1=e.y0+e.value*f):(e.y0=(l-a)/2-t/2+r,e.y1=e.y0+e.value*f)}))}))}function m(e,t){var r=d.length;d.forEach((function(i){var a=i.length,o=i[0].depth;i.forEach((function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&I(i,t)>0);else if(0==o&&1==a)s=i.y1-i.y0,i.y0=l/2-s/2,i.y1=l/2+s/2;else if(o==r-1&&1==a)s=i.y1-i.y0,i.y0=l/2-s/2,i.y1=l/2+s/2;else{var u=(0,n.mo)(i.sourceLinks,_),c=(0,n.mo)(i.targetLinks,b),f=((u&&c?(u+c)/2:u||c)-x(i))*e;i.y0+=f,i.y1+=f}}))}))}function w(){d.forEach((function(t){var r,n,i,o=a,s=t.length;for(t.sort(g),i=0;i0&&(r.y0+=n,r.y1+=n),o=r.y1+e;if((n=o-e-l)>0)for(o=r.y0-=n,r.y1-=n,i=s-2;i>=0;--i)(n=(r=t[i]).y1+e-o)>0&&(r.y0-=n,r.y1-=n),o=r.y0}))}}(f,O,c),N(f);for(var h=0;h<4;h++)Z(f,l,c),X(f,0,c),W(f,a,l,c),Z(f,l,c),X(f,0,c);return function(e,t,r){var i=e.nodes,a=e.links,o=!1,s=!1;if(a.forEach((function(e){"top"==e.circularLinkType?o=!0:"bottom"==e.circularLinkType&&(s=!0)})),0==o||0==s){var l=(0,n.SY)(i,(function(e){return e.y0})),u=(r-t)/((0,n.kv)(i,(function(e){return e.y1}))-l);i.forEach((function(e){var t=(e.y1-e.y0)*u;e.y0=(e.y0-l)*u,e.y1=e.y0+t})),a.forEach((function(e){e.y0=(e.y0-l)*u,e.y1=(e.y1-l)*u,e.width=e.width*u}))}}(f,a,l),z(f,R,l,c),f}function N(e){e.nodes.forEach((function(e){e.sourceLinks.sort(m),e.targetLinks.sort(v)})),e.nodes.forEach((function(e){var t=e.y0,r=t,n=e.y1,i=n;e.sourceLinks.forEach((function(e){e.circular?(e.y0=n-e.width/2,n-=e.width):(e.y0=t+e.width/2,t+=e.width)})),e.targetLinks.forEach((function(e){e.circular?(e.y1=i-e.width/2,i-=e.width):(e.y1=r+e.width/2,r+=e.width)}))}))}return F.nodeId=function(e){return arguments.length?(c="function"===typeof e?e:h(e),F):c},F.nodeAlign=function(e){return arguments.length?(d="function"===typeof e?e:h(e),F):d},F.nodeWidth=function(e){return arguments.length?(u=+e,F):u},F.nodePadding=function(t){return arguments.length?(e=+t,F):e},F.nodes=function(e){return arguments.length?(M="function"===typeof e?e:h(e),F):M},F.links=function(e){return arguments.length?(L="function"===typeof e?e:h(e),F):L},F.size=function(e){return arguments.length?(r=a=0,o=+e[0],l=+e[1],F):[o-r,l-a]},F.extent=function(e){return arguments.length?(r=+e[0][0],o=+e[1][0],a=+e[0][1],l=+e[1][1],F):[[r,a],[o,l]]},F.iterations=function(e){return arguments.length?(O=+e,F):O},F.circularLinkGap=function(e){return arguments.length?(R=+e,F):R},F.nodePaddingRatio=function(e){return arguments.length?(t=+e,F):t},F.sortNodes=function(e){return arguments.length?(D=e,F):D},F.update=function(e){return P(e,c),N(e),e.links.forEach((function(e){e.circular&&(e.circularLinkType=e.y0+e.y11||i>1)}function D(e,t,r){return e.sort(F),e.forEach((function(n,i){var a,o,s=0;if($(n,r)&&R(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;lo.source.column)){var u=e[l].circularPathData.verticalBuffer+e[l].width/2+t;s=u>s?u:s}n.circularPathData.verticalBuffer=s+n.width/2}})),e}function z(e,t,r,i){var o=(0,n.SY)(e.links,(function(e){return e.source.y0}));e.links.forEach((function(e){e.circular&&(e.circularPathData={})})),D(e.links.filter((function(e){return"top"==e.circularLinkType})),t,i),D(e.links.filter((function(e){return"bottom"==e.circularLinkType})),t,i),e.links.forEach((function(n){if(n.circular){if(n.circularPathData.arcRadius=n.width+E,n.circularPathData.leftNodeBuffer=5,n.circularPathData.rightNodeBuffer=5,n.circularPathData.sourceWidth=n.source.x1-n.source.x0,n.circularPathData.sourceX=n.source.x0+n.circularPathData.sourceWidth,n.circularPathData.targetX=n.target.x0,n.circularPathData.sourceY=n.y0,n.circularPathData.targetY=n.y1,$(n,i)&&R(n))n.circularPathData.leftSmallArcRadius=E+n.width/2,n.circularPathData.leftLargeArcRadius=E+n.width/2,n.circularPathData.rightSmallArcRadius=E+n.width/2,n.circularPathData.rightLargeArcRadius=E+n.width/2,"bottom"==n.circularLinkType?(n.circularPathData.verticalFullExtent=n.source.y1+S+n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.rightLargeArcRadius):(n.circularPathData.verticalFullExtent=n.source.y0-S-n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.rightLargeArcRadius);else{var s=n.source.column,l=n.circularLinkType,u=e.links.filter((function(e){return e.source.column==s&&e.circularLinkType==l}));"bottom"==n.circularLinkType?u.sort(B):u.sort(N);var c=0;u.forEach((function(e,r){e.circularLinkID==n.circularLinkID&&(n.circularPathData.leftSmallArcRadius=E+n.width/2+c,n.circularPathData.leftLargeArcRadius=E+n.width/2+r*t+c),c+=e.width})),s=n.target.column,u=e.links.filter((function(e){return e.target.column==s&&e.circularLinkType==l})),"bottom"==n.circularLinkType?u.sort(U):u.sort(j),c=0,u.forEach((function(e,r){e.circularLinkID==n.circularLinkID&&(n.circularPathData.rightSmallArcRadius=E+n.width/2+c,n.circularPathData.rightLargeArcRadius=E+n.width/2+r*t+c),c+=e.width})),"bottom"==n.circularLinkType?(n.circularPathData.verticalFullExtent=Math.max(r,n.source.y1,n.target.y1)+S+n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.rightLargeArcRadius):(n.circularPathData.verticalFullExtent=o-S-n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.rightLargeArcRadius)}n.circularPathData.leftInnerExtent=n.circularPathData.sourceX+n.circularPathData.leftNodeBuffer,n.circularPathData.rightInnerExtent=n.circularPathData.targetX-n.circularPathData.rightNodeBuffer,n.circularPathData.leftFullExtent=n.circularPathData.sourceX+n.circularPathData.leftLargeArcRadius+n.circularPathData.leftNodeBuffer,n.circularPathData.rightFullExtent=n.circularPathData.targetX-n.circularPathData.rightLargeArcRadius-n.circularPathData.rightNodeBuffer}if(n.circular)n.path=function(e){return"top"==e.circularLinkType?"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 0 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY-e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 0 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 0 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY-e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 0 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY:"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 1 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY+e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 1 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 1 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY+e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 1 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY}(n);else{var f=(0,a.ak)().source((function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]})).target((function(e){return[e.target.x0,e.y1]}));n.path=f(n)}}))}function F(e,t){return q(e)==q(t)?"bottom"==e.circularLinkType?B(e,t):N(e,t):q(t)-q(e)}function N(e,t){return e.y0-t.y0}function B(e,t){return t.y0-e.y0}function j(e,t){return e.y1-t.y1}function U(e,t){return t.y1-e.y1}function q(e){return e.target.column-e.source.column}function V(e){return e.target.x0-e.source.x1}function H(e,t){var r=O(e),n=V(t)/Math.tan(r);return"up"==J(e)?e.y1+n:e.y1-n}function G(e,t){var r=O(e),n=V(t)/Math.tan(r);return"up"==J(e)?e.y1-n:e.y1+n}function W(e,t,r,n){e.links.forEach((function(i){if(!i.circular&&i.target.column-i.source.column>1){var a=i.source.column+1,o=i.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)e.nodes.forEach((function(o){if(o.column==a){var u,c=s/(l+1),f=Math.pow(1-c,3),d=3*c*Math.pow(1-c,2),h=3*Math.pow(c,2)*(1-c),p=Math.pow(c,3),v=f*i.y0+d*i.y0+h*i.y1+p*i.y1,m=v-i.width/2,g=v+i.width/2;m>o.y0&&ma.y0&&i.y0a.y0&&i.y1a.y1)&&Y(e,u,t,r)}))):(g>o.y0&&go.y1)&&(u=g-o.y0+10,o=Y(o,u,t,r),e.nodes.forEach((function(e){M(e,n)!=M(o,n)&&e.column==o.column&&e.y0o.y1&&Y(e,u,t,r)})))}}))}}))}function Y(e,t,r,n){return e.y0+t>=r&&e.y1+t<=n&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach((function(e){e.y1=e.y1+t})),e.sourceLinks.forEach((function(e){e.y0=e.y0+t}))),e}function Z(e,t,r,n){e.nodes.forEach((function(i){n&&i.y+(i.y1-i.y0)>t&&(i.y=i.y-(i.y+(i.y1-i.y0)-t));var a=e.links.filter((function(e){return M(e.source,r)==M(i,r)})),o=a.length;o>1&&a.sort((function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(!K(e,t))return e.y1-t.y1;if(e.target.column>t.target.column){var r=G(t,e);return e.y1-r}if(t.target.column>e.target.column)return G(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0}));var s=i.y0;a.forEach((function(e){e.y0=s+e.width/2,s+=e.width})),a.forEach((function(e,t){if("bottom"==e.circularLinkType){for(var r=t+1,n=0;r1&&n.sort((function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(!K(e,t))return e.y0-t.y0;if(t.source.column0?"up":"down"}function $(e,t){return M(e.source,t)==M(e.target,t)}},26800:function(e,t,r){"use strict";r.r(t),r.d(t,{sankey:function(){return w},sankeyCenter:function(){return u},sankeyJustify:function(){return l},sankeyLeft:function(){return o},sankeyLinkHorizontal:function(){return M},sankeyRight:function(){return s}});var n=r(84706),i=r(34712);function a(e){return e.target.depth}function o(e){return e.depth}function s(e,t){return t-1-e.height}function l(e,t){return e.sourceLinks.length?e.depth:t-1}function u(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?(0,n.SY)(e.sourceLinks,a)-1:0}function c(e){return function(){return e}}function f(e,t){return h(e.source,t.source)||e.index-t.index}function d(e,t){return h(e.target,t.target)||e.index-t.index}function h(e,t){return e.y0-t.y0}function p(e){return e.value}function v(e){return(e.y0+e.y1)/2}function m(e){return v(e.source)*e.value}function g(e){return v(e.target)*e.value}function y(e){return e.index}function x(e){return e.nodes}function b(e){return e.links}function _(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function w(){var e=0,t=0,r=1,a=1,o=24,s=8,u=y,w=l,k=x,T=b,A=32,M=2/3;function S(){var l={nodes:k.apply(null,arguments),links:T.apply(null,arguments)};return function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=(0,i.kH)(e.nodes,u);e.links.forEach((function(e,r){e.index=r;var n=e.source,i=e.target;"object"!==typeof n&&(n=e.source=_(t,n)),"object"!==typeof i&&(i=e.target=_(t,i)),n.sourceLinks.push(e),i.targetLinks.push(e)}))}(l),function(e){e.nodes.forEach((function(e){e.value=Math.max((0,n.oh)(e.sourceLinks,p),(0,n.oh)(e.targetLinks,p))}))}(l),function(t){var n,i,a;for(n=t.nodes,i=[],a=0;n.length;++a,n=i,i=[])n.forEach((function(e){e.depth=a,e.sourceLinks.forEach((function(e){i.indexOf(e.target)<0&&i.push(e.target)}))}));for(n=t.nodes,i=[],a=0;n.length;++a,n=i,i=[])n.forEach((function(e){e.height=a,e.targetLinks.forEach((function(e){i.indexOf(e.source)<0&&i.push(e.source)}))}));var s=(r-e-o)/(a-1);t.nodes.forEach((function(t){t.x1=(t.x0=e+Math.max(0,Math.min(a-1,Math.floor(w.call(null,t,a))))*s)+o}))}(l),function(e){var r=(0,i.UJ)().key((function(e){return e.x0})).sortKeys(n.XE).entries(e.nodes).map((function(e){return e.values}));u(),d();for(var o=1,l=A;l>0;--l)f(o*=.99),d(),c(o),d();function u(){var i=(0,n.kv)(r,(function(e){return e.length})),o=M*(a-t)/(i-1);s>o&&(s=o);var l=(0,n.SY)(r,(function(e){return(a-t-(e.length-1)*s)/(0,n.oh)(e,p)}));r.forEach((function(e){e.forEach((function(e,t){e.y1=(e.y0=t)+e.value*l}))})),e.links.forEach((function(e){e.width=e.value*l}))}function c(e){r.forEach((function(t){t.forEach((function(t){if(t.targetLinks.length){var r=((0,n.oh)(t.targetLinks,m)/(0,n.oh)(t.targetLinks,p)-v(t))*e;t.y0+=r,t.y1+=r}}))}))}function f(e){r.slice().reverse().forEach((function(t){t.forEach((function(t){if(t.sourceLinks.length){var r=((0,n.oh)(t.sourceLinks,g)/(0,n.oh)(t.sourceLinks,p)-v(t))*e;t.y0+=r,t.y1+=r}}))}))}function d(){r.forEach((function(e){var r,n,i,o=t,l=e.length;for(e.sort(h),i=0;i0&&(r.y0+=n,r.y1+=n),o=r.y1+s;if((n=o-s-a)>0)for(o=r.y0-=n,r.y1-=n,i=l-2;i>=0;--i)(n=(r=e[i]).y1+s-o)>0&&(r.y0-=n,r.y1-=n),o=r.y0}))}}(l),E(l),l}function E(e){e.nodes.forEach((function(e){e.sourceLinks.sort(d),e.targetLinks.sort(f)})),e.nodes.forEach((function(e){var t=e.y0,r=t;e.sourceLinks.forEach((function(e){e.y0=t+e.width/2,t+=e.width})),e.targetLinks.forEach((function(e){e.y1=r+e.width/2,r+=e.width}))}))}return S.update=function(e){return E(e),e},S.nodeId=function(e){return arguments.length?(u="function"===typeof e?e:c(e),S):u},S.nodeAlign=function(e){return arguments.length?(w="function"===typeof e?e:c(e),S):w},S.nodeWidth=function(e){return arguments.length?(o=+e,S):o},S.nodePadding=function(e){return arguments.length?(s=+e,S):s},S.nodes=function(e){return arguments.length?(k="function"===typeof e?e:c(e),S):k},S.links=function(e){return arguments.length?(T="function"===typeof e?e:c(e),S):T},S.size=function(n){return arguments.length?(e=t=0,r=+n[0],a=+n[1],S):[r-e,a-t]},S.extent=function(n){return arguments.length?(e=+n[0][0],r=+n[1][0],t=+n[0][1],a=+n[1][1],S):[[e,t],[r,a]]},S.iterations=function(e){return arguments.length?(A=+e,S):A},S}var k=r(10132);function T(e){return[e.source.x1,e.y0]}function A(e){return[e.target.x0,e.y1]}function M(){return(0,k.ak)().source(T).target(A)}},33428:function(e,t,r){var n,i;(function(){var a={version:"3.8.2"},o=[].slice,s=function(e){return o.call(e)},l=self.document;function u(e){return e&&(e.ownerDocument||e.document||e).documentElement}function c(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(ga){s=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}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(ya){var f=this.Element.prototype,d=f.setAttribute,h=f.setAttributeNS,p=this.CSSStyleDeclaration.prototype,v=p.setProperty;f.setAttribute=function(e,t){d.call(this,e,t+"")},f.setAttributeNS=function(e,t,r){h.call(this,e,t,r+"")},p.setProperty=function(e,t,r){v.call(this,e,t+"",r)}}function m(e,t){return et?1:e>=t?0:NaN}function g(e){return null===e?NaN:+e}function y(e){return!isNaN(e)}function x(e){return{left:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[a],r)<0?n=a+1:i=a}return n},right:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[a],r)>0?i=a:n=a+1}return n}}}a.ascending=m,a.descending=function(e,t){return te?1:t>=e?0:NaN},a.min=function(e,t){var r,n,i=-1,a=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},a.max=function(e,t){var r,n,i=-1,a=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},a.extent=function(e,t){var r,n,i,a=-1,o=e.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return o/(l-1)},a.deviation=function(){var e=a.variance.apply(this,arguments);return e?Math.sqrt(e):e};var b=x(m);function _(e){return e.length}a.bisectLeft=b.left,a.bisect=a.bisectRight=b.right,a.bisector=function(e){return x(1===e.length?function(t,r){return m(e(t),r)}:e)},a.shuffle=function(e,t,r){(a=arguments.length)<3&&(r=e.length,a<2&&(t=0));for(var n,i,a=r-t;a;)i=Math.random()*a--|0,n=e[a+t],e[a+t]=e[i+t],e[i+t]=n;return e},a.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},a.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],i=new Array(r<0?0:r);t=0;)for(t=(n=e[i]).length;--t>=0;)r[--o]=n[t];return r};var w=Math.abs;function k(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function T(){this._=Object.create(null)}a.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,i=[],a=function(e){for(var t=1;e*t%1;)t*=10;return t}(w(r)),o=-1;if(e*=a,t*=a,(r*=a)<0)for(;(n=e+r*++o)>t;)i.push(n/a);else for(;(n=e+r*++o)=n.length)return t?t.call(r,a):e?a.sort(e):a;for(var l,u,c,f,d=-1,h=a.length,p=n[s++],v=new T;++d=n.length)return e;var r=[],a=i[t++];return e.forEach((function(e,n){r.push({key:e,values:s(n,t)})})),a?r.sort((function(e,t){return a(e.key,t.key)})):r}return r.map=function(e,t){return o(t,e,0)},r.entries=function(e){return s(o(a.map,e,0),0)},r.key=function(e){return n.push(e),r},r.sortKeys=function(e){return i[n.length-1]=e,r},r.sortValues=function(t){return e=t,r},r.rollup=function(e){return t=e,r},r},a.set=function(e){var t=new R;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}},a.event=null,a.requote=function(e){return e.replace(G,"\\$&")};var G=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,W={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function Y(e){return W(e,J),e}var Z=function(e,t){return t.querySelector(e)},X=function(e,t){return t.querySelectorAll(e)},K=function(e,t){var r=e.matches||e[F(e,"matchesSelector")];return K=function(e,t){return r.call(e,t)},K(e,t)};"function"===typeof Sizzle&&(Z=function(e,t){return Sizzle(e,t)[0]||null},X=Sizzle,K=Sizzle.matchesSelector),a.selection=function(){return a.select(l.documentElement)};var J=a.selection.prototype=[];function $(e){return"function"===typeof e?e:function(){return Z(e,this)}}function Q(e){return"function"===typeof e?e:function(){return X(e,this)}}J.select=function(e){var t,r,n,i,a=[];e=$(e);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),te.hasOwnProperty(r)?{space:te[r],local:e}:e}},J.attr=function(e,t){if(arguments.length<2){if("string"===typeof e){var r=this.node();return(e=a.ns.qualify(e)).local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}for(t in e)this.each(re(t,e[t]));return this}return this.each(re(e,t))},J.classed=function(e,t){if(arguments.length<2){if("string"===typeof e){var r=this.node(),n=(e=ae(e)).length,i=-1;if(t=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},J.sort=function(e){e=pe.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(e=e.slice(0,i));var l=xe.get(e);function u(){var t=this[n];t&&(this.removeEventListener(e,t,t.$),delete this[n])}return l&&(e=l,o=_e),i?t?function(){var i=o(t,s(arguments));u.call(this),this.addEventListener(e,this[n]=i,i.$=r),i._=t}:u:t?B:function(){var t,r=new RegExp("^__on([^.]+)"+a.requote(e)+"$");for(var n in this)if(t=n.match(r)){var i=this[n];this.removeEventListener(t[1],i,i.$),delete this[n]}}}a.selection.enter=me,a.selection.enter.prototype=ge,ge.append=J.append,ge.empty=J.empty,ge.node=J.node,ge.call=J.call,ge.size=J.size,ge.select=function(e){for(var t,r,n,i,a,o=[],s=-1,l=this.length;++s=t&&(t=i+1);!(o=s[t])&&++t1?Ie:e<-1?-Ie:Math.asin(e)}function Fe(e){return((e=Math.exp(e))+1/e)/2}var Ne=Math.SQRT2;a.interpolateZoom=function(e,t){var r,n,i=e[0],a=e[1],o=e[2],s=t[0],l=t[1],u=t[2],c=s-i,f=l-a,d=c*c+f*f;if(d0&&(e=e.transition().duration(v)),e.call(w.event)}function S(){s&&s.domain(o.range().map((function(e){return(e-d.x)/d.k})).map(o.invert)),f&&f.domain(u.range().map((function(e){return(e-d.y)/d.k})).map(u.invert))}function E(e){m++||e({type:"zoomstart"})}function C(e){S(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function L(e){--m||(e({type:"zoomend"}),t=null)}function P(){var e=this,t=_.of(e,arguments),r=0,n=a.select(c(e)).on(y,(function(){r=1,A(a.mouse(e),i),C(t)})).on(x,(function(){n.on(y,null).on(x,null),o(r),L(t)})),i=k(a.mouse(e)),o=Te(e);$i.call(e),E(t)}function O(){var e,t=this,r=_.of(t,arguments),n={},o=0,s=".zoom-"+a.event.changedTouches[0].identifier,l="touchmove"+s,u="touchend"+s,c=[],f=a.select(t),h=Te(t);function p(){var r=a.touches(t);return e=d.k,r.forEach((function(e){e.identifier in n&&(n[e.identifier]=k(e))})),r}function v(){var e=a.event.target;a.select(e).on(l,m).on(u,y),c.push(e);for(var r=a.event.changedTouches,s=0,f=r.length;s1){g=h[0];var x=h[1],b=g[0]-x[0],_=g[1]-x[1];o=b*b+_*_}}function m(){var s,l,u,c,f=a.touches(t);$i.call(t);for(var d=0,h=f.length;d360?e-=360:e<0&&(e+=360),e<60?n+(i-n)*e/60:e<180?i:e<240?n+(i-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)-(i=r<=.5?r*(1+t):r+t-r*t),new ot(a(e+120),a(e),a(e-120))}function We(e,t,r){return this instanceof We?(this.h=+e,this.c=+t,void(this.l=+r)):arguments.length<2?e instanceof We?new We(e.h,e.c,e.l):rt(e instanceof Xe?e.l:(e=ht((e=a.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new We(e,t,r)}He.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ve(this.h,this.s,this.l/e)},He.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ve(this.h,this.s,e*this.l)},He.rgb=function(){return Ge(this.h,this.s,this.l)},a.hcl=We;var Ye=We.prototype=new qe;function Ze(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Xe(r,Math.cos(e*=Re)*t,Math.sin(e)*t)}function Xe(e,t,r){return this instanceof Xe?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Xe?new Xe(e.l,e.a,e.b):e instanceof We?Ze(e.h,e.c,e.l):ht((e=ot(e)).r,e.g,e.b):new Xe(e,t,r)}Ye.brighter=function(e){return new We(this.h,this.c,Math.min(100,this.l+Ke*(arguments.length?e:1)))},Ye.darker=function(e){return new We(this.h,this.c,Math.max(0,this.l-Ke*(arguments.length?e:1)))},Ye.rgb=function(){return Ze(this.h,this.c,this.l).rgb()},a.lab=Xe;var Ke=18,Je=.95047,$e=1,Qe=1.08883,et=Xe.prototype=new qe;function tt(e,t,r){var n=(e+16)/116,i=n+t/500,a=n-r/200;return new ot(at(3.2404542*(i=nt(i)*Je)-1.5371385*(n=nt(n)*$e)-.4985314*(a=nt(a)*Qe)),at(-.969266*i+1.8760108*n+.041556*a),at(.0556434*i-.2040259*n+1.0572252*a))}function rt(e,t,r){return e>0?new We(Math.atan2(r,t)*De,Math.sqrt(t*t+r*r),e):new We(NaN,NaN,e)}function nt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function it(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function at(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ot(e,t,r){return this instanceof ot?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof ot?new ot(e.r,e.g,e.b):ft(""+e,ot,Ge):new ot(e,t,r)}function st(e){return new ot(e>>16,e>>8&255,255&e)}function lt(e){return st(e)+""}et.brighter=function(e){return new Xe(Math.min(100,this.l+Ke*(arguments.length?e:1)),this.a,this.b)},et.darker=function(e){return new Xe(Math.max(0,this.l-Ke*(arguments.length?e:1)),this.a,this.b)},et.rgb=function(){return tt(this.l,this.a,this.b)},a.rgb=ot;var ut=ot.prototype=new qe;function ct(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ft(e,t,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(vt(i[0]),vt(i[1]),vt(i[2]))}return(a=mt.get(e))?t(a.r,a.g,a.b):(null==e||"#"!==e.charAt(0)||isNaN(a=parseInt(e.slice(1),16))||(4===e.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===e.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),t(o,s,l))}function dt(e,t,r){var n,i,a=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=e==o?(t-r)/s+(t0&&l<1?0:n),new Ve(n,i,l)}function ht(e,t,r){var n=it((.4124564*(e=pt(e))+.3575761*(t=pt(t))+.1804375*(r=pt(r)))/Je),i=it((.2126729*e+.7151522*t+.072175*r)/$e);return Xe(116*i-16,500*(n-i),200*(i-it((.0193339*e+.119192*t+.9503041*r)/Qe)))}function pt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}ut.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,i=30;return t||r||n?(t&&t=200&&t<300||304===t){try{e=r.call(i,u)}catch(ga){return void o.error.call(i,ga)}o.load.call(i,e)}else o.error.call(i,u)}return self.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(e)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=f:u.onreadystatechange=function(){u.readyState>3&&f()},u.onprogress=function(e){var t=a.event;a.event=e;try{o.progress.call(i,u)}finally{a.event=t}},i.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",i)},i.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",i):t},i.responseType=function(e){return arguments.length?(c=e,i):c},i.response=function(e){return r=e,i},["get","post"].forEach((function(e){i[e]=function(){return i.send.apply(i,[e].concat(s(arguments)))}})),i.send=function(r,n,a){if(2===arguments.length&&"function"===typeof n&&(a=n,n=null),u.open(r,e,!0),null==t||"accept"in l||(l.accept=t+",*/*"),u.setRequestHeader)for(var s in l)u.setRequestHeader(s,l[s]);return null!=t&&u.overrideMimeType&&u.overrideMimeType(t),null!=c&&(u.responseType=c),null!=a&&i.on("error",a).on("load",(function(e){a(null,e)})),o.beforesend.call(i,u),u.send(null==n?null:n),i},i.abort=function(){return u.abort(),i},a.rebind(i,o,"on"),null==n?i:i.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(n))}mt.forEach((function(e,t){mt.set(e,st(t))})),a.functor=gt,a.xhr=yt(D),a.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function i(e,r,n){arguments.length<3&&(n=r,r=null);var i=xt(e,t,null==r?a:o(r),n);return i.row=function(e){return arguments.length?i.response(null==(r=e)?a:o(e)):r},i}function a(e){return i.parse(e.responseText)}function o(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var r;return i.parseRows(e,(function(e,n){if(r)return r(e,n-1);var i=function(t){for(var r={},n=e.length,i=0;i=l)return o;if(i)return i=!1,a;var t=u;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(kt),kt=setTimeout(Mt,t)),wt=0):(wt=1,Tt(Mt))}function St(){for(var e=Date.now(),t=bt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Et(){for(var e,t=bt,r=1/0;t;)t.c?(t.t1&&(t=e[a[o-2]],r=e[a[o-1]],n=e[s],(r[0]-t[0])*(n[1]-t[1])-(r[1]-t[1])*(n[0]-t[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}function Ot(e,t){return e[0]-t[0]||e[1]-t[1]}a.timer=function(){At.apply(this,arguments)},a.timer.flush=function(){St(),Et()},a.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},a.geom={},a.geom.hull=function(e){var t=Ct,r=Lt;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,i=gt(t),a=gt(r),o=e.length,s=[],l=[];for(n=0;n=0;--n)h.push(e[s[u[n]][2]]);for(n=+f;nEe)s=s.L;else{if(!((i=a-Kt(s,o))>Ee)){n>-Ee?(t=s.P,r=s):i>-Ee?(t=s,r=s.N):t=r=s;break}if(!s.R){t=s;break}s=s.R}var l=Gt(e);if(Bt.insert(t,l),t||r){if(t===r)return tr(t),r=Gt(t.site),Bt.insert(l,r),l.edge=r.edge=ir(t.site,l.site),er(t),void er(r);if(r){tr(t),tr(r);var u=t.site,c=u.x,f=u.y,d=e.x-c,h=e.y-f,p=r.site,v=p.x-c,m=p.y-f,g=2*(d*m-h*v),y=d*d+h*h,x=v*v+m*m,b={x:(m*y-h*x)/g+c,y:(d*x-v*y)/g+f};or(r.edge,u,p,b),l.edge=ir(u,e,null,b),r.edge=ir(e,p,null,b),er(t),er(r)}else l.edge=ir(t.site,l.site)}}function Xt(e,t){var r=e.site,n=r.x,i=r.y,a=i-t;if(!a)return n;var o=e.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,u=l-t;if(!u)return s;var c=s-n,f=1/a-1/u,d=c/u;return f?(-d+Math.sqrt(d*d-2*f*(c*c/(-2*u)-l+u/2+i-a/2)))/f+n:(n+s)/2}function Kt(e,t){var r=e.N;if(r)return Xt(r,t);var n=e.site;return n.y===t?n.x:1/0}function Jt(e){this.site=e,this.edges=[]}function $t(e,t){return t.angle-e.angle}function Qt(){ur(this),this.x=this.y=this.arc=this.site=this.cy=null}function er(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,i=e.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,u=n.y-s,c=a.x-o,f=2*(l*(m=a.y-s)-u*c);if(!(f>=-Ce)){var d=l*l+u*u,h=c*c+m*m,p=(m*d-u*h)/f,v=(l*h-c*d)/f,m=v+s,g=Vt.pop()||new Qt;g.arc=e,g.site=i,g.x=p+o,g.y=m+Math.sqrt(p*p+v*v),g.cy=m,e.circle=g;for(var y=null,x=Ut._;x;)if(g.y=s)return;if(d>p){if(a){if(a.y>=u)return}else a={x:m,y:l};r={x:m,y:u}}else{if(a){if(a.y1)if(d>p){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x0)){if(t/=d,d<0){if(t0){if(t>f)return;t>c&&(c=t)}if(t=i-l,d||!(t<0)){if(t/=d,d<0){if(t>f)return;t>c&&(c=t)}else if(d>0){if(t0)){if(t/=h,h<0){if(t0){if(t>f)return;t>c&&(c=t)}if(t=a-u,h||!(t<0)){if(t/=h,h<0){if(t>f)return;t>c&&(c=t)}else if(h>0){if(t0&&(e.a={x:l+c*d,y:u+c*h}),f<1&&(e.b={x:l+f*d,y:u+f*h}),e}}}}}),l=o.length;l--;)(!rr(t=o[l],e)||!s(t)||w(t.a.x-t.b.x)Ee||w(i-r)>Ee)&&(s.splice(o,0,new sr(ar(a.site,c,w(n-f)Ee?{x:f,y:w(t-f)Ee?{x:w(r-p)Ee?{x:d,y:w(t-d)Ee?{x:w(r-h)=r&&u.x<=i&&u.y>=n&&u.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/Ee)*Ee,y:Math.round(i(e,t)/Ee)*Ee,i:t}}))}return o.links=function(e){return hr(s(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 hr(s(e)).cells.forEach((function(r,n){for(var i,a,o,s,l=r.site,u=r.edges.sort($t),c=-1,f=u.length,d=u[f-1].edge,h=d.l===l?d.r:d.l;++ca&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:_r(r,n)})),a=Tr.lastIndex;return av&&(v=l.x),l.y>m&&(m=l.y),u.push(l.x),c.push(l.y);else for(f=0;fv&&(v=x),b>m&&(m=b),u.push(x),c.push(b)}var _=v-h,k=m-p;function T(e,t,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var l=e.x,u=e.y;if(null!=l)if(w(l-r)+w(u-n)<.01)A(e,t,r,n,i,a,o,s);else{var c=e.point;e.x=e.y=e.point=null,A(e,c,l,u,i,a,o,s),A(e,t,r,n,i,a,o,s)}else e.x=r,e.y=n,e.point=t}else A(e,t,r,n,i,a,o,s)}function A(e,t,r,n,i,a,o,s){var l=.5*(i+o),u=.5*(a+s),c=r>=l,f=n>=u,d=f<<1|c;e.leaf=!1,c?i=l:o=l,f?a=u:s=u,T(e=e.nodes[d]||(e.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,i,a,o,s)}_>k?m=p+_:v=h+k;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){T(M,e,+g(e,++f),+y(e,f),h,p,v,m)},visit:function(e){yr(e,M,h,p,v,m)},find:function(e){return function(e,t,r,n,i,a,o){var s,l=1/0;return function e(u,c,f,d,h){if(!(c>a||f>o||d=_)<<1|t>=b,k=w+4;w=0&&!(r=a.interpolators[n](e,t)););return r}function Mr(e,t){var r,n=[],i=[],a=e.length,o=t.length,s=Math.min(e.length,t.length);for(r=0;r=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*Ie)}function zr(e){return Math.pow(2,10*(e-1))}function Fr(e){return 1-Math.sqrt(1-e*e)}function Nr(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 Br(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function jr(e){var t,r,n,i=[e.a,e.b],a=[e.c,e.d],o=qr(i),s=Ur(i,a),l=qr(((t=a)[0]+=(n=-s)*(r=i)[0],t[1]+=n*r[1],t))||0;i[0]*a[1]=0?e.slice(0,r):e,i=r>=0?e.slice(r+1):"in";return n=Er.get(n)||Sr,i=Cr.get(i)||D,t=i(n.apply(null,o.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},a.interpolateHcl=function(e,t){e=a.hcl(e),t=a.hcl(t);var r=e.h,n=e.c,i=e.l,o=t.h-r,s=t.c-n,l=t.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?t.c:n),isNaN(o)?(o=0,r=isNaN(r)?t.h:r):o>180?o-=360:o<-180&&(o+=360),function(e){return Ze(r+o*e,n+s*e,i+l*e)+""}},a.interpolateHsl=function(e,t){e=a.hsl(e),t=a.hsl(t);var r=e.h,n=e.s,i=e.l,o=t.h-r,s=t.s-n,l=t.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?t.s:n),isNaN(o)?(o=0,r=isNaN(r)?t.h:r):o>180?o-=360:o<-180&&(o+=360),function(e){return Ge(r+o*e,n+s*e,i+l*e)+""}},a.interpolateLab=function(e,t){e=a.lab(e),t=a.lab(t);var r=e.l,n=e.a,i=e.b,o=t.l-r,s=t.a-n,l=t.b-i;return function(e){return tt(r+o*e,n+s*e,i+l*e)+""}},a.interpolateRound=Br,a.transform=function(e){var t=l.createElementNS(a.ns.prefix.svg,"g");return(a.transform=function(e){if(null!=e){t.setAttribute("transform",e);var r=t.transform.baseVal.consolidate()}return new jr(r?r.matrix:Vr)})(e)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Vr={a:1,b:0,c:0,d:1,e:0,f:0};function Hr(e){return e.length?e.pop()+",":""}function Gr(e,t){var r=[],n=[];return e=a.transform(e),t=a.transform(t),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:_r(e[0],t[0])},{i:i-2,x:_r(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(e.translate,t.translate,r,n),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Hr(r)+"rotate(",null,")")-2,x:_r(e,t)})):t&&r.push(Hr(r)+"rotate("+t+")")}(e.rotate,t.rotate,r,n),function(e,t,r,n){e!==t?n.push({i:r.push(Hr(r)+"skewX(",null,")")-2,x:_r(e,t)}):t&&r.push(Hr(r)+"skewX("+t+")")}(e.skew,t.skew,r,n),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push(Hr(r)+"scale(",null,",",null,")");n.push({i:i-4,x:_r(e[0],t[0])},{i:i-2,x:_r(e[1],t[1])})}else 1===t[0]&&1===t[1]||r.push(Hr(r)+"scale("+t+")")}(e.scale,t.scale,r,n),e=t=null,function(e){for(var t,i=-1,a=n.length;++i0?r=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:r=0})):t>0&&(l.start({type:"start",alpha:r=t}),e=At(s.tick)),s):r},s.start=function(){var e,t,r,a=g.length,l=y.length,c=u[0],p=u[1];for(e=0;e=0;)r.push(i[n])}function sn(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(a=e.children)&&(i=a.length))for(var i,a,o=-1;++o=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;r&&(a.value=0),a.children=u}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return sn(i,(function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)})),s}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&&(on(e,(function(e){e.children&&(e.value=0)})),sn(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},a.layout.partition=function(){var e=a.layout.hierarchy(),t=[1,1];function r(e,t,n,i){var a=e.children;if(e.x=t,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=e.value?n/e.value:0;++us&&(s=n),o.push(n)}for(r=0;ri&&(n=r,i=t);return n}function _n(e){return e.reduce(wn,0)}function wn(e,t){return e+t[1]}function kn(e,t){return Tn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Tn(e,t){for(var r=-1,n=+e[0],i=(e[1]-n)/t,a=[];++r<=t;)a[r]=i*r+n;return a}function An(e){return[a.min(e),a.max(e)]}function Mn(e,t){return e.value-t.value}function Sn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function En(e,t){e._pack_next=t,t._pack_prev=e}function Cn(e,t){var r=t.x-e.x,n=t.y-e.y,i=e.r+t.r;return.999*i*i>r*r+n*n}function Ln(e){if((t=e.children)&&(l=t.length)){var t,r,n,i,a,o,s,l,u=1/0,c=-1/0,f=1/0,d=-1/0;if(t.forEach(Pn),(r=t[0]).x=-r.r,r.y=0,x(r),l>1&&((n=t[1]).x=n.r,n.y=0,x(n),l>2))for(Rn(r,n,i=t[2]),x(i),Sn(r,i),r._pack_prev=i,Sn(i,n),n=r._pack_next,a=3;a0)for(o=-1;++o=f[0]&&l<=f[1]&&((s=u[a.bisect(d,l,1,p)-1]).y+=v,s.push(i[o]));return u}return i.value=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(r=gt(e),i):r},i.bins=function(e){return arguments.length?(n="number"===typeof e?function(t){return Tn(t,e)}:gt(e),i):n},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},a.layout.pack=function(){var e,t=a.layout.hierarchy().sort(Mn),r=0,n=[1,1];function i(i,a){var o=t.call(this,i,a),s=o[0],l=n[0],u=n[1],c=null==e?Math.sqrt:"function"===typeof e?e:function(){return e};if(s.x=s.y=0,sn(s,(function(e){e.r=+c(e.value)})),sn(s,Ln),r){var f=r*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;sn(s,(function(e){e.r+=f})),sn(s,Ln),sn(s,(function(e){e.r-=f}))}return In(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),o}return i.size=function(e){return arguments.length?(n=e,i):n},i.radius=function(t){return arguments.length?(e=null==t||"function"===typeof t?t:+t,i):e},i.padding=function(e){return arguments.length?(r=+e,i):r},an(i,t)},a.layout.tree=function(){var e=a.layout.hierarchy().sort(null).value(null),t=Dn,r=[1,1],n=null;function i(i,a){var u=e.call(this,i,a),c=u[0],f=function(e){for(var t,r={A:null,children:[e]},n=[r];null!=(t=n.pop());)for(var i,a=t.children,o=0,s=a.length;oh.x&&(h=e),e.depth>p.depth&&(p=e)}));var v=t(d,h)/2-d.x,m=r[0]/(h.x+t(h,d)/2+v),g=r[1]/(p.depth||1);on(c,(function(e){e.x=(e.x+v)*m,e.y=e.depth*g}))}return u}function o(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r.length){!function(e){for(var t,r=0,n=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],u=a.m,c=o.m,f=s.m,d=l.m;s=Fn(s),a=zn(a),s&&a;)l=zn(l),(o=Fn(o)).a=e,(i=s.z+f-a.z-u+t(s._,a._))>0&&(Nn(Bn(s,e,n),e,i),u+=i,c+=i),f+=s.m,u+=a.m,d+=l.m,c+=o.m;s&&!Fn(o)&&(o.t=s,o.m+=f-c),a&&!zn(l)&&(l.t=a,l.m+=u-d,n=e)}return n}(e,i,e.parent.A||n[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=r[0],e.y=e.depth*r[1]}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(n=null==(r=e)?l:null,i):n?null:r},i.nodeSize=function(e){return arguments.length?(n=null==(r=e)?null:l,i):n?r:null},an(i,e)},a.layout.cluster=function(){var e=a.layout.hierarchy().sort(null).value(null),t=Dn,r=[1,1],n=!1;function i(i,o){var s,l=e.call(this,i,o),u=l[0],c=0;sn(u,(function(e){var r=e.children;r&&r.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(r),e.y=function(e){return 1+a.max(e,(function(e){return e.y}))}(r)):(e.x=s?c+=t(e,s):0,e.y=0,s=e)}));var f=jn(u),d=Un(u),h=f.x-t(f,d)/2,p=d.x+t(d,f)/2;return sn(u,n?function(e){e.x=(e.x-u.x)*r[0],e.y=(u.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(p-h)*r[0],e.y=(1-(u.y?e.y/u.y:1))*r[1]}),l}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(n=null==(r=e),i):n?null:r},i.nodeSize=function(e){return arguments.length?(n=null!=(r=e),i):n?r:null},an(i,e)},a.layout.treemap=function(){var e,t=a.layout.hierarchy(),r=Math.round,n=[1,1],i=null,o=qn,s=!1,l="squarify",u=.5*(1+Math.sqrt(5));function c(e,t){for(var r,n,i=-1,a=e.length;++i0;)s.push(r=u[i-1]),s.area+=r.area,"squarify"!==l||(n=h(s,v))<=d?(u.pop(),d=n):(s.area-=s.pop().area,p(s,v,a,!1),v=Math.min(a.dx,a.dy),s.length=s.area=0,d=1/0);s.length&&(p(s,v,a,!0),s.length=s.area=0),t.forEach(f)}}function d(e){var t=e.children;if(t&&t.length){var r,n=o(e),i=t.slice(),a=[];for(c(i,n.dx*n.dy/e.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(p(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);t.forEach(d)}}function h(e,t){for(var r,n=e.area,i=0,a=1/0,o=-1,s=e.length;++oi&&(i=r));return t*=t,(n*=n)?Math.max(t*i*u/n,n/(t*a*u)):1/0}function p(e,t,n,i){var a,o=-1,s=e.length,l=n.x,u=n.y,c=t?r(e.area/t):0;if(t==n.dx){for((i||c>n.dy)&&(c=n.dy);++on.dx)&&(c=n.dx);++o1);return e+t*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=a.random.normal.apply(a,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=a.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?Kn:Wn,l=n?Yr:Wr;return i=o(e,t,l,r),a=o(t,e,l,Ar),s}function s(e){return i(e)}return s.invert=function(e){return a(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},s.range=function(e){return arguments.length?(t=e,o()):t},s.rangeRound=function(e){return s.range(e).interpolate(Br)},s.clamp=function(e){return arguments.length?(n=e,o()):n},s.interpolate=function(e){return arguments.length?(r=e,o()):r},s.ticks=function(t){return ti(e,t)},s.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},s.nice=function(t){return Qn(e,t),o()},s.copy=function(){return Jn(e,t,r,n)},o()}function $n(e,t){return a.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Qn(e,t){return Yn(e,Zn(ei(e,t)[2])),Yn(e,Zn(ei(e,t)[2])),e}function ei(e,t){null==t&&(t=10);var r=Hn(e),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),a=t/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function ti(e,t){return a.range.apply(a,ei(e,t))}function ri(e,t,r,n){function i(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function a(e){return r?Math.pow(t,e):-Math.pow(t,-e)}function o(t){return e(i(t))}return o.invert=function(t){return a(e.invert(t))},o.domain=function(t){return arguments.length?(r=t[0]>=0,e.domain((n=t.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(t=+r,e.domain(n.map(i)),o):t},o.nice=function(){var t=Yn(n.map(i),r?Math:ni);return e.domain(t),n=t.map(a),o},o.ticks=function(){var e=Hn(n),o=[],s=e[0],l=e[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),f=t%1?2:t;if(isFinite(c-u)){if(r){for(;u0;d--)o.push(a(u)*d);for(u=0;o[u]l;c--);o=o.slice(u,c)}return o},o.copy=function(){return ri(e.copy(),t,r,n)},$n(o,e)}a.scale.linear=function(){return Jn([0,1],[0,1],Ar,!1)},a.scale.log=function(){return ri(a.scale.linear().domain([0,1]),10,!0,[1,10])};var ni={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function ii(e,t,r){var n=ai(t),i=ai(1/t);function a(t){return e(n(t))}return a.invert=function(t){return i(e.invert(t))},a.domain=function(t){return arguments.length?(e.domain((r=t.map(Number)).map(n)),a):r},a.ticks=function(e){return ti(r,e)},a.tickFormat=function(e,t){return d3_scale_linearTickFormat(r,e,t)},a.nice=function(e){return a.domain(Qn(r,e))},a.exponent=function(o){return arguments.length?(n=ai(t=o),i=ai(1/t),e.domain(r.map(n)),a):t},a.copy=function(){return ii(e.copy(),t,r)},$n(a,e)}function ai(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oi(e,t){var r,n,i;function o(i){return n[((r.get(i)||("range"===t.t?r.set(i,e.push(i)):NaN))-1)%n.length]}function s(t,r){return a.range(e.length).map((function(e){return t+r*e}))}return o.domain=function(n){if(!arguments.length)return e;e=[],r=new T;for(var i,a=-1,s=n.length;++a0?r[n-1]:e[0],nf?0:1;if(u=Oe)return l(u,h)+(s?l(s,1-h):"")+"Z";var p,v,m,g,y,x,b,_,w,k,T,A,M=0,S=0,E=[];if((g=(+o.apply(this,arguments)||0)/2)&&(m=n===mi?Math.sqrt(s*s+u*u):+n.apply(this,arguments),h||(S*=-1),u&&(S=ze(m/u*Math.sin(g))),s&&(M=ze(m/s*Math.sin(g)))),u){y=u*Math.cos(c+S),x=u*Math.sin(c+S),b=u*Math.cos(f-S),_=u*Math.sin(f-S);var C=Math.abs(f-c-2*S)<=Le?0:1;if(S&&wi(y,x,b,_)===h^C){var L=(c+f)/2;y=u*Math.cos(L),x=u*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(f-M),k=s*Math.sin(f-M),T=s*Math.cos(c+M),A=s*Math.sin(c+M);var P=Math.abs(c-f+2*M)<=Le?0:1;if(M&&wi(w,k,T,A)===1-h^P){var O=(c+f)/2;w=s*Math.cos(O),k=s*Math.sin(O),T=A=null}}else w=k=0;if(d>Ee&&(p=Math.min(Math.abs(u-s)/2,+r.apply(this,arguments)))>.001){v=s0?0:1}function ki(e,t,r,n,i){var a=e[0]-t[0],o=e[1]-t[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=e[0]+l,f=e[1]+u,d=t[0]+l,h=t[1]+u,p=(c+d)/2,v=(f+h)/2,m=d-c,g=h-f,y=m*m+g*g,x=r-n,b=c*h-d*f,_=(g<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*g-m*_)/y,k=(-b*m-g*_)/y,T=(b*g+m*_)/y,A=(-b*m+g*_)/y,M=w-p,S=k-v,E=T-p,C=A-v;return M*M+S*S>E*E+C*C&&(w=T,k=A),[[w-l,k-u],[w*r/x,k*r/x]]}function Ti(){return!0}function Ai(e){var t=Ct,r=Lt,n=Ti,i=Si,a=i.key,o=.7;function s(a){var s,l=[],u=[],c=-1,f=a.length,d=gt(t),h=gt(r);function p(){l.push("M",i(e(u),o))}for(;++c1&&i.push("H",n[0]),i.join("")},"step-before":Ci,"step-after":Li,basis:Ii,"basis-open":function(e){if(e.length<4)return Si(e);for(var t,r=[],n=-1,i=e.length,a=[0],o=[0];++n<3;)t=e[n],a.push(t[0]),o.push(t[1]);for(r.push(Ri(Fi,a)+","+Ri(Fi,o)),--n;++n9&&(i=3*t/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n);for(s=-1;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(e))}});function Si(e){return e.length>1?e.join("L"):e+"Z"}function Ei(e){return e.join("L")+"Z"}function Ci(e){for(var t=0,r=e.length,n=e[0],i=[n[0],",",n[1]];++t1){s=t[1],a=e[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;uLe)+",1 "+t}function l(e,t,r,n){return"Q 0,0 "+n}return a.radius=function(e){return arguments.length?(r=gt(e),a):r},a.source=function(t){return arguments.length?(e=gt(t),a):e},a.target=function(e){return arguments.length?(t=gt(e),a):t},a.startAngle=function(e){return arguments.length?(n=gt(e),a):n},a.endAngle=function(e){return arguments.length?(i=gt(e),a):i},a},a.svg.diagonal=function(){var e=qi,t=Vi,r=Gi;function n(n,i){var a=e.call(this,n,i),o=t.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(t){return arguments.length?(e=gt(t),n):e},n.target=function(e){return arguments.length?(t=gt(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},a.svg.diagonal.radial=function(){var e=a.svg.diagonal(),t=Gi,r=e.projection;return e.projection=function(e){return arguments.length?r(function(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Ie;return[r*Math.cos(n),r*Math.sin(n)]}}(t=e)):t},e},a.svg.symbol=function(){var e=Yi,t=Wi;function r(r,n){return(Xi.get(e.call(this,r,n))||Zi)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=gt(t),r):e},r.size=function(e){return arguments.length?(t=gt(e),r):t},r};var Xi=a.map({circle:Zi,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*Ji)),r=t*Ji;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/Ki),r=t*Ki/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ki),r=t*Ki/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});a.svg.symbolTypes=Xi.keys();var Ki=Math.sqrt(3),Ji=Math.tan(30*Re);J.transition=function(e){for(var t,r,n=ta||++ia,i=sa(e),a=[],o=ra||{time:Date.now(),ease:Rr,delay:0,duration:250},s=-1,l=this.length;++s0;)u[--d].call(e,o);if(a>=1)return f.event&&f.event.end.call(e,e.__data__,t),--c.count?delete c[n]:delete e[r],1}f||(a=i.time,o=At((function(e){var t=f.delay;if(o.t=t+a,t<=e)return d(e-t);o.c=d}),0,a),f=c[n]={tween:new T,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++c.count)}na.call=J.call,na.empty=J.empty,na.node=J.node,na.size=J.size,a.transition=function(e,t){return e&&e.transition?ta?e.transition(t):e:a.selection().transition(e)},a.transition.prototype=na,na.select=function(e){var t,r,n,i=this.id,a=this.namespace,o=[];e=$(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",o[1]-o[0])}function v(e){e.select(".extent").attr("y",s[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function m(){var f,m,g=this,y=a.select(a.event.target),x=r.of(g,arguments),b=a.select(g),_=y.datum(),w=!/^(n|s)$/.test(_)&&n,k=!/^(e|w)$/.test(_)&&i,T=y.classed("extent"),A=Te(g),M=a.mouse(g),S=a.select(c(g)).on("keydown.brush",(function(){32==a.event.keyCode&&(T||(f=null,M[0]-=o[1],M[1]-=s[1],T=2),q())})).on("keyup.brush",(function(){32==a.event.keyCode&&2==T&&(M[0]+=o[1],M[1]+=s[1],T=0,q())}));if(a.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",O):S.on("mousemove.brush",L).on("mouseup.brush",O),b.interrupt().selectAll("*").interrupt(),T)M[0]=o[0]-M[0],M[1]=s[0]-M[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);m=[o[1-E]-M[0],s[1-C]-M[1]],M[0]=o[E],M[1]=s[C]}else a.event.altKey&&(f=M.slice());function L(){var e=a.mouse(g),t=!1;m&&(e[0]+=m[0],e[1]+=m[1]),T||(a.event.altKey?(f||(f=[(o[0]+o[1])/2,(s[0]+s[1])/2]),M[0]=o[+(e[0](n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},i.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var a=o;function o(e,t){this.x=e,this.y=t}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,i=r*this.x+t*this.y;return this.x=n,this.y=i,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),i=t.x+r*(this.x-t.x)-n*(this.y-t.y),a=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(e){return e instanceof o?e:Array.isArray(e)?new o(e[0],e[1]):e};var s="undefined"!==typeof self?self:{};function l(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function f(e,t,r,i){var a=new n(e,t,r,i);return function(e){return a.solve(e)}}var d=f(.25,.1,.25,1);function h(e,t,r){return Math.min(r,Math.max(t,e))}function p(e,t,r){var n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}function v(e,t,r){if(!e.length)return r(null,[]);var n=e.length,i=new Array(e.length),a=null;e.forEach((function(e,o){t(e,(function(e,t){e&&(a=e),i[o]=t,0===--n&&r(a,i)}))}))}function m(e){var t=[];for(var r in e)t.push(e[r]);return t}function g(e,t){var r=[];for(var n in e)n in t||r.push(n);return r}function y(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,i=t;n>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}return e()}function k(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function T(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function A(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function M(e,t){return-1!==e.indexOf(t,e.length-t.length)}function S(e,t,r){var n={};for(var i in e)n[i]=t.call(r||this,e[i],i,e);return n}function E(e,t,r){var n={};for(var i in e)t.call(r||this,e[i],i,e)&&(n[i]=e[i]);return n}function C(e){return Array.isArray(e)?e.map(C):"object"===typeof e&&e?S(e,C):e}function L(e,t){for(var r=0;r=0)return!0;return!1}var P={};function O(e){P[e]||("undefined"!==typeof console&&console.warn(e),P[e]=!0)}function I(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function R(e){for(var t=0,r=0,n=e.length,i=n-1,a=void 0,o=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,r={};if(e.replace(t,(function(e,t,n,i){var a=n||i;return r[t]=!a||a.toLowerCase(),""})),r["max-age"]){var n=parseInt(r["max-age"],10);isNaN(n)?delete r["max-age"]:r["max-age"]=n}return r}var N=null;function B(e){if(null==N){var t=e.navigator?e.navigator.userAgent:null;N=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return N}function j(e){try{var t=s[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(r){return!1}}function U(e){return s.btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(Number("0x"+t))})))}function q(e){return decodeURIComponent(s.atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}var V,H,G,W,Y=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),Z=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,X=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,K={now:Y,frame:function(e){var t=Z(e);return{cancel:function(){return X(t)}}},getImageData:function(e,t){void 0===t&&(t=0);var r=s.document.createElement("canvas"),n=r.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return r.width=e.width,r.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return V||(V=s.document.createElement("a")),V.href=e,V.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return!!s.matchMedia&&(null==H&&(H=s.matchMedia("(prefers-reduced-motion: reduce)")),H.matches)}},J={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},$={supported:!1,testSupport:te},Q=!1,ee=!1;function te(e){!Q&&W&&(ee?re(e):G=e)}function re(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,W),e.isContextLost())return;$.supported=!0}catch(r){}e.deleteTexture(t),Q=!0}s.document&&((W=s.document.createElement("img")).onload=function(){G&&re(G),G=null,ee=!0},W.onerror=function(){Q=!0,G=null},W.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var ne="01";function ie(){for(var e="1",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r="",n=0;n<10;n++)r+=t[Math.floor(62*Math.random())];var i=432e5;return{token:[e,ne,r].join(""),tokenExpiresAt:Date.now()+i}}var ae=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function oe(e){return 0===e.indexOf("mapbox:")}ae.prototype._createSkuToken=function(){var e=ie();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},ae.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ae.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},ae.prototype.normalizeStyleURL=function(e,t){if(!oe(e))return e;var r=de(e);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},ae.prototype.normalizeGlyphsURL=function(e,t){if(!oe(e))return e;var r=de(e);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},ae.prototype.normalizeSourceURL=function(e,t){if(!oe(e))return e;var r=de(e);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||t)},ae.prototype.normalizeSpriteURL=function(e,t,r,n){var i=de(e);return oe(e)?(i.path="/styles/v1"+i.path+"/sprite"+t+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=""+t+r,he(i))},ae.prototype.normalizeTileURL=function(e,t){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!oe(e))return e;var r=de(e),n=/(\.(png|jpg)\d*)(?=$)/,i=/^.+\/v4\//,a=K.devicePixelRatio>=2||512===t?"@2x":"",o=$.supported?".webp":"$1";r.path=r.path.replace(n,""+a+o),r.path=r.path.replace(i,"/"),r.path="/v4"+r.path;var s=this._customAccessToken||ce(r.params)||J.ACCESS_TOKEN;return J.REQUIRE_ACCESS_TOKEN&&s&&this._skuToken&&r.params.push("sku="+this._skuToken),this._makeAPIURL(r,s)},ae.prototype.canonicalizeTileURL=function(e,t){var r="/v4/",n=/\.[\w]+$/,i=de(e);if(!i.path.match(/(^\/v4\/)/)||!i.path.match(n))return e;var a="mapbox://tiles/";a+=i.path.replace(r,"");var o=i.params;return t&&(o=o.filter((function(e){return!e.match(/^access_token=/)}))),o.length&&(a+="?"+o.join("&")),a},ae.prototype.canonicalizeTileset=function(e,t){for(var r=!!t&&oe(t),n=[],i=0,a=e.tiles||[];i=0&&e.params.splice(i,1)}if("/"!==n.path&&(e.path=""+n.path+e.path),!J.REQUIRE_ACCESS_TOKEN)return he(e);if(!(t=t||J.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+r);if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+r);return e.params=e.params.filter((function(e){return-1===e.indexOf("access_token")})),e.params.push("access_token="+t),he(e)};var se=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function le(e){return se.test(e)}function ue(e){return e.indexOf("sku=")>0&&le(e)}function ce(e){for(var t=0,r=e;t=1&&s.localStorage.setItem(t,JSON.stringify(this.eventData))}catch(n){O("Unable to write to LocalStorage")}},me.prototype.processRequests=function(e){},me.prototype.postEvent=function(e,t,n,i){var a=this;if(J.EVENTS_URL){var o=de(J.EVENTS_URL);o.params.push("access_token="+(i||J.ACCESS_TOKEN||""));var s={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:ne,userId:this.anonId},l=t?y(s,t):s,u={url:he(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([l])};this.pendingRequest=Je(u,(function(e){a.pendingRequest=null,n(e),a.saveEventData(),a.processRequests(i)}))}},me.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var ge,ye,xe=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postMapLoadEvent=function(e,t,r,n){this.skuToken=r,(J.EVENTS_URL&&n||J.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return oe(e)||le(e)})))&&this.queueRequest({id:t,timestamp:Date.now()},n)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),T(this.anonId)||(this.anonId=w()),this.postEvent(i,{skuToken:this.skuToken},(function(e){e||n&&(t.success[n]=!0)}),e))}},t}(me),be=function(e){function t(t){e.call(this,"appUserTurnstile"),this._customAccessToken=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postTurnstileEvent=function(e,t){J.EVENTS_URL&&J.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return oe(e)||le(e)}))&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=ve(J.ACCESS_TOKEN),n=r?r.u:J.ACCESS_TOKEN,i=n!==this.eventData.tokenU;T(this.anonId)||(this.anonId=w(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{"enabled.telemetry":!1},(function(e){e||(t.eventData.lastSuccess=a,t.eventData.tokenU=n)}),e)}},t}(me),_e=new be,we=_e.postTurnstileEvent.bind(_e),ke=new xe,Te=ke.postMapLoadEvent.bind(ke),Ae="mapbox-tiles",Me=500,Se=50,Ee=42e4;function Ce(){s.caches&&!ge&&(ge=s.caches.open(Ae))}function Le(e,t){if(void 0===ye)try{new Response(new ReadableStream),ye=!0}catch(r){ye=!1}ye?t(e.body):e.blob().then(t)}function Pe(e,t,r){if(Ce(),ge){var n={status:t.status,statusText:t.statusText,headers:new s.Headers};t.headers.forEach((function(e,t){return n.headers.set(t,e)}));var i=F(t.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&n.headers.set("Expires",new Date(r+1e3*i["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-rDate.now()&&!r["no-cache"]}var De,ze=1/0;function Fe(e){++ze>Se&&(e.getActor().send("enforceCacheSizeLimit",Me),ze=0)}function Ne(e){Ce(),ge&&ge.then((function(t){t.keys().then((function(r){for(var n=0;n=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===e.type)try{n=JSON.parse(r.response)}catch(i){return t(i)}t(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else t(new Ve(r.statusText,r.status,e.url))},r.send(e.body),{cancel:function(){return r.abort()}}}var Ze=function(e,t){if(!Ge(e.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return We(e,t);if(z()&&self.worker&&self.worker.actor){var r=!0;return self.worker.actor.send("getResource",e,t,void 0,r)}}return Ye(e,t)},Xe=function(e,t){return Ze(y(e,{type:"json"}),t)},Ke=function(e,t){return Ze(y(e,{type:"arrayBuffer"}),t)},Je=function(e,t){return Ze(y(e,{method:"POST"}),t)};function $e(e){var t=s.document.createElement("a");return t.href=e,t.protocol===s.document.location.protocol&&t.host===s.document.location.host}var Qe,et,tt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function rt(e,t,r,n){var i=new s.Image,a=s.URL;i.onload=function(){t(null,i),a.revokeObjectURL(i.src),i.onload=null,s.requestAnimationFrame((function(){i.src=tt}))},i.onerror=function(){return t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var o=new s.Blob([new Uint8Array(e)],{type:"image/png"});i.cacheControl=r,i.expires=n,i.src=e.byteLength?a.createObjectURL(o):tt}function nt(e,t){var r=new s.Blob([new Uint8Array(e)],{type:"image/png"});s.createImageBitmap(r).then((function(e){t(null,e)})).catch((function(e){t(new Error("Could not load image because of "+e.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))}Qe=[],et=0;var it=function(e,t){if($.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),et>=J.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return Qe.push(r),r}et++;var n=!1,i=function(){if(!n)for(n=!0,et--;Qe.length&&et0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},ct.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var ft={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},dt=function(e,t,r,n){this.message=(e?e+": ":"")+r,n&&(this.identifier=n),null!==t&&void 0!==t&&t.__line__&&(this.line=t.__line__)};function ht(e){var t=e.key,r=e.value;return r?[new dt(t,r,"constants have been deprecated as of v8")]:[]}function pt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,i=t;n":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var Ot=[xt,bt,_t,wt,kt,Et,Tt,Lt(At),Ct];function It(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!It(e.itemType,t.itemType))&&("number"!==typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var r=0,n=Ot;r255?255:e}function i(e){return e<0?0:e>1?1:e}function a(e){return"%"===e[e.length-1]?n(parseFloat(e)/100*255):n(parseInt(e))}function o(e){return"%"===e[e.length-1]?i(parseFloat(e)/100):i(parseFloat(e))}function s(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in r)return r[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=i.indexOf("("),u=i.indexOf(")");if(-1!==l&&u+1===i.length){var c=i.substr(0,l),f=i.substr(l+1,u-(l+1)).split(","),d=1;switch(c){case"rgba":if(4!==f.length)return null;d=o(f.pop());case"rgb":return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),d];case"hsla":if(4!==f.length)return null;d=o(f.pop());case"hsl":if(3!==f.length)return null;var h=(parseFloat(f[0])%360+360)%360/360,p=o(f[1]),v=o(f[2]),m=v<=.5?v*(p+1):v+p-v*p,g=2*v-m;return[n(255*s(g,m,h+1/3)),n(255*s(g,m,h)),n(255*s(g,m,h-1/3)),d];default:return null}}return null}try{t.parseCSSColor=l}catch(u){}})),Ft=zt.parseCSSColor,Nt=function(e,t,r,n){void 0===n&&(n=1),this.r=e,this.g=t,this.b=r,this.a=n};Nt.parse=function(e){if(e){if(e instanceof Nt)return e;if("string"===typeof e){var t=Ft(e);if(t)return new Nt(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},Nt.prototype.toString=function(){var e=this.toArray(),t=e[0],r=e[1],n=e[2],i=e[3];return"rgba("+Math.round(t)+","+Math.round(r)+","+Math.round(n)+","+i+")"},Nt.prototype.toArray=function(){var e=this,t=e.r,r=e.g,n=e.b,i=e.a;return 0===i?[0,0,0,0]:[255*t/i,255*r/i,255*n/i,i]},Nt.black=new Nt(0,0,0,1),Nt.white=new Nt(1,1,1,1),Nt.transparent=new Nt(0,0,0,0),Nt.red=new Nt(1,0,0,1);var Bt=function(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Bt.prototype.compare=function(e,t){return this.collator.compare(e,t)},Bt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var jt=function(e,t,r,n,i){this.text=e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=i},Ut=function(e){this.sections=e};Ut.fromString=function(e){return new Ut([new jt(e,null,null,null,null)])},Ut.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},Ut.factory=function(e){return e instanceof Ut?e:Ut.fromString(e)},Ut.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},Ut.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t=0&&e<=255&&"number"===typeof t&&t>=0&&t<=255&&"number"===typeof r&&r>=0&&r<=255?"undefined"===typeof n||"number"===typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"===typeof n?[e,t,r,n]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Ht(e){if(null===e)return!0;if("string"===typeof e)return!0;if("boolean"===typeof e)return!0;if("number"===typeof e)return!0;if(e instanceof Nt)return!0;if(e instanceof Bt)return!0;if(e instanceof Ut)return!0;if(e instanceof qt)return!0;if(Array.isArray(e)){for(var t=0,r=e;t2){var s=e[1];if("string"!==typeof s||!(s in Xt)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);a=Xt[s],n++}else a=At;if(e.length>3){if(null!==e[2]&&("number"!==typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],n++}r=Lt(a,o)}else r=Xt[i];for(var l=[];n1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var Jt=function(e){this.type=Et,this.sections=e};Jt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[1];if(!Array.isArray(r)&&"object"===typeof r)return t.error("First argument must be an image or text section.");for(var n=[],i=!1,a=1;a<=e.length-1;++a){var o=e[a];if(i&&"object"===typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o["font-scale"]&&!(s=t.parse(o["font-scale"],1,bt)))return null;var l=null;if(o["text-font"]&&!(l=t.parse(o["text-font"],1,Lt(_t))))return null;var u=null;if(o["text-color"]&&!(u=t.parse(o["text-color"],1,kt)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var f=t.parse(e[a],1,At);if(!f)return null;var d=f.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new Jt(n)},Jt.prototype.evaluate=function(e){var t=function(t){var r=t.content.evaluate(e);return Gt(r)===Ct?new jt("",r,null,null,null):new jt(Wt(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)};return new Ut(this.sections.map(t))},Jt.prototype.eachChild=function(e){for(var t=0,r=this.sections;t-1),r},$t.prototype.eachChild=function(e){e(this.input)},$t.prototype.outputDefined=function(){return!1},$t.prototype.serialize=function(){return["image",this.input.serialize()]};var Qt={"to-boolean":wt,"to-color":kt,"to-number":bt,"to-string":_t},er=function(e,t){this.type=e,this.args=t};er.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");for(var n=Qt[r],i=[],a=1;a4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":Vt(t[0],t[1],t[2],t[3])))return new Nt(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Zt(r||"Could not parse color from value '"+("string"===typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,l=this.args;s=t[2])&&!(e[1]<=t[1])&&!(e[3]>=t[3])}function fr(e,t){var r=lr(e[0]),n=ur(e[1]),i=Math.pow(2,t.z);return[Math.round(r*i*or),Math.round(n*i*or)]}function dr(e,t,r){var n=e[0]-t[0],i=e[1]-t[1],a=e[0]-r[0],o=e[1]-r[1];return n*o-a*i===0&&n*a<=0&&i*o<=0}function hr(e,t,r){return t[1]>e[1]!==r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function pr(e,t){for(var r=!1,n=0,i=t.length;n0&&f<0||c<0&&f>0}function yr(e,t,r,n){var i=[t[0]-e[0],t[1]-e[1]];return 0!==mr([n[0]-r[0],n[1]-r[1]],i)&&!(!gr(e,t,r,n)||!gr(r,n,e,t))}function xr(e,t,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=e[0]-r[0]>i?-n:r[0]-e[0]>i?n:0;0===a&&(a=e[0]-r[2]>i?-n:r[2]-e[0]>i?n:0),e[0]+=a}sr(t,e)}function Ar(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function Mr(e,t,r,n){for(var i=Math.pow(2,n.z)*or,a=[n.x*or,n.y*or],o=[],s=0,l=e;s=0)return!1;var r=!0;return e.eachChild((function(e){r&&!Ir(e,t)&&(r=!1)})),r}Lr.parse=function(e,t){if(2!==e.length)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(Ht(e[1])){var r=e[1];if("FeatureCollection"===r.type)for(var n=0;nt))throw new Zt("Input is not a number.");o=s-1}return 0}Dr.prototype.parse=function(e,t,r,n,i){return void 0===i&&(i={}),t?this.concat(t,r,n)._parse(e,i):this._parse(e,i)},Dr.prototype._parse=function(e,t){function r(e,t,r){return"assert"===r?new Kt(t,[e]):"coerce"===r?new er(t,[e]):e}if(null!==e&&"string"!==typeof e&&"boolean"!==typeof e&&"number"!==typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!==typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(e,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,t.typeAnnotation||"coerce");else a=r(a,o,t.typeAnnotation||"assert")}if(!(a instanceof Yt)&&"resolvedImage"!==a.type.kind&&zr(a)){var l=new rr;try{a=new Yt(a.type,a.evaluate(l))}catch(u){return this.error(u.message),null}}return a}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return"undefined"===typeof e?this.error("'undefined' value invalid. Use null instead."):"object"===typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Dr.prototype.concat=function(e,t,r){var n="number"===typeof e?this.path.concat(e):this.path,i=r?this.scope.concat(r):this.scope;return new Dr(this.registry,n,t||null,i,this.errors)},Dr.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new gt(n,e))},Dr.prototype.checkSubtype=function(e,t){var r=It(e,t);return r&&this.error(r),r};var Nr=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,i);if(!c)return null;i=i||c.type,n.push([o,c])}return new Nr(i,r,n)},Nr.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var i=t.length;return n>=t[i-1]?r[i-1].evaluate(e):r[Fr(t,n)].evaluate(e)},Nr.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var qr=Object.freeze({__proto__:null,number:Br,color:jr,array:Ur}),Vr=.95047,Hr=1,Gr=1.08883,Wr=4/29,Yr=6/29,Zr=3*Yr*Yr,Xr=Yr*Yr*Yr,Kr=Math.PI/180,Jr=180/Math.PI;function $r(e){return e>Xr?Math.pow(e,1/3):e/Zr+Wr}function Qr(e){return e>Yr?e*e*e:Zr*(e-Wr)}function en(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function tn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function rn(e){var t=tn(e.r),r=tn(e.g),n=tn(e.b),i=$r((.4124564*t+.3575761*r+.1804375*n)/Vr),a=$r((.2126729*t+.7151522*r+.072175*n)/Hr);return{l:116*a-16,a:500*(i-a),b:200*(a-$r((.0193339*t+.119192*r+.9503041*n)/Gr)),alpha:e.a}}function nn(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=Hr*Qr(t),r=Vr*Qr(r),n=Gr*Qr(n),new Nt(en(3.2404542*r-1.5371385*t-.4985314*n),en(-.969266*r+1.8760108*t+.041556*n),en(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function an(e,t,r){return{l:Br(e.l,t.l,r),a:Br(e.a,t.a,r),b:Br(e.b,t.b,r),alpha:Br(e.alpha,t.alpha,r)}}function on(e){var t=rn(e),r=t.l,n=t.a,i=t.b,a=Math.atan2(i,n)*Jr;return{h:a<0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:e.a}}function sn(e){var t=e.h*Kr,r=e.c;return nn({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})}function ln(e,t,r){var n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}function un(e,t,r){return{h:ln(e.h,t.h,r),c:Br(e.c,t.c,r),l:Br(e.l,t.l,r),alpha:Br(e.alpha,t.alpha,r)}}var cn={forward:rn,reverse:nn,interpolate:an},fn={forward:on,reverse:sn,interpolate:un},dn=Object.freeze({__proto__:null,lab:cn,hcl:fn}),hn=function(e,t,r,n,i){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(!(i=t.parse(i,2,bt)))return null;var l=[],u=null;"interpolate-hcl"===r||"interpolate-lab"===r?u=kt:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c=f)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);var v=t.parse(d,p,u);if(!v)return null;u=u||v.type,l.push([f,v])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"===typeof u.N?new hn(u,r,n,i,l):t.error("Type "+Pt(u)+" is not interpolatable.")},hn.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var i=t.length;if(n>=t[i-1])return r[i-1].evaluate(e);var a=Fr(t,n),o=t[a],s=t[a+1],l=hn.interpolationFactor(this.interpolation,n,o,s),u=r[a].evaluate(e),c=r[a+1].evaluate(e);return"interpolate"===this.operator?qr[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?fn.reverse(fn.interpolate(fn.forward(u),fn.forward(c),l)):cn.reverse(cn.interpolate(cn.forward(u),cn.forward(c),l))},hn.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t=r.length)throw new Zt("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new Zt("Array index must be an integer, but found "+t+" instead.");return r[t]},gn.prototype.eachChild=function(e){e(this.index),e(this.input)},gn.prototype.outputDefined=function(){return!1},gn.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var yn=function(e,t){this.type=wt,this.needle=e,this.haystack=t};yn.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,At),n=t.parse(e[2],2,At);return r&&n?Rt(r.type,[wt,_t,bt,xt,At])?new yn(r,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+Pt(r.type)+" instead"):null},yn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!Dt(t,["boolean","string","number","null"]))throw new Zt("Expected first argument to be of type boolean, string, number or null, but found "+Pt(Gt(t))+" instead.");if(!Dt(r,["string","array"]))throw new Zt("Expected second argument to be of type array or string, but found "+Pt(Gt(r))+" instead.");return r.indexOf(t)>=0},yn.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},yn.prototype.outputDefined=function(){return!0},yn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xn=function(e,t,r){this.type=bt,this.needle=e,this.haystack=t,this.fromIndex=r};xn.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,At),n=t.parse(e[2],2,At);if(!r||!n)return null;if(!Rt(r.type,[wt,_t,bt,xt,At]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+Pt(r.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,bt);return i?new xn(r,n,i):null}return new xn(r,n)},xn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!Dt(t,["boolean","string","number","null"]))throw new Zt("Expected first argument to be of type boolean, string, number or null, but found "+Pt(Gt(t))+" instead.");if(!Dt(r,["string","array"]))throw new Zt("Expected second argument to be of type array or string, but found "+Pt(Gt(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(e);return r.indexOf(t,n)}return r.indexOf(t)},xn.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},xn.prototype.outputDefined=function(){return!1},xn.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var bn=function(e,t,r,n,i,a){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};bn.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!==1)return t.error("Expected an even number of arguments.");var r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var i={},a=[],o=2;oNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"===typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,Gt(d)))return null}else r=Gt(d);if("undefined"!==typeof i[String(d)])return u.error("Branch labels must be unique.");i[String(d)]=a.length}var h=t.parse(l,o,n);if(!h)return null;n=n||h.type,a.push(h)}var p=t.parse(e[1],1,At);if(!p)return null;var v=t.parse(e[e.length-1],e.length-1,n);return v?"value"!==p.type.kind&&t.concat(1).checkSubtype(r,p.type)?null:new bn(r,n,p,i,a,v):null},bn.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(Gt(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},bn.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},bn.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},bn.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();ir}function En(e,t,r){return t<=r}function Cn(e,t,r){return t>=r}function Ln(e,t,r,n){return 0===n.compare(t,r)}function Pn(e,t,r,n){return!Ln(e,t,r,n)}function On(e,t,r,n){return n.compare(t,r)<0}function In(e,t,r,n){return n.compare(t,r)>0}function Rn(e,t,r,n){return n.compare(t,r)<=0}function Dn(e,t,r,n){return n.compare(t,r)>=0}function zn(e,t,r){var n="=="!==e&&"!="!==e;return function(){function i(e,t,r){this.type=wt,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return i.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var r=e[0],a=t.parse(e[1],1,At);if(!a)return null;if(!kn(r,a.type))return t.concat(1).error('"'+r+"\" comparisons are not supported for type '"+Pt(a.type)+"'.");var o=t.parse(e[2],2,At);if(!o)return null;if(!kn(r,o.type))return t.concat(2).error('"'+r+"\" comparisons are not supported for type '"+Pt(o.type)+"'.");if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error("Cannot compare types '"+Pt(a.type)+"' and '"+Pt(o.type)+"'.");n&&("value"===a.type.kind&&"value"!==o.type.kind?a=new Kt(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new Kt(a.type,[o])));var s=null;if(4===e.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,St)))return null}return new i(a,o,s)},i.prototype.evaluate=function(i){var a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=Gt(a),l=Gt(o);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new Zt('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var u=Gt(a),c=Gt(o);if("string"!==u.kind||"string"!==c.kind)return t(i,a,o)}return this.collator?r(i,a,o,this.collator.evaluate(i)):t(i,a,o)},i.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},i}()}wn.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,At),n=t.parse(e[2],2,bt);if(!r||!n)return null;if(!Rt(r.type,[Lt(At),_t,At]))return t.error("Expected first argument to be of type array or string, but found "+Pt(r.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,bt);return i?new wn(r.type,r,n,i):null}return new wn(r.type,r,n)},wn.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!Dt(t,["string","array"]))throw new Zt("Expected first argument to be of type array or string, but found "+Pt(Gt(t))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(e);return t.slice(r,n)}return t.slice(r)},wn.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},wn.prototype.outputDefined=function(){return!1},wn.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Fn=zn("==",Tn,Ln),Nn=zn("!=",An,Pn),Bn=zn("<",Mn,On),jn=zn(">",Sn,In),Un=zn("<=",En,Rn),qn=zn(">=",Cn,Dn),Vn=function(e,t,r,n,i){this.type=_t,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Vn.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var r=t.parse(e[1],1,bt);if(!r)return null;var n=e[2];if("object"!==typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=t.parse(n.locale,1,_t)))return null;var a=null;if(n.currency&&!(a=t.parse(n.currency,1,_t)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=t.parse(n["min-fraction-digits"],1,bt)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,bt))?null:new Vn(r,i,a,o,s)},Vn.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},Vn.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},Vn.prototype.outputDefined=function(){return!1},Vn.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Hn=function(e){this.type=bt,this.input=e};Hn.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error("Expected argument of type string or array, but found "+Pt(r.type)+" instead."):new Hn(r):null},Hn.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"===typeof t)return t.length;if(Array.isArray(t))return t.length;throw new Zt("Expected value to be of type string or array, but found "+Pt(Gt(t))+" instead.")},Hn.prototype.eachChild=function(e){e(this.input)},Hn.prototype.outputDefined=function(){return!1},Hn.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Gn={"==":Fn,"!=":Nn,">":jn,"<":Bn,">=":qn,"<=":Un,array:Kt,at:gn,boolean:Kt,case:_n,coalesce:vn,collator:ar,format:Jt,image:$t,in:yn,"index-of":xn,interpolate:hn,"interpolate-hcl":hn,"interpolate-lab":hn,length:Hn,let:mn,literal:Yt,match:bn,number:Kt,"number-format":Vn,object:Kt,slice:wn,step:Nr,string:Kt,"to-boolean":er,"to-color":er,"to-number":er,"to-string":er,var:Rr,within:Lr};function Wn(e,t){var r=t[0],n=t[1],i=t[2],a=t[3];r=r.evaluate(e),n=n.evaluate(e),i=i.evaluate(e);var o=a?a.evaluate(e):1,s=Vt(r,n,i,o);if(s)throw new Zt(s);return new Nt(r/255*o,n/255*o,i/255*o,o)}function Yn(e,t){return e in t}function Zn(e,t){var r=t[e];return"undefined"===typeof r?null:r}function Xn(e,t,r,n){for(;r<=n;){var i=r+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:r=i+1}return!1}function Kn(e){return{type:e}}function Jn(e){return{result:"success",value:e}}function $n(e){return{result:"error",value:e}}function Qn(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function ei(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function ti(e){return!!e.expression&&e.expression.interpolated}function ri(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function ni(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)}function ii(e){return e}function ai(e,t){var r,n,i,a="color"===t.type,o=e.stops&&"object"===typeof e.stops[0][0],s=o||void 0!==e.property,l=o||!s,u=e.type||(ti(t)?"exponential":"interval");if(a&&((e=pt({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],Nt.parse(e[1])]}))),e.default?e.default=Nt.parse(e.default):e.default=Nt.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!dn[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)r=ui;else if("interval"===u)r=li;else if("categorical"===u){r=si,n=Object.create(null);for(var c=0,f=e.stops;c=e.stops[n-1][0])return e.stops[n-1][1];var i=Fr(e.stops.map((function(e){return e[0]})),r);return e.stops[i][1]}function ui(e,t,r){var n=void 0!==e.base?e.base:1;if("number"!==ri(r))return oi(e.default,t.default);var i=e.stops.length;if(1===i)return e.stops[0][1];if(r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];var a=Fr(e.stops.map((function(e){return e[0]})),r),o=fi(r,n,e.stops[a][0],e.stops[a+1][0]),s=e.stops[a][1],l=e.stops[a+1][1],u=qr[t.type]||ii;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=dn[e.colorSpace];u=function(e,t){return c.reverse(c.interpolate(c.forward(e),c.forward(t),o))}}return"function"===typeof s.evaluate?{evaluate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=s.evaluate.apply(void 0,e),n=l.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==n)return u(r,n,o)}}:u(s,l,o)}function ci(e,t,r){return"color"===t.type?r=Nt.parse(r):"formatted"===t.type?r=Ut.fromString(r.toString()):"resolvedImage"===t.type?r=qt.fromString(r.toString()):ri(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0),oi(r,e.default,t.default)}function fi(e,t,r,n){var i=n-r,a=e-r;return 0===i?0:1===t?a/i:(Math.pow(t,a)-1)/(Math.pow(t,i)-1)}nr.register(Gn,{error:[Mt,[_t],function(e,t){var r=t[0];throw new Zt(r.evaluate(e))}],typeof:[_t,[At],function(e,t){return Pt(Gt(t[0].evaluate(e)))}],"to-rgba":[Lt(bt,4),[kt],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[kt,[bt,bt,bt],Wn],rgba:[kt,[bt,bt,bt,bt],Wn],has:{type:wt,overloads:[[[_t],function(e,t){return Yn(t[0].evaluate(e),e.properties())}],[[_t,Tt],function(e,t){var r=t[0],n=t[1];return Yn(r.evaluate(e),n.evaluate(e))}]]},get:{type:At,overloads:[[[_t],function(e,t){return Zn(t[0].evaluate(e),e.properties())}],[[_t,Tt],function(e,t){var r=t[0],n=t[1];return Zn(r.evaluate(e),n.evaluate(e))}]]},"feature-state":[At,[_t],function(e,t){return Zn(t[0].evaluate(e),e.featureState||{})}],properties:[Tt,[],function(e){return e.properties()}],"geometry-type":[_t,[],function(e){return e.geometryType()}],id:[At,[],function(e){return e.id()}],zoom:[bt,[],function(e){return e.globals.zoom}],"heatmap-density":[bt,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[bt,[],function(e){return e.globals.lineProgress||0}],accumulated:[At,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[bt,Kn(bt),function(e,t){for(var r=0,n=0,i=t;n":[wt,[_t,At],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],a=n.value;return typeof i===typeof a&&i>a}],"filter-id->":[wt,[At],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n===typeof i&&n>i}],"filter-<=":[wt,[_t,At],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],a=n.value;return typeof i===typeof a&&i<=a}],"filter-id-<=":[wt,[At],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n===typeof i&&n<=i}],"filter->=":[wt,[_t,At],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],a=n.value;return typeof i===typeof a&&i>=a}],"filter-id->=":[wt,[At],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n===typeof i&&n>=i}],"filter-has":[wt,[At],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[wt,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[wt,[Lt(_t)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[wt,[Lt(At)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[wt,[_t,Lt(At)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[wt,[_t,Lt(At)],function(e,t){var r=t[0],n=t[1];return Xn(e.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:wt,overloads:[[[wt,wt],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)&&n.evaluate(e)}],[Kn(wt),function(e,t){for(var r=0,n=t;r0&&"string"===typeof e[0]&&e[0]in Gn}function pi(e,t){var r=new Dr(Gn,[],t?_i(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?Jn(new di(n,t)):$n(r.errors)}di.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,a){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},di.prototype.evaluate=function(e,t,r,n,i,a){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null===o||void 0===o||"number"===typeof o&&o!==o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new Zt("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(s){return this._warningHistory[s.message]||(this._warningHistory[s.message]=!0,"undefined"!==typeof console&&console.warn(s.message)),this._defaultValue}};var vi=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Or(t.expression)};vi.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)},vi.prototype.evaluate=function(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)};var mi=function(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Or(t.expression),this.interpolationType=n};function gi(e,t){if("error"===(e=pi(e,t)).result)return e;var r=e.value.expression,n=Pr(r);if(!n&&!Qn(t))return $n([new gt("","data expressions not supported")]);var i=Ir(r,["zoom"]);if(!i&&!ei(t))return $n([new gt("","zoom expressions not supported")]);var a=bi(r);if(!a&&!i)return $n([new gt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof gt)return $n([a]);if(a instanceof hn&&!ti(t))return $n([new gt("",'"interpolate" expressions cannot be used with this property')]);if(!a)return Jn(new vi(n?"constant":"source",e.value));var o=a instanceof hn?a.interpolation:void 0;return Jn(new mi(n?"camera":"composite",e.value,a.labels,o))}mi.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)},mi.prototype.evaluate=function(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)},mi.prototype.interpolationFactor=function(e,t,r){return this.interpolationType?hn.interpolationFactor(this.interpolationType,e,t,r):0};var yi=function(e,t){this._parameters=e,this._specification=t,pt(this,ai(this._parameters,this._specification))};function xi(e,t){if(ni(e))return new yi(e,t);if(hi(e)){var r=gi(e,t);if("error"===r.result)throw new Error(r.value.map((function(e){return e.key+": "+e.message})).join(", "));return r.value}var n=e;return"string"===typeof e&&"color"===t.type&&(n=Nt.parse(e)),{kind:"constant",evaluate:function(){return n}}}function bi(e){var t=null;if(e instanceof mn)t=bi(e.result);else if(e instanceof vn)for(var r=0,n=e.args;rn.maximum?[new dt(t,r,r+" is greater than the maximum value "+n.maximum)]:[]}function Mi(e){var t,r,n,i=e.valueSpec,a=vt(e.value.type),o={},s="categorical"!==a&&void 0===e.value.property,l=!s,u="array"===ri(e.value.stops)&&"array"===ri(e.value.stops[0])&&"object"===ri(e.value.stops[0][0]),c=ki({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:f,default:p}});return"identity"===a&&s&&c.push(new dt(e.key,e.value,'missing required property "property"')),"identity"===a||e.value.stops||c.push(new dt(e.key,e.value,'missing required property "stops"')),"exponential"===a&&e.valueSpec.expression&&!ti(e.valueSpec)&&c.push(new dt(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Qn(e.valueSpec)?c.push(new dt(e.key,e.value,"property functions not supported")):s&&!ei(e.valueSpec)&&c.push(new dt(e.key,e.value,"zoom functions not supported"))),"categorical"!==a&&!u||void 0!==e.value.property||c.push(new dt(e.key,e.value,'"property" property is required')),c;function f(e){if("identity"===a)return[new dt(e.key,e.value,'identity function may not have a "stops" property')];var t=[],r=e.value;return t=t.concat(Ti({key:e.key,value:r,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:d})),"array"===ri(r)&&0===r.length&&t.push(new dt(e.key,r,"array must have at least one stop")),t}function d(e){var t=[],a=e.value,s=e.key;if("array"!==ri(a))return[new dt(s,a,"array expected, "+ri(a)+" found")];if(2!==a.length)return[new dt(s,a,"array length 2 expected, length "+a.length+" found")];if(u){if("object"!==ri(a[0]))return[new dt(s,a,"object expected, "+ri(a[0])+" found")];if(void 0===a[0].zoom)return[new dt(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new dt(s,a,"object stop key must have value")];if(n&&n>vt(a[0].zoom))return[new dt(s,a[0].zoom,"stop zoom values must appear in ascending order")];vt(a[0].zoom)!==n&&(n=vt(a[0].zoom),r=void 0,o={}),t=t.concat(ki({key:s+"[0]",value:a[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:Ai,value:h}}))}else t=t.concat(h({key:s+"[0]",value:a[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},a));return hi(mt(a[1]))?t.concat([new dt(s+"[1]",a[1],"expressions are not allowed in function stops.")]):t.concat(ra({key:s+"[1]",value:a[1],valueSpec:i,style:e.style,styleSpec:e.styleSpec}))}function h(e,n){var s=ri(e.value),l=vt(e.value),u=null!==e.value?e.value:n;if(t){if(s!==t)return[new dt(e.key,u,s+" stop domain type must match previous stop domain type "+t)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new dt(e.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==a){var c="number expected, "+s+" found";return Qn(i)&&void 0===a&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new dt(e.key,u,c)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==r&&l=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!==typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,r=e.slice(1);tt?1:0}function Di(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var t=1;t"===t||"<="===t||">="===t?Fi(e[1],e[2],t):"any"===t?Ni(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(zi)):"none"===t?["all"].concat(e.slice(1).map(zi).map(Ui)):"in"===t?Bi(e[1],e.slice(2)):"!in"===t?Ui(Bi(e[1],e.slice(2))):"has"===t?ji(e[1]):"!has"===t?Ui(ji(e[1])):"within"!==t||e}function Fi(e,t,r){switch(e){case"$type":return["filter-type-"+r,t];case"$id":return["filter-id-"+r,t];default:return["filter-"+r,e,t]}}function Ni(e){return["any"].concat(e.map(zi))}function Bi(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!==typeof t[0]}))?["filter-in-large",e,["literal",t.sort(Ri)]]:["filter-in-small",e,["literal",t]]}}function ji(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Ui(e){return["!",e]}function qi(e){return Pi(mt(e.value))?Si(pt({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Vi(e)}function Vi(e){var t=e.value,r=e.key;if("array"!==ri(t))return[new dt(r,t,"array expected, "+ri(t)+" found")];var n,i=e.styleSpec,a=[];if(t.length<1)return[new dt(r,t,"filter array must have at least 1 element")];switch(a=a.concat(Li({key:r+"[0]",value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),vt(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===vt(t[1])&&a.push(new dt(r,t,'"$type" cannot be use with operator "'+t[0]+'"'));case"==":case"!=":3!==t.length&&a.push(new dt(r,t,'filter array for operator "'+t[0]+'" must have 3 elements'));case"in":case"!in":t.length>=2&&"string"!==(n=ri(t[1]))&&a.push(new dt(r+"[1]",t[1],"string expected, "+n+" found"));for(var o=2;o=c[h+0]&&n>=c[h+1])?(o[d]=!0,a.push(u[d])):o[d]=!1}}},pa.prototype._forEachCell=function(e,t,r,n,i,a,o,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(r),f=this._convertToCellCoord(n),d=l;d<=c;d++)for(var h=u;h<=f;h++){var p=this.d*h+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(h),this._convertFromCellCoord(d+1),this._convertFromCellCoord(h+1)))&&i.call(this,e,t,r,n,p,a,o,s))return}},pa.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},pa.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},pa.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=ha+this.cells.length+1+1,r=0,n=0;n=0)){var f=e[c];u[c]=ga[l].shallow.indexOf(c)>=0?f:wa(f,t)}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)}function ka(e){if(null===e||void 0===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||ba(e)||_a(e)||ArrayBuffer.isView(e)||e instanceof va)return e;if(Array.isArray(e))return e.map(ka);if("object"===typeof e){var t=e.$name||"Object",r=ga[t].klass;if(!r)throw new Error("can't deserialize unregistered class "+t);if(r.deserialize)return r.deserialize(e);for(var n=Object.create(r.prototype),i=0,a=Object.keys(e);i=0?s:ka(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)}var Ta=function(){this.first=!0};Ta.prototype.update=function(e,t){var r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function Ma(e){for(var t=0,r=e;t=65097&&e<=65103)||!!Aa["CJK Compatibility Ideographs"](e)||!!Aa["CJK Compatibility"](e)||!!Aa["CJK Radicals Supplement"](e)||!!Aa["CJK Strokes"](e)||!(!Aa["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||!!Aa["CJK Unified Ideographs Extension A"](e)||!!Aa["CJK Unified Ideographs"](e)||!!Aa["Enclosed CJK Letters and Months"](e)||!!Aa["Hangul Compatibility Jamo"](e)||!!Aa["Hangul Jamo Extended-A"](e)||!!Aa["Hangul Jamo Extended-B"](e)||!!Aa["Hangul Jamo"](e)||!!Aa["Hangul Syllables"](e)||!!Aa.Hiragana(e)||!!Aa["Ideographic Description Characters"](e)||!!Aa.Kanbun(e)||!!Aa["Kangxi Radicals"](e)||!!Aa["Katakana Phonetic Extensions"](e)||!(!Aa.Katakana(e)||12540===e)||!(!Aa["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!Aa["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||!!Aa["Unified Canadian Aboriginal Syllabics"](e)||!!Aa["Unified Canadian Aboriginal Syllabics Extended"](e)||!!Aa["Vertical Forms"](e)||!!Aa["Yijing Hexagram Symbols"](e)||!!Aa["Yi Syllables"](e)||!!Aa["Yi Radicals"](e))}function Pa(e){return!(!Aa["Latin-1 Supplement"](e)||167!==e&&169!==e&&174!==e&&177!==e&&188!==e&&189!==e&&190!==e&&215!==e&&247!==e)||!(!Aa["General Punctuation"](e)||8214!==e&&8224!==e&&8225!==e&&8240!==e&&8241!==e&&8251!==e&&8252!==e&&8258!==e&&8263!==e&&8264!==e&&8265!==e&&8273!==e)||!!Aa["Letterlike Symbols"](e)||!!Aa["Number Forms"](e)||!(!Aa["Miscellaneous Technical"](e)||!(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215))||!(!Aa["Control Pictures"](e)||9251===e)||!!Aa["Optical Character Recognition"](e)||!!Aa["Enclosed Alphanumerics"](e)||!!Aa["Geometric Shapes"](e)||!(!Aa["Miscellaneous Symbols"](e)||e>=9754&&e<=9759)||!(!Aa["Miscellaneous Symbols and Arrows"](e)||!(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243))||!!Aa["CJK Symbols and Punctuation"](e)||!!Aa.Katakana(e)||!!Aa["Private Use Area"](e)||!!Aa["CJK Compatibility Forms"](e)||!!Aa["Small Form Variants"](e)||!!Aa["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e}function Oa(e){return!(La(e)||Pa(e))}function Ia(e){return Aa.Arabic(e)||Aa["Arabic Supplement"](e)||Aa["Arabic Extended-A"](e)||Aa["Arabic Presentation Forms-A"](e)||Aa["Arabic Presentation Forms-B"](e)}function Ra(e){return e>=1424&&e<=2303||Aa["Arabic Presentation Forms-A"](e)||Aa["Arabic Presentation Forms-B"](e)}function Da(e,t){return!(!t&&Ra(e))&&!(e>=2304&&e<=3583||e>=3840&&e<=4255||Aa.Khmer(e))}function za(e){for(var t=0,r=e;t-1&&(ja=Na.error),Ba&&Ba(e)};function Va(){Ha.fire(new lt("pluginStateChange",{pluginStatus:ja,pluginURL:Ua}))}var Ha=new ct,Ga=function(){return ja},Wa=function(e){return e({pluginStatus:ja,pluginURL:Ua}),Ha.on("pluginStateChange",e),e},Ya=function(e,t,r){if(void 0===r&&(r=!1),ja===Na.deferred||ja===Na.loading||ja===Na.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Ua=K.resolveURL(e),ja=Na.deferred,Ba=t,Va(),r||Za()},Za=function(){if(ja!==Na.deferred||!Ua)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");ja=Na.loading,Va(),Ua&&Ke({url:Ua},(function(e){e?qa(e):(ja=Na.loaded,Va())}))},Xa={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ja===Na.loaded||null!=Xa.applyArabicShaping},isLoading:function(){return ja===Na.loading},setState:function(e){ja=e.pluginStatus,Ua=e.pluginURL},isParsed:function(){return null!=Xa.applyArabicShaping&&null!=Xa.processBidirectionalText&&null!=Xa.processStyledBidirectionalText},getPluginURL:function(){return Ua}},Ka=function(){Xa.isLoading()||Xa.isLoaded()||"deferred"!==Ga()||Za()},Ja=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ta,this.transition={})};Ja.prototype.isSupportedScript=function(e){return Fa(e,Xa.isLoaded())},Ja.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ja.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}};var $a=function(e,t){this.property=e,this.value=t,this.expression=xi(void 0===t?e.specification.default:t,e.specification)};$a.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},$a.prototype.possiblyEvaluate=function(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)};var Qa=function(e){this.property=e,this.value=new $a(e,void 0)};Qa.prototype.transitioned=function(e,t){return new to(this.property,this.value,t,y({},e.transition,this.transition),e.now)},Qa.prototype.untransitioned=function(){return new to(this.property,this.value,null,{},0)};var eo=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};eo.prototype.getValue=function(e){return C(this._values[e].value.value)},eo.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Qa(this._values[e].property)),this._values[e].value=new $a(this._values[e].property,null===t?void 0:C(t))},eo.prototype.getTransition=function(e){return C(this._values[e].transition)},eo.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Qa(this._values[e].property)),this._values[e].transition=C(t)||void 0},eo.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);tthis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(nn.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},t.prototype.interpolate=function(e){return e},t}(so),uo=function(e){this.specification=e};uo.prototype.possiblyEvaluate=function(e,t,r,n){if(void 0!==e.value){if("constant"===e.expression.kind){var i=e.expression.evaluate(t,null,{},r,n);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new Ja(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Ja(Math.floor(t.zoom),t)),e.expression.evaluate(new Ja(Math.floor(t.zoom+1),t)),t)}},uo.prototype._calculate=function(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},uo.prototype.interpolate=function(e){return e};var co=function(e){this.specification=e};co.prototype.possiblyEvaluate=function(e,t,r,n){return!!e.expression.evaluate(t,null,{},r,n)},co.prototype.interpolate=function(){return!1};var fo=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var r=e[t];r.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new $a(r,void 0),i=this.defaultTransitionablePropertyValues[t]=new Qa(r);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}};ya("DataDrivenProperty",so),ya("DataConstantProperty",oo),ya("CrossFadedDataDrivenProperty",lo),ya("CrossFadedProperty",uo),ya("ColorRampProperty",co);var ho="-transition",po=function(e){function t(t,r){if(e.call(this),this.id=t.id,this.type=t.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),r.layout&&(this._unevaluatedLayout=new no(r.layout)),r.paint)){for(var n in this._transitionablePaint=new eo(r.paint),t.paint)this.setPaintProperty(n,t.paint[n],{validate:!1});for(var i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ao(r.paint)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},t.prototype.setLayoutProperty=function(e,t,r){if(void 0===r&&(r={}),null!==t&&void 0!==t){var n="layers."+this.id+".layout."+e;if(this._validate(ca,n,e,t,r))return}"visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t},t.prototype.getPaintProperty=function(e){return M(e,ho)?this._transitionablePaint.getTransition(e.slice(0,-ho.length)):this._transitionablePaint.getValue(e)},t.prototype.setPaintProperty=function(e,t,r){if(void 0===r&&(r={}),null!==t&&void 0!==t){var n="layers."+this.id+".paint."+e;if(this._validate(ua,n,e,t,r))return!1}if(M(e,ho))return this._transitionablePaint.setTransition(e.slice(0,-ho.length),t||void 0),!1;var i=this._transitionablePaint._values[e],a="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var l=this._transitionablePaint._values[e].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(e,s,l)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){},t.prototype._handleOverridablePaintPropertyUpdate=function(e,t,r){return!1},t.prototype.isHidden=function(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility},t.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)},t.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),E(e,(function(e,t){return void 0!==e&&!("layout"===t&&!Object.keys(e).length)&&!("paint"===t&&!Object.keys(e).length)}))},t.prototype._validate=function(e,t,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&fa(this,e.call(sa,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:ft,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var e in this.paint._values){var t=this.paint.get(e);if(t instanceof io&&Qn(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1},t}(ct),vo={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},mo=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},go=128,yo=5,xo=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function bo(e,t){void 0===t&&(t=1);var r=0,n=0;return{members:e.map((function(e){var i=_o(e.type),a=r=wo(r,Math.max(t,i)),o=e.components||1;return n=Math.max(n,i),r+=i*o,{name:e.name,type:e.type,components:o,offset:a}})),size:wo(r,Math.max(n,t)),alignment:t}}function _o(e){return vo[e].BYTES_PER_ELEMENT}function wo(e,t){return Math.ceil(e/t)*t}xo.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},xo.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},xo.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},xo.prototype.clear=function(){this.length=0},xo.prototype.resize=function(e){this.reserve(e),this.length=e},xo.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*yo),go),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},xo.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e},t}(xo);ko.prototype.bytesPerElement=4,ya("StructArrayLayout2i4",ko);var To=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var a=4*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,e},t}(xo);To.prototype.bytesPerElement=8,ya("StructArrayLayout4i8",To);var Ao=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)},t.prototype.emplace=function(e,t,r,n,i,a,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e},t}(xo);Ao.prototype.bytesPerElement=12,ya("StructArrayLayout2i4i12",Ao);var Mo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)},t.prototype.emplace=function(e,t,r,n,i,a,o){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,e},t}(xo);Mo.prototype.bytesPerElement=8,ya("StructArrayLayout2i4ub8",Mo);var So=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e},t}(xo);So.prototype.bytesPerElement=8,ya("StructArrayLayout2f8",So);var Eo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,u){var c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,n,i,a,o,s,l,u)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,u,c){var f=10*e;return this.uint16[f+0]=t,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint16[f+8]=u,this.uint16[f+9]=c,e},t}(xo);Eo.prototype.bytesPerElement=20,ya("StructArrayLayout10ui20",Eo);var Co=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,u,c,f){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,r,n,i,a,o,s,l,u,c,f)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,u,c,f,d){var h=12*e;return this.int16[h+0]=t,this.int16[h+1]=r,this.int16[h+2]=n,this.int16[h+3]=i,this.uint16[h+4]=a,this.uint16[h+5]=o,this.uint16[h+6]=s,this.uint16[h+7]=l,this.int16[h+8]=u,this.int16[h+9]=c,this.int16[h+10]=f,this.int16[h+11]=d,e},t}(xo);Co.prototype.bytesPerElement=24,ya("StructArrayLayout4i4ui4i24",Co);var Lo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e},t}(xo);Lo.prototype.bytesPerElement=12,ya("StructArrayLayout3f12",Lo);var Po=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint32[r+0]=t,e},t}(xo);Po.prototype.bytesPerElement=4,ya("StructArrayLayout1ul4",Po);var Oo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l){var u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,n,i,a,o,s,l)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,u){var c=10*e,f=5*e;return this.int16[c+0]=t,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=i,this.int16[c+4]=a,this.int16[c+5]=o,this.uint32[f+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,e},t}(xo);Oo.prototype.bytesPerElement=20,ya("StructArrayLayout6i1ul2ui20",Oo);var Io=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)},t.prototype.emplace=function(e,t,r,n,i,a,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e},t}(xo);Io.prototype.bytesPerElement=12,ya("StructArrayLayout2i2i2i12",Io);var Ro=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i)},t.prototype.emplace=function(e,t,r,n,i,a){var o=4*e,s=8*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,e},t}(xo);Ro.prototype.bytesPerElement=16,ya("StructArrayLayout2f1f2i16",Ro);var Do=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var a=12*e,o=3*e;return this.uint8[a+0]=t,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,e},t}(xo);Do.prototype.bytesPerElement=12,ya("StructArrayLayout2ub2f12",Do);var zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,e},t}(xo);zo.prototype.bytesPerElement=6,ya("StructArrayLayout3ui6",zo);var Fo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,u,c,f,d,h,p,v,m){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,r,n,i,a,o,s,l,u,c,f,d,h,p,v,m)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,u,c,f,d,h,p,v,m,g){var y=24*e,x=12*e,b=48*e;return this.int16[y+0]=t,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=u,this.uint16[y+12]=c,this.float32[x+7]=f,this.float32[x+8]=d,this.uint8[b+36]=h,this.uint8[b+37]=p,this.uint8[b+38]=v,this.uint32[x+10]=m,this.int16[y+22]=g,e},t}(xo);Fo.prototype.bytesPerElement=48,ya("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Fo);var No=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,u,c,f,d,h,p,v,m,g,y,x,b,_,w,k,T,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,e,t,r,n,i,a,o,s,l,u,c,f,d,h,p,v,m,g,y,x,b,_,w,k,T,A,M,S)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,u,c,f,d,h,p,v,m,g,y,x,b,_,w,k,T,A,M,S,E){var C=34*e,L=17*e;return this.int16[C+0]=t,this.int16[C+1]=r,this.int16[C+2]=n,this.int16[C+3]=i,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=u,this.uint16[C+9]=c,this.uint16[C+10]=f,this.uint16[C+11]=d,this.uint16[C+12]=h,this.uint16[C+13]=p,this.uint16[C+14]=v,this.uint16[C+15]=m,this.uint16[C+16]=g,this.uint16[C+17]=y,this.uint16[C+18]=x,this.uint16[C+19]=b,this.uint16[C+20]=_,this.uint16[C+21]=w,this.uint16[C+22]=k,this.uint32[L+12]=T,this.float32[L+13]=A,this.float32[L+14]=M,this.float32[L+15]=S,this.float32[L+16]=E,e},t}(xo);No.prototype.bytesPerElement=68,ya("StructArrayLayout8i15ui1ul4f68",No);var Bo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.float32[r+0]=t,e},t}(xo);Bo.prototype.bytesPerElement=4,ya("StructArrayLayout1f4",Bo);var jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,e},t}(xo);jo.prototype.bytesPerElement=6,ya("StructArrayLayout3i6",jo);var Uo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=2*e,a=4*e;return this.uint32[i+0]=t,this.uint16[a+2]=r,this.uint16[a+3]=n,e},t}(xo);Uo.prototype.bytesPerElement=8,ya("StructArrayLayout1ul2ui8",Uo);var qo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e},t}(xo);qo.prototype.bytesPerElement=4,ya("StructArrayLayout2ui4",qo);var Vo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint16[r+0]=t,e},t}(xo);Vo.prototype.bytesPerElement=2,ya("StructArrayLayout1ui2",Vo);var Ho=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var a=4*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,e},t}(xo);Ho.prototype.bytesPerElement=16,ya("StructArrayLayout4f16",Ho);var Go=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,r),t}(mo);Go.prototype.size=20;var Wo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Go(this,e)},t}(Oo);ya("CollisionBoxArray",Wo);var Yo=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(t.prototype,r),t}(mo);Yo.prototype.size=48;var Zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Yo(this,e)},t}(Fo);ya("PlacedSymbolArray",Zo);var Xo=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+12]=e},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(t.prototype,r),t}(mo);Xo.prototype.size=68;var Ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Xo(this,e)},t}(No);ya("SymbolInstanceArray",Ko);var Jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t}(Bo);ya("GlyphOffsetArray",Jo);var $o=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t}(jo);ya("SymbolLineVertexArray",$o);var Qo=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(t.prototype,r),t}(mo);Qo.prototype.size=8;var es=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Qo(this,e)},t}(Uo);ya("FeatureIndexArray",es);var ts=bo([{name:"a_pos",components:2,type:"Int16"}],4).members,rs=function(e){void 0===e&&(e=[]),this.segments=e};function ns(e,t){return 256*(e=h(Math.floor(e),0,255))+(t=h(Math.floor(t),0,255))}rs.prototype.prepareSegment=function(e,t,r,n){var i=this.segments[this.segments.length-1];return e>rs.MAX_VERTEX_ARRAY_LENGTH&&O("Max vertices per segment is "+rs.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!i||i.vertexLength+e>rs.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},rs.prototype.get=function(){return this.segments},rs.prototype.destroy=function(){for(var e=0,t=this.segments;e>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}e.exports=t})),os=t((function(e){function t(e,t){for(var r,n=e.length,i=t^n,a=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&e.charCodeAt(a+2))<<16;case 2:i^=(255&e.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}e.exports=t})),ss=as,ls=as,us=os;ss.murmur3=ls,ss.murmur2=us;var cs=function(){this.ids=[],this.positions=[],this.indexed=!1};cs.prototype.add=function(e,t,r,n){this.ids.push(ds(e)),this.positions.push(t,r,n)},cs.prototype.getPositions=function(e){for(var t=ds(e),r=0,n=this.ids.length-1;r>1;this.ids[i]>=t?n=i:r=i+1}for(var a=[];this.ids[r]===t;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},cs.serialize=function(e,t){var r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return hs(r,n,0,r.length-1),t&&t.push(r.buffer,n.buffer),{ids:r,positions:n}},cs.deserialize=function(e){var t=new cs;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t};var fs=Math.pow(2,53)-1;function ds(e){var t=+e;return!isNaN(t)&&t<=fs?t:ss(String(e))}function hs(e,t,r,n){for(;r>1],a=r-1,o=n+1;;){do{a++}while(e[a]i);if(a>=o)break;ps(e,a,o),ps(t,3*a,3*o),ps(t,3*a+1,3*o+1),ps(t,3*a+2,3*o+2)}o-ro.x+1||lo.y+1)&&O("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function js(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Bs(e):[]}}function Us(e,t,r,n,i){e.emplaceBack(2*t+(n+1)/2,2*r+(i+1)/2)}var qs=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ko,this.indexArray=new zo,this.segments=new rs,this.programConfigurations=new Ps(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function Vs(e,t){for(var r=0;r=3)for(var a=0;a1){if(Zs(e,t))return!0;for(var n=0;n1?e.distSqr(r):e.distSqr(r.sub(t)._mult(i)._add(t))}function $s(e,t){for(var r,n,i,a=!1,o=0;ot.y!==i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(a=!a);return a}function Qs(e,t){for(var r=!1,n=0,i=e.length-1;nt.y!==o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function el(e,t,r,n,i){for(var o=0,s=e;o=l.x&&i>=l.y)return!0}var u=[new a(t,r),new a(t,i),new a(n,i),new a(n,r)];if(e.length>2)for(var c=0,f=u;ci.x&&t.x>i.x||e.yi.y&&t.y>i.y)return!1;var a=I(e,t,r[0]);return a!==I(e,t,r[1])||a!==I(e,t,r[2])||a!==I(e,t,r[3])}function rl(e,t,r){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function nl(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function il(e,t,r,n,i){if(!t[0]&&!t[1])return e;var o=a.convert(t)._mult(i);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l=Ds||c<0||c>=Ds)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),d=f.vertexLength;Us(this.layoutVertexArray,u,c,-1,-1),Us(this.layoutVertexArray,u,c,1,-1),Us(this.layoutVertexArray,u,c,1,1),Us(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(d,d+1,d+2),this.indexArray.emplaceBack(d,d+3,d+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},n)},ya("CircleBucket",qs,{omit:["layers"]});var al=new fo({"circle-sort-key":new so(ft.layout_circle["circle-sort-key"])}),ol={paint:new fo({"circle-radius":new so(ft.paint_circle["circle-radius"]),"circle-color":new so(ft.paint_circle["circle-color"]),"circle-blur":new so(ft.paint_circle["circle-blur"]),"circle-opacity":new so(ft.paint_circle["circle-opacity"]),"circle-translate":new oo(ft.paint_circle["circle-translate"]),"circle-translate-anchor":new oo(ft.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new oo(ft.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new oo(ft.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new so(ft.paint_circle["circle-stroke-width"]),"circle-stroke-color":new so(ft.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new so(ft.paint_circle["circle-stroke-opacity"])}),layout:al},sl="undefined"!==typeof Float32Array?Float32Array:Array;function ll(){var e=new sl(4);return sl!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function ul(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l+a*s,e[1]=i*l+o*s,e[2]=n*-s+a*l,e[3]=i*-s+o*l,e}function cl(){var e=new sl(9);return sl!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function fl(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function dl(){var e=new sl(16);return sl!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function hl(e){var t=new sl(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}function pl(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}function vl(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],m=t[14],g=t[15],y=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,k=i*u-a*l,T=c*v-f*p,A=c*m-d*p,M=c*g-h*p,S=f*m-d*v,E=f*g-h*v,C=d*g-h*m,L=y*C-x*E+b*S+_*M-w*A+k*T;return L?(L=1/L,e[0]=(s*C-l*E+u*S)*L,e[1]=(i*E-n*C-a*S)*L,e[2]=(v*k-m*w+g*_)*L,e[3]=(d*w-f*k-h*_)*L,e[4]=(l*M-o*C-u*A)*L,e[5]=(r*C-i*M+a*A)*L,e[6]=(m*b-p*k-g*x)*L,e[7]=(c*k-d*b+h*x)*L,e[8]=(o*E-s*M+u*T)*L,e[9]=(n*M-r*E-a*T)*L,e[10]=(p*w-v*b+g*y)*L,e[11]=(f*b-c*w-h*y)*L,e[12]=(s*A-o*S-l*T)*L,e[13]=(r*S-n*A+i*T)*L,e[14]=(v*x-p*_-m*y)*L,e[15]=(c*_-f*x+d*y)*L,e):null}function ml(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],d=t[9],h=t[10],p=t[11],v=t[12],m=t[13],g=t[14],y=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*s+_*f+w*v,e[1]=x*i+b*l+_*d+w*m,e[2]=x*a+b*u+_*h+w*g,e[3]=x*o+b*c+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*n+b*s+_*f+w*v,e[5]=x*i+b*l+_*d+w*m,e[6]=x*a+b*u+_*h+w*g,e[7]=x*o+b*c+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*n+b*s+_*f+w*v,e[9]=x*i+b*l+_*d+w*m,e[10]=x*a+b*u+_*h+w*g,e[11]=x*o+b*c+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*n+b*s+_*f+w*v,e[13]=x*i+b*l+_*d+w*m,e[14]=x*a+b*u+_*h+w*g,e[15]=x*o+b*c+_*p+w*y,e}function gl(e,t,r){var n,i,a,o,s,l,u,c,f,d,h,p,v=r[0],m=r[1],g=r[2];return t===e?(e[12]=t[0]*v+t[4]*m+t[8]*g+t[12],e[13]=t[1]*v+t[5]*m+t[9]*g+t[13],e[14]=t[2]*v+t[6]*m+t[10]*g+t[14],e[15]=t[3]*v+t[7]*m+t[11]*g+t[15]):(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],d=t[9],h=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=f,e[9]=d,e[10]=h,e[11]=p,e[12]=n*v+s*m+f*g+t[12],e[13]=i*v+l*m+d*g+t[13],e[14]=a*v+u*m+h*g+t[14],e[15]=o*v+c*m+p*g+t[15]),e}function yl(e,t,r){var n=r[0],i=r[1],a=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]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function xl(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],d=t[11];return 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]),e[4]=a*i+u*n,e[5]=o*i+c*n,e[6]=s*i+f*n,e[7]=l*i+d*n,e[8]=u*i-a*n,e[9]=c*i-o*n,e[10]=f*i-s*n,e[11]=d*i-l*n,e}function bl(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],d=t[7];return 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]),e[0]=a*i+u*n,e[1]=o*i+c*n,e[2]=s*i+f*n,e[3]=l*i+d*n,e[4]=u*i-a*n,e[5]=c*i-o*n,e[6]=f*i-s*n,e[7]=d*i-l*n,e}function _l(e,t,r,n,i){var a,o=1/Math.tan(t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(a=1/(n-i),e[10]=(i+n)*a,e[14]=2*i*n*a):(e[10]=-1,e[14]=-2*n),e}function wl(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*u,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,r=arguments.length;r--;)t+=e[r]*e[r];return Math.sqrt(t)});var kl=ml;function Tl(){var e=new sl(3);return sl!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Al(e){var t=new sl(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ml(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function Sl(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function El(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function Cl(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function Ll(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Pl(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=i*l-a*s,e[1]=a*o-n*l,e[2]=n*s-i*o,e}function Ol(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e}var Il=Sl;function Rl(){var e=new sl(4);return sl!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function Dl(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function zl(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Fl(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e}function Nl(){var e=new sl(2);return sl!=Float32Array&&(e[0]=0,e[1]=0),e}function Bl(e){var t=e[0],r=e[1];return t*t+r*r}Tl(),Rl();var jl=Bl,Ul=(Nl(),function(e){function t(t){e.call(this,t,ol)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new qs(e)},t.prototype.queryRadius=function(e){var t=e;return rl("circle-radius",this,t)+rl("circle-stroke-width",this,t)+nl(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,a,o,s){for(var l=il(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),a.angle,o),u=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),c="map"===this.paint.get("circle-pitch-alignment"),f=c?l:Vl(l,s),d=c?u*o:u,h=0,p=n;he.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=e.data,s=t.data,l=0;l80*r){n=a=e[0],i=o=e[1];for(var p=r;pa&&(a=s),l>o&&(o=l);u=0!==(u=Math.max(a-n,o-i))?1/u:0}return su(d,h,r,n,i,u),h}function au(e,t,r,n,i){var a,o;if(i===Du(e,t,r,n)>0)for(a=t;a=t;a-=n)o=Ou(a,e[a],e[a+1],o);return o&&Tu(o,o.next)&&(Iu(o),o=o.next),o}function ou(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!Tu(n,n.next)&&0!==ku(n.prev,n,n.next))n=n.next;else{if(Iu(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function su(e,t,r,n,i,a,o){if(e){!o&&a&&gu(e,n,i,a);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,a?uu(e,n,i,a):lu(e))t.push(s.i/r),t.push(e.i/r),t.push(l.i/r),Iu(e),e=l.next,u=l.next;else if((e=l)===u){o?1===o?su(e=cu(ou(e),t,r),t,r,n,i,a,2):2===o&&fu(e,t,r,n,i,a):su(ou(e),t,r,n,i,a,1);break}}}function lu(e){var t=e.prev,r=e,n=e.next;if(ku(t,r,n)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(_u(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&ku(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function uu(e,t,r,n){var i=e.prev,a=e,o=e.next;if(ku(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=xu(s,l,t,r,n),d=xu(u,c,t,r,n),h=e.prevZ,p=e.nextZ;h&&h.z>=f&&p&&p.z<=d;){if(h!==e.prev&&h!==e.next&&_u(i.x,i.y,a.x,a.y,o.x,o.y,h.x,h.y)&&ku(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,p!==e.prev&&p!==e.next&&_u(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&ku(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;h&&h.z>=f;){if(h!==e.prev&&h!==e.next&&_u(i.x,i.y,a.x,a.y,o.x,o.y,h.x,h.y)&&ku(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&_u(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&ku(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function cu(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!Tu(i,a)&&Au(i,n,n.next,a)&&Cu(i,a)&&Cu(a,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(a.i/r),Iu(n),Iu(n.next),n=e=a),n=n.next}while(n!==e);return ou(n)}function fu(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&wu(o,s)){var l=Pu(o,s);return o=ou(o,o.next),l=ou(l,l.next),su(o,t,r,n,i,a),void su(l,t,r,n,i,a)}s=s.next}o=o.next}while(o!==e)}function du(e,t,r,n){var i,a,o,s=[];for(i=0,a=t.length;i=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&i!==n.x&&_u(ar.x||n.x===r.x&&mu(r,n)))&&(r=n,d=l)),n=n.next}while(n!==u);return r}function mu(e,t){return ku(e.prev,e,t.prev)<0&&ku(t.next,e,e.next)<0}function gu(e,t,r,n){var i=e;do{null===i.z&&(i.z=xu(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,yu(i)}function yu(e){var t,r,n,i,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return e}function xu(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function bu(e){var t=e,r=e;do{(t.x=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function wu(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Eu(e,t)&&(Cu(e,t)&&Cu(t,e)&&Lu(e,t)&&(ku(e.prev,e,t.prev)||ku(e,t.prev,t))||Tu(e,t)&&ku(e.prev,e,e.next)>0&&ku(t.prev,t,t.next)>0)}function ku(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Tu(e,t){return e.x===t.x&&e.y===t.y}function Au(e,t,r,n){var i=Su(ku(e,t,r)),a=Su(ku(e,t,n)),o=Su(ku(r,n,e)),s=Su(ku(r,n,t));return i!==a&&o!==s||!(0!==i||!Mu(e,r,t))||!(0!==a||!Mu(e,n,t))||!(0!==o||!Mu(r,e,n))||!(0!==s||!Mu(r,t,n))}function Mu(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Su(e){return e>0?1:e<0?-1:0}function Eu(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Au(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Cu(e,t){return ku(e.prev,e,e.next)<0?ku(e,t,e.next)>=0&&ku(e,e.prev,t)>=0:ku(e,t,e.prev)<0||ku(e,e.next,t)<0}function Lu(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!==r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}function Pu(e,t){var r=new Ru(e.i,e.x,e.y),n=new Ru(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Ou(e,t,r,n){var i=new Ru(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Iu(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Ru(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Du(e,t,r,n){for(var i=0,a=t,o=r-n;ar;){if(n-r>600){var a=n-r+1,o=t-r+1,s=Math.log(a),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);Fu(e,t,Math.max(r,Math.floor(t-o*l/a+u)),Math.min(n,Math.floor(t+(a-o)*l/a+u)),i)}var c=e[t],f=r,d=n;for(Nu(e,r,t),i(e[n],c)>0&&Nu(e,r,n);f0;)d--}0===i(e[r],c)?Nu(e,r,d):Nu(e,++d,n),d<=t&&(r=d+1),t<=d&&(n=d-1)}}function Nu(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Bu(e,t){return et?1:0}function ju(e,t){var r=e.length;if(r<=1)return[e];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&(n+=e[i-1].length,r.holes.push(n))}return r},ru.default=nu;var Hu=500,Gu=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ko,this.indexArray=new zo,this.indexArray2=new qo,this.programConfigurations=new Ps(e.layers,e.zoom),this.segments=new rs,this.segments2=new rs,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};Gu.prototype.populate=function(e,t,r){this.hasPattern=qu("fill",this.layers,t);for(var n=this.layers[0].layout.get("fill-sort-key"),i=[],a=0,o=e;a>3}if(i--,1===n||2===n)o+=e.readSVarint(),s+=e.readSVarint(),1===n&&(t&&l.push(t),t=[]),t.push(new a(o,s));else{if(7!==n)throw new Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&l.push(t),l},Ju.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;e.pos>3}if(n--,1===r||2===r)(i+=e.readSVarint())s&&(s=i),(a+=e.readSVarint())u&&(u=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,u]},Ju.prototype.toGeoJSON=function(e,t,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=Ju.types[this.type];function c(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}function oc(e,t){this.layers=e.readFields(sc,{},t)}function sc(e,t,r){if(3===e){var n=new rc(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}nc.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Ku(this._pbf,t,this.extent,this._keys,this._values)};var lc={VectorTile:oc,VectorTileFeature:Ku,VectorTileLayer:rc},uc=lc.VectorTileFeature.types,cc=500,fc=Math.pow(2,13);function dc(e,t,r,n,i,a,o,s){e.emplaceBack(t,r,2*Math.floor(n*fc)+o,i*fc*2,a*fc*2,Math.round(s))}var hc=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Ao,this.indexArray=new zo,this.programConfigurations=new Ps(e.layers,e.zoom),this.segments=new rs,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function pc(e,t){return e.x===t.x&&(e.x<0||e.x>Ds)||e.y===t.y&&(e.y<0||e.y>Ds)}function vc(e){return e.every((function(e){return e.x<0}))||e.every((function(e){return e.x>Ds}))||e.every((function(e){return e.y<0}))||e.every((function(e){return e.y>Ds}))}hc.prototype.populate=function(e,t,r){this.features=[],this.hasPattern=qu("fill-extrusion",this.layers,t);for(var n=0,i=e;n=1){var y=p[m-1];if(!pc(g,y)){f.vertexLength+4>rs.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=g.sub(y)._perp()._unit(),b=y.dist(g);v+b>32768&&(v=0),dc(this.layoutVertexArray,g.x,g.y,x.x,x.y,0,0,v),dc(this.layoutVertexArray,g.x,g.y,x.x,x.y,0,1,v),v+=b,dc(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,v),dc(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,v);var _=f.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),f.vertexLength+=4,f.primitiveLength+=2}}}}if(f.vertexLength+l>rs.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===uc[e.type]){for(var w=[],k=[],T=f.vertexLength,A=0,M=s;A=2&&e[l-1].equals(e[l-2]);)l--;for(var u=0;u0;if(k&&g>u){var A=c.dist(h);if(A>2*f){var M=c.sub(c.sub(h)._mult(f/A)._round());this.updateDistance(h,M),this.addCurrentVertex(M,v,0,0,d),h=M}}var S=h&&p,E=S?r:s?"butt":n;if(S&&"round"===E&&(_i&&(E="bevel"),"bevel"===E&&(_>2&&(E="flipbevel"),_100)y=m.mult(-1);else{var C=_*v.add(m).mag()/v.sub(m).mag();y._perp()._mult(C*(T?-1:1))}this.addCurrentVertex(c,y,0,0,d),this.addCurrentVertex(c,y.mult(-1),0,0,d)}else if("bevel"===E||"fakeround"===E){var L=-Math.sqrt(_*_-1),P=T?L:0,O=T?0:L;if(h&&this.addCurrentVertex(c,v,P,O,d),"fakeround"===E)for(var I=Math.round(180*w/Math.PI/Cc),R=1;R2*f){var j=c.add(p.sub(c)._mult(f/B)._round());this.updateDistance(c,j),this.addCurrentVertex(j,m,0,0,d),c=j}}}}},Ic.prototype.addCurrentVertex=function(e,t,r,n,i,a){void 0===a&&(a=!1);var o=t.x+t.y*r,s=t.y-t.x*r,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,o,s,a,!1,r,i),this.addHalfVertex(e,l,u,a,!0,-n,i),this.distance>Oc/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,r,n,i,a))},Ic.prototype.addHalfVertex=function(e,t,r,n,i,a,o){var s=e.x,l=e.y,u=(this.lineClips?this.scaledDistance*(Oc-1):this.scaledDistance)*Pc;if(this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(Mc*t)+128,Math.round(Mc*r)+128,1+(0===a?0:a<0?-1:1)|(63&u)<<2,u>>6),this.lineClips){var c=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(c,this.lineClipsArray.length)}var f=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,f),o.primitiveLength++),i?this.e2=f:this.e1=f},Ic.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Ic.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.updateScaledDistance()},ya("LineBucket",Ic,{omit:["layers","patternFeatures"]});var Rc=new fo({"line-cap":new oo(ft.layout_line["line-cap"]),"line-join":new so(ft.layout_line["line-join"]),"line-miter-limit":new oo(ft.layout_line["line-miter-limit"]),"line-round-limit":new oo(ft.layout_line["line-round-limit"]),"line-sort-key":new so(ft.layout_line["line-sort-key"])}),Dc={paint:new fo({"line-opacity":new so(ft.paint_line["line-opacity"]),"line-color":new so(ft.paint_line["line-color"]),"line-translate":new oo(ft.paint_line["line-translate"]),"line-translate-anchor":new oo(ft.paint_line["line-translate-anchor"]),"line-width":new so(ft.paint_line["line-width"]),"line-gap-width":new so(ft.paint_line["line-gap-width"]),"line-offset":new so(ft.paint_line["line-offset"]),"line-blur":new so(ft.paint_line["line-blur"]),"line-dasharray":new uo(ft.paint_line["line-dasharray"]),"line-pattern":new lo(ft.paint_line["line-pattern"]),"line-gradient":new co(ft.paint_line["line-gradient"])}),layout:Rc},zc=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,r){return r=new Ja(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),e.prototype.possiblyEvaluate.call(this,t,r)},t.prototype.evaluate=function(t,r,n,i){return r=y({},r,{zoom:Math.floor(r.zoom)}),e.prototype.evaluate.call(this,t,r,n,i)},t}(so),Fc=new zc(Dc.paint.properties["line-width"].specification);Fc.useIntegerZoom=!0;var Nc=function(e){function t(t){e.call(this,t,Dc),this.gradientVersion=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){if("line-gradient"===e){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=t._styleExpression.expression instanceof Nr,this.gradientVersion=(this.gradientVersion+1)%u}},t.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},t.prototype.recalculate=function(t,r){e.prototype.recalculate.call(this,t,r),this.paint._values["line-floorwidth"]=Fc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new Ic(e)},t.prototype.queryRadius=function(e){var t=e,r=Bc(rl("line-width",this,t),rl("line-gap-width",this,t)),n=rl("line-offset",this,t);return r/2+Math.abs(n)+nl(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,a,o){var s=il(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,o),l=o/2*Bc(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),u=this.paint.get("line-offset").evaluate(t,r);return u&&(n=jc(n,u*o)),Ws(s,n,l)},t.prototype.isTileClipped=function(){return!0},t}(po);function Bc(e,t){return t>0?t+2*e:e}function jc(e,t){for(var r=[],n=new a(0,0),i=0;i":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"};function Kc(e){for(var t="",r=0;r>1,c=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=d,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=d,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),a-=u}return(h?-1:1)*o*Math.pow(2,a-n)},write:function(e,t,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(o=o<0;e[r+h]=255&o,h+=p,o/=256,u-=8);e[r+h-p]|=128*v}},Qc=ef;function ef(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}ef.Varint=0,ef.Fixed64=1,ef.Bytes=2,ef.Fixed32=5;var tf=4294967296,rf=1/tf,nf=12,af="undefined"===typeof TextDecoder?null:new TextDecoder("utf8");function of(e,t,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128)return lf(e,n,t);if(n|=(127&(i=a[r.pos++]))<<3,i<128)return lf(e,n,t);if(n|=(127&(i=a[r.pos++]))<<10,i<128)return lf(e,n,t);if(n|=(127&(i=a[r.pos++]))<<17,i<128)return lf(e,n,t);if(n|=(127&(i=a[r.pos++]))<<24,i<128)return lf(e,n,t);if(n|=(1&(i=a[r.pos++]))<<31,i<128)return lf(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function sf(e){return e.type===ef.Bytes?e.readVarint()+e.pos:e.pos+1}function lf(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function uf(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),cf(r,n,t),ff(n,t)}function cf(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos]=127&e}function ff(e,t){var r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function df(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function hf(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function Tf(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function Af(e,t,r){for(var n="",i=t;i239?4:l>223?3:l>191?2:1;if(i+c>r)break;1===c?l<128&&(u=l):2===c?128===(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)<=127&&(u=null):3===c?(a=e[i+1],o=e[i+2],128===(192&a)&&128===(192&o)&&((u=(15&l)<<12|(63&a)<<6|63&o)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=e[i+1],o=e[i+2],s=e[i+3],128===(192&a)&&128===(192&o)&&128===(192&s)&&((u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),i+=c}return n}function Mf(e,t,r){return af.decode(e.subarray(t,r))}function Sf(e,t,r){for(var n,i,a=0;a55295&&n<57344){if(!i){n>56319||a+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):i=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(e[r++]=239,e[r++]=191,e[r++]=189,i=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}ef.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,a=this.pos;this.type=7&n,e(i,t,this),this.pos===a&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=wf(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Tf(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=wf(this.buf,this.pos)+wf(this.buf,this.pos+4)*tf;return this.pos+=8,e},readSFixed64:function(){var e=wf(this.buf,this.pos)+Tf(this.buf,this.pos+4)*tf;return this.pos+=8,e},readFloat:function(){var e=$c.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=$c.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:of(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=nf&&af?Mf(this.buf,t,e):Af(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==ef.Bytes)return e.push(this.readVarint(t));var r=sf(this);for(e=e||[];this.pos127;);else if(t===ef.Bytes)this.pos=this.readVarint()+this.pos;else if(t===ef.Fixed32)this.pos+=4;else{if(t!==ef.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?uf(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=Sf(this.buf,e,this.pos);var r=this.pos-t;r>=128&&df(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),$c.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),$c.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&df(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,ef.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,hf,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,pf,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,gf,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,vf,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,mf,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,yf,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,xf,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,bf,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,_f,t)},writeBytesField:function(e,t){this.writeTag(e,ef.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,ef.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,ef.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,ef.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,ef.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,ef.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,ef.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,ef.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,ef.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,ef.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var Ef=3;function Cf(e,t,r){1===e&&r.readMessage(Lf,t)}function Lf(e,t,r){if(3===e){var n=r.readMessage(Pf,{}),i=n.id,a=n.bitmap,o=n.width,s=n.height,l=n.left,u=n.top,c=n.advance;t.push({id:i,bitmap:new Zl({width:o+2*Ef,height:s+2*Ef},a),metrics:{width:o,height:s,left:l,top:u,advance:c}})}}function Pf(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function Of(e){return new Qc(e).readFields(Cf,[])}var If=Ef;function Rf(e){for(var t=0,r=0,n=0,i=e;n=0;d--){var h=o[d];if(!(f.w>h.w||f.h>h.h)){if(f.x=h.x,f.y=h.y,l=Math.max(l,f.y+f.h),s=Math.max(s,f.x+f.w),f.w===h.w&&f.h===h.h){var p=o.pop();d=0&&n>=e&&Zf[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)},Gf.prototype.substring=function(e,t){var r=new Gf;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r},Gf.prototype.toString=function(){return this.text},Gf.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,r){return Math.max(t,e.sections[r].scale)}),0)},Gf.prototype.addTextSection=function(e,t){this.text+=e.text,this.sections.push(Hf.forText(e.scale,e.fontStack||t));for(var r=this.sections.length-1,n=0;n=Vf?null:++this.imageSectionID:(this.imageSectionID=qf,this.imageSectionID)};var Zf={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Xf={};function Kf(e,t,r,n,i,a){if(t.imageName){var o=n[t.imageName];return o?o.displaySize[0]*t.scale*Jc/a+i:0}var s=r[t.fontStack],l=s&&s[e];return l?l.metrics.advance*t.scale+i:0}function Jf(e,t,r,n,i,a){for(var o=0,s=0;s=0,c=0,f=0;f0&&N>A&&(A=N)}else{var B=r[S.fontStack],j=B&&B[C];if(j&&j.rect)O=j.rect,P=j.metrics;else{var U=t[S.fontStack],q=U&&U[C];if(!q)continue;P=q.metrics}L=(_-S.scale)*Jc}D?(e.verticalizable=!0,T.push({glyph:C,imageName:I,x:d,y:h+L,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:O}),d+=R*S.scale+u):(T.push({glyph:C,imageName:I,x:d,y:h+L,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:O}),d+=P.advance*S.scale+u)}if(0!==T.length){var V=d-u;p=Math.max(V,p),ad(T,0,T.length-1,m,A)}d=0;var H=a*_+A;k.lineOffset=Math.max(A,w),h+=H,v=Math.max(H,v),++g}else h+=a,++g}var G=h-jf,W=nd(o),Y=W.horizontalAlign,Z=W.verticalAlign;od(e.positionedLines,m,Y,Z,p,v,a,G,i.length),e.top+=-Z*G,e.bottom=e.top+G,e.left+=-Y*p,e.right=e.left+p}function ad(e,t,r,n,i){if(n||i)for(var a=e[r],o=a.metrics.advance*a.scale,s=(e[r].x+o)*n,l=t;l<=r;l++)e[l].x-=s,e[l].y+=i}function od(e,t,r,n,i,a,o,s,l){var u=(t-r)*i,c=0;c=a!==o?-s*n-jf:(-n*l+.5)*o;for(var f=0,d=e;f-r/2;){if(--o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=f.dist(d)}return!0}function md(e){for(var t=0,r=0;ru){var p=(u-l)/h,v=Br(f.x,d.x,p),m=Br(f.y,d.y,p),g=new ud(v,m,d.angleTo(f),c);return g._round(),!o||vd(e,g,s,o,t)?g:void 0}l+=h}}function bd(e,t,r,n,i,a,o,s,l){var u=gd(n,a,o),c=yd(n,i),f=c*o,d=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-f=0&&b=0&&_=0&&d+u<=c){var w=new ud(b,_,y,p);w._round(),n&&!vd(e,w,a,n,i)||h.push(w)}}f+=g}return s||h.length||o||(h=_d(e,f/2,r,n,i,a,o,!0,l)),h}function wd(e,t,r,n,i){for(var o=[],s=0;s=n&&d.x>=n||(f.x>=n?f=new a(n,f.y+(d.y-f.y)*((n-f.x)/(d.x-f.x)))._round():d.x>=n&&(d=new a(n,f.y+(d.y-f.y)*((n-f.x)/(d.x-f.x)))._round()),f.y>=i&&d.y>=i||(f.y>=i?f=new a(f.x+(d.x-f.x)*((i-f.y)/(d.y-f.y)),i)._round():d.y>=i&&(d=new a(f.x+(d.x-f.x)*((i-f.y)/(d.y-f.y)),i)._round()),u&&f.equals(u[u.length-1])||(u=[f],o.push(u)),u.push(d)))))}return o}var kd=Df;function Td(e,t,r,n){var i=[],o=e.image,s=o.pixelRatio,l=o.paddedRect.w-2*kd,u=o.paddedRect.h-2*kd,c=e.right-e.left,f=e.bottom-e.top,d=o.stretchX||[[0,l]],h=o.stretchY||[[0,u]],p=function(e,t){return e+t[1]-t[0]},v=d.reduce(p,0),m=h.reduce(p,0),g=l-v,y=u-m,x=0,b=v,_=0,w=m,k=0,T=g,A=0,M=y;if(o.content&&n){var S=o.content;x=Ad(d,0,S[0]),_=Ad(h,0,S[1]),b=Ad(d,S[0],S[2]),w=Ad(h,S[1],S[3]),k=S[0]-x,A=S[1]-_,T=S[2]-S[0]-b,M=S[3]-S[1]-w}var E=function(n,i,l,u){var d=Sd(n.stretch-x,b,c,e.left),h=Ed(n.fixed-k,T,n.stretch,v),p=Sd(i.stretch-_,w,f,e.top),g=Ed(i.fixed-A,M,i.stretch,m),y=Sd(l.stretch-x,b,c,e.left),S=Ed(l.fixed-k,T,l.stretch,v),E=Sd(u.stretch-_,w,f,e.top),C=Ed(u.fixed-A,M,u.stretch,m),L=new a(d,p),P=new a(y,p),O=new a(y,E),I=new a(d,E),R=new a(h/s,g/s),D=new a(S/s,C/s),z=t*Math.PI/180;if(z){var F=Math.sin(z),N=Math.cos(z),B=[N,-F,F,N];L._matMult(B),P._matMult(B),I._matMult(B),O._matMult(B)}var j=n.stretch+n.fixed,U=l.stretch+l.fixed,q=i.stretch+i.fixed,V=u.stretch+u.fixed;return{tl:L,tr:P,bl:I,br:O,tex:{x:o.paddedRect.x+kd+j,y:o.paddedRect.y+kd+q,w:U-j,h:V-q},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:R,pixelOffsetBR:D,minFontScaleX:T/s/c,minFontScaleY:M/s/f,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var C=Md(d,g,v),L=Md(h,y,m),P=0;P0&&(p=Math.max(10,p),this.circleDiameter=p)}else{var v=o.top*s-l,m=o.bottom*s+l,g=o.left*s-l,y=o.right*s+l,x=o.collisionPadding;if(x&&(g-=x[0]*s,v-=x[1]*s,y+=x[2]*s,m+=x[3]*s),c){var b=new a(g,v),_=new a(y,v),w=new a(g,m),k=new a(y,m),T=c*Math.PI/180;b._rotate(T),_._rotate(T),w._rotate(T),k._rotate(T),g=Math.min(b.x,_.x,w.x,k.x),y=Math.max(b.x,_.x,w.x,k.x),v=Math.min(b.y,_.y,w.y,k.y),m=Math.max(b.y,_.y,w.y,k.y)}e.emplaceBack(t.x,t.y,g,v,y,m,r,n,i)}this.boxEndIndex=e.length},Pd=function(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=Od),this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function Od(e,t){return et?1:0}function Id(e,t,r){void 0===t&&(t=1),void 0===r&&(r=!1);for(var n=1/0,i=1/0,o=-1/0,s=-1/0,l=e[0],u=0;uo)&&(o=c.x),(!u||c.y>s)&&(s=c.y)}var f=o-n,d=s-i,h=Math.min(f,d),p=h/2,v=new Pd([],Rd);if(0===h)return new a(n,i);for(var m=n;my.d||!y.d)&&(y=b,r&&console.log("found best %d after %d probes",Math.round(1e4*b.d)/1e4,x)),b.max-y.d<=t||(p=b.h/2,v.push(new Dd(b.p.x-p,b.p.y-p,p,e)),v.push(new Dd(b.p.x+p,b.p.y-p,p,e)),v.push(new Dd(b.p.x-p,b.p.y+p,p,e)),v.push(new Dd(b.p.x+p,b.p.y+p,p,e)),x+=4)}return r&&(console.log("num probes: "+x),console.log("best distance: "+y.d)),y.p}function Rd(e,t){return t.max-e.max}function Dd(e,t,r,n){this.p=new a(e,t),this.h=r,this.d=zd(this.p,n),this.max=this.d+this.h*Math.SQRT2}function zd(e,t){for(var r=!1,n=1/0,i=0;ie.y!==c.y>e.y&&e.x<(c.x-u.x)*(e.y-u.y)/(c.y-u.y)+u.x&&(r=!r),n=Math.min(n,Js(e,u,c))}return(r?1:-1)*Math.sqrt(n)}function Fd(e){for(var t=0,r=0,n=0,i=e[0],a=0,o=i.length,s=o-1;a0&&(this.data[0]=t,this._down(0)),e}},Pd.prototype.peek=function(){return this.data[0]},Pd.prototype._up=function(e){for(var t=this,r=t.data,n=t.compare,i=r[e];e>0;){var a=e-1>>1,o=r[a];if(n(i,o)>=0)break;r[e]=o,e=a}r[e]=i},Pd.prototype._down=function(e){for(var t=this,r=t.data,n=t.compare,i=this.length>>1,a=r[e];e=0)break;r[e]=s,e=o}r[e]=a};var Nd=7,Bd=Number.POSITIVE_INFINITY;function jd(e,t){function r(e,t){var r=0,n=0;t<0&&(t=0);var i=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=i-Nd;break;case"bottom-right":case"bottom-left":n=-i+Nd;break;case"bottom":n=-t+Nd;break;case"top":n=t-Nd}switch(e){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=t;break;case"right":r=-t}return[r,n]}function n(e,t,r){var n=0,i=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":i=r-Nd;break;case"bottom-right":case"bottom-left":case"bottom":i=-r+Nd}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,i]}return t[1]!==Bd?n(e,t[0],t[1]):r(e,t[0])}function Ud(e,t,r,n,i,a,o){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=Ds/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,u=e.layers[0]._unevaluatedLayout._values,c={};if("composite"===e.textSizeData.kind){var f=e.textSizeData,d=f.minZoom,h=f.maxZoom;c.compositeTextSizes=[u["text-size"].possiblyEvaluate(new Ja(d),o),u["text-size"].possiblyEvaluate(new Ja(h),o)]}if("composite"===e.iconSizeData.kind){var p=e.iconSizeData,v=p.minZoom,m=p.maxZoom;c.compositeIconSizes=[u["icon-size"].possiblyEvaluate(new Ja(v),o),u["icon-size"].possiblyEvaluate(new Ja(m),o)]}c.layoutTextSize=u["text-size"].possiblyEvaluate(new Ja(e.zoom+1),o),c.layoutIconSize=u["icon-size"].possiblyEvaluate(new Ja(e.zoom+1),o),c.textMaxSize=u["text-size"].possiblyEvaluate(new Ja(18));for(var g=l.get("text-line-height")*Jc,y="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),x=l.get("text-keep-upright"),b=l.get("text-size"),_=function(){var a=k[w],s=l.get("text-font").evaluate(a,{},o).join(","),u=b.evaluate(a,{},o),f=c.layoutTextSize.evaluate(a,{},o),d=c.layoutIconSize.evaluate(a,{},o),h={horizontal:{},vertical:void 0},p=a.text,v=[0,0];if(p){var m=p.toString(),_=l.get("text-letter-spacing").evaluate(a,{},o)*Jc,T=Sa(m)?_:0,A=l.get("text-anchor").evaluate(a,{},o),M=l.get("text-variable-anchor");if(!M){var S=l.get("text-radial-offset").evaluate(a,{},o);v=S?jd(A,[S*Jc,Bd]):l.get("text-offset").evaluate(a,{},o).map((function(e){return e*Jc}))}var E=y?"center":l.get("text-justify").evaluate(a,{},o),C=l.get("symbol-placement"),L="point"===C?l.get("text-max-width").evaluate(a,{},o)*Jc:0,P=function(){e.allowVerticalPlacement&&Ma(m)&&(h.vertical=Yf(p,t,r,i,s,L,g,A,"left",T,v,Bf.vertical,!0,C,f,u))};if(!y&&M){for(var I="auto"===E?M.map((function(e){return qd(e)})):[E],R=!1,D=0;D=Ds||f.y<0||f.y>=Ds||Zd(e,f,s,r,n,i,d,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,y,w,A,l,b,k,M,p,t,a,u,c,o)};if("line"===S)for(var P=0,O=wd(t.geometry,0,0,Ds,Ds);P1){var j=xd(B,T,r.vertical||v,n,m,x);j&&L(B,j)}}else if("Polygon"===t.type)for(var U=0,q=ju(t.geometry,0);UGd&&O(e.layerIds[0]+': Value for "text-size" is >= '+Hd+'. Reduce your "text-size".'):"composite"===m.kind&&((g=[cd*h.compositeTextSizes[0].evaluate(o,{},p),cd*h.compositeTextSizes[1].evaluate(o,{},p)])[0]>Gd||g[1]>Gd)&&O(e.layerIds[0]+': Value for "text-size" is >= '+Hd+'. Reduce your "text-size".'),e.addSymbols(e.text,v,g,s,a,o,u,t,l.lineStartIndex,l.lineLength,d,p);for(var y=0,x=c;yGd&&O(e.layerIds[0]+': Value for "icon-size" is >= '+Hd+'. Reduce your "icon-size".'):"composite"===Z.kind&&((X=[cd*_.compositeIconSizes[0].evaluate(b,{},k),cd*_.compositeIconSizes[1].evaluate(b,{},k)])[0]>Gd||X[1]>Gd)&&O(e.layerIds[0]+': Value for "icon-size" is >= '+Hd+'. Reduce your "icon-size".'),e.addSymbols(e.icon,W,X,x,y,b,!1,t,L.lineStartIndex,L.lineLength,-1,k),z=e.icon.placedSymbolArray.length-1,Y&&(I=4*Y.length,e.addSymbols(e.icon,Y,X,x,y,b,Bf.vertical,t,L.lineStartIndex,L.lineLength,-1,k),F=e.icon.placedSymbolArray.length-1)}for(var K in n.horizontal){var J=n.horizontal[K];if(!M){B=ss(J.text);var $=s.layout.get("text-rotate").evaluate(b,{},k);M=new Ld(l,t,u,c,f,J,d,h,p,$)}var Q=1===J.positionedLines.length;if(R+=Wd(e,t,J,a,s,p,b,v,L,n.vertical?Bf.horizontal:Bf.horizontalOnly,Q?Object.keys(n.horizontal):[K],N,z,_,k),Q)break}n.vertical&&(D+=Wd(e,t,n.vertical,a,s,p,b,v,L,Bf.vertical,["vertical"],N,F,_,k));var ee=M?M.boxStartIndex:e.collisionBoxArray.length,te=M?M.boxEndIndex:e.collisionBoxArray.length,re=E?E.boxStartIndex:e.collisionBoxArray.length,ne=E?E.boxEndIndex:e.collisionBoxArray.length,ie=S?S.boxStartIndex:e.collisionBoxArray.length,ae=S?S.boxEndIndex:e.collisionBoxArray.length,oe=C?C.boxStartIndex:e.collisionBoxArray.length,se=C?C.boxEndIndex:e.collisionBoxArray.length,le=-1,ue=function(e,t){return e&&e.circleDiameter?Math.max(e.circleDiameter,t):t};le=ue(M,le),le=ue(E,le),le=ue(S,le);var ce=(le=ue(C,le))>-1?1:0;ce&&(le*=T/Jc),e.glyphOffsetArray.length>=nh.MAX_GLYPHS&&O("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,b.sortKey),e.symbolInstances.emplaceBack(t.x,t.y,N.right>=0?N.right:-1,N.center>=0?N.center:-1,N.left>=0?N.left:-1,N.vertical||-1,z,F,B,ee,te,re,ne,ie,ae,oe,se,u,R,D,P,I,ce,0,d,j,U,le)}function Xd(e,t,r,n){var i=e.compareText;if(t in i){for(var a=i[t],o=a.length-1;o>=0;o--)if(n.dist(a[o])0)&&("constant"!==a.value.kind||a.value.value.length>0),u="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=i.get("symbol-sort-key");if(this.features=[],l||u){for(var f=t.iconDependencies,d=t.glyphDependencies,h=t.availableImages,p=new Ja(this.zoom),v=0,m=e;v=0;for(var I=0,R=T.sections;I=0;s--)a[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=t[s-1].dist(t[s]));for(var l=0;l0},nh.prototype.hasIconData=function(){return this.icon.segments.get().length>0},nh.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},nh.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},nh.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},nh.prototype.addIndicesForPlacedSymbol=function(e,t){for(var r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(e)===r&&t.addIndicesForPlacedSymbol(t.text,e)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},ya("SymbolBucket",nh,{omit:["layers","collisionBoxArray","features","compareText"]}),nh.MAX_GLYPHS=65535,nh.addDynamicAttributes=Qd;var ah=new fo({"symbol-placement":new oo(ft.layout_symbol["symbol-placement"]),"symbol-spacing":new oo(ft.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new oo(ft.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new so(ft.layout_symbol["symbol-sort-key"]),"symbol-z-order":new oo(ft.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new oo(ft.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new oo(ft.layout_symbol["icon-ignore-placement"]),"icon-optional":new oo(ft.layout_symbol["icon-optional"]),"icon-rotation-alignment":new oo(ft.layout_symbol["icon-rotation-alignment"]),"icon-size":new so(ft.layout_symbol["icon-size"]),"icon-text-fit":new oo(ft.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new oo(ft.layout_symbol["icon-text-fit-padding"]),"icon-image":new so(ft.layout_symbol["icon-image"]),"icon-rotate":new so(ft.layout_symbol["icon-rotate"]),"icon-padding":new oo(ft.layout_symbol["icon-padding"]),"icon-keep-upright":new oo(ft.layout_symbol["icon-keep-upright"]),"icon-offset":new so(ft.layout_symbol["icon-offset"]),"icon-anchor":new so(ft.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new oo(ft.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new oo(ft.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new oo(ft.layout_symbol["text-rotation-alignment"]),"text-field":new so(ft.layout_symbol["text-field"]),"text-font":new so(ft.layout_symbol["text-font"]),"text-size":new so(ft.layout_symbol["text-size"]),"text-max-width":new so(ft.layout_symbol["text-max-width"]),"text-line-height":new oo(ft.layout_symbol["text-line-height"]),"text-letter-spacing":new so(ft.layout_symbol["text-letter-spacing"]),"text-justify":new so(ft.layout_symbol["text-justify"]),"text-radial-offset":new so(ft.layout_symbol["text-radial-offset"]),"text-variable-anchor":new oo(ft.layout_symbol["text-variable-anchor"]),"text-anchor":new so(ft.layout_symbol["text-anchor"]),"text-max-angle":new oo(ft.layout_symbol["text-max-angle"]),"text-writing-mode":new oo(ft.layout_symbol["text-writing-mode"]),"text-rotate":new so(ft.layout_symbol["text-rotate"]),"text-padding":new oo(ft.layout_symbol["text-padding"]),"text-keep-upright":new oo(ft.layout_symbol["text-keep-upright"]),"text-transform":new so(ft.layout_symbol["text-transform"]),"text-offset":new so(ft.layout_symbol["text-offset"]),"text-allow-overlap":new oo(ft.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new oo(ft.layout_symbol["text-ignore-placement"]),"text-optional":new oo(ft.layout_symbol["text-optional"])}),oh={paint:new fo({"icon-opacity":new so(ft.paint_symbol["icon-opacity"]),"icon-color":new so(ft.paint_symbol["icon-color"]),"icon-halo-color":new so(ft.paint_symbol["icon-halo-color"]),"icon-halo-width":new so(ft.paint_symbol["icon-halo-width"]),"icon-halo-blur":new so(ft.paint_symbol["icon-halo-blur"]),"icon-translate":new oo(ft.paint_symbol["icon-translate"]),"icon-translate-anchor":new oo(ft.paint_symbol["icon-translate-anchor"]),"text-opacity":new so(ft.paint_symbol["text-opacity"]),"text-color":new so(ft.paint_symbol["text-color"],{runtimeType:kt,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new so(ft.paint_symbol["text-halo-color"]),"text-halo-width":new so(ft.paint_symbol["text-halo-width"]),"text-halo-blur":new so(ft.paint_symbol["text-halo-blur"]),"text-translate":new oo(ft.paint_symbol["text-translate"]),"text-translate-anchor":new oo(ft.paint_symbol["text-translate-anchor"])}),layout:ah},sh=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:xt,this.defaultValue=e};sh.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},sh.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},sh.prototype.outputDefined=function(){return!1},sh.prototype.serialize=function(){return null},ya("FormatSectionOverride",sh,{omit:["defaultValue"]});var lh=function(e){function t(t){e.call(this,t,oh)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t,r){if(e.prototype.recalculate.call(this,t,r),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var i=[],a=0,o=n;a",targetMapId:n,sourceMapId:a.mapId})}}},Th.prototype.receive=function(e){var t=e.data,r=t.id;if(r&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else z()||t.mustQueue?(this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,t)},Th.prototype.process=function(){if(this.taskQueue.length){var e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)}},Th.prototype.processTask=function(e,t){var r=this;if(""===t.type){var n=this.callbacks[e];delete this.callbacks[e],n&&(t.error?n(ka(t.error)):n(null,ka(t.data)))}else{var i=!1,a=B(this.globalScope)?void 0:[],o=t.hasCallback?function(t,n){i=!0,delete r.cancelCallbacks[e],r.target.postMessage({id:e,type:"",sourceMapId:r.mapId,error:t?wa(t):null,data:wa(n,a)},a)}:function(e){i=!0},s=null,l=ka(t.data);if(this.parent[t.type])s=this.parent[t.type](t.sourceMapId,l,o);else if(this.parent.getWorkerSource){var u=t.type.split(".");s=this.parent.getWorkerSource(t.sourceMapId,u[0],l.source)[u[1]](l,o)}else o(new Error("Could not find function "+t.type));!i&&s&&s.cancel&&(this.cancelCallbacks[e]=s.cancel)}},Th.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Sh=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};Sh.prototype.setNorthEast=function(e){return this._ne=e instanceof Ch?new Ch(e.lng,e.lat):Ch.convert(e),this},Sh.prototype.setSouthWest=function(e){return this._sw=e instanceof Ch?new Ch(e.lng,e.lat):Ch.convert(e),this},Sh.prototype.extend=function(e){var t,r,n=this._sw,i=this._ne;if(e instanceof Ch)t=e,r=e;else{if(!(e instanceof Sh)){if(Array.isArray(e)){if(4===e.length||e.every(Array.isArray)){var a=e;return this.extend(Sh.convert(a))}var o=e;return this.extend(Ch.convert(o))}return this}if(t=e._sw,r=e._ne,!t||!r)return this}return n||i?(n.lng=Math.min(t.lng,n.lng),n.lat=Math.min(t.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new Ch(t.lng,t.lat),this._ne=new Ch(r.lng,r.lat)),this},Sh.prototype.getCenter=function(){return new Ch((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Sh.prototype.getSouthWest=function(){return this._sw},Sh.prototype.getNorthEast=function(){return this._ne},Sh.prototype.getNorthWest=function(){return new Ch(this.getWest(),this.getNorth())},Sh.prototype.getSouthEast=function(){return new Ch(this.getEast(),this.getSouth())},Sh.prototype.getWest=function(){return this._sw.lng},Sh.prototype.getSouth=function(){return this._sw.lat},Sh.prototype.getEast=function(){return this._ne.lng},Sh.prototype.getNorth=function(){return this._ne.lat},Sh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Sh.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Sh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Sh.prototype.contains=function(e){var t=Ch.convert(e),r=t.lng,n=t.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},Sh.convert=function(e){return!e||e instanceof Sh?e:new Sh(e)};var Eh=6371008.8,Ch=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ch.prototype.wrap=function(){return new Ch(p(this.lng,-180,180),this.lat)},Ch.prototype.toArray=function(){return[this.lng,this.lat]},Ch.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ch.prototype.distanceTo=function(e){var t=Math.PI/180,r=this.lat*t,n=e.lat*t,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return Eh*Math.acos(Math.min(i,1))},Ch.prototype.toBounds=function(e){void 0===e&&(e=0);var t=360*e/40075017,r=t/Math.cos(Math.PI/180*this.lat);return new Sh(new Ch(this.lng-r,this.lat-t),new Ch(this.lng+r,this.lat+t))},Ch.convert=function(e){if(e instanceof Ch)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Ch(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"===typeof e&&null!==e)return new Ch(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Lh=2*Math.PI*Eh;function Ph(e){return Lh*Math.cos(e*Math.PI/180)}function Oh(e){return(180+e)/360}function Ih(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Rh(e,t){return e/Ph(t)}function Dh(e){return 360*e-180}function zh(e){var t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function Fh(e,t){return e*Ph(zh(t))}function Nh(e){return 1/Math.cos(e*Math.PI/180)}var Bh=function(e,t,r){void 0===r&&(r=0),this.x=+e,this.y=+t,this.z=+r};Bh.fromLngLat=function(e,t){void 0===t&&(t=0);var r=Ch.convert(e);return new Bh(Oh(r.lng),Ih(r.lat),Rh(t,r.lat))},Bh.prototype.toLngLat=function(){return new Ch(Dh(this.x),zh(this.y))},Bh.prototype.toAltitude=function(){return Fh(this.z,this.y)},Bh.prototype.meterInMercatorCoordinateUnits=function(){return 1/Lh*Nh(zh(this.y))};var jh=function(e,t,r){this.z=e,this.x=t,this.y=r,this.key=Vh(0,e,e,t,r)};jh.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},jh.prototype.url=function(e,t){var r=Ah(this.x,this.y,this.z),n=Hh(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===t?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",n).replace("{bbox-epsg-3857}",r)},jh.prototype.getTilePoint=function(e){var t=Math.pow(2,this.z);return new a((e.x*t-this.x)*Ds,(e.y*t-this.y)*Ds)},jh.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Uh=function(e,t){this.wrap=e,this.canonical=t,this.key=Vh(e,t.z,t.z,t.x,t.y)},qh=function(e,t,r,n,i){this.overscaledZ=e,this.wrap=t,this.canonical=new jh(r,+n,+i),this.key=Vh(t,e,r,n,i)};function Vh(e,t,r,n,i){(e*=2)<0&&(e=-1*e-1);var a=1<0;a--)i+=(t&(n=1<this.canonical.z?new qh(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new qh(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},qh.prototype.calculateScaledKey=function(e,t){var r=this.canonical.z-e;return e>this.canonical.z?Vh(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):Vh(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)},qh.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t},qh.prototype.children=function(e){if(this.overscaledZ>=e)return[new qh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new qh(t,this.wrap,t,r,n),new qh(t,this.wrap,t,r+1,n),new qh(t,this.wrap,t,r,n+1),new qh(t,this.wrap,t,r+1,n+1)]},qh.prototype.isLessThan=function(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},Gh.prototype._unpackMapbox=function(e,t,r){return(256*e*256+256*t+r)/10-1e4},Gh.prototype._unpackTerrarium=function(e,t,r){return 256*e+t+r/256-32768},Gh.prototype.getPixels=function(){return new Xl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Gh.prototype.backfillBorder=function(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var n=t*this.dim,i=t*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(t){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-t*this.dim,l=-r*this.dim,u=a;u=0&&c[3]>=0&&s.insert(o,c[0],c[1],c[2],c[3])}},Jh.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new lc.VectorTile(new Qc(this.rawTileData)).layers,this.sourceLayerCoder=new Yh(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Jh.prototype.query=function(e,t,r,n){var i=this;this.loadVTLayers();for(var a=e.params||{},o=Ds/e.tileSize/e.scale,s=Ii(a.filter),l=e.queryGeometry,u=e.queryPadding*o,c=Qh(l),f=this.grid.query(c.minX-u,c.minY-u,c.maxX+u,c.maxY+u),d=Qh(e.cameraQueryGeometry),h=0,p=this.grid3D.query(d.minX-u,d.minY-u,d.maxX+u,d.maxY+u,(function(t,r,n,i){return el(e.cameraQueryGeometry,t-u,r-u,n+u,i+u)}));hn)i=!1;else if(t)if(this.expirationTime=E.maxzoom||"none"!==E.visibility&&(l(S,this.zoom,n),(v[E.id]=E.createBucket({index:c.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,m,this.tileID.canonical),c.bucketLayerIDs.push(S.map((function(e){return e.id}))))}}}var C=e.mapObject(m.glyphDependencies,(function(e){return Object.keys(e).map(Number)}));Object.keys(C).length?i.send("getGlyphs",{uid:this.uid,stacks:C},(function(e,t){f||(f=e,d=t,O.call(s))})):d={};var L=Object.keys(m.iconDependencies);L.length?i.send("getImages",{icons:L,source:this.source,tileID:this.tileID,type:"icons"},(function(e,t){f||(f=e,h=t,O.call(s))})):h={};var P=Object.keys(m.patternDependencies);function O(){if(f)return a(f);if(d&&h&&p){var t=new o(d),r=new e.ImageAtlas(h,p);for(var i in v){var s=v[i];s instanceof e.SymbolBucket?(l(s.layers,this.zoom,n),e.performSymbolLayout(s,d,t.positions,h,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):s.hasPattern&&(s instanceof e.LineBucket||s instanceof e.FillBucket||s instanceof e.FillExtrusionBucket)&&(l(s.layers,this.zoom,n),s.addFeatures(m,this.tileID.canonical,r.patternPositions))}this.status="done",a(null,{buckets:e.values(v).filter((function(e){return!e.isEmpty()})),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:r,glyphMap:this.returnDependencies?d:null,iconMap:this.returnDependencies?h:null,glyphPositions:this.returnDependencies?t.positions:null})}}P.length?i.send("getImages",{icons:P,source:this.source,tileID:this.tileID,type:"patterns"},(function(e,t){f||(f=e,p=t,O.call(s))})):p={},O.call(this)};var c=function(e,t,r,n){this.actor=e,this.layerIndex=t,this.availableImages=r,this.loadVectorData=n||u,this.loading={},this.loaded={}};c.prototype.loadTile=function(t,r){var n=this,i=t.uid;this.loading||(this.loading={});var a=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.RequestPerformance(t.request),o=this.loading[i]=new s(t);o.abort=this.loadVectorData(t,(function(t,s){if(delete n.loading[i],t||!s)return o.status="done",n.loaded[i]=o,r(t);var l=s.rawData,u={};s.expires&&(u.expires=s.expires),s.cacheControl&&(u.cacheControl=s.cacheControl);var c={};if(a){var f=a.finish();f&&(c.resourceTiming=JSON.parse(JSON.stringify(f)))}o.vectorTile=s.vectorTile,o.parse(s.vectorTile,n.layerIndex,n.availableImages,n.actor,(function(t,n){if(t||!n)return r(t);r(null,e.extend({rawTileData:l.slice(0)},n,u,c))})),n.loaded=n.loaded||{},n.loaded[i]=o}))},c.prototype.reloadTile=function(e,t){var r=this,n=this.loaded,i=e.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=e.showCollisionBoxes;var s=function(e,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),t(e,n)};"parsing"===o.status?o.reloadCallback=s:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},c.prototype.abortTile=function(e,t){var r=this.loading,n=e.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),t()},c.prototype.removeTile=function(e,t){var r=this.loaded,n=e.uid;r&&r[n]&&delete r[n],t()};var f=e.window.ImageBitmap,d=function(){this.loaded={}};d.prototype.loadTile=function(t,r){var n=t.uid,i=t.encoding,a=t.rawImageData,o=f&&a instanceof f?this.getImageData(a):a,s=new e.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},d.prototype.getImageData=function(t){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,t.width+2,t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:r.width,height:r.height},r.data)},d.prototype.removeTile=function(e){var t=this.loaded,r=e.uid;t&&t[r]&&delete t[r]};var h=p;function p(e,t){var r,n=e&&e.type;if("FeatureCollection"===n)for(r=0;r=0!==!!t&&e.reverse()}var g=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,y=function(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};y.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],r=0,n=this._feature.geometry;r>31}function z(e,t){for(var r=e.loadGeometry(),n=e.type,i=0,a=0,o=r.length,s=0;s>1;B(e,t,o,n,i,a%2),N(e,t,r,n,o-1,a+1),N(e,t,r,o+1,i,a+1)}}function B(e,t,r,n,i,a){for(;i>n;){if(i-n>600){var o=i-n+1,s=r-n+1,l=Math.log(o),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(o-u)/o)*(s-o/2<0?-1:1);B(e,t,r,Math.max(n,Math.floor(r-s*u/o+c)),Math.min(i,Math.floor(r+(o-s)*u/o+c)),a)}var f=t[2*r+a],d=n,h=i;for(j(e,t,n,r),t[2*i+a]>f&&j(e,t,n,i);df;)h--}t[2*n+a]===f?j(e,t,n,h):j(e,t,++h,i),h<=r&&(n=h+1),r<=h&&(i=h-1)}}function j(e,t,r,n){U(e,r,n),U(t,2*r,2*n),U(t,2*r+1,2*n+1)}function U(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function q(e,t,r,n,i,a,o){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var f=u.pop(),d=u.pop(),h=u.pop();if(d-h<=o)for(var p=h;p<=d;p++)s=t[2*p],l=t[2*p+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(e[p]);else{var v=Math.floor((h+d)/2);s=t[2*v],l=t[2*v+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(e[v]);var m=(f+1)%2;(0===f?r<=s:n<=l)&&(u.push(h),u.push(v-1),u.push(m)),(0===f?i>=s:a>=l)&&(u.push(v+1),u.push(d),u.push(m))}}return c}function V(e,t,r,n,i,a){for(var o=[0,e.length-1,0],s=[],l=i*i;o.length;){var u=o.pop(),c=o.pop(),f=o.pop();if(c-f<=a)for(var d=f;d<=c;d++)H(t[2*d],t[2*d+1],r,n)<=l&&s.push(e[d]);else{var h=Math.floor((f+c)/2),p=t[2*h],v=t[2*h+1];H(p,v,r,n)<=l&&s.push(e[h]);var m=(u+1)%2;(0===u?r-i<=p:n-i<=v)&&(o.push(f),o.push(h-1),o.push(m)),(0===u?r+i>=p:n+i>=v)&&(o.push(h+1),o.push(c),o.push(m))}}return s}function H(e,t,r,n){var i=e-r,a=t-n;return i*i+a*a}T.fromVectorTileJs=A,T.fromGeojsonVt=M,T.GeoJSONWrapper=S;var G=function(e){return e[0]},W=function(e){return e[1]},Y=function(e,t,r,n,i){void 0===t&&(t=G),void 0===r&&(r=W),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=e;for(var a=e.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(e.length),s=this.coords=new i(2*e.length),l=0;l=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return ie(ie({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:r})}function ee(e){return e/360+.5}function te(e){var t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function re(e){return 360*(e-.5)}function ne(e){var t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function ie(e,t){for(var r in t)e[r]=t[r];return e}function ae(e){return e.x}function oe(e){return e.y}function se(e,t,r,n){for(var i,a=n,o=r-t>>1,s=r-t,l=e[t],u=e[t+1],c=e[r],f=e[r+1],d=t+3;da)i=d,a=h;else if(h===a){var p=Math.abs(d-o);pn&&(i-t>3&&se(e,t,i,n),e[i+2]=a,r-i>3&&se(e,i,r,n))}function le(e,t,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((e-r)*o+(t-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=e-r)*o+(s=t-n)*s}function ue(e,t,r,n){var i={id:"undefined"===typeof e?null:e,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return ce(i),i}function ce(e){var t=e.geometry,r=e.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)fe(e,t);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(o+=n?(i*u-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(u-a,2))),i=l,a=u}var c=t.length-3;t[2]=1,se(t,0,c,r),t[c+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function me(e,t,r,n){for(var i=0;i1?1:r}function xe(e,t,r,n,i,a,o,s){if(n/=t,a>=(r/=t)&&o=n)return null;for(var l=[],u=0;u=r&&p=n)){var v=[];if("Point"===d||"MultiPoint"===d)be(f,v,r,n,i);else if("LineString"===d)_e(f,v,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===d)ke(f,v,r,n,i,!1);else if("Polygon"===d)ke(f,v,r,n,i,!0);else if("MultiPolygon"===d)for(var m=0;m=r&&o<=n&&(t.push(e[a]),t.push(e[a+1]),t.push(e[a+2]))}}function _e(e,t,r,n,i,a,o){for(var s,l,u=we(e),c=0===i?Ae:Me,f=e.start,d=0;dr&&(l=c(u,h,p,m,g,r),o&&(u.start=f+s*l)):y>n?x=r&&(l=c(u,h,p,m,g,r),b=!0),x>n&&y<=n&&(l=c(u,h,p,m,g,n),b=!0),!a&&b&&(o&&(u.end=f+s*l),t.push(u),u=we(e)),o&&(f+=s)}var _=e.length-3;h=e[_],p=e[_+1],v=e[_+2],(y=0===i?h:p)>=r&&y<=n&&Te(u,h,p,v),_=u.length-3,a&&_>=3&&(u[_]!==u[0]||u[_+1]!==u[1])&&Te(u,u[0],u[1],u[2]),u.length&&t.push(u)}function we(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function ke(e,t,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=c),f>o.maxY&&(o.maxY=f)}return o}function Ie(e,t,r,n){var i=t.geometry,a=t.type,o=[];if("Point"===a||"MultiPoint"===a)for(var s=0;s0&&t.size<(i?o:n))r.numPoints+=t.length/3;else{for(var s=[],l=0;lo)&&(r.numSimplified++,s.push(t[l]),s.push(t[l+1])),r.numPoints++;i&&De(s,a),e.push(s)}}function De(e,t){for(var r=0,n=0,i=e.length,a=i-2;n0===t)for(n=0,i=e.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=de(e,t);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(n=Se(n,t)).length&&this.splitTile(n,0,0,0),r&&(n.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function Ne(e,t,r){return 32*((1<=n;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new Y(s,ae,oe,a,Float32Array),r&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-c)}return r&&console.timeEnd("total time"),this},X.prototype.getClusters=function(e,t){var r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],t),s=this.getClusters([-180,n,i,a],t);return o.concat(s)}for(var l=this.trees[this._limitZoom(t)],u=[],c=0,f=l.range(ee(r),te(a),ee(i),te(n));ct&&(p+=y.numPoints||1)}if(p>=s){for(var x=c.x*h,b=c.y*h,_=o&&h>1?this._map(c,!0):null,w=(u<<5)+(t+1)+this.points.length,k=0,T=d;k1)for(var E=0,C=d;E>5},X.prototype._getOriginZoom=function(e){return(e-this.points.length)%32},X.prototype._map=function(e,t){if(e.numPoints)return t?ie({},e.properties):e.properties;var r=this.points[e.index].properties,n=this.options.map(r);return t&&n===r?ie({},n):n},Fe.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Fe.prototype.splitTile=function(e,t,r,n,i,a,o){for(var s=[e,t,r,n],l=this.options,u=l.debug;s.length;){n=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();var c=1<1&&console.time("creation"),d=this.tiles[f]=Oe(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,d.numFeatures,d.numPoints,d.numSimplified),console.timeEnd("creation"));var h="z"+t;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(d.source=e,i){if(t===l.maxZoom||t===i)continue;var p=1<1&&console.time("clipping");var v,m,g,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,k=.5+_,T=1+_;v=m=g=y=null,x=xe(e,c,r-_,r+k,0,d.minX,d.maxX,l),b=xe(e,c,r+w,r+T,0,d.minX,d.maxX,l),e=null,x&&(v=xe(x,c,n-_,n+k,1,d.minY,d.maxY,l),m=xe(x,c,n+w,n+T,1,d.minY,d.maxY,l),x=null),b&&(g=xe(b,c,n-_,n+k,1,d.minY,d.maxY,l),y=xe(b,c,n+w,n+T,1,d.minY,d.maxY,l),b=null),u>1&&console.timeEnd("clipping"),s.push(v||[],t+1,2*r,2*n),s.push(m||[],t+1,2*r,2*n+1),s.push(g||[],t+1,2*r+1,2*n),s.push(y||[],t+1,2*r+1,2*n+1)}}},Fe.prototype.getTile=function(e,t,r){var n=this.options,i=n.extent,a=n.debug;if(e<0||e>24)return null;var o=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var l,u=e,c=t,f=r;!l&&u>0;)u--,c=Math.floor(c/2),f=Math.floor(f/2),l=this.tiles[Ne(u,c,f)];return l&&l.source?(a>1&&console.log("found parent tile z%d-%d-%d",u,c,f),a>1&&console.time("drilling down"),this.splitTile(l.source,u,c,f,e,t,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?Le(this.tiles[s],i):null):null};var Ue=function(t){function r(e,r,n,i){t.call(this,e,r,n,je),i&&(this.loadGeoJSON=i)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new e.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if("object"!==typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));h(o,!0);try{if(n.filter){var s=e.createExpression(n.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===s.result)throw new Error(s.value.map((function(e){return e.key+": "+e.message})).join(", "));var l=o.features.filter((function(e){return s.value.evaluate({zoom:0},e)}));o={type:"FeatureCollection",features:l}}t._geoJSONIndex=n.cluster?new X(qe(n)).load(o.features):ze(o,n.geojsonVtOptions)}catch(a){return r(a)}t.loaded={};var u={};if(i){var c=i.finish();c&&(u.resourceTiming={},u.resourceTiming[n.source]=JSON.parse(JSON.stringify(c)))}r(null,u)}))}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(e,r){var n=this.loaded,i=e.uid;return n&&n[i]?t.prototype.reloadTile.call(this,e,r):this.loadTile(e,r)},r.prototype.loadGeoJSON=function(t,r){if(t.request)e.getJSON(t.request,r);else{if("string"!==typeof t.data)return r(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."));try{return r(null,JSON.parse(t.data))}catch(n){return r(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),t()},r.prototype.getClusterExpansionZoom=function(e,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId))}catch(r){t(r)}},r.prototype.getClusterChildren=function(e,t){try{t(null,this._geoJSONIndex.getChildren(e.clusterId))}catch(r){t(r)}},r.prototype.getClusterLeaves=function(e,t){try{t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset))}catch(r){t(r)}},r}(c);function qe(t){var r=t.superclusterOptions,n=t.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),u=0,c=l;u1?"@2x":"",l=e.getJSON(r.transformRequest(r.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),(function(e,t){l=null,o||(o=e,i=t,c())})),u=e.getImage(r.transformRequest(r.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),(function(e,t){u=null,o||(o=e,a=t,c())}));function c(){if(o)n(o);else if(i&&a){var t=e.browser.getImageData(a),r={};for(var s in i){var l=i[s],u=l.width,c=l.height,f=l.x,d=l.y,h=l.sdf,p=l.pixelRatio,v=l.stretchX,m=l.stretchY,g=l.content,y=new e.RGBAImage({width:u,height:c});e.RGBAImage.copy(t,y,{x:f,y:d},{x:0,y:0},{width:u,height:c}),r[s]={data:y,pixelRatio:p,sdf:h,stretchX:v,stretchY:m,content:g}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}function d(e){var t=e.userImage;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}r.suppressClick=function(){e.window.addEventListener("click",c,!0),e.window.setTimeout((function(){e.window.removeEventListener("click",c,!0)}),0)},r.mousePos=function(t,r){var n=t.getBoundingClientRect();return new e.Point(r.clientX-n.left-t.clientLeft,r.clientY-n.top-t.clientTop)},r.touchPos=function(t,r){for(var n=t.getBoundingClientRect(),i=[],a=0;a=0?0:t.button},r.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var h=1,p=function(t){function r(){t.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,r=this.requestors;t=0?1.2:1))}function b(e,t,r,n,i,a,o){for(var s=0;s65535)t(new Error("glyphs > 65535 not supported"));else if(a.ranges[s])t(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],w.loadGlyphRange(r,s,n.url,n.requestManager,(function(e,t){if(t){for(var r in t)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=t[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=e[++s]);var c=Math.abs(u-l.left),f=Math.abs(u-l.right),d=Math.min(c,f),h=void 0,p=i/r*(n+1);if(l.isDash){var v=n-Math.abs(p);h=Math.sqrt(d*d+v*v)}else h=n-Math.sqrt(d*d+p*p);this.data[o+u]=Math.max(0,Math.min(255,h+128))}},S.prototype.addRegularDash=function(e){for(var t=e.length-1;t>=0;--t){var r=e[t],n=e[t+1];r.zeroLength?e.splice(t,1):n&&n.isDash===r.isDash&&(n.left=r.left,e.splice(t,1))}var i=e[0],a=e[e.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=e[s],u=0;u1&&(l=e[++s]);var c=Math.abs(u-l.left),f=Math.abs(u-l.right),d=Math.min(c,f),h=l.isDash?d:-d;this.data[o+u]=Math.max(0,Math.min(255,h+128))}},S.prototype.addDash=function(t,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o=n.minX&&t.x=n.minY&&t.y0&&(l[new e.OverscaledTileID(t.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+10&&(n.resourceTiming=t._resourceTiming,t._resourceTiming=[]),t.fire(new e.Event("data",n))}}))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setData=function(t){var r=this;return this._data=t,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(t){if(t)r.fire(new e.ErrorEvent(t));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new e.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this},r.prototype.getClusterChildren=function(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this},r.prototype.getClusterLeaves=function(e,t,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:r},n),this},r.prototype._updateWorkerData=function(t){var r=this;this._loaded=!1;var n=e.extend({},this.workerOptions),i=this._data;"string"===typeof i?(n.request=this.map._requestManager.transformRequest(e.browser.resolveURL(i),e.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+".loadData",n,(function(e,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:n.source},null),t(e))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(t,r){var n=this,i=t.actor?"reloadTile":"loadTile";t.actor=this.actor;var a={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(i,a,(function(e,a){return delete t.request,t.unloadVectorData(),t.aborted?r(null):e?r(e):(t.loadVectorData(a,n.map.painter,"reloadTile"===i),r(null))}))},r.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0},r.prototype.unloadTile=function(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(e.Evented),D=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),z=function(t){function r(e,r,n,i){t.call(this),this.id=e,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=r}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(t,r){var n=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new e.ErrorEvent(i)):a&&(n.image=a,t&&(n.coordinates=t),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(e){var t=this;return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,(function(){t.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setCoordinates=function(t){var r=this;this.coordinates=t;var n=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=F(n),this.minzoom=this.maxzoom=this.tileID.z;var i=n.map((function(e){return r.tileID.getTilePoint(e)._round()}));return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(i[2].x,i[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var t=this.map.painter.context,r=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,D.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(t,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.loadTile=function(e,t){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={},t(null)):(e.state="errored",t(null))},r.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(e.Evented);function F(t){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=t;or.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=t}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,r=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,D.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(z),B=function(t){function r(r,n,i,a){t.call(this,r,n,i,a),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((function(e){return!Array.isArray(e)||2!==e.length||e.some((function(e){return"number"!==typeof e}))}))||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!==typeof n.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"===typeof n.canvas||n.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,D.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var e=0,t=[this.canvas.width,this.canvas.height];ethis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},J.prototype.has=function(e){return e.wrapped().key in this.data},J.prototype.getAndRemove=function(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null},J.prototype._getAndRemoveByKey=function(e){var t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value},J.prototype.getByKey=function(e){var t=this.data[e];return t?t[0].value:null},J.prototype.get=function(e){return this.has(e)?this.data[e.wrapped().key][0].value:null},J.prototype.remove=function(e,t){if(!this.has(e))return this;var r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},J.prototype.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this},J.prototype.filter=function(e){var t=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[a]&&(e.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(e){return this.getTileByID(e.key)},r.prototype.getTileByID=function(e){return this._tiles[e]},r.prototype._retainLoadedChildren=function(e,t,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=t||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>t+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>t;)if(e[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(e,t){if(e.key in this._loadedParentTiles){var r=this._loadedParentTiles[e.key];return r&&r.tileID.overscaledZ>=t?r:null}for(var n=e.overscaledZ-1;n>=t;n--){var i=e.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(e){var t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)},r.prototype.updateCacheSize=function(e){var t=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),r=5,n=Math.floor(t*r),i="number"===typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,n):n;this._cache.setMaxSize(i)},r.prototype.handleWrapJump=function(e){var t=(e-(void 0===this._prevLng?e:this._prevLng))/360,r=Math.round(t);if(this._prevLng=e,r){var n={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+r),n[a.tileID.key]=a}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(t){var n=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(t){return new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)})):(i=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(e){return n._source.hasTile(e)})))):i=[];var a=t.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if($e(this._source.type)){for(var u={},c={},f=0,d=Object.keys(l);fthis._source.maxzoom){var m=p.children(this._source.maxzoom)[0],g=this.getTile(m);if(g&&g.hasData()){n[m.key]=m;continue}}else{var y=p.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var x=v.wasRequested(),b=p.overscaledZ-1;b>=a;--b){var _=p.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(v=this.getTile(_))&&x&&(v=this._addTile(_)),v&&(n[_.key]=_,x=v.wasRequested(),v.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var e in this._loadedParentTiles={},this._tiles){for(var t=[],r=void 0,n=this._tiles[e].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}t.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=t;a0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},r.prototype.clearTiles=function(){for(var e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()},r.prototype.tilesIn=function(t,r,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(t):t,l=t.map((function(e){return o.pointCoordinate(e)})),u=s.map((function(e){return o.pointCoordinate(e)})),c=this.getIds(),f=1/0,d=1/0,h=-1/0,p=-1/0,v=0,m=u;v=0&&g[1].y+m>=0){var y=l.map((function(e){return s.getTilePoint(e)})),x=u.map((function(e){return s.getTilePoint(e)}));a.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:v})}}},x=0;x=e.browser.now())return!0}return!1},r.prototype.setFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.updateState(e,t,r)},r.prototype.removeFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.removeFeatureState(e,t,r)},r.prototype.getFeatureState=function(e,t){return e=e||"_geojsonTileLayer",this._state.getState(e,t)},r.prototype.setDependencies=function(e,t,r){var n=this._tiles[e];n&&n.setDependencies(t,r)},r.prototype.reloadTilesForDependencies=function(e,t){for(var r in this._tiles)this._tiles[r].hasDependency(e,t)&&this._reloadTile(r,"reloading");this._cache.filter((function(r){return!r.hasDependency(e,t)}))},r}(e.Evented);function Je(e,t){var r=Math.abs(2*e.wrap)-+(e.wrap<0),n=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function $e(e){return"raster"===e||"image"===e||"video"===e}function Qe(){return new e.window.Worker(ps.workerUrl)}Ke.maxOverzooming=10,Ke.maxUnderzooming=3;var et="mapboxgl_preloaded_worker_pool",tt=function(){this.active={}};tt.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var wt=function(e,t,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(var a=0;a=-t[0]&&r<=t[0]&&n>=-t[1]&&n<=t[1]}function Et(t,r,n,i,a,o,s,l){var u=i?t.textSizeData:t.iconSizeData,c=e.evaluateSizeForZoom(u,n.transform.zoom),f=[256/n.width*2+1,256/n.height*2+1],d=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;d.clear();for(var h=t.lineVertexArray,p=i?t.text.placedSymbolArray:t.icon.placedSymbolArray,v=n.transform.width/n.transform.height,m=!1,g=0;gMath.abs(n.x-r.x)*i?{useVertical:!0}:(t===e.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function Pt(t,r,n,i,a,o,s,l,u,c,f,d,h,p){var v,m=r/24,g=t.lineOffsetX*m,y=t.lineOffsetY*m;if(t.numGlyphs>1){var x=t.glyphStartIndex+t.numGlyphs,b=t.lineStartIndex,_=t.lineStartIndex+t.lineLength,w=Ct(m,l,g,y,n,f,d,t,u,o,h);if(!w)return{notEnoughRoom:!0};var k=At(w.first.point,s).point,T=At(w.last.point,s).point;if(i&&!n){var A=Lt(t.writingMode,k,T,p);if(A)return A}v=[w.first];for(var M=t.glyphStartIndex+1;M0?L.point:Ot(d,C,S,1,a),O=Lt(t.writingMode,S,P,p);if(O)return O}var I=It(m*l.getoffsetX(t.glyphStartIndex),g,y,n,f,d,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,u,o,h);if(!I)return{notEnoughRoom:!0};v=[I]}for(var R=0,D=v;R0?1:-1,v=0;i&&(p*=-1,v=Math.PI),p<0&&(v+=Math.PI);for(var m=p>0?l+s:l+s+1,g=a,y=a,x=0,b=0,_=Math.abs(h),w=[];x+b<=_;){if((m+=p)=u)return null;if(y=g,w.push(g),void 0===(g=d[m])){var k=new e.Point(c.getx(m),c.gety(m)),T=At(k,f);if(T.signedDistanceFromCamera>0)g=d[m]=T.point;else{var A=m-p;g=Ot(0===x?o:new e.Point(c.getx(A),c.gety(A)),k,y,_-x+1,f)}}x+=b,b=y.dist(g)}var M=(_-x)/b,S=g.sub(y),E=S.mult(M)._add(y);E._add(S._unit()._perp()._mult(n*p));var C=v+Math.atan2(g.y-y.y,g.x-y.x);return w.push(E),{point:E,angle:C,path:w}}wt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},wt.prototype.insert=function(e,t,r,n,i){this._forEachCell(t,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},wt.prototype.insertCircle=function(e,t,r,n){this._forEachCell(t-n,r-n,t+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(r),this.circles.push(n)},wt.prototype._insertBoxCell=function(e,t,r,n,i,a){this.boxCells[i].push(a)},wt.prototype._insertCircleCell=function(e,t,r,n,i,a){this.circleCells[i].push(a)},wt.prototype._query=function(e,t,r,n,i,a){if(r<0||e>this.width||n<0||t>this.height)return!i&&[];var o=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},wt.prototype._queryCircle=function(e,t,r,n,i){var a=e-r,o=e+r,s=t-r,l=t+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var u=[],c={hitTest:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,u,c,i),n?u.length>0:u},wt.prototype.query=function(e,t,r,n,i){return this._query(e,t,r,n,!1,i)},wt.prototype.hitTest=function(e,t,r,n,i){return this._query(e,t,r,n,!0,i)},wt.prototype.hitTestCircle=function(e,t,r,n){return this._queryCircle(e,t,r,!0,n)},wt.prototype._queryCell=function(e,t,r,n,i,a,o,s){var l=o.seenUids,u=this.boxCells[i];if(null!==u)for(var c=this.bboxes,f=0,d=u;f=c[p+0]&&n>=c[p+1]&&(!s||s(this.boxKeys[h]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[h],x1:c[p],y1:c[p+1],x2:c[p+2],y2:c[p+3]})}}}var v=this.circleCells[i];if(null!==v)for(var m=this.circles,g=0,y=v;go*o+s*s},wt.prototype._circleAndRectCollide=function(e,t,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;var u=(o-i)/2,c=Math.abs(t-(i+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;var f=l-s,d=c-u;return f*f+d*d<=r*r};var Rt=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Dt(e,t){for(var r=0;r=1;O--)P.push(C.path[O]);for(var I=1;I0){for(var F=P[0].clone(),N=P[0].clone(),B=1;B=M.x&&N.x<=S.x&&F.y>=M.y&&N.y<=S.y?[P]:N.xS.x||N.yS.y?[]:e.clipLine([P],M.x,M.y,S.x,S.y)}for(var j=0,U=z;j=this.screenRightBoundary||nthis.screenBottomBoundary},Nt.prototype.isInsideGrid=function(e,t,r,n){return r>=0&&e=0&&t0?(this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(v=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:m,width:r,height:n,anchor:e,textBoxScale:i,prevAnchor:v},this.markUsedJustification(d,e,f,h),d.allowVerticalPlacement&&(this.markUsedOrientation(d,h,f),this.placedOrientations[f.crossTileID]=h),{shift:g,placedGlyphBoxes:y}):void 0},Zt.prototype.placeLayerBucketPart=function(t,r,n){var i=this,a=t.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,u=a.textLabelPlaneMatrix,c=a.labelToScreenMatrix,f=a.textPixelRatio,d=a.holdingForFade,h=a.collisionBoxArray,p=a.partiallyEvaluatedTextSize,v=a.collisionGroup,m=s.get("text-optional"),g=s.get("icon-optional"),y=s.get("text-allow-overlap"),x=s.get("icon-allow-overlap"),b="map"===s.get("text-rotation-alignment"),_="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),k="viewport-y"===s.get("symbol-z-order"),T=y&&(x||!o.hasIconData()||g),A=x&&(y||!o.hasTextData()||m);!o.collisionArrays&&h&&o.deserializeCollisionBoxes(h);var M=function(t,a){if(!r[t.crossTileID])if(d)i.placements[t.crossTileID]=new qt(!1,!1,!1);else{var h=!1,k=!1,M=!0,S=null,E={box:null,offscreen:null},C={box:null,offscreen:null},L=null,P=null,O=null,I=0,R=0,D=0;a.textFeatureIndex?I=a.textFeatureIndex:t.useRuntimeCollisionCircles&&(I=t.featureIndex),a.verticalTextFeatureIndex&&(R=a.verticalTextFeatureIndex);var z=a.textBox;if(z){var F=function(r){var n=e.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[t.crossTileID];a&&(i.placedOrientations[t.crossTileID]=a,n=a,i.markUsedOrientation(o,n,t))}return n},N=function(r,n){if(o.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(B=B.filter((function(e){return e!==j.anchor}))).unshift(j.anchor)}var U=function(e,r,n){for(var a=e.x2-e.x1,s=e.y2-e.y1,u=t.textBoxScale,c=w&&!x?r:null,d={box:[],offscreen:!1},p=y?2*B.length:B.length,m=0;m=B.length,T=i.attemptAnchorPlacement(g,e,a,s,u,b,_,f,l,v,k,t,o,n,c);if(T&&(d=T.placedGlyphBoxes)&&d.box&&d.box.length){h=!0,S=T.shift;break}}return d};N((function(){return U(z,a.iconBox,e.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=E&&E.box&&E.box.length;return o.allowVerticalPlacement&&!n&&t.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}})),E&&(h=E.box,M=E.offscreen);var q=F(E&&E.box);if(!h&&i.prevPlacement){var V=i.prevPlacement.variableOffsets[t.crossTileID];V&&(i.variableOffsets[t.crossTileID]=V,i.markUsedJustification(o,V.anchor,t,q))}}else{var H=function(e,r){var n=i.collisionIndex.placeCollisionBox(e,y,f,l,v.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,t),i.placedOrientations[t.crossTileID]=r),n};N((function(){return H(z,e.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&r?H(r,e.WritingMode.vertical):{box:null,offscreen:null}})),F(E&&E.box&&E.box.length)}}if(h=(L=E)&&L.box&&L.box.length>0,M=L&&L.offscreen,t.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),W=e.evaluateSizeForFeature(o.textSizeData,p,G),Y=s.get("text-padding"),Z=t.collisionCircleDiameter;P=i.collisionIndex.placeCollisionCircles(y,G,o.lineVertexArray,o.glyphOffsetArray,W,l,u,c,n,_,v.predicate,Z,Y),h=y||P.circles.length>0&&!P.collisionDetected,M=M&&P.offscreen}if(a.iconFeatureIndex&&(D=a.iconFeatureIndex),a.iconBox){var X=function(e){var t=w&&S?Yt(e,S.x,S.y,b,_,i.transform.angle):e;return i.collisionIndex.placeCollisionBox(t,x,f,l,v.predicate)};k=C&&C.box&&C.box.length&&a.verticalIconBox?(O=X(a.verticalIconBox)).box.length>0:(O=X(a.iconBox)).box.length>0,M=M&&O.offscreen}var K=m||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,J=g||0===t.numIconVertices;if(K||J?J?K||(k=k&&h):h=k&&h:k=h=k&&h,h&&L&&L.box&&(C&&C.box&&R?i.collisionIndex.insertCollisionBox(L.box,s.get("text-ignore-placement"),o.bucketInstanceId,R,v.ID):i.collisionIndex.insertCollisionBox(L.box,s.get("text-ignore-placement"),o.bucketInstanceId,I,v.ID)),k&&O&&i.collisionIndex.insertCollisionBox(O.box,s.get("icon-ignore-placement"),o.bucketInstanceId,D,v.ID),P&&(h&&i.collisionIndex.insertCollisionCircles(P.circles,s.get("text-ignore-placement"),o.bucketInstanceId,I,v.ID),n)){var $=o.bucketInstanceId,Q=i.collisionCircleArrays[$];void 0===Q&&(Q=i.collisionCircleArrays[$]=new Vt);for(var ee=0;ee=0;--E){var C=S[E];M(o.symbolInstances.get(C),o.collisionArrays[C])}else for(var L=t.symbolInstanceStart;L=0&&(t.text.placedSymbolArray.get(u).crossTileID=a>=0&&u!==a?0:n.crossTileID)}},Zt.prototype.markUsedOrientation=function(t,r,n){for(var i=r===e.WritingMode.horizontal||r===e.WritingMode.horizontalOnly?r:0,a=r===e.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===e.WritingMode.vertical,w=b===e.WritingMode.horizontal||b===e.WritingMode.horizontalOnly;if(y){var k=nr(g.text),T=_?ir:k;p(t.text,s,T);var A=w?ir:k;p(t.text,l,A);var M=g.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(e){e>=0&&(t.text.placedSymbolArray.get(e).hidden=M||_?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(t,S.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(t,"left",a,E),i.markUsedOrientation(t,E,a))}if(x){var C=nr(g.icon),L=!(d&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var P=L?C:ir;p(t.icon,a.numIconVertices,P),t.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=g.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var O=L?ir:C;p(t.icon,a.numVerticalIconVertices,O),t.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=g.icon.isHidden()}}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){var I=t.collisionArrays[n];if(I){var R=new e.Point(0,0);if(I.textBox||I.verticalTextBox){var D=!0;if(u){var z=i.variableOffsets[v];z?(R=Wt(z.anchor,z.width,z.height,z.textOffset,z.textBoxScale),c&&R._rotate(f?i.transform.angle:-i.transform.angle)):D=!1}I.textBox&&Xt(t.textCollisionBox.collisionVertexArray,g.text.placed,!D||_,R.x,R.y),I.verticalTextBox&&Xt(t.textCollisionBox.collisionVertexArray,g.text.placed,!D||w,R.x,R.y)}var F=Boolean(!w&&I.verticalIconBox);I.iconBox&&Xt(t.iconCollisionBox.collisionVertexArray,g.icon.placed,F,d?R.x:0,d?R.y:0),I.verticalIconBox&&Xt(t.iconCollisionBox.collisionVertexArray,g.icon.placed,!F,d?R.x:0,d?R.y:0)}}},m=0;me},Zt.prototype.setStale=function(){this.stale=!0};var Kt=Math.pow(2,25),Jt=Math.pow(2,24),$t=Math.pow(2,17),Qt=Math.pow(2,16),er=Math.pow(2,9),tr=Math.pow(2,8),rr=Math.pow(2,1);function nr(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;var t=e.placed?1:0,r=Math.floor(127*e.opacity);return r*Kt+t*Jt+r*$t+t*Qt+r*er+t*tr+r*rr+t}var ir=0,ar=function(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&void 0!==e.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};ar.prototype.continuePlacement=function(e,t,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[t[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new ar(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},or.prototype.commit=function(e){return this.placement.commit(e),this.placement};var sr=512/e.EXTENT/2,lr=function(e,t,r){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;ne.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(e)&&l.findMatches(t.symbolInstances,e,i)}else{var u=o[e.scaledTo(Number(a)).key];u&&u.findMatches(t.symbolInstances,e,i)}}for(var c=0;c0)throw new Error("Unimplemented: "+i.map((function(e){return e.command})).join(", ")+".");return n.forEach((function(e){"setTransition"!==e.command&&r[e.command].apply(r,e.args)})),this.stylesheet=t,!0},r.prototype.addImage=function(t,r){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,r),this._afterImageUpdated(t)},r.prototype.updateImage=function(e,t){this.imageManager.updateImage(e,t)},r.prototype.getImage=function(e){return this.imageManager.getImage(e)},r.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this._afterImageUpdated(t)},r.prototype._afterImageUpdated=function(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(t,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0)||!this._validate(e.validateStyle.source,"sources."+t,r,null,n)){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var a=this.sourceCaches[t]=new Ke(t,r,this.dispatcher);a.style=this,a.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:t}})),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===t)return this.fire(new e.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(e,t){this._checkLoaded(),this.sourceCaches[e].getSource().setData(t),this._changed=!0},r.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},r.prototype.addLayer=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var i=t.id;if(this.getLayer(i))this.fire(new e.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var a;if("custom"===t.type){if(dr(this,e.validateCustomStyleLayer(t)))return;a=e.createStyleLayer(t)}else{if("object"===typeof t.source&&(this.addSource(i,t.source),t=e.clone$1(t),t=e.extend(t,{source:i})),this._validate(e.validateStyle.layer,"layers."+i,t,{arrayIndex:-1},n))return;a=e.createStyleLayer(t),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&&a.source&&"custom"!==a.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]="clear":(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause())}this._updateLayer(a),a.onAdd&&a.onAdd(this.map)}}},r.prototype.moveLayer=function(t,r){if(this._checkLoaded(),this._changed=!0,this._layers[t]){if(t!==r){var n=this._order.indexOf(t);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(i,0,t),this._layerOrderChanged=!0)}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(t){this._checkLoaded();var r=this._layers[t];if(r){r.setEventedParent(null);var n=this._order.indexOf(t);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=r,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],r.onRemove&&r.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(e){return this._layers[e]},r.prototype.hasLayer=function(e){return e in this._layers},r.prototype.setLayerZoomRange=function(t,r,n){this._checkLoaded();var i=this.getLayer(t);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(t);if(i){if(!e.deepEqual(i.filter,r))return null===r||void 0===r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(e.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=e.clone$1(r),this._updateLayer(i)))}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(t){return e.clone$1(this.getLayer(t).filter)},r.prototype.setLayoutProperty=function(t,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(t);a?e.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(t,r){var n=this.getLayer(t);if(n)return n.getLayoutProperty(r);this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(t,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(t);a?e.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},r.prototype.setFeatureState=function(t,r){this._checkLoaded();var n=t.source,i=t.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;"geojson"===o&&i?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||i?(void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),a.setFeatureState(i,t.id,r)):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(t,r){this._checkLoaded();var n=t.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o="vector"===a?t.sourceLayer:void 0;"vector"!==a||o?r&&"string"!==typeof t.id&&"number"!==typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(o,t.id,r):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(t){this._checkLoaded();var r=t.source,n=t.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if("vector"!==i.getSource().type||n)return void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,t.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},r.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(e){for(var t=this,r=function(e){return"fill-extrusion"===t._layers[e].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=e;s=0;p--){var v=this._order[p];if(r(v))for(var m=i.length-1;m>=0;m--){var g=i[m].feature;if(n[g.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}",Pr="attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}",Or="varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}",Ir="attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}",Rr="uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}",Dr="attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}",zr="#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Fr="attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}",Nr="varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Br="attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}",jr="uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Ur="uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}",qr="uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Vr="uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}",Hr="varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Gr="uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}",Wr="uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Yr="uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}",Zr="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Xr="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Kr="uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Jr="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",$r="uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Qr="\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}",en="uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",tn="\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}",rn="uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",nn="\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}",an="uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",on="\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}",sn="uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",ln="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",un="uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",cn="const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}",fn="#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",dn="const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}",hn="#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",pn="const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}",vn=Un("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),mn=Un(yr,xr),gn=Un(br,_r),yn=Un(wr,kr),xn=Un(Tr,Ar),bn=Un(Mr,Sr),_n=Un(Er,Cr),wn=Un(Lr,Pr),kn=Un(Or,Ir),Tn=Un(Rr,Dr),An=Un(zr,Fr),Mn=Un(Nr,Br),Sn=Un(jr,Ur),En=Un(qr,Vr),Cn=Un(Hr,Gr),Ln=Un(Wr,Yr),Pn=Un(Zr,Xr),On=Un(Kr,Jr),In=Un($r,Qr),Rn=Un(en,tn),Dn=Un(rn,nn),zn=Un(an,on),Fn=Un(sn,ln),Nn=Un(un,cn),Bn=Un(fn,dn),jn=Un(hn,pn);function Un(e,t){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n=t.match(/attribute ([\w]+) ([\w]+)/g),i=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=a?a.concat(i):i,s={};return{fragmentSource:e=e.replace(r,(function(e,t,r,n,i){return s[i]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+r+" "+n+" "+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n"})),vertexSource:t=t.replace(r,(function(e,t,r,n,i){var a="float"===n?"vec2":"vec4",o=i.match(/color/)?"color":a;return s[i]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+a+" a_"+i+";\nvarying "+r+" "+n+" "+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = a_"+i+";\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = unpack_mix_"+o+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+a+" a_"+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = a_"+i+";\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = unpack_mix_"+o+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n"})),staticAttributes:n,staticUniforms:o}}var qn=Object.freeze({__proto__:null,prelude:vn,background:mn,backgroundPattern:gn,circle:yn,clippingMask:xn,heatmap:bn,heatmapTexture:_n,collisionBox:wn,collisionCircle:kn,debug:Tn,fill:An,fillOutline:Mn,fillOutlinePattern:Sn,fillPattern:En,fillExtrusion:Cn,fillExtrusionPattern:Ln,hillshadePrepare:Pn,hillshade:On,line:In,lineGradient:Rn,linePattern:Dn,lineSDF:zn,raster:Fn,symbolIcon:Nn,symbolSDF:Bn,symbolTextAndIcon:jn}),Vn=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function Hn(e){for(var t=[],r=0;r>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}function Yn(e,t,r,n){var i=r.imageManager.getPattern(e.from.toString()),a=r.imageManager.getPattern(e.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,u=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,r.transform.tileZoom)/u,f=c*(n.tileID.canonical.x+n.tileID.wrap*u),d=c*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/Bt(n,1,r.transform.tileZoom),u_pixel_coord_upper:[f>>16,d>>16],u_pixel_coord_lower:[65535&f,65535&d]}}Gn.prototype.draw=function(e,t,r,n,i,a,o,s,l,u,c,f,d,h,p,v){var m,g=e.gl;if(!this.failedToCreate){for(var y in e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(n),e.setColorMode(i),e.setCullFace(a),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);h&&h.setUniforms(e,this.binderUniforms,f,{zoom:d});for(var x=(m={},m[g.LINES]=2,m[g.TRIANGLES]=3,m[g.LINE_STRIP]=1,m)[t],b=0,_=c.get();b<_.length;b+=1){var w=_[b],k=w.vaos||(w.vaos={});(k[s]||(k[s]=new Vn)).bind(e,this,l,h?h.getPaintVertexBuffers():[],u,w.vertexOffset,p,v),g.drawElements(t,w.primitiveLength*x,g.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var Zn=function(t,r,n,i){var a=r.style.light,o=a.properties.get("position"),s=[o.x,o.y,o.z],l=e.create$1();"viewport"===a.properties.get("anchor")&&e.fromRotation(l,-r.transform.angle),e.transformMat3(s,s,l);var u=a.properties.get("color");return{u_matrix:t,u_lightpos:s,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+n,u_opacity:i}},Xn=function(t,r,n,i,a,o,s){return e.extend(Zn(t,r,n,i),Wn(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Kn=function(e){return{u_matrix:e}},Jn=function(t,r,n,i){return e.extend(Kn(t),Wn(n,r,i))},$n=function(e,t){return{u_matrix:e,u_world:t}},Qn=function(t,r,n,i,a){return e.extend(Jn(t,r,n,i),{u_world:a})},ei=function(t,r,n,i){var a,o,s=t.transform;if("map"===i.paint.get("circle-pitch-alignment")){var l=Bt(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:t.translatePosMatrix(r.posMatrix,n,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+a,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:o}},ti=function(e,t,r){var n=Bt(r,1,t.zoom),i=Math.pow(2,t.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:e,u_camera_to_center_distance:t.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[t.pixelsToGLUnits[0]/(n*i),t.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},ri=function(e,t,r){return{u_matrix:e,u_inv_matrix:t,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},ni=function(e,t,r){return void 0===r&&(r=1),{u_matrix:e,u_color:t,u_overlay:0,u_overlay_scale:r}},ii=function(e){return{u_matrix:e}},ai=function(e,t,r,n){return{u_matrix:e,u_extrude_scale:Bt(t,1,r),u_intensity:n}},oi=function(t,r,n,i){var a=e.create();e.ortho(a,0,t.width,t.height,0,0,1);var o=t.context.gl;return{u_matrix:a,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:n,u_color_ramp:i,u_opacity:r.paint.get("heatmap-opacity")}},si=function(e,t,r){var n=r.paint.get("hillshade-shadow-color"),i=r.paint.get("hillshade-highlight-color"),a=r.paint.get("hillshade-accent-color"),o=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(o-=e.transform.angle);var s=!e.options.moving;return{u_matrix:e.transform.calculatePosMatrix(t.tileID.toUnwrapped(),s),u_image:0,u_latrange:ui(e,t.tileID),u_light:[r.paint.get("hillshade-exaggeration"),o],u_shadow:n,u_highlight:i,u_accent:a}},li=function(t,r){var n=r.stride,i=e.create();return e.ortho(i,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(i,i,[0,-e.EXTENT,0]),{u_matrix:i,u_image:1,u_dimension:[n,n],u_zoom:t.overscaledZ,u_unpack:r.getUnpackVector()}};function ui(t,r){var n=Math.pow(2,r.canonical.z),i=r.canonical.y;return[new e.MercatorCoordinate(0,i/n).toLngLat().lat,new e.MercatorCoordinate(0,(i+1)/n).toLngLat().lat]}var ci=function(t,r,n){var i=t.transform;return{u_matrix:vi(t,r,n),u_ratio:1/Bt(r,1,i.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},fi=function(t,r,n,i){return e.extend(ci(t,r,n),{u_image:0,u_image_height:i})},di=function(t,r,n,i){var a=t.transform,o=pi(r,a);return{u_matrix:vi(t,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/Bt(r,1,a.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},hi=function(t,r,n,i,a){var o=t.transform,s=t.lineAtlas,l=pi(r,o),u="round"===n.layout.get("line-cap"),c=s.getDash(i.from,u),f=s.getDash(i.to,u),d=c.width*a.fromScale,h=f.width*a.toScale;return e.extend(ci(t,r,n),{u_patternscale_a:[l/d,-c.height/2],u_patternscale_b:[l/h,-f.height/2],u_sdfgamma:s.width/(256*Math.min(d,h)*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:c.y,u_tex_y_b:f.y,u_mix:a.t})};function pi(e,t){return 1/Bt(e,1,t.tileZoom)}function vi(e,t,r){return e.translatePosMatrix(t.tileID.posMatrix,t,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var mi=function(e,t,r,n,i){return{u_matrix:e,u_tl_parent:t,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:xi(i.paint.get("raster-saturation")),u_contrast_factor:yi(i.paint.get("raster-contrast")),u_spin_weights:gi(i.paint.get("raster-hue-rotate"))}};function gi(e){e*=Math.PI/180;var t=Math.sin(e),r=Math.cos(e);return[(2*r+1)/3,(-Math.sqrt(3)*t-r+1)/3,(Math.sqrt(3)*t-r+1)/3]}function yi(e){return e>0?1/(1-e):1+e}function xi(e){return e>0?1-1/(1.001-e):-e}var bi,_i=function(e,t,r,n,i,a,o,s,l,u){var c=i.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:c.width/c.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},wi=function(t,r,n,i,a,o,s,l,u,c,f){var d=a.transform;return e.extend(_i(t,r,n,i,a,o,s,l,u,c),{u_gamma_scale:i?Math.cos(d._pitch)*d.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+f})},ki=function(t,r,n,i,a,o,s,l,u,c){return e.extend(wi(t,r,n,i,a,o,s,l,!0,u,!0),{u_texsize_icon:c,u_texture_icon:1})},Ti=function(e,t,r){return{u_matrix:e,u_opacity:t,u_color:r}},Ai=function(t,r,n,i,a,o){return e.extend(Yn(i,o,n,a),{u_matrix:t,u_opacity:r})},Mi={fillExtrusion:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fillExtrusionPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,r.u_height_factor),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fill:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},fillPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},fillOutline:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world)}},fillOutlinePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},circle:function(t,r){return{u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,r.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},collisionBox:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(t,r.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_overscale_factor:new e.Uniform1f(t,r.u_overscale_factor)}},collisionCircle:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_inv_matrix:new e.UniformMatrix4f(t,r.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(t,r.u_viewport_size)}},debug:function(t,r){return{u_color:new e.UniformColor(t,r.u_color),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_overlay:new e.Uniform1i(t,r.u_overlay),u_overlay_scale:new e.Uniform1f(t,r.u_overlay_scale)}},clippingMask:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmap:function(t,r){return{u_extrude_scale:new e.Uniform1f(t,r.u_extrude_scale),u_intensity:new e.Uniform1f(t,r.u_intensity),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmapTexture:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_color_ramp:new e.Uniform1i(t,r.u_color_ramp),u_opacity:new e.Uniform1f(t,r.u_opacity)}},hillshade:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_latrange:new e.Uniform2f(t,r.u_latrange),u_light:new e.Uniform2f(t,r.u_light),u_shadow:new e.UniformColor(t,r.u_shadow),u_highlight:new e.UniformColor(t,r.u_highlight),u_accent:new e.UniformColor(t,r.u_accent)}},hillshadePrepare:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_dimension:new e.Uniform2f(t,r.u_dimension),u_zoom:new e.Uniform1f(t,r.u_zoom),u_unpack:new e.Uniform4f(t,r.u_unpack)}},line:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels)}},lineGradient:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_image:new e.Uniform1i(t,r.u_image),u_image_height:new e.Uniform1f(t,r.u_image_height)}},linePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_texsize:new e.Uniform2f(t,r.u_texsize),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_image:new e.Uniform1i(t,r.u_image),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},lineSDF:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,r.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,r.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,r.u_sdfgamma),u_image:new e.Uniform1i(t,r.u_image),u_tex_y_a:new e.Uniform1f(t,r.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,r.u_tex_y_b),u_mix:new e.Uniform1f(t,r.u_mix)}},raster:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_tl_parent:new e.Uniform2f(t,r.u_tl_parent),u_scale_parent:new e.Uniform1f(t,r.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,r.u_buffer_scale),u_fade_t:new e.Uniform1f(t,r.u_fade_t),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image0:new e.Uniform1i(t,r.u_image0),u_image1:new e.Uniform1i(t,r.u_image1),u_brightness_low:new e.Uniform1f(t,r.u_brightness_low),u_brightness_high:new e.Uniform1f(t,r.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,r.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,r.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,r.u_spin_weights)}},symbolIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture)}},symbolSDF:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,r.u_is_halo)}},symbolTextAndIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texsize_icon:new e.Uniform2f(t,r.u_texsize_icon),u_texture:new e.Uniform1i(t,r.u_texture),u_texture_icon:new e.Uniform1i(t,r.u_texture_icon),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,r.u_is_halo)}},background:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_color:new e.UniformColor(t,r.u_color)}},backgroundPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image:new e.Uniform1i(t,r.u_image),u_pattern_tl_a:new e.Uniform2f(t,r.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,r.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,r.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,r.u_pattern_br_b),u_texsize:new e.Uniform2f(t,r.u_texsize),u_mix:new e.Uniform1f(t,r.u_mix),u_pattern_size_a:new e.Uniform2f(t,r.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,r.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,r.u_scale_a),u_scale_b:new e.Uniform1f(t,r.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,r.u_tile_units_to_pixels)}}};function Si(t,r,n,i,a,o,s){for(var l=t.context,u=l.gl,c=t.useProgram("collisionBox"),f=[],d=0,h=0,p=0;p0){var _=e.create(),w=y;e.mul(_,g.placementInvProjMatrix,t.transform.glCoordMatrix),e.mul(_,_,g.placementViewportMatrix),f.push({circleArray:b,circleOffset:h,transform:w,invTransform:_}),h=d+=b.length/4}x&&c.draw(l,u.LINES,Ne.disabled,Ue.disabled,t.colorModeForRenderPass(),Ze.disabled,ti(y,t.transform,m),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,t.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&f.length){var k=t.useProgram("collisionCircle"),T=new e.StructArrayLayout2f1f2i16;T.resize(4*d),T._trim();for(var A=0,M=0,S=f;M=0&&(v[g.associatedIconIndex]={shiftedAnchor:S,angle:E})}else Dt(g.numGlyphs,h)}if(f){p.clear();for(var L=t.icon.placedSymbolArray,P=0;P0){var s=e.browser.now(),l=(s-t.timeAdded)/o,u=r?(s-r.timeAdded)/o:-1,c=n.getSource(),f=a.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),d=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(t.tileID.overscaledZ-f),h=d&&t.refreshedUponExpiration?1:e.clamp(d?l:1-u,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),r?{opacity:1,mix:1-h}:{opacity:h,mix:0}}return{opacity:1,mix:0}}function $i(e,t,r){var n=r.paint.get("background-color"),i=r.paint.get("background-opacity");if(0!==i){var a=e.context,o=a.gl,s=e.transform,l=s.tileSize,u=r.paint.get("background-pattern");if(!e.isPatternMissing(u)){var c=!u&&1===n.a&&1===i&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass===c){var f=Ue.disabled,d=e.depthModeForSublayer(0,"opaque"===c?Ne.ReadWrite:Ne.ReadOnly),h=e.colorModeForRenderPass(),p=e.useProgram(u?"backgroundPattern":"background"),v=s.coveringTiles({tileSize:l});u&&(a.activeTexture.set(o.TEXTURE0),e.imageManager.bind(e.context));for(var m=r.getCrossfadeParameters(),g=0,y=v;g "+n.overscaledZ),fa(t,g+" "+p+"kb"),s.draw(i,a.TRIANGLES,l,u,Ge.alphaBlended,Ze.disabled,ni(o,e.Color.transparent,m),f,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}function fa(e,t){e.initDebugOverlayCanvas();var r=e.debugOverlayCanvas,n=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,r.width,r.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}function da(e,t,r){var n=e.context,i=r.implementation;if("offscreen"===e.renderPass){var a=i.prerender;a&&(e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),a.call(i,n.gl,e.transform.customLayerMatrix()),n.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),n.setStencilMode(Ue.disabled);var o="3d"===i.renderingMode?new Ne(e.context.gl.LEQUAL,Ne.ReadWrite,e.depthRangeFor3D):e.depthModeForSublayer(0,Ne.ReadOnly);n.setDepthMode(o),i.render(n.gl,e.transform.customLayerMatrix()),n.setDirty(),e.setBaseState(),n.bindFramebuffer.set(null)}}var ha={symbol:Li,circle:Fi,heatmap:Ni,line:qi,fill:Vi,"fill-extrusion":Gi,hillshade:Yi,raster:Ki,background:$i,debug:ua,custom:da},pa=function(e,t){this.context=new Xe(e),this.transform=t,this._tileTextures={},this.setup(),this.numSublayers=Ke.maxUnderzooming+Ke.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new fr,this.gpuTimers={}};pa.prototype.resize=function(t,r){if(this.width=t*e.browser.devicePixelRatio,this.height=r*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,i=this.style._order;n256&&this.clearStencil(),r.setColorMode(Ge.disabled),r.setDepthMode(Ne.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var a=0,o=t;a256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new Ue({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},pa.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new Ue({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},pa.prototype.stencilConfigForOverlap=function(e){var t,r=this.context.gl,n=e.sort((function(e,t){return t.overscaledZ-e.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],k=a[w.source],T=c[w.source];this._renderTileClippingMasks(w,T),this.renderLayer(this,k,w,T)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?t.pop():null},pa.prototype.isPatternMissing=function(e){if(!e)return!1;if(!e.from||!e.to)return!0;var t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r},pa.prototype.useProgram=function(e,t){this.cache=this.cache||{};var r=""+e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new Gn(this.context,e,qn[e],t,Mi[e],this._showOverdrawInspector)),this.cache[r]},pa.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},pa.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)},pa.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var t=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,t.RGBA)}},pa.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var va=function(e,t){this.points=e,this.planes=t};va.fromInvProjectionMatrix=function(t,r,n){var i=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],a=Math.pow(2,n),o=i.map((function(r){return e.transformMat4([],r,t)})).map((function(t){return e.scale$1([],t,1/t[3]/r*a)})),s=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(t){var r=e.sub([],o[t[0]],o[t[1]]),n=e.sub([],o[t[2]],o[t[1]]),i=e.normalize([],e.cross([],r,n)),a=-e.dot(i,o[t[1]]);return i.concat(a)}));return new va(o,s)};var ma=function(t,r){this.min=t,this.max=r,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};ma.prototype.quadrant=function(t){for(var r=[t%2===0,t<2],n=e.clone$2(this.min),i=e.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,f=0;fthis.max[l]-this.min[l])return 0}return 1};var ga=function(e,t,r,n){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(e)||e<0||isNaN(t)||t<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=r,this.right=n};ga.prototype.interpolate=function(t,r,n){return null!=r.top&&null!=t.top&&(this.top=e.number(t.top,r.top,n)),null!=r.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,r.bottom,n)),null!=r.left&&null!=t.left&&(this.left=e.number(t.left,r.left,n)),null!=r.right&&null!=t.right&&(this.right=e.number(t.right,r.right,n)),this},ga.prototype.getCenter=function(t,r){var n=e.clamp((this.left+t-this.right)/2,0,t),i=e.clamp((this.top+r-this.bottom)/2,0,r);return new e.Point(n,i)},ga.prototype.equals=function(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right},ga.prototype.clone=function(){return new ga(this.top,this.bottom,this.left,this.right)},ga.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var ya=function(t,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=t||0,this._maxZoom=r||22,this._minPitch=void 0===n||null===n?0:n,this._maxPitch=void 0===i||null===i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ga,this._posMatrixCache={},this._alignedPosMatrixCache={}},xa={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};function ba(e,t){var r=!1,n=null,i=function(){n=null,r&&(e(),n=setTimeout(i,t),r=!1)};return function(){return r=!0,n||i(),n}}ya.prototype.clone=function(){var e=new ya(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._calcMatrices(),e},xa.minZoom.get=function(){return this._minZoom},xa.minZoom.set=function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))},xa.maxZoom.get=function(){return this._maxZoom},xa.maxZoom.set=function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))},xa.minPitch.get=function(){return this._minPitch},xa.minPitch.set=function(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))},xa.maxPitch.get=function(){return this._maxPitch},xa.maxPitch.set=function(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))},xa.renderWorldCopies.get=function(){return this._renderWorldCopies},xa.renderWorldCopies.set=function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e},xa.worldSize.get=function(){return this.tileSize*this.scale},xa.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},xa.size.get=function(){return new e.Point(this.width,this.height)},xa.bearing.get=function(){return-this.angle/Math.PI*180},xa.bearing.set=function(t){var r=-e.wrap(t,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},xa.pitch.get=function(){return this._pitch/Math.PI*180},xa.pitch.set=function(t){var r=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},xa.fov.get=function(){return this._fov/Math.PI*180},xa.fov.set=function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())},xa.zoom.get=function(){return this._zoom},xa.zoom.set=function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},xa.center.get=function(){return this._center},xa.center.set=function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())},xa.padding.get=function(){return this._edgeInsets.toJSON()},xa.padding.set=function(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())},xa.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},ya.prototype.isPaddingEqual=function(e){return this._edgeInsets.equals(e)},ya.prototype.interpolatePadding=function(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this._constrain(),this._calcMatrices()},ya.prototype.coveringZoomLevel=function(e){var t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)},ya.prototype.getVisibleUnwrappedCoordinates=function(t){var r=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new e.Point(0,0)),i=this.pointCoordinate(new e.Point(this.width,0)),a=this.pointCoordinate(new e.Point(this.width,this.height)),o=this.pointCoordinate(new e.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),u=1,c=s-u;c<=l+u;c++)0!==c&&r.push(new e.UnwrappedTileID(c,t));return r},ya.prototype.coveringTiles=function(t){var r=this.coveringZoomLevel(t),n=r;if(void 0!==t.minzoom&&rt.maxzoom&&(r=t.maxzoom);var i=e.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=va.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=t.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var u=3,c=function(e){return{aabb:new ma([e*a,0,0],[(e+1)*a,a,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}},f=[],d=[],h=r,p=t.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var v=1;v<=3;v++)f.push(c(-v)),f.push(c(v));for(f.push(c(0));f.length>0;){var m=f.pop(),g=m.x,y=m.y,x=m.fullyVisible;if(!x){var b=m.aabb.intersects(s);if(0===b)continue;x=2===b}var _=m.aabb.distanceX(o),w=m.aabb.distanceY(o),k=Math.max(Math.abs(_),Math.abs(w)),T=u+(1<T&&m.zoom>=l)d.push({tileID:new e.OverscaledTileID(m.zoom===h?p:m.zoom,m.wrap,m.zoom,g,y),distanceSq:e.sqrLen([o[0]-.5-g,o[1]-.5-y])});else for(var A=0;A<4;A++){var M=(g<<1)+A%2,S=(y<<1)+(A>>1);f.push({aabb:m.aabb.quadrant(A),zoom:m.zoom+1,x:M,y:S,wrap:m.wrap,fullyVisible:x})}}return d.sort((function(e,t){return e.distanceSq-t.distanceSq})).map((function(e){return e.tileID}))},ya.prototype.resize=function(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()},xa.unmodified.get=function(){return this._unmodified},ya.prototype.zoomScale=function(e){return Math.pow(2,e)},ya.prototype.scaleZoom=function(e){return Math.log(e)/Math.LN2},ya.prototype.project=function(t){var r=e.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(t.lng)*this.worldSize,e.mercatorYfromLat(r)*this.worldSize)},ya.prototype.unproject=function(t){return new e.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()},xa.point.get=function(){return this.project(this.center)},ya.prototype.setLocationAtPoint=function(t,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(t),o=new e.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},ya.prototype.locationPoint=function(e){return this.coordinatePoint(this.locationCoordinate(e))},ya.prototype.pointLocation=function(e){return this.coordinateLocation(this.pointCoordinate(e))},ya.prototype.locationCoordinate=function(t){return e.MercatorCoordinate.fromLngLat(t)},ya.prototype.coordinateLocation=function(e){return e.toLngLat()},ya.prototype.pointCoordinate=function(t){var r=0,n=[t.x,t.y,0,1],i=[t.x,t.y,1,1];e.transformMat4(n,n,this.pixelMatrixInverse),e.transformMat4(i,i,this.pixelMatrixInverse);var a=n[3],o=i[3],s=n[0]/a,l=i[0]/o,u=n[1]/a,c=i[1]/o,f=n[2]/a,d=i[2]/o,h=f===d?0:(r-f)/(d-f);return new e.MercatorCoordinate(e.number(s,l,h)/this.worldSize,e.number(u,c,h)/this.worldSize)},ya.prototype.coordinatePoint=function(t){var r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix),new e.Point(r[0]/r[3],r[1]/r[3])},ya.prototype.getBounds=function(){return(new e.LngLatBounds).extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},ya.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},ya.prototype.setMaxBounds=function(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},ya.prototype.calculatePosMatrix=function(t,r){void 0===r&&(r=!1);var n=t.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=t.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*t.wrap,l=e.identity(new Float64Array(16));return e.translate(l,l,[s*o,a.y*o,0]),e.scale(l,l,[o/e.EXTENT,o/e.EXTENT,1]),e.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},ya.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},ya.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,r,n,i,a=-90,o=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var f=this.latRange;a=e.mercatorYfromLat(f[1])*this.worldSize,t=(o=e.mercatorYfromLat(f[0])*this.worldSize)-ao&&(i=o-m)}if(this.lngRange){var g=h.x,y=u.x/2;g-yl&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new e.Point(void 0!==n?n:h.x,void 0!==i?i:h.y))),this._unmodified=c,this._constraining=!1}},ya.prototype._calcMatrices=function(){if(this.height){var t=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(t)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,u=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),c=this.height/50,f=new Float64Array(16);e.perspective(f,this._fov,this.width/this.height,c,u),f[8]=2*-r.x/this.width,f[9]=2*r.y/this.height,e.scale(f,f,[1,-1,1]),e.translate(f,f,[0,0,-this.cameraToCenterDistance]),e.rotateX(f,f,this._pitch),e.rotateZ(f,f,this.angle),e.translate(f,f,[-s,-l,0]),this.mercatorMatrix=e.scale([],f,[this.worldSize,this.worldSize,this.worldSize]),e.scale(f,f,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=f,this.invProjMatrix=e.invert([],this.projMatrix);var d=this.width%2/2,h=this.height%2/2,p=Math.cos(this.angle),v=Math.sin(this.angle),m=s-Math.round(s)+p*d+v*h,g=l-Math.round(l)+p*h+v*d,y=new Float64Array(f);if(e.translate(y,y,[m>.5?m-1:m,g>.5?g-1:g,0]),this.alignedProjMatrix=y,f=e.create(),e.scale(f,f,[this.width/2,-this.height/2,1]),e.translate(f,f,[1,-1,0]),this.labelPlaneMatrix=f,f=e.create(),e.scale(f,f,[1,-1,1]),e.translate(f,f,[-1,-1,0]),e.scale(f,f,[2/this.width,2/this.height,1]),this.glCoordMatrix=f,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(f=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=f,this._posMatrixCache={},this._alignedPosMatrixCache={}}},ya.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new e.Point(0,0)),r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},ya.prototype.getCameraPoint=function(){var t=this._pitch,r=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,r))},ya.prototype.getCameraQueryGeometry=function(t){var r=this.getCameraPoint();if(1===t.length)return[t[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=t;s=3&&!e.some((function(e){return isNaN(e)}))){var t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},_a.prototype._updateHashUnthrottled=function(){var t=e.window.location.href.replace(/(#.+)?$/,this.getHashString());try{e.window.history.replaceState(e.window.history.state,null,t)}catch(r){}};var wa={linearity:.3,easing:e.bezier(0,0,.3,1)},ka=e.extend({deceleration:2500,maxSpeed:1400},wa),Ta=e.extend({deceleration:20,maxSpeed:1400},wa),Aa=e.extend({deceleration:1e3,maxSpeed:360},wa),Ma=e.extend({deceleration:1e3,maxSpeed:90},wa),Sa=function(e){this._map=e,this.clear()};function Ea(e,t){(!e.duration||e.duration0&&r-t[0].time>n;)t.shift()},Sa.prototype._onMoveEnd=function(t){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new La(e.type,this._map,e))},Ia.prototype.dblclick=function(e){return this._firePreventable(new La(e.type,this._map,e))},Ia.prototype.mouseover=function(e){this._map.fire(new La(e.type,this._map,e))},Ia.prototype.mouseout=function(e){this._map.fire(new La(e.type,this._map,e))},Ia.prototype.touchstart=function(e){return this._firePreventable(new Pa(e.type,this._map,e))},Ia.prototype.touchmove=function(e){this._map.fire(new Pa(e.type,this._map,e))},Ia.prototype.touchend=function(e){this._map.fire(new Pa(e.type,this._map,e))},Ia.prototype.touchcancel=function(e){this._map.fire(new Pa(e.type,this._map,e))},Ia.prototype._firePreventable=function(e){if(this._map.fire(e),e.defaultPrevented)return{}},Ia.prototype.isEnabled=function(){return!0},Ia.prototype.isActive=function(){return!1},Ia.prototype.enable=function(){},Ia.prototype.disable=function(){};var Ra=function(e){this._map=e};Ra.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ra.prototype.mousemove=function(e){this._map.fire(new La(e.type,this._map,e))},Ra.prototype.mousedown=function(){this._delayContextMenu=!0},Ra.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new La("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ra.prototype.contextmenu=function(e){this._delayContextMenu?this._contextMenuEvent=e:this._map.fire(new La(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()},Ra.prototype.isEnabled=function(){return!0},Ra.prototype.isActive=function(){return!1},Ra.prototype.enable=function(){},Ra.prototype.disable=function(){};var Da=function(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1};function za(e,t){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=Fa(t),this.touches=za(r,t)))},Ua.prototype.touchmove=function(e,t,r){if(!this.aborted&&this.centroid){var n=za(r,t);for(var i in this.touches){var a=this.touches[i],o=n[i];(!o||o.dist(a)>ja)&&(this.aborted=!0)}}},Ua.prototype.touchend=function(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>Ba)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var qa=function(e){this.singleTap=new Ua(e),this.numTaps=e.numTaps,this.reset()};qa.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},qa.prototype.touchstart=function(e,t,r){this.singleTap.touchstart(e,t,r)},qa.prototype.touchmove=function(e,t,r){this.singleTap.touchmove(e,t,r)},qa.prototype.touchend=function(e,t,r){var n=this.singleTap.touchend(e,t,r);if(n){var i=e.timeStamp-this.lastTime0&&(this._active=!0);var i=za(n,r),a=new e.Point(0,0),o=new e.Point(0,0),s=0;for(var l in i){var u=i[l],c=this._touches[l];c&&(a._add(u),o._add(u.sub(c)),s++,i[l]=u)}if(this._touches=i,!(sMath.abs(e.x)}var lo=100,uo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reset=function(){e.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},t.prototype._start=function(e){this._lastPoints=e,so(e[0].sub(e[1]))&&(this._valid=!1)},t.prototype._move=function(e,t,r){var n=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid)return this._lastPoints=e,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}},t.prototype.gestureBeginsVertically=function(e,t,r){if(void 0!==this._valid)return this._valid;var n=2,i=e.mag()>=n,a=t.mag()>=n;if(i||a){if(!i||!a)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove0===t.y>0;return so(e)&&so(t)&&o}},t}(Qa),co={panStep:100,bearingStep:15,pitchStep:10},fo=function(){var e=co;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep,this._rotationDisabled=!1};function ho(e){return e*(2-e)}fo.prototype.reset=function(){this._active=!1},fo.prototype.keydown=function(e){var t=this;if(!(e.altKey||e.ctrlKey||e.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(n=0,i=0),{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:ho,zoom:r?Math.round(l)+r*(e.shiftKey?2:1):l,bearing:s.getBearing()+n*t._bearingStep,pitch:s.getPitch()+i*t._pitchStep,offset:[-a*t._panStep,-o*t._panStep],center:s.getCenter()},{originalEvent:e})}}}},fo.prototype.enable=function(){this._enabled=!0},fo.prototype.disable=function(){this._enabled=!1,this.reset()},fo.prototype.isEnabled=function(){return this._enabled},fo.prototype.isActive=function(){return this._active},fo.prototype.disableRotation=function(){this._rotationDisabled=!0},fo.prototype.enableRotation=function(){this._rotationDisabled=!1};var po=4.000244140625,vo=.01,mo=1/450,go=2,yo=function(t,r){this._map=t,this._el=t.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=vo,this._wheelZoomRate=mo,e.bindAll(["_onTimeout"],this)};yo.prototype.setZoomRate=function(e){this._defaultZoomRate=e},yo.prototype.setWheelZoomRate=function(e){this._wheelZoomRate=e},yo.prototype.isEnabled=function(){return!!this._enabled},yo.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},yo.prototype.isZooming=function(){return!!this._zooming},yo.prototype.enable=function(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)},yo.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},yo.prototype.wheel=function(t){if(this.isEnabled()){var r=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,n=e.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%po===0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),t.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=t,this._delta-=r,this._active||this._start(t)),t.preventDefault()}},yo.prototype._onTimeout=function(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},yo.prototype._start=function(t){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,t);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},yo.prototype.renderFrame=function(){var t=this;if(this._frameId&&(this._frameId=null,this.isActive())){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>po?this._wheelZoomRate:this._defaultZoomRate,i=go/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a="number"===typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s="number"===typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var f=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),d=u(f);o=e.number(l,s,d),f<1?this._frameId||(this._frameId=!0):c=!0}else o=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout((function(){t._zooming=!1,t._handler._triggerRenderFrame(),delete t._targetZoom,delete t._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},yo.prototype._smoothOutEasing=function(t){var r=e.ease;if(this._prevEase){var n=this._prevEase,i=(e.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=e.bezier(o,s,.25,1)}return this._prevEase={start:e.browser.now(),duration:t,easing:r},r},yo.prototype.reset=function(){this._active=!1};var xo=function(e,t){this._clickZoom=e,this._tapZoom=t};xo.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},xo.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},xo.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},xo.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var bo=function(){this.reset()};bo.prototype.reset=function(){this._active=!1},bo.prototype.dblclick=function(e,t){return e.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(e.shiftKey?-1:1),around:r.unproject(t)},{originalEvent:e})}}},bo.prototype.enable=function(){this._enabled=!0},bo.prototype.disable=function(){this._enabled=!1,this.reset()},bo.prototype.isEnabled=function(){return this._enabled},bo.prototype.isActive=function(){return this._active};var _o=function(){this._tap=new qa({numTouches:1,numTaps:1}),this.reset()};_o.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},_o.prototype.touchstart=function(e,t,r){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>Na&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=t[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(e,t,r))},_o.prototype.touchmove=function(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=t[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,r)},_o.prototype.touchend=function(e,t,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(e,t,r)&&(this._tapTime=e.timeStamp)},_o.prototype.touchcancel=function(){this.reset()},_o.prototype.enable=function(){this._enabled=!0},_o.prototype.disable=function(){this._enabled=!1,this.reset()},_o.prototype.isEnabled=function(){return this._enabled},_o.prototype.isActive=function(){return this._active};var wo=function(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r};wo.prototype.enable=function(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},wo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},wo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},wo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ko=function(e,t,r){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=r};ko.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ko.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ko.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ko.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var To=function(e,t,r,n){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};To.prototype.enable=function(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},To.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},To.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},To.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},To.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},To.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ao=function(e){return e.zoom||e.drag||e.pitch||e.rotate},Mo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(e.Event);function So(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}var Eo=function(t,n){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Sa(t),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),e.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[e.window,"blur",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,_):Math.max(.5,_),w=Math.pow(m,1-t),k=i.unproject(x.add(b.mult(t*w)).mult(v));i.setLocationAtPoint(i.renderWorldCopies?k.wrap():k,p)}n._fireMoveEvents(r)}),(function(e){n._afterEase(r,e)}),t),this},r.prototype._prepareEase=function(t,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new e.Event("movestart",t)),this._zooming&&!n.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!n.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!n.pitching&&this.fire(new e.Event("pitchstart",t))},r.prototype._fireMoveEvents=function(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))},r.prototype._afterEase=function(t,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new e.Event("zoomend",t)),i&&this.fire(new e.Event("rotateend",t)),a&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}},r.prototype.flyTo=function(t,r){var n=this;if(!t.essential&&e.browser.prefersReducedMotion){var i=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,r)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in t?e.clamp(+t.zoom,a.minZoom,a.maxZoom):o,f="bearing"in t?this._normalizeBearing(t.bearing,s):s,d="pitch"in t?+t.pitch:l,h="padding"in t?t.padding:a.padding,p=a.zoomScale(c-o),v=e.Point.convert(t.offset),m=a.centerPoint.add(v),g=a.pointLocation(m),y=e.LngLat.convert(t.center||g);this._normalizeCenter(y);var x=a.project(g),b=a.project(y).sub(x),_=t.curve,w=Math.max(a.width,a.height),k=w/p,T=b.mag();if("minZoom"in t){var A=e.clamp(Math.min(t.minZoom,o,c),a.minZoom,a.maxZoom),M=w/a.zoomScale(A-o);_=Math.sqrt(M/T*2)}var S=_*_;function E(e){var t=(k*k-w*w+(e?-1:1)*S*S*T*T)/(2*(e?k:w)*S*T);return Math.log(Math.sqrt(t*t+1)-t)}function C(e){return(Math.exp(e)-Math.exp(-e))/2}function L(e){return(Math.exp(e)+Math.exp(-e))/2}function P(e){return C(e)/L(e)}var O=E(0),I=function(e){return L(O)/L(O+_*e)},R=function(e){return w*((L(O)*P(O+_*e)-C(O))/S)/T},D=(E(1)-O)/_;if(Math.abs(T)<1e-6||!isFinite(D)){if(Math.abs(w-k)<1e-6)return this.easeTo(t,r);var z=kt.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=d!==l,this._padding=!a.isPaddingEqual(h),this._prepareEase(r,!1),this._ease((function(t){var i=t*D,p=1/I(i);a.zoom=1===t?c:o+a.scaleZoom(p),n._rotating&&(a.bearing=e.number(s,f,t)),n._pitching&&(a.pitch=e.number(l,d,t)),n._padding&&(a.interpolatePadding(u,h,t),m=a.centerPoint.add(v));var g=1===t?y:a.unproject(x.add(b.mult(R(i))).mult(p));a.setLocationAtPoint(a.renderWorldCopies?g.wrap():g,m),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),t),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,t)}if(!e){var n=this.handlers;n&&n.stop(!1)}return this},r.prototype._ease=function(t,r,n){!1===n.animate||0===n.duration?(t(1),r()):(this._easeStart=e.browser.now(),this._easeOptions=n,this._onEaseFrame=t,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var t=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(t,r){t=e.wrap(t,-180,180);var n=Math.abs(t-r);return Math.abs(t-360-r)180?-360:r<-180?360:0}},r}(e.Evented),Lo=function(t){void 0===t&&(t={}),this.options=t,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Lo.prototype.getDefaultPosition=function(){return"bottom-right"},Lo.prototype.onAdd=function(e){var t=this.options&&this.options.compact;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Lo.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Lo.prototype._setElementTitle=function(e,t){var r=this._map._getUIString("AttributionControl."+t);e.title=r,e.setAttribute("aria-label",r)},Lo.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Lo.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){var n=r.reduce((function(e,t,n){return t.value&&(e+=t.key+"="+t.value+(n=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,e.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Lo.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Po=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};Po.prototype.onAdd=function(e){this._map=e,this._container=r.create("div","mapboxgl-ctrl");var t=r.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Po.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Po.prototype.getDefaultPosition=function(){return"bottom-left"},Po.prototype._updateLogo=function(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Po.prototype._logoRequired=function(){if(this._map.style){var e=this._map.style.sourceCaches;for(var t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},Po.prototype._updateCompact=function(){var e=this._container.children;if(e.length){var t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}};var Oo=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Oo.prototype.add=function(e){var t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t},Oo.prototype.remove=function(e){for(var t=this._currentlyRunning,r=0,n=t?this._queue.concat(t):this._queue;rt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitchjo)throw new Error("maxPitch must be less than or equal to "+jo);var i=new ya(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies);if(n.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new Oo,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},Io,t.locale),this._clickTolerance=t.clickTolerance,this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken),"string"===typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof Do))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return r._update(!1)})),this.on("moveend",(function(){return r._update(!1)})),this.on("zoom",(function(){return r._update(!0)})),"undefined"!==typeof e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1),e.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Eo(this,t);var a="string"===typeof t.hash&&t.hash||void 0;this._hash=t.hash&&new _a(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new Lo({customAttribution:t.customAttribution})),this.addControl(new Po,t.logoPosition),this.on("style.load",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on("data",(function(t){r._update("style"===t.dataType),r.fire(new e.Event(t.dataType+"data",t))})),this.on("dataloading",(function(t){r.fire(new e.Event(t.dataType+"dataloading",t))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(t,r){if(void 0===r&&(r=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var n=t.onAdd(this);this._controls.push(t);var i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(t);return r>-1&&this._controls.splice(r,1),t.onRemove(this),this},i.prototype.hasControl=function(e){return this._controls.indexOf(e)>-1},i.prototype.resize=function(t){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t))),this.fire(new e.Event("resize",t)),a&&this.fire(new e.Event("moveend",t)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()},i.prototype.setMinZoom=function(e){if((e=null===e||void 0===e?Fo:e)>=Fo&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(e){if((e=null===e||void 0===e?Bo:e)=Bo&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()jo)throw new Error("maxPitch must be less than or equal to "+jo);if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(e){return this.transform.renderWorldCopies=e,this._update()},i.prototype.project=function(t){return this.transform.locationPoint(e.LngLat.convert(t))},i.prototype.unproject=function(t){return this.transform.pointLocation(e.Point.convert(t))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(e,t,r){var n,i=this;if("mouseenter"===e||"mouseover"===e){var a=!1,o=function(n){var o=i.getLayer(t)?i.queryRenderedFeatures(n.point,{layers:[t]}):[];o.length?a||(a=!0,r.call(i,new La(e,i,n.originalEvent,{features:o}))):a=!1};return{layer:t,listener:r,delegates:{mousemove:o,mouseout:function(){a=!1}}}}if("mouseleave"===e||"mouseout"===e){var s=!1,l=function(n){(i.getLayer(t)?i.queryRenderedFeatures(n.point,{layers:[t]}):[]).length?s=!0:s&&(s=!1,r.call(i,new La(e,i,n.originalEvent)))},u=function(t){s&&(s=!1,r.call(i,new La(e,i,t.originalEvent)))};return{layer:t,listener:r,delegates:{mousemove:l,mouseout:u}}}var c=function(e){var n=i.getLayer(t)?i.queryRenderedFeatures(e.point,{layers:[t]}):[];n.length&&(e.features=n,r.call(i,e),delete e.features)};return{layer:t,listener:r,delegates:(n={},n[e]=c,n)}},i.prototype.on=function(e,t,r){if(void 0===r)return n.prototype.on.call(this,e,t);var i=this._createDelegatedListener(e,t,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(e,t,r){if(void 0===r)return n.prototype.once.call(this,e,t);var i=this._createDelegatedListener(e,t,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(e,t,r){var i=this;if(void 0===r)return n.prototype.off.call(this,e,t);var a=function(n){for(var a=n[e],o=0;o180;){var s=n.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}Wo.prototype.down=function(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),r.disableDrag()},Wo.prototype.move=function(e,t){var r=this.map,n=this.mouseRotate.mousemoveWindow(e,t);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(e,t);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Wo.prototype.off=function(){var e=this.element;r.removeEventListener(e,"mousedown",this.mousedown),r.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(e,"touchmove",this.touchmove),r.removeEventListener(e,"touchend",this.touchend),r.removeEventListener(e,"touchcancel",this.reset),this.offTemp()},Wo.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(e.window,"mousemove",this.mousemove),r.removeEventListener(e.window,"mouseup",this.mouseup)},Wo.prototype.mousedown=function(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:function(){return t.preventDefault()}}),r.mousePos(this.element,t)),r.addEventListener(e.window,"mousemove",this.mousemove),r.addEventListener(e.window,"mouseup",this.mouseup)},Wo.prototype.mousemove=function(e){this.move(e,r.mousePos(this.element,e))},Wo.prototype.mouseup=function(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()},Wo.prototype.touchstart=function(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return e.preventDefault()}},this._startPos))},Wo.prototype.touchmove=function(e){1!==e.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,e.targetTouches)[0],this.move({preventDefault:function(){return e.preventDefault()}},this._lastPos))},Wo.prototype.touchend=function(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=r}this._isDragging&&(this._pos=t.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new e.Event("dragstart"))),this.fire(new e.Event("drag")))},n.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new e.Event("dragend")),this._state="inactive"},n.prototype._addDragHandler=function(e){this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},n.prototype.setDraggable=function(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},n.prototype.isDraggable=function(){return this._draggable},n.prototype.setRotation=function(e){return this._rotation=e||0,this._update(),this},n.prototype.getRotation=function(){return this._rotation},n.prototype.setRotationAlignment=function(e){return this._rotationAlignment=e||"auto",this._update(),this},n.prototype.getRotationAlignment=function(){return this._rotationAlignment},n.prototype.setPitchAlignment=function(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this},n.prototype.getPitchAlignment=function(){return this._pitchAlignment},n}(e.Evented),$o={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};function Qo(t){void 0!==Ko?t(Ko):void 0!==e.window.navigator.permissions?e.window.navigator.permissions.query({name:"geolocation"}).then((function(e){Ko="denied"!==e.state,t(Ko)})):(Ko=!!e.window.navigator.geolocation,t(Ko))}var es=0,ts=!1,rs=function(t){function n(r){t.call(this),this.options=e.extend({},$o,r),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.onAdd=function(e){return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Qo(this._setupUI),this._container},n.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,es=0,ts=!1},n.prototype._isOutOfMapMaxBounds=function(e){var t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitudet.getEast()||r.latitudet.getNorth())},n.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},n.prototype._onSuccess=function(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}},n.prototype._updateCamera=function(t){var r=new e.LngLat(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy,i=this._map.getBearing(),a=e.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(t){if(t){var r=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var e=this._map._container.clientHeight/2,t=this._map.unproject([0,e]),r=this._map.unproject([1,e]),n=t.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(t){if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&ts)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(t){var n=this;if(this._container.addEventListener("contextmenu",(function(e){return e.preventDefault()})),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===t){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Jo(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Jo({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(t){var r=t.originalEvent&&"resize"===t.originalEvent.type;t.geolocateSource||"ACTIVE_LOCK"!==n._watchState||r||(n._watchState="BACKGROUND",n._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),n._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),n.fire(new e.Event("trackuserlocationend")))}))},n.prototype.trigger=function(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":es--,ts=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++es>1?(t={maximumAge:6e5,timeout:0},ts=!0):(t=this.options.positionOptions,ts=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},n}(e.Evented),ns={maxWidth:100,unit:"metric"},is=function(t){this.options=e.extend({},ns,t),e.bindAll(["_onMove","setUnit"],this)};function as(e,t,r){var n=r&&r.maxWidth||100,i=e._container.clientHeight/2,a=e.unproject([0,i]),o=e.unproject([n,i]),s=a.distanceTo(o);if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?os(t,n,l/5280,e._getUIString("ScaleControl.Miles")):os(t,n,l,e._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?os(t,n,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?os(t,n,s/1e3,e._getUIString("ScaleControl.Kilometers")):os(t,n,s,e._getUIString("ScaleControl.Meters"))}function os(e,t,r,n){var i=ls(r),a=i/r;e.style.width=t*a+"px",e.innerHTML=i+" "+n}function ss(e){var t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}function ls(e){var t=Math.pow(10,(""+Math.floor(e)).length-1),r=e/t;return t*(r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:ss(r))}is.prototype.getDefaultPosition=function(){return"bottom-left"},is.prototype._onMove=function(){as(this._map,this._container,this.options)},is.prototype.onAdd=function(e){return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},is.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},is.prototype.setUnit=function(e){this.options.unit=e,as(this._map,this._container,this.options)};var us=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};us.prototype.onAdd=function(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},us.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},us.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},us.prototype._setupUI=function(){var t=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden",!0),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},us.prototype._updateTitle=function(){var e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e},us.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},us.prototype._isFullscreen=function(){return this._fullscreen},us.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},us.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var cs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},fs=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),ds=function(t){function n(r){t.call(this),this.options=e.extend(Object.create(cs),r),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.addTo=function(t){return this._map&&this.remove(),this._map=t,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new e.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(t){return this.setDOMContent(e.window.document.createTextNode(t))},n.prototype.setHTML=function(t){var r,n=e.window.document.createDocumentFragment(),i=e.window.document.createElement("body");for(i.innerHTML=t;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(e){return this.options.maxWidth=e,this._update(),this},n.prototype.setDOMContent=function(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this},n.prototype.addClassName=function(e){this._container&&this._container.classList.add(e)},n.prototype.removeClassName=function(e){this._container&&this._container.classList.remove(e)},n.prototype.setOffset=function(e){return this.options.offset=e,this._update(),this},n.prototype.toggleClassName=function(e){if(this._container)return this._container.classList.toggle(e)},n.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},n.prototype._onMouseUp=function(e){this._update(e.point)},n.prototype._onMouseMove=function(e){this._update(e.point)},n.prototype._onDrag=function(e){this._update(e.point)},n.prototype._update=function(e){var t=this,n=this._lngLat||this._trackPointer;if(this._map&&n&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(e){return t._container.classList.add(e)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Yo(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),a=this.options.anchor,o=hs(this.options.offset);if(!a){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=i.y+o.bottom.ythis._map.transform.height-u?["bottom"]:[],i.xthis._map.transform.width-l/2&&s.push("right"),a=0===s.length?"bottom":s.join("-")}var c=i.add(o[a]).round();r.setTransform(this._container,Zo[a]+" translate("+c.x+"px,"+c.y+"px)"),Xo(this._container,a,"popup")}},n.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var e=this._container.querySelector(fs);e&&e.focus()}},n.prototype._onClose=function(){this.remove()},n}(e.Evented);function hs(t){if(t){if("number"===typeof t){var r=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{center:new e.Point(0,0),top:new e.Point(0,t),"top-left":new e.Point(r,r),"top-right":new e.Point(-r,r),bottom:new e.Point(0,-t),"bottom-left":new e.Point(r,-r),"bottom-right":new e.Point(-r,-r),left:new e.Point(t,0),right:new e.Point(-t,0)}}if(t instanceof e.Point||Array.isArray(t)){var n=e.Point.convert(t);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:e.Point.convert(t.center||[0,0]),top:e.Point.convert(t.top||[0,0]),"top-left":e.Point.convert(t["top-left"]||[0,0]),"top-right":e.Point.convert(t["top-right"]||[0,0]),bottom:e.Point.convert(t.bottom||[0,0]),"bottom-left":e.Point.convert(t["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(t["bottom-right"]||[0,0]),left:e.Point.convert(t.left||[0,0]),right:e.Point.convert(t.right||[0,0])}}return hs(new e.Point(0,0))}var ps={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:qo,NavigationControl:Go,GeolocateControl:rs,AttributionControl:Lo,ScaleControl:is,FullscreenControl:us,Popup:ds,Marker:Jo,Style:mr,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:at,clearPrewarmedResources:ot,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return tt.workerCount},set workerCount(e){tt.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){e.clearTileCache(t)},workerUrl:""};return ps})),r}()},3108:function(e,t,r){"use strict";e.exports=r(26099)},26099:function(e,t,r){"use strict";var n=r(64928),i=r(32420),a=r(51160),o=r(76752),s=r(55616),l=r(31264),u=r(47520),c=r(18400),f=r(72512),d=r(76244);function h(e,t){for(var r=t[0],n=t[1],a=1/(t[2]-r),o=1/(t[3]-n),s=new Array(e.length),l=0,u=e.length/2;l>>1;t.dtype||(t.dtype="array"),"string"===typeof t.dtype?p=new(f(t.dtype))(m):t.dtype&&(p=t.dtype,Array.isArray(p)&&(p.length=m));for(var g=0;gr||s>1073741824){for(var d=0;dr+i||M>n+i||S=L)&&o!==s){var l=y[a];void 0===s&&(s=l.length);for(var u=o;u=m&&f<=w&&d>=g&&d<=k&&P.push(c)}var h=x[a],p=h[4*o+0],v=h[4*o+1],b=h[4*o+2],_=h[4*o+3],T=function(e,t){for(var r=null,n=0;null===r;)if(r=e[4*t+n],++n>e.length)return null;return r}(h,o+1),E=.5*i,O=a+1;t(r,n,E,O,p,v||b||_||T),t(r,n+E,E,O,v,b||_||T),t(r+E,n,E,O,b,_||T),t(r+E,n+E,E,O,_,T)}}(0,0,1,0,0,1),P},p;function E(e,t,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s0){t+=Math.abs(o(e[0]));for(var r=1;r2){for(l=0;l=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},t.radiansToLength=c,t.lengthToRadians=f,t.lengthToDegrees=function(e,t){return d(f(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=d,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return c(f(e,t),r)},t.convertArea=function(e,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[r];if(!i)throw new Error("invalid original units");var a=t.areaFactors[n];if(!a)throw new Error("invalid final units");return e/i*a},t.isNumber=h,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!h(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},3256:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(46284);function i(e,t,r){if(null!==e)for(var n,a,o,s,l,u,c,f,d=0,h=0,p=e.type,v="FeatureCollection"===p,m="Feature"===p,g=v?e.features.length:1,y=0;yu||h>c||p>f)return l=i,u=r,c=h,f=p,void(o=0);var v=n.lineString([l,i],e.properties);if(!1===t(v,r,a,p,o))return!1;o++,l=i}))&&void 0}}}))}function c(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,r,i){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===t(e,r,i,0,0))return!1;break;case"Polygon":for(var s=0;se[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},t.radiansToLength=c,t.lengthToRadians=f,t.lengthToDegrees=function(e,t){return d(f(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=d,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return c(f(e,t),r)},t.convertArea=function(e,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[r];if(!i)throw new Error("invalid original units");var a=t.areaFactors[n];if(!a)throw new Error("invalid final units");return e/i*a},t.isNumber=h,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!h(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},84880:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(76796);function i(e,t,r){if(null!==e)for(var n,a,o,s,l,u,c,f,d=0,h=0,p=e.type,v="FeatureCollection"===p,m="Feature"===p,g=v?e.features.length:1,y=0;yu||h>c||p>f)return l=i,u=r,c=h,f=p,void(o=0);var v=n.lineString([l,i],e.properties);if(!1===t(v,r,a,p,o))return!1;o++,l=i}))&&void 0}}}))}function c(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,r,i){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===t(e,r,i,0,0))return!1;break;case"Polygon":for(var s=0;s=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},t.radiansToLength=c,t.lengthToRadians=f,t.lengthToDegrees=function(e,t){return d(f(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=d,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return c(f(e,t),r)},t.convertArea=function(e,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[r];if(!i)throw new Error("invalid original units");var a=t.areaFactors[n];if(!a)throw new Error("invalid final units");return e/i*a},t.isNumber=h,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!h(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")},t.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},t.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},t.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},t.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},t.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},t.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},t.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},43752:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(49840);function i(e,t,r){if(null!==e)for(var n,a,o,s,l,u,c,f,d=0,h=0,p=e.type,v="FeatureCollection"===p,m="Feature"===p,g=v?e.features.length:1,y=0;yu||h>c||p>f)return l=i,u=r,c=h,f=p,void(o=0);var v=n.lineString([l,i],e.properties);if(!1===t(v,r,a,p,o))return!1;o++,l=i}))&&void 0}}}))}function c(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,r,i){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===t(e,r,i,0,0))return!1;break;case"Polygon":for(var s=0;si&&(i=e[o]),e[o]1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;ie.length)&&(r=e.length),e.substring(r-t.length,r)===t}var m="",g="",y="",x="",b={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function w(e){return h(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function k(e,t,r){var i="",a="",o=0,s="",l=!1,u=w(e),c=u.split("\n"),f=w(t).split("\n"),h=0,p="";if("strictEqual"===r&&"object"===d(e)&&"object"===d(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===c.length&&1===f.length&&c[0]!==f[0]){var _=c[0].length+f[0].length;if(_<=10){if(("object"!==d(e)||null===e)&&("object"!==d(t)||null===t)&&(0!==e||0!==t))return"".concat(b[r],"\n\n")+"".concat(c[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r&&_<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;c[0][h]===f[0][h];)h++;h>2&&(p="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",h),"^"),h=0)}}for(var k=c[c.length-1],T=f[f.length-1];k===T&&(h++<2?s="\n ".concat(k).concat(s):i=k,c.pop(),f.pop(),0!==c.length&&0!==f.length);)k=c[c.length-1],T=f[f.length-1];var A=Math.max(c.length,f.length);if(0===A){var M=u.split("\n");if(M.length>30)for(M[26]="".concat(m,"...").concat(x);M.length>27;)M.pop();return"".concat(b.notIdentical,"\n\n").concat(M.join("\n"),"\n")}h>3&&(s="\n".concat(m,"...").concat(x).concat(s),l=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var S=0,E=b[r]+"\n".concat(g,"+ actual").concat(x," ").concat(y,"- expected").concat(x),C=" ".concat(m,"...").concat(x," Lines skipped");for(h=0;h1&&h>2&&(L>4?(a+="\n".concat(m,"...").concat(x),l=!0):L>3&&(a+="\n ".concat(f[h-2]),S++),a+="\n ".concat(f[h-1]),S++),o=h,i+="\n".concat(y,"-").concat(x," ").concat(f[h]),S++;else if(f.length1&&h>2&&(L>4?(a+="\n".concat(m,"...").concat(x),l=!0):L>3&&(a+="\n ".concat(c[h-2]),S++),a+="\n ".concat(c[h-1]),S++),o=h,a+="\n".concat(g,"+").concat(x," ").concat(c[h]),S++;else{var P=f[h],O=c[h],I=O!==P&&(!v(O,",")||O.slice(0,-1)!==P);I&&v(P,",")&&P.slice(0,-1)===O&&(I=!1,O+=","),I?(L>1&&h>2&&(L>4?(a+="\n".concat(m,"...").concat(x),l=!0):L>3&&(a+="\n ".concat(c[h-2]),S++),a+="\n ".concat(c[h-1]),S++),o=h,a+="\n".concat(g,"+").concat(x," ").concat(O),i+="\n".concat(y,"-").concat(x," ").concat(P),S+=2):(a+=i,i="",1!==L&&0!==h||(a+="\n ".concat(O),S++))}if(S>20&&h30)for(T[26]="".concat(m,"...").concat(x);T.length>27;)T.pop();r=1===T.length?o(this,f(t).call(this,"".concat(v," ").concat(T[0]))):o(this,f(t).call(this,"".concat(v,"\n\n").concat(T.join("\n"),"\n")))}else{var A=w(u),M="",S=b[a];"notDeepEqual"===a||"notEqual"===a?(A="".concat(b[a],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(M="".concat(w(c)),A.length>512&&(A="".concat(A.slice(0,509),"...")),M.length>512&&(M="".concat(M.slice(0,509),"...")),"deepEqual"===a||"equal"===a?A="".concat(S,"\n\n").concat(A,"\n\nshould equal\n\n"):M=" ".concat(a," ").concat(M)),r=o(this,f(t).call(this,"".concat(A).concat(M)))}return Error.stackTraceLimit=h,r.generatedMessage=!i,Object.defineProperty(s(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=u,r.expected=c,r.operator=a,Error.captureStackTrace&&Error.captureStackTrace(s(r),l),r.stack,r.name="AssertionError",o(r)}var r,l,u;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,e),r=t,l=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:h.custom,value:function(e,t){return h(this,function(e){for(var t=1;t2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(e,t,i){var a,o,l,u;if(void 0===s&&(s=r(45408)),s("string"===typeof e,"'name' must be a string"),"string"===typeof t&&(o="not ",t.substr(!l||l<0?0:+l,o.length)===o)?(a="must not be",t=t.replace(/^not /,"")):a="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))u="The ".concat(e," ").concat(a," ").concat(f(t,"type"));else{var c=function(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";u='The "'.concat(e,'" ').concat(c," ").concat(a," ").concat(f(t,"type"))}return u+=". Received type ".concat(n(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===l&&(l=r(35840));var i=l.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n0,"At least one arg needs to be specified");var i="The ",a=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),a){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,a-1).join(", "),i+=", and ".concat(t[a-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=u},25116:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(l){i=!0,a=l}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a=void 0!==/a/g.flags,o=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},s=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},l=Object.is?Object.is:r(39896),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},c=Number.isNaN?Number.isNaN:r(1560);function f(e){return e.call.bind(e)}var d=f(Object.prototype.hasOwnProperty),h=f(Object.prototype.propertyIsEnumerable),p=f(Object.prototype.toString),v=r(35840).types,m=v.isAnyArrayBuffer,g=v.isArrayBufferView,y=v.isDate,x=v.isMap,b=v.isRegExp,_=v.isSet,w=v.isNativeError,k=v.isBoxedPrimitive,T=v.isNumberObject,A=v.isStringObject,M=v.isBooleanObject,S=v.isBigIntObject,E=v.isSymbolObject,C=v.isFloat32Array,L=v.isFloat64Array;function P(e){if(0===e.length||e.length>10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function O(e){return Object.keys(e).filter(P).concat(u(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function I(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i>2],a+=n[(3&r[t])<<4|r[t+1]>>4],a+=n[(15&r[t+1])<<2|r[t+2]>>6],a+=n[63&r[t+2]];return i%3===2?a=a.substring(0,a.length-1)+"=":i%3===1&&(a=a.substring(0,a.length-2)+"=="),a},s=function(e){var t,r,n,a,o,s=.75*e.length,l=e.length,u=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var c=new ArrayBuffer(s),f=new Uint8Array(c);for(t=0;t>4,f[u++]=(15&n)<<4|a>>2,f[u++]=(3&a)<<6|63&o;return c}},59968:function(e,t){"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,a=s(e),o=a[0],l=a[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,l)),c=0,f=l>0?o-4:o;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;su?u:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,a,o=[],s=t;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},64928:function(e){"use strict";function t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,i=o-1):n=o+1}return a}function r(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,i=o-1):n=o+1}return a}function n(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,n=o+1):i=o-1}return a}function i(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,n=o+1):i=o-1}return a}function a(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function o(e,t,r,n,i,a){return"function"===typeof r?a(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):a(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}e.exports={ge:function(e,r,n,i,a){return o(e,r,n,i,a,t)},gt:function(e,t,n,i,a){return o(e,t,n,i,a,r)},lt:function(e,t,r,i,a){return o(e,t,r,i,a,n)},le:function(e,t,r,n,a){return o(e,t,r,n,a,i)},eq:function(e,t,r,n,i){return o(e,t,r,n,i,a)}}},308:function(e,t){"use strict";function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=2147483647,t.INT_MIN=-1<<31,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},29620:function(e,t,r){"use strict";var n=r(32420);e.exports=function(e,t){t||(t={});var r,o,s,l,u,c,f,d,h,p,v,m=null==t.cutoff?.25:t.cutoff,g=null==t.radius?8:t.radius,y=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");r=t.width,o=t.height,l=e,c=t.stride?t.stride:Math.floor(e.length/r/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(f=(d=e).getContext("2d"),r=d.width,o=d.height,l=(h=f.getImageData(0,0,r,o)).data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(f=e,r=(d=e.canvas).width,o=d.height,l=(h=f.getImageData(0,0,r,o)).data,c=4):window.ImageData&&e instanceof window.ImageData&&(h=e,r=e.width,o=e.height,l=h.data,c=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(r*o),p=0,v=u.length;p-1?i(r):r}},57916:function(e,t,r){"use strict";var n=r(8844),i=r(53664),a=r(14500),o=i("%TypeError%"),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||n.call(l,s),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(h){c=null}e.exports=function(e){if("function"!==typeof e)throw new o("a function is required");var t=u(n,l,arguments);return a(t,1+f(0,e.length-(arguments.length-1)),!0)};var d=function(){return u(n,s,arguments)};c?c(e.exports,"apply",{value:d}):e.exports.apply=d},32420:function(e){e.exports=function(e,t,r){return tr?r:e:et?t:e}},3808:function(e,t,r){"use strict";var n=r(32420);function i(e,t){null==t&&(t=!0);var r=e[0],i=e[1],a=e[2],o=e[3];return null==o&&(o=t?1:255),t&&(r*=255,i*=255,a*=255,o*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((a=255&n(a,0,255))<<8)+(o=255&n(o,0,255))}e.exports=i,e.exports.to=i,e.exports.from=function(e,t){var r=(e=+e)>>>24,n=(16711680&e)>>>16,i=(65280&e)>>>8,a=255&e;return!1===t?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},17592:function(e){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},72160:function(e,t,r){"use strict";var n=r(96824),i=r(32420),a=r(72512);e.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var r=new(a(t))(4),o="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!==typeof e||((e=n(e))[0]/=255,e[1]/=255,e[2]/=255),function(e){return e instanceof Uint8Array||e instanceof Uint8ClampedArray||!!(Array.isArray(e)&&(e[0]>1||0===e[0])&&(e[1]>1||0===e[1])&&(e[2]>1||0===e[2])&&(!e[3]||e[3]>1))}(e)?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:1):(r[0]=i(Math.floor(255*e[0]),0,255),r[1]=i(Math.floor(255*e[1]),0,255),r[2]=i(Math.floor(255*e[2]),0,255),r[3]=null==e[3]?255:i(Math.floor(255*e[3]),0,255)),r)}},96824:function(e,t,r){"use strict";var n=r(95532),i=r(53576),a=r(32420);e.exports=function(e){var t,r=n(e);return r.space?((t=Array(3))[0]=a(r.values[0],0,255),t[1]=a(r.values[1],0,255),t[2]=a(r.values[2],0,255),"h"===r.space[0]&&(t=i.rgb(t)),t.push(a(r.alpha,0,1)),t):[]}},95532:function(e,t,r){"use strict";var n=r(17592);e.exports=function(e){var t,r,a=[],o=1;if("string"===typeof e)if(e=e.toLowerCase(),n[e])a=n[e].slice(),r="rgb";else if("transparent"===e)o=0,r="rgb",a=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var s=e.slice(1);o=1,(c=s.length)<=4?(a=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===c&&(o=parseInt(s[3]+s[3],16)/255)):(a=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===c&&(o=parseInt(s[6]+s[7],16)/255)),a[0]||(a[0]=0),a[1]||(a[1]=0),a[2]||(a[2]=0),r="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u="rgb"===l;r=s=l.replace(/a$/,"");var c="cmyk"===s?4:"gray"===s?1:3;a=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===c?parseFloat(e)/100:"rgb"===s?255*parseFloat(e)/100:parseFloat(e);if("h"===s[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==i[e])return i[e]}return parseFloat(e)})),l===s&&a.push(1),o=u||void 0===a[c]?1:a[c],a=a.slice(0,c)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(a=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),r=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(a=[e[0],e[1],e[2]],r="rgb",o=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(r="rgb",a=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(r="hsl",a=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),o=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(o/=100)):(r="rgb",a=[e>>>16,(65280&e)>>>8,255&e]);return{space:r,values:a,alpha:o}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},53576:function(e,t,r){"use strict";var n=r(19336);e.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t,r,n,i,a,o=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[a=255*l,a,a];t=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var u=0;u<3;u++)(n=o+1/3*-(u-1))<0?n++:n>1&&n--,a=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[u]=255*a;return i}},n.hsl=function(e){var t,r,n=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?t=0:n===s?t=(i-a)/l:i===s?t=2+(a-n)/l:a===s&&(t=4+(n-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),r=(o+s)/2,[t,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},19336:function(e){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},36116:function(e){e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},42771:function(e,t,r){"use strict";e.exports={parse:r(46416),stringify:r(49395)}},8744:function(e,t,r){"use strict";var n=r(30584);e.exports={isSize:function(e){return/^[\d\.]/.test(e)||-1!==e.indexOf("/")||-1!==n.indexOf(e)}}},46416:function(e,t,r){"use strict";var n=r(92384),i=r(68194),a=r(3748),o=r(2904),s=r(47916),l=r(7294),u=r(39956),c=r(8744).isSize;e.exports=d;var f=d.cache={};function d(e){if("string"!==typeof e)throw new Error("Font argument must be a string.");if(f[e])return f[e];if(""===e)throw new Error("Cannot parse an empty string.");if(-1!==a.indexOf(e))return f[e]={system:e};for(var t,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},d=u(e,/\s+/);t=d.shift();){if(-1!==i.indexOf(t))return["style","variant","weight","stretch"].forEach((function(e){r[e]=t})),f[e]=r;if(-1===s.indexOf(t))if("normal"!==t&&"small-caps"!==t)if(-1===l.indexOf(t)){if(-1===o.indexOf(t)){if(c(t)){var p=u(t,"/");if(r.size=p[0],null!=p[1]?r.lineHeight=h(p[1]):"/"===d[0]&&(d.shift(),r.lineHeight=h(d.shift())),!d.length)throw new Error("Missing required font-family.");return r.family=u(d.join(" "),/\s*,\s*/).map(n),f[e]=r}throw new Error("Unknown or unsupported font token: "+t)}r.weight=t}else r.stretch=t;else r.variant=t;else r.style=t}throw new Error("Missing required font-size.")}function h(e){var t=parseFloat(e);return t.toString()===e?t:e}},49395:function(e,t,r){"use strict";var n=r(55616),i=r(8744).isSize,a=v(r(68194)),o=v(r(3748)),s=v(r(2904)),l=v(r(47916)),u=v(r(7294)),c={normal:1,"small-caps":1},f={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},d="1rem",h="serif";function p(e,t){if(e&&!t[e]&&!a[e])throw Error("Unknown keyword `"+e+"`");return e}function v(e){for(var t={},r=0;rt?1:e>=t?0:NaN}r.d(t,{XE:function(){return n},kv:function(){return o},mo:function(){return l},Uf:function(){return u},SY:function(){return c},ik:function(){return f},oh:function(){return d}});var i=function(e){var t;return 1===e.length&&(t=e,e=function(e,r){return n(t(e),r)}),{left:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;e(t[a],r)<0?n=a+1:i=a}return n},right:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;e(t[a],r)>0?i=a:n=a+1}return n}}}(n),a=(i.right,i.left,Array.prototype);function o(e,t){var r,n,i=e.length,a=-1;if(null==t){for(;++a=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(n=r);return n}function s(e){return null===e?NaN:+e}function l(e,t){var r,n=e.length,i=n,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(n=e[i]).length;--t>=0;)r[--o]=n[t];return r}function c(e,t){var r,n,i=e.length,a=-1;if(null==t){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function f(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((t-e)/r)),a=new Array(i);++n=n.length)return null!=e&&r.sort(e),null!=t?t(r):r;for(var u,c,f,d=-1,h=r.length,p=n[i++],v=o(),m=s();++dn.length)return e;var a,o=i[r-1];return null!=t&&r>=n.length?a=e.entries():(a=[],e.each((function(e,t){a.push({key:t,values:s(e,r)})}))),null!=o?a.sort((function(e,t){return o(e.key,t.key)})):a}return r={object:function(e){return a(e,0,l,u)},map:function(e){return a(e,0,c,f)},entries:function(e){return s(a(e,0,c,f),0)},key:function(e){return n.push(e),r},sortKeys:function(e){return i[n.length-1]=e,r},sortValues:function(t){return e=t,r},rollup:function(e){return t=e,r}}}function l(){return{}}function u(e,t,r){e[t]=r}function c(){return o()}function f(e,t,r){e.set(t,r)}function d(){}var h=o.prototype;d.prototype=function(e,t){var r=new d;if(e instanceof d)e.each((function(e){r.add(e)}));else if(e){var n=-1,i=e.length;if(null==t)for(;++n=(a=(v+g)/2))?v=a:g=a,(c=r>=(o=(m+y)/2))?m=o:y=o,i=h,!(h=h[f=c<<1|u]))return i[f]=p,e;if(s=+e._x.call(null,h.data),l=+e._y.call(null,h.data),t===s&&r===l)return p.next=h,i?i[f]=p:e._root=p,e;do{i=i?i[f]=new Array(4):e._root=new Array(4),(u=t>=(a=(v+g)/2))?v=a:g=a,(c=r>=(o=(m+y)/2))?m=o:y=o}while((f=c<<1|u)===(d=(l>=o)<<1|s>=a));return i[d]=h,i[f]=p,e}function s(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function l(e){return e[0]}function u(e){return e[1]}function c(e,t,r){var n=new f(null==t?l:t,null==r?u:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function f(e,t,r,n,i,a){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function d(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}r.r(t),r.d(t,{forceCenter:function(){return n},forceCollide:function(){return m},forceLink:function(){return b},forceManyBody:function(){return K},forceRadial:function(){return J},forceSimulation:function(){return X},forceX:function(){return $},forceY:function(){return Q}});var h=c.prototype=f.prototype;function p(e){return e.x+e.vx}function v(e){return e.y+e.vy}function m(e){var t,r,n=1,o=1;function s(){for(var e,i,s,u,f,d,h,m=t.length,g=0;gu+p||if+p||os.index){var v=u-l.x-l.vx,m=f-l.y-l.vy,g=v*v+m*m;ge.r&&(e.r=e[t].r)}function u(){if(t){var n,i,a=t.length;for(r=new Array(a),n=0;nf&&(f=n),id&&(d=i));if(u>f||c>d)return this;for(this.cover(u,c).cover(f,d),r=0;re||e>=i||n>t||t>=a;)switch(s=(th||(a=u.y0)>p||(o=u.x1)=y)<<1|e>=g)&&(u=v[v.length-1],v[v.length-1]=v[v.length-1-c],v[v.length-1-c]=u)}else{var x=e-+this._x.call(null,m.data),b=t-+this._y.call(null,m.data),_=x*x+b*b;if(_=(s=(p+m)/2))?p=s:m=s,(c=o>=(l=(v+g)/2))?v=l:g=l,t=h,!(h=h[f=c<<1|u]))return this;if(!h.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(r=t,d=f)}for(;h.data!==e;)if(n=h,!(h=h.next))return this;return(i=h.next)&&delete h.next,n?(i?n.next=i:delete n.next,this):t?(i?t[f]=i:delete t[f],(h=t[0]||t[1]||t[2]||t[3])&&h===(t[3]||t[2]||t[1]||t[0])&&!h.length&&(r?r[d]=h:this._root=h),this):(this._root=i,this)},h.removeAll=function(e){for(var t=0,r=e.length;t=0&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++o0)for(var r,n,i=new Array(r),a=0;a=0&&t._call.call(null,e),t=t._next;--C}()}finally{C=0,function(){for(var e,t,r=M,n=1/0;r;)r._call?(n>r._time&&(n=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:M=t);S=e,H(n)}(),R=0}}function V(){var e=z.now(),t=e-I;t>O&&(D-=t,I=e)}function H(e){C||(L&&(L=clearTimeout(L)),e-R>24?(e<1/0&&(L=setTimeout(q,e-z.now()-D)),P&&(P=clearInterval(P))):(P||(I=z.now(),P=setInterval(V,O)),C=1,F(q)))}function G(e){return e.x}function W(e){return e.y}j.prototype=U.prototype={constructor:j,restart:function(e,t,r){if("function"!==typeof e)throw new TypeError("callback is not a function");r=(null==r?N():+r)+(null==t?0:+t),this._next||S===this||(S?S._next=this:M=this,S=this),this._call=e,this._time=r,H()},stop:function(){this._call&&(this._call=null,this._time=1/0,H())}};var Y=10,Z=Math.PI*(3-Math.sqrt(5));function X(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),a=0,o=.6,s=(0,g.kH)(),l=U(c),u=E("tick","end");function c(){f(),u.call("tick",t),r1?(null==r?s.remove(e):s.set(e,h(r)),t):s.get(e)},find:function(t,r,n){var i,a,o,s,l,u=0,c=e.length;for(null==n?n=1/0:n*=n,u=0;u1?(u.on(e,r),t):u.on(e)}}}function K(){var e,t,r,n,o=i(-30),s=1,l=1/0,u=.81;function f(n){var i,a=e.length,o=c(e,G,W).visitAfter(h);for(r=n,i=0;i=l)){(e.data!==t||e.next)&&(0===f&&(p+=(f=a())*f),0===d&&(p+=(d=a())*d),p1?n[0]+n.slice(2):n,+e.slice(r+1)]}r.d(t,{E9:function(){return d},SO:function(){return v}});var i,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){if(!(t=a.exec(e)))throw new Error("invalid format: "+e);var t;return new s({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 s(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,t){var r=n(e,t);if(!r)return e+"";var i=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}o.prototype=s.prototype,s.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 u={"%":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,t){var r=n(e,t);if(!r)return e+"";var a=r[0],o=r[1],s=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+n(e,Math.max(0,t+s-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 f,d,h=Array.prototype.map,p=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function v(e){var t,r,a=void 0===e.grouping||void 0===e.thousands?c:(t=h.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,a=[],o=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[o=(o+1)%t.length];return a.reverse().join(r)}),s=void 0===e.currency?"":e.currency[0]+"",l=void 0===e.currency?"":e.currency[1]+"",f=void 0===e.decimal?".":e.decimal+"",d=void 0===e.numerals?c:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(h.call(e.numerals,String)),v=void 0===e.percent?"%":e.percent+"",m=void 0===e.minus?"-":e.minus+"",g=void 0===e.nan?"NaN":e.nan+"";function y(e){var t=(e=o(e)).fill,r=e.align,n=e.sign,c=e.symbol,h=e.zero,y=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):u[w]||(void 0===b&&(b=12),_=!0,w="g"),(h||"0"===t&&"="===r)&&(h=!0,t="0",r="=");var k="$"===c?s:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T="$"===c?l:/[%p]/.test(w)?v:"",A=u[w],M=/[defgprs%]/.test(w);function S(e){var o,s,l,u=k,c=T;if("c"===w)c=A(e)+c,e="";else{var v=(e=+e)<0||1/e<0;if(e=isNaN(e)?g:A(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),v&&0===+e&&"+"!==n&&(v=!1),u=(v?"("===n?n:m:"-"===n||"("===n?"":n)+u,c=("s"===w?p[8+i/3]:"")+c+(v&&"("===n?")":""),M)for(o=-1,s=e.length;++o(l=e.charCodeAt(o))||l>57){c=(46===l?f+e.slice(o+1):e.slice(o))+c,e=e.slice(0,o);break}}x&&!h&&(e=a(e,1/0));var S=u.length+e.length+c.length,E=S>1)+u+e+c+E.slice(S);break;default:e=E+u+e+c}return d(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return e+""},S}return{format:y,formatPrefix:function(e,t){var r,i=y(((e=o(e)).type="f",e)),a=3*Math.max(-8,Math.min(8,Math.floor((r=t,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),s=Math.pow(10,-a),l=p[8+a/3];return function(e){return i(s*e)+l}}}}f=v({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),d=f.format,f.formatPrefix},87108:function(e,t,r){"use strict";r.r(t),r.d(t,{geoAiry:function(){return D},geoAiryRaw:function(){return R},geoAitoff:function(){return F},geoAitoffRaw:function(){return z},geoArmadillo:function(){return B},geoArmadilloRaw:function(){return N},geoAugust:function(){return U},geoAugustRaw:function(){return j},geoBaker:function(){return G},geoBakerRaw:function(){return H},geoBerghaus:function(){return Z},geoBerghausRaw:function(){return Y},geoBertin1953:function(){return re},geoBertin1953Raw:function(){return te},geoBoggs:function(){return ce},geoBoggsRaw:function(){return ue},geoBonne:function(){return ve},geoBonneRaw:function(){return pe},geoBottomley:function(){return ge},geoBottomleyRaw:function(){return me},geoBromley:function(){return xe},geoBromleyRaw:function(){return ye},geoChamberlin:function(){return Ee},geoChamberlinAfrica:function(){return Se},geoChamberlinRaw:function(){return Ae},geoCollignon:function(){return Le},geoCollignonRaw:function(){return Ce},geoCraig:function(){return Oe},geoCraigRaw:function(){return Pe},geoCraster:function(){return De},geoCrasterRaw:function(){return Re},geoCylindricalEqualArea:function(){return Fe},geoCylindricalEqualAreaRaw:function(){return ze},geoCylindricalStereographic:function(){return Be},geoCylindricalStereographicRaw:function(){return Ne},geoEckert1:function(){return Ue},geoEckert1Raw:function(){return je},geoEckert2:function(){return Ve},geoEckert2Raw:function(){return qe},geoEckert3:function(){return Ge},geoEckert3Raw:function(){return He},geoEckert4:function(){return Ye},geoEckert4Raw:function(){return We},geoEckert5:function(){return Xe},geoEckert5Raw:function(){return Ze},geoEckert6:function(){return Je},geoEckert6Raw:function(){return Ke},geoEisenlohr:function(){return et},geoEisenlohrRaw:function(){return Qe},geoFahey:function(){return nt},geoFaheyRaw:function(){return rt},geoFoucaut:function(){return at},geoFoucautRaw:function(){return it},geoFoucautSinusoidal:function(){return st},geoFoucautSinusoidalRaw:function(){return ot},geoGilbert:function(){return dt},geoGingery:function(){return mt},geoGingeryRaw:function(){return ht},geoGinzburg4:function(){return xt},geoGinzburg4Raw:function(){return yt},geoGinzburg5:function(){return _t},geoGinzburg5Raw:function(){return bt},geoGinzburg6:function(){return kt},geoGinzburg6Raw:function(){return wt},geoGinzburg8:function(){return At},geoGinzburg8Raw:function(){return Tt},geoGinzburg9:function(){return St},geoGinzburg9Raw:function(){return Mt},geoGringorten:function(){return Lt},geoGringortenQuincuncial:function(){return ai},geoGringortenRaw:function(){return Ct},geoGuyou:function(){return Rt},geoGuyouRaw:function(){return It},geoHammer:function(){return $},geoHammerRaw:function(){return K},geoHammerRetroazimuthal:function(){return Nt},geoHammerRetroazimuthalRaw:function(){return zt},geoHealpix:function(){return Yt},geoHealpixRaw:function(){return Vt},geoHill:function(){return Xt},geoHillRaw:function(){return Zt},geoHomolosine:function(){return tr},geoHomolosineRaw:function(){return er},geoHufnagel:function(){return nr},geoHufnagelRaw:function(){return rr},geoHyperelliptical:function(){return sr},geoHyperellipticalRaw:function(){return or},geoInterrupt:function(){return cr},geoInterruptedBoggs:function(){return dr},geoInterruptedHomolosine:function(){return pr},geoInterruptedMollweide:function(){return mr},geoInterruptedMollweideHemispheres:function(){return yr},geoInterruptedQuarticAuthalic:function(){return fn},geoInterruptedSinuMollweide:function(){return br},geoInterruptedSinusoidal:function(){return wr},geoKavrayskiy7:function(){return Tr},geoKavrayskiy7Raw:function(){return kr},geoLagrange:function(){return Mr},geoLagrangeRaw:function(){return Ar},geoLarrivee:function(){return Cr},geoLarriveeRaw:function(){return Er},geoLaskowski:function(){return Pr},geoLaskowskiRaw:function(){return Lr},geoLittrow:function(){return Ir},geoLittrowRaw:function(){return Or},geoLoximuthal:function(){return Dr},geoLoximuthalRaw:function(){return Rr},geoMiller:function(){return Fr},geoMillerRaw:function(){return zr},geoModifiedStereographic:function(){return Xr},geoModifiedStereographicAlaska:function(){return Hr},geoModifiedStereographicGs48:function(){return Gr},geoModifiedStereographicGs50:function(){return Wr},geoModifiedStereographicLee:function(){return Zr},geoModifiedStereographicMiller:function(){return Yr},geoModifiedStereographicRaw:function(){return Nr},geoMollweide:function(){return oe},geoMollweideRaw:function(){return ae},geoMtFlatPolarParabolic:function(){return Qr},geoMtFlatPolarParabolicRaw:function(){return $r},geoMtFlatPolarQuartic:function(){return tn},geoMtFlatPolarQuarticRaw:function(){return en},geoMtFlatPolarSinusoidal:function(){return nn},geoMtFlatPolarSinusoidalRaw:function(){return rn},geoNaturalEarth:function(){return an.c},geoNaturalEarth2:function(){return sn},geoNaturalEarth2Raw:function(){return on},geoNaturalEarthRaw:function(){return an.g},geoNellHammer:function(){return un},geoNellHammerRaw:function(){return ln},geoNicolosi:function(){return hn},geoNicolosiRaw:function(){return dn},geoPatterson:function(){return Tn},geoPattersonRaw:function(){return kn},geoPeirceQuincuncial:function(){return oi},geoPierceQuincuncial:function(){return oi},geoPolyconic:function(){return Mn},geoPolyconicRaw:function(){return An},geoPolyhedral:function(){return In},geoPolyhedralButterfly:function(){return jn},geoPolyhedralCollignon:function(){return Vn},geoPolyhedralWaterman:function(){return Hn},geoProject:function(){return Xn},geoQuantize:function(){return si},geoQuincuncial:function(){return ii},geoRectangularPolyconic:function(){return ui},geoRectangularPolyconicRaw:function(){return li},geoRobinson:function(){return di},geoRobinsonRaw:function(){return fi},geoSatellite:function(){return pi},geoSatelliteRaw:function(){return hi},geoSinuMollweide:function(){return Qt},geoSinuMollweideRaw:function(){return $t},geoSinusoidal:function(){return he},geoSinusoidalRaw:function(){return de},geoStitch:function(){return Ii},geoTimes:function(){return Di},geoTimesRaw:function(){return Ri},geoTwoPointAzimuthal:function(){return Bi},geoTwoPointAzimuthalRaw:function(){return Fi},geoTwoPointAzimuthalUsa:function(){return Ni},geoTwoPointEquidistant:function(){return qi},geoTwoPointEquidistantRaw:function(){return ji},geoTwoPointEquidistantUsa:function(){return Ui},geoVanDerGrinten:function(){return Hi},geoVanDerGrinten2:function(){return Wi},geoVanDerGrinten2Raw:function(){return Gi},geoVanDerGrinten3:function(){return Zi},geoVanDerGrinten3Raw:function(){return Yi},geoVanDerGrinten4:function(){return Ki},geoVanDerGrinten4Raw:function(){return Xi},geoVanDerGrintenRaw:function(){return Vi},geoWagner:function(){return $i},geoWagner4:function(){return na},geoWagner4Raw:function(){return ra},geoWagner6:function(){return aa},geoWagner6Raw:function(){return ia},geoWagner7:function(){return Qi},geoWagnerRaw:function(){return Ji},geoWiechel:function(){return sa},geoWiechelRaw:function(){return oa},geoWinkel3:function(){return ua},geoWinkel3Raw:function(){return la}});var n=r(87952),i=Math.abs,a=Math.atan,o=Math.atan2,s=(Math.ceil,Math.cos),l=Math.exp,u=Math.floor,c=Math.log,f=Math.max,d=Math.min,h=Math.pow,p=Math.round,v=Math.sign||function(e){return e>0?1:e<0?-1:0},m=Math.sin,g=Math.tan,y=1e-6,x=1e-12,b=Math.PI,_=b/2,w=b/4,k=Math.SQRT1_2,T=P(2),A=P(b),M=2*b,S=180/b,E=b/180;function C(e){return e>1?_:e<-1?-_:Math.asin(e)}function L(e){return e>1?0:e<-1?b:Math.acos(e)}function P(e){return e>0?Math.sqrt(e):0}function O(e){return(l(e)-l(-e))/2}function I(e){return(l(e)+l(-e))/2}function R(e){var t=g(e/2),r=2*c(s(e/2))/(t*t);function n(e,t){var n=s(e),i=s(t),a=m(t),o=i*n,l=-((1-o?c((1+o)/2)/(1-o):-.5)+r/(1+o));return[l*i*m(e),l*a]}return n.invert=function(t,n){var a,l=P(t*t+n*n),u=-e/2,f=50;if(!l)return[0,0];do{var d=u/2,h=s(d),p=m(d),v=p/h,g=-c(i(h));u-=a=(2/v*g-r*v-l)/(-g/(p*p)+1-r/(2*h*h))*(h<0?.7:1)}while(i(a)>y&&--f>0);var x=m(u);return[o(t*x,l*s(u)),C(n*x/l)]},n}function D(){var e=_,t=(0,n.U)(R),r=t(e);return r.radius=function(r){return arguments.length?t(e=r*E):e*S},r.scale(179.976).clipAngle(147)}function z(e,t){var r=s(t),n=function(e){return e?e/Math.sin(e):1}(L(r*s(e/=2)));return[2*r*m(e)*n,m(t)*n]}function F(){return(0,n.c)(z).scale(152.63)}function N(e){var t=m(e),r=s(e),n=e>=0?1:-1,a=g(n*e),l=(1+t-r)/2;function u(e,i){var u=s(i),c=s(e/=2);return[(1+u)*m(e),(n*i>-o(c,a)-.001?0:10*-n)+l+m(i)*r-(1+u)*t*c]}return u.invert=function(e,u){var c=0,f=0,d=50;do{var h=s(c),p=m(c),v=s(f),g=m(f),x=1+v,b=x*p-e,_=l+g*r-x*t*h-u,w=x*h/2,k=-p*g,T=t*x*p/2,A=r*v+t*h*g,M=k*T-A*w,S=(_*k-b*A)/M/2,E=(b*T-_*w)/M;i(E)>2&&(E/=2),c-=S,f-=E}while((i(S)>y||i(E)>y)&&--d>0);return n*f>-o(s(c),a)-.001?[2*c,f]:null},u}function B(){var e=20*E,t=e>=0?1:-1,r=g(t*e),i=(0,n.U)(N),a=i(e),l=a.stream;return a.parallel=function(n){return arguments.length?(r=g((t=(e=n*E)>=0?1:-1)*e),i(e)):e*S},a.stream=function(n){var i=a.rotate(),u=l(n),c=(a.rotate([0,0]),l(n)),f=a.precision();return a.rotate(i),u.sphere=function(){c.polygonStart(),c.lineStart();for(var n=-180*t;t*n<180;n+=90*t)c.point(n,90*t);if(e)for(;t*(n-=3*t*f)>=-180;)c.point(n,t*-o(s(n*E/2),r)*S);c.lineEnd(),c.polygonEnd()},u},a.scale(218.695).center([0,28.0974])}function j(e,t){var r=g(t/2),n=P(1-r*r),i=1+n*s(e/=2),a=m(e)*n/i,o=r/i,l=a*a,u=o*o;return[4/3*a*(3+l-3*u),4/3*o*(3+3*l-u)]}function U(){return(0,n.c)(j).scale(66.1603)}z.invert=function(e,t){if(!(e*e+4*t*t>b*b+y)){var r=e,n=t,a=25;do{var o,l=m(r),u=m(r/2),c=s(r/2),f=m(n),d=s(n),h=m(2*n),p=f*f,v=d*d,g=u*u,x=1-v*c*c,_=x?L(d*c)*P(o=1/x):o=0,w=2*_*d*u-e,k=_*f-t,T=o*(v*g+_*d*c*p),A=o*(.5*l*h-2*_*f*u),M=.25*o*(h*u-_*f*v*l),S=o*(p*c+_*g*d),E=A*M-S*T;if(!E)break;var C=(k*A-w*S)/E,O=(w*M-k*T)/E;r-=C,n-=O}while((i(C)>y||i(O)>y)&&--a>0);return[r,n]}},j.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&i(t)>1)return null;var r=1+e*e+t*t,n=P((r-P(r*r-4*t*t))/2),a=C(n)/3,l=n?function(e){return c(e+P(e*e-1))}(i(t/n))/3:function(e){return c(e+P(e*e+1))}(i(e))/3,u=s(a),f=I(l),d=f*f-u*u;return[2*v(e)*o(O(l)*u,.25-d),2*v(t)*o(f*m(a),.25+d)]};var q=P(8),V=c(1+T);function H(e,t){var r=i(t);return rx&&--u>0);return[e/(s(o)*(q-1/m(o))),v(t)*o]};var W=r(69020);function Y(e){var t=2*b/e;function r(e,r){var n=(0,W.O)(e,r);if(i(e)>_){var a=o(n[1],n[0]),l=P(n[0]*n[0]+n[1]*n[1]),u=t*p((a-_)/t)+_,c=o(m(a-=u),2-s(a));a=u+C(b/l*m(c))-c,n[0]=l*s(a),n[1]=l*m(a)}return n}return r.invert=function(e,r){var n=P(e*e+r*r);if(n>_){var i=o(r,e),l=t*p((i-_)/t)+_,u=i>l?-1:1,c=n*s(l-i),f=1/g(u*L((c-b)/P(b*(b-2*c)+n*n)));i=l+2*a((f+u*P(f*f-3))/3),e=n*s(i),r=n*m(i)}return W.O.invert(e,r)},r}function Z(){var e=5,t=(0,n.U)(Y),r=t(e),i=r.stream,a=.01,l=-s(a*E),u=m(a*E);return r.lobes=function(r){return arguments.length?t(e=+r):e},r.stream=function(t){var n=r.rotate(),c=i(t),f=(r.rotate([0,0]),i(t));return r.rotate(n),c.sphere=function(){f.polygonStart(),f.lineStart();for(var t=0,r=360/e,n=2*b/e,i=90-180/e,c=_;t0&&i(n)>y);return s<0?NaN:r}function ee(e,t,r){return void 0===t&&(t=40),void 0===r&&(r=x),function(n,a,o,s){var l,u,c;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var f=0;fl)o-=u/=2,s-=c/=2;else{l=v;var m=(o>0?-1:1)*r,g=(s>0?-1:1)*r,y=e(o+m,s),x=e(o,s+g),b=(y[0]-d[0])/m,_=(y[1]-d[1])/m,w=(x[0]-d[0])/g,k=(x[1]-d[1])/g,T=k*b-_*w,A=(i(T)<.5?.5:1)/T;if(o+=u=(p*w-h*k)*A,s+=c=(h*_-p*b)*A,i(u)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return t.invert=ee(t),t}function re(){return(0,n.c)(te()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function ne(e,t){var r,n=e*m(t),a=30;do{t-=r=(t+m(t)-n)/(1+s(t))}while(i(r)>y&&--a>0);return t/2}function ie(e,t,r){function n(n,i){return[e*n*s(i=ne(r,i)),t*m(i)]}return n.invert=function(n,i){return i=C(i/t),[n/(e*s(i)),C((2*i+m(2*i))/r)]},n}J.invert=function(e,t){var r=2*C(t/2);return[e*s(r/2)/s(r),r]};var ae=ie(T/_,T,b);function oe(){return(0,n.c)(ae).scale(169.529)}var se=2.00276,le=1.11072;function ue(e,t){var r=ne(b,t);return[se*e/(1/s(t)+le/s(r)),(t+T*m(r))/se]}function ce(){return(0,n.c)(ue).scale(160.857)}function fe(e){var t=0,r=(0,n.U)(e),i=r(t);return i.parallel=function(e){return arguments.length?r(t=e*E):t*S},i}function de(e,t){return[e*s(t),t]}function he(){return(0,n.c)(de).scale(152.63)}function pe(e){if(!e)return de;var t=1/g(e);function r(r,n){var i=t+e-n,a=i?r*s(n)/i:i;return[i*m(a),t-i*s(a)]}return r.invert=function(r,n){var i=P(r*r+(n=t-n)*n),a=t+e-i;return[i/s(a)*o(r,n),a]},r}function ve(){return fe(pe).scale(123.082).center([0,26.1441]).parallel(45)}function me(e){function t(t,r){var n=_-r,i=n?t*e*m(n)/n:n;return[n*m(i)/e,_-n*s(i)]}return t.invert=function(t,r){var n=t*e,i=_-r,a=P(n*n+i*i),s=o(n,i);return[(a?a/m(a):1)*s/e,_-a]},t}function ge(){var e=.5,t=(0,n.U)(me),r=t(e);return r.fraction=function(r){return arguments.length?t(e=+r):e},r.scale(158.837)}ue.invert=function(e,t){var r,n,a=se*t,o=t<0?-w:w,l=25;do{n=a-T*m(o),o-=r=(m(2*o)+2*o-b*m(n))/(2*s(2*o)+2+b*s(n)*T*s(o))}while(i(r)>y&&--l>0);return n=a-T*m(o),[e*(1/s(n)+le/s(o))/se,n]},de.invert=function(e,t){return[e/s(t),t]};var ye=ie(1,4/b,b);function xe(){return(0,n.c)(ye).scale(152.63)}var be=r(24052),_e=r(92992);function we(e,t,r,n,a,l){var u,c=s(l);if(i(e)>1||i(l)>1)u=L(r*a+t*n*c);else{var f=m(e/2),d=m(l/2);u=2*C(P(f*f+t*n*d*d))}return i(u)>y?[u,o(n*m(l),t*a-r*n*c)]:[0,0]}function ke(e,t,r){return L((e*e+t*t-r*r)/(2*e*t))}function Te(e){return e-2*b*u((e+b)/(2*b))}function Ae(e,t,r){for(var n,i=[[e[0],e[1],m(e[1]),s(e[1])],[t[0],t[1],m(t[1]),s(t[1])],[r[0],r[1],m(r[1]),s(r[1])]],a=i[2],o=0;o<3;++o,a=n)n=i[o],a.v=we(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=ke(i[0].v[0],i[2].v[0],i[1].v[0]),u=ke(i[0].v[0],i[1].v[0],i[2].v[0]),c=b-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var f=[i[2].point[0]=i[0].point[0]+i[2].v[0]*s(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*m(l))];return function(e,t){var r,n=m(t),a=s(t),o=new Array(3);for(r=0;r<3;++r){var l=i[r];if(o[r]=we(t-l[1],l[3],l[2],a,n,e-l[0]),!o[r][0])return l.point;o[r][1]=Te(o[r][1]-l.v[1])}var d=f.slice();for(r=0;r<3;++r){var h=2==r?0:r+1,p=ke(i[r].v[0],o[r][0],o[h][0]);o[r][1]<0&&(p=-p),r?1==r?(p=u-p,d[0]-=o[r][0]*s(p),d[1]-=o[r][0]*m(p)):(p=c-p,d[0]+=o[r][0]*s(p),d[1]+=o[r][0]*m(p)):(d[0]+=o[r][0]*s(p),d[1]-=o[r][0]*m(p))}return d[0]/=3,d[1]/=3,d}}function Me(e){return e[0]*=E,e[1]*=E,e}function Se(){return Ee([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ee(e,t,r){var i=(0,be.c)({type:"MultiPoint",coordinates:[e,t,r]}),a=[-i[0],-i[1]],o=(0,_e.c)(a),s=Ae(Me(o(e)),Me(o(t)),Me(o(r)));s.invert=ee(s);var l=(0,n.c)(s).rotate(a),u=l.center;return delete l.rotate,l.center=function(e){return arguments.length?u(o(e)):o.invert(u())},l.clipAngle(90)}function Ce(e,t){var r=P(1-m(t));return[2/A*e*r,A*(1-r)]}function Le(){return(0,n.c)(Ce).scale(95.6464).center([0,30])}function Pe(e){var t=g(e);function r(e,r){return[e,(e?e/m(e):1)*(m(r)*s(e)-t*s(r))]}return r.invert=t?function(e,r){e&&(r*=m(e)/e);var n=s(e);return[e,2*o(P(n*n+t*t-r*r)-n,t-r)]}:function(e,t){return[e,C(e?t*g(e)/e:t)]},r}function Oe(){return fe(Pe).scale(249.828).clipAngle(90)}Ce.invert=function(e,t){var r=(r=t/A-1)*r;return[r>0?e*P(b/r)/2:0,C(1-r)]};var Ie=P(3);function Re(e,t){return[Ie*e*(2*s(2*t/3)-1)/A,Ie*A*m(t/3)]}function De(){return(0,n.c)(Re).scale(156.19)}function ze(e){var t=s(e);function r(e,r){return[e*t,m(r)/t]}return r.invert=function(e,r){return[e/t,C(r*t)]},r}function Fe(){return fe(ze).parallel(38.58).scale(195.044)}function Ne(e){var t=s(e);function r(e,r){return[e*t,(1+t)*g(r/2)]}return r.invert=function(e,r){return[e/t,2*a(r/(1+t))]},r}function Be(){return fe(Ne).scale(124.75)}function je(e,t){var r=P(8/(3*b));return[r*e*(1-i(t)/b),r*t]}function Ue(){return(0,n.c)(je).scale(165.664)}function qe(e,t){var r=P(4-3*m(i(t)));return[2/P(6*b)*e*r,v(t)*P(2*b/3)*(2-r)]}function Ve(){return(0,n.c)(qe).scale(165.664)}function He(e,t){var r=P(b*(4+b));return[2/r*e*(1+P(1-4*t*t/(b*b))),4/r*t]}function Ge(){return(0,n.c)(He).scale(180.739)}function We(e,t){var r=(2+_)*m(t);t/=2;for(var n=0,a=1/0;n<10&&i(a)>y;n++){var o=s(t);t-=a=(t+m(t)*(o+2)-r)/(2*o*(1+o))}return[2/P(b*(4+b))*e*(1+s(t)),2*P(b/(4+b))*m(t)]}function Ye(){return(0,n.c)(We).scale(180.739)}function Ze(e,t){return[e*(1+s(t))/P(2+b),2*t/P(2+b)]}function Xe(){return(0,n.c)(Ze).scale(173.044)}function Ke(e,t){for(var r=(1+_)*m(t),n=0,a=1/0;n<10&&i(a)>y;n++)t-=a=(t+m(t)-r)/(1+s(t));return r=P(2+b),[e*(1+s(t))/r,2*t/r]}function Je(){return(0,n.c)(Ke).scale(173.044)}Re.invert=function(e,t){var r=3*C(t/(Ie*A));return[A*e/(Ie*(2*s(2*r/3)-1)),r]},je.invert=function(e,t){var r=P(8/(3*b)),n=t/r;return[e/(r*(1-i(n)/b)),n]},qe.invert=function(e,t){var r=2-i(t)/P(2*b/3);return[e*P(6*b)/(2*r),v(t)*C((4-r*r)/3)]},He.invert=function(e,t){var r=P(b*(4+b))/2;return[e*r/(1+P(1-t*t*(4+b)/(4*b))),t*r/2]},We.invert=function(e,t){var r=t*P((4+b)/b)/2,n=C(r),i=s(n);return[e/(2/P(b*(4+b))*(1+i)),C((n+r*(i+2))/(2+_))]},Ze.invert=function(e,t){var r=P(2+b),n=t*r/2;return[r*e/(1+s(n)),n]},Ke.invert=function(e,t){var r=1+_,n=P(r/2);return[2*e*n/(1+s(t*=n)),C((t+m(t))/r)]};var $e=3+2*T;function Qe(e,t){var r=m(e/=2),n=s(e),i=P(s(t)),o=s(t/=2),l=m(t)/(o+T*n*i),u=P(2/(1+l*l)),f=P((T*o+(n+r)*i)/(T*o+(n-r)*i));return[$e*(u*(f-1/f)-2*c(f)),$e*(u*l*(f+1/f)-2*a(l))]}function et(){return(0,n.c)(Qe).scale(62.5271)}Qe.invert=function(e,t){if(!(r=j.invert(e/1.2,1.065*t)))return null;var r,n=r[0],o=r[1],l=20;e/=$e,t/=$e;do{var u=n/2,h=o/2,p=m(u),v=s(u),g=m(h),x=s(h),b=s(o),w=P(b),A=g/(x+T*v*w),M=A*A,S=P(2/(1+M)),E=(T*x+(v+p)*w)/(T*x+(v-p)*w),C=P(E),L=C-1/C,O=C+1/C,I=S*L-2*c(C)-e,R=S*A*O-2*a(A)-t,D=g&&k*w*p*M/g,z=(T*v*x+w)/(2*(x+T*v*w)*(x+T*v*w)*w),F=-.5*A*S*S*S,N=F*D,B=F*z,U=(U=2*x+T*w*(v-p))*U*C,q=(T*v*x*w+b)/U,V=-T*p*g/(w*U),H=L*N-2*q/C+S*(q+q/E),G=L*B-2*V/C+S*(V+V/E),W=A*O*N-2*D/(1+M)+S*O*D+S*A*(q-q/E),Y=A*O*B-2*z/(1+M)+S*O*z+S*A*(V-V/E),Z=G*W-Y*H;if(!Z)break;var X=(R*G-I*Y)/Z,K=(I*W-R*H)/Z;n-=X,o=f(-_,d(_,o-K))}while((i(X)>y||i(K)>y)&&--l>0);return i(i(o)-_)n){var d=P(f),h=o(c,u),v=r*p(h/r),g=h-v,x=e*s(g),w=(e*m(g)-g*m(x))/(_-x),k=pt(g,w),T=(b-e)/vt(k,x,b);u=d;var A,M=50;do{u-=A=(e+vt(k,x,u)*T-d)/(k(u)*T)}while(i(A)>y&&--M>0);c=g*m(u),u<_&&(c-=w*(u-_));var S=m(v),E=s(v);l[0]=u*E-c*S,l[1]=u*S+c*E}return l}return a.invert=function(t,a){var l=t*t+a*a;if(l>n){var u=P(l),c=o(a,t),f=r*p(c/r),d=c-f;t=u*s(d),a=u*m(d);for(var h=t-_,v=m(t),g=a/v,y=t<_?1/0:0,w=10;;){var k=e*m(g),T=e*s(g),A=m(T),M=_-T,S=(k-g*A)/M,E=pt(g,S);if(i(y)y||i(h)>y)&&--g>0);return[p,v]},c}var yt=gt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function xt(){return(0,n.c)(yt).scale(149.995)}var bt=gt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function _t(){return(0,n.c)(bt).scale(153.93)}var wt=gt(5/6*b,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return(0,n.c)(wt).scale(130.945)}function Tt(e,t){var r=e*e,n=t*t;return[e*(1-.162388*n)*(.87-952426e-9*r*r),t*(1+n/12)]}function At(){return(0,n.c)(Tt).scale(131.747)}Tt.invert=function(e,t){var r,n=e,a=t,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-t)/(1+s/4)}while(i(r)>y&&--o>0);o=50,e/=1-.162388*s;do{var l=(l=n*n)*l;n-=r=(n*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while(i(r)>y&&--o>0);return[n,a]};var Mt=gt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function St(){return(0,n.c)(Mt).scale(131.087)}function Et(e){var t=e(_,0)[0]-e(-_,0)[0];function r(r,n){var i=r>0?-.5:.5,a=e(r+i*b,n);return a[0]-=i*t,a}return e.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=e.invert(r+i*t,n),o=a[0]-i*b;return o<-b?o+=2*b:o>b&&(o-=2*b),a[0]=o,a}),r}function Ct(e,t){var r=v(e),n=v(t),a=s(t),l=s(e)*a,u=m(e)*a,c=m(n*t);e=i(o(u,c)),t=C(l),i(e-_)>y&&(e%=_);var f=function(e,t){if(t===_)return[0,0];var r,n,a=m(t),o=a*a,l=o*o,u=1+l,c=1+3*l,f=1-l,d=C(1/P(u)),h=f+o*u*d,p=(1-a)/h,v=P(p),g=p*u,x=P(g),w=v*f;if(0===e)return[0,-(w+o*x)];var k,T=s(t),A=1/T,M=2*a*T,S=(-3*o+d*c)*M,E=(-h*T-(1-a)*S)/(h*h),L=o*u*E+p*c*M,O=-A*M,I=-A*L,R=-2*A*(f*(.5*E/v)-2*o*v*M),D=4*e/b;if(e>.222*b||t.175*b){if(r=(w+o*P(g*(1+l)-w*w))/(1+l),e>b/4)return[r,r];var z=r,F=.5*r;r=.5*(F+z),n=50;do{var N=r*(R+O*P(g-r*r))+I*C(r/x)-D;if(!N)break;N<0?F=r:z=r,r=.5*(F+z)}while(i(z-F)>y&&--n>0)}else{r=y,n=25;do{var B=r*r,j=P(g-B),U=R+O*j,q=r*U+I*C(r/x)-D;r-=k=j?q/(U+(I-O*B)/j):0}while(i(k)>y&&--n>0)}return[r,-w-o*P(g-r*r)]}(e>b/4?_-e:e,t);return e>b/4&&(c=f[0],f[0]=-f[1],f[1]=-c),f[0]*=r,f[1]*=-n,f}function Lt(){return(0,n.c)(Et(Ct)).scale(239.75)}function Pt(e,t){var r,n,o,u,c,f;if(t=1-y)return r=(1-t)/4,o=1/(n=I(e)),[(u=((f=l(2*(f=e)))-1)/(f+1))+r*((c=n*O(e))-e)/(n*n),o-r*u*o*(c-e),o+r*u*o*(c+e),2*a(l(e))-_+r*(c-e)/n];var d=[1,0,0,0,0,0,0,0,0],h=[P(t),0,0,0,0,0,0,0,0],p=0;for(n=P(1-t),c=1;i(h[p]/d[p])>y&&p<8;)r=d[p++],h[p]=(r-n)/2,d[p]=(r+n)/2,n=P(r*n),c*=2;o=c*d[p]*e;do{o=(C(u=h[p]*m(n=o)/d[p])+o)/2}while(--p);return[m(o),u=s(o),u/s(o-n),o]}function Ot(e,t){if(!t)return e;if(1===t)return c(g(e/2+w));for(var r=1,n=P(1-t),o=P(t),s=0;i(o)>y;s++){if(e%b){var l=a(n*g(e)/r);l<0&&(l+=b),e+=l+~~(e/b)*b}else e+=e;o=(r+n)/2,n=P(r*n),o=((r=o)-n)/2}return e/(h(2,s)*r)}function It(e,t){var r=(T-1)/(T+1),n=P(1-r*r),u=Ot(_,n*n),f=c(g(b/4+i(t)/2)),d=l(-1*f)/P(r),h=function(e,t){var r=e*e,n=t+1,i=1-r-t*t;return[.5*((e>=0?_:-_)-o(i,2*e)),-.25*c(i*i+4*r)+.5*c(n*n+r)]}(d*s(-1*e),d*m(-1*e)),p=function(e,t,r){var n=i(e),o=O(i(t));if(n){var s=1/m(n),l=1/(g(n)*g(n)),u=-(l+r*(o*o*s*s)-1+r),c=(-u+P(u*u-(r-1)*l*4))/2;return[Ot(a(1/P(c)),r)*v(e),Ot(a(P((c/l-1)/r)),1-r)*v(t)]}return[0,Ot(a(o),1-r)*v(t)]}(h[0],h[1],n*n);return[-p[1],(t>=0?1:-1)*(.5*u-p[0])]}function Rt(){return(0,n.c)(Et(It)).scale(151.496)}Ct.invert=function(e,t){i(e)>1&&(e=2*v(e)-e),i(t)>1&&(t=2*v(t)-t);var r=v(e),n=v(t),a=-r*e,l=-n*t,u=l/a<1,c=function(e,t){for(var r=0,n=1,a=.5,o=50;;){var l=a*a,u=P(a),c=C(1/P(1+l)),f=1-l+a*(1+l)*c,d=(1-u)/f,h=P(d),p=d*(1+l),v=h*(1-l),m=P(p-e*e),g=t+v+a*m;if(i(n-r)0?r=a:n=a,a=.5*(r+n)}if(!o)return null;var y=C(u),_=s(y),w=1/_,k=2*u*_,T=(-f*_-(-3*a+c*(1+3*l))*k*(1-u))/(f*f),A=.5*T/h,M=(1-l)*A-2*a*h*k;return[b/4*(e*(-2*w*M+-w*k*m)+-w*(a*(1+l)*T+d*(1+3*l)*k)*C(e/P(p))),y]}(u?l:a,u?a:l),f=c[0],d=c[1],h=s(d);return u&&(f=-_-f),[r*(o(m(f)*h,-m(d))+b),n*C(s(f)*h)]},It.invert=function(e,t){var r=(T-1)/(T+1),n=P(1-r*r),i=function(e,t,r){var n,i,a;return e?(n=Pt(e,r),t?(a=(i=Pt(t,1-r))[1]*i[1]+r*n[0]*n[0]*i[0]*i[0],[[n[0]*i[2]/a,n[1]*n[2]*i[0]*i[1]/a],[n[1]*i[1]/a,-n[0]*n[2]*i[0]*i[2]/a],[n[2]*i[1]*i[2]/a,-r*n[0]*n[1]*i[0]/a]]):[[n[0],0],[n[1],0],[n[2],0]]):[[0,(i=Pt(t,1-r))[0]/i[1]],[1/i[1],0],[i[2]/i[1],0]]}(.5*Ot(_,n*n)-t,-e,n*n),s=function(e,t){var r=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/r,(e[1]*t[0]-e[0]*t[1])/r]}(i[0],i[1]);return[o(s[1],s[0])/-1,2*a(l(-.5*c(r*s[0]*s[0]+r*s[1]*s[1])))-_]};var Dt=r(61780);function zt(e){var t=m(e),r=s(e),n=Ft(e);function a(e,a){var o=n(e,a);e=o[0],a=o[1];var l=m(a),u=s(a),c=s(e),f=L(t*l+r*u*c),d=m(f),h=i(d)>y?f/d:1;return[h*r*m(e),(i(e)>_?h:-h)*(t*u-r*l*c)]}return n.invert=Ft(-e),a.invert=function(e,r){var i=P(e*e+r*r),a=-m(i),l=s(i),u=i*l,c=-r*a,f=i*t,d=P(u*u+c*c-f*f),h=o(u*f+c*d,c*f-u*d),p=(i>_?-1:1)*o(e*a,i*s(h)*l+r*m(h)*a);return n.invert(p,h)},a}function Ft(e){var t=m(e),r=s(e);return function(e,n){var i=s(n),a=s(e)*i,l=m(e)*i,u=m(n);return[o(l,a*r-u*t),C(u*r+a*t)]}}function Nt(){var e=0,t=(0,n.U)(zt),r=t(e),i=r.rotate,a=r.stream,o=(0,Dt.c)();return r.parallel=function(n){if(!arguments.length)return e*S;var i=r.rotate();return t(e=n*E).rotate(i)},r.rotate=function(t){return arguments.length?(i.call(r,[t[0],t[1]-e*S]),o.center([-t[0],-t[1]]),r):((t=i.call(r))[1]+=e*S,t)},r.stream=function(e){return(e=a(e)).sphere=function(){e.polygonStart();var t,r=o.radius(89.99)().coordinates[0],n=r.length-1,i=-1;for(e.lineStart();++i=0;)e.point((t=r[i])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},r.scale(79.4187).parallel(45).clipAngle(179.999)}var Bt=r(84706),jt=r(16016),Ut=C(1-1/3)*S,qt=ze(0);function Vt(e){var t=Ut*E,r=Ce(b,t)[0]-Ce(-b,t)[0],n=qt(0,t)[1],a=Ce(0,t)[1],o=A-a,s=M/e,l=4/M,c=n+o*o*4/M;function h(h,p){var v,m=i(p);if(m>t){var g=d(e-1,f(0,u((h+b)/s)));(v=Ce(h+=b*(e-1)/e-g*s,m))[0]=v[0]*M/r-M*(e-1)/(2*e)+g*M/e,v[1]=n+4*(v[1]-a)*o/M,p<0&&(v[1]=-v[1])}else v=qt(h,p);return v[0]*=l,v[1]/=c,v}return h.invert=function(t,h){t/=l;var p=i(h*=c);if(p>n){var v=d(e-1,f(0,u((t+b)/s)));t=(t+b*(e-1)/e-v*s)*r/M;var m=Ce.invert(t,.25*(p-n)*M/o+a);return m[0]-=b*(e-1)/e-v*s,h<0&&(m[1]=-m[1]),m}return qt.invert(t,h)},h}function Ht(e,t){return[e,1&t?90-y:Ut]}function Gt(e,t){return[e,1&t?-90+y:-Ut]}function Wt(e){return[e[0]*(1-y),e[1]]}function Yt(){var e=4,t=(0,n.U)(Vt),r=t(e),i=r.stream;return r.lobes=function(r){return arguments.length?t(e=+r):e},r.stream=function(t){var n=r.rotate(),a=i(t),o=(r.rotate([0,0]),i(t));return r.rotate(n),a.sphere=function(){(0,jt.c)(function(e){var t=[].concat((0,Bt.ik)(-180,180+e/2,e).map(Ht),(0,Bt.ik)(180,-180-e/2,-e).map(Gt));return{type:"Polygon",coordinates:[180===e?t.map(Wt):t]}}(180/e),o)},a},r.scale(239.75)}function Zt(e){var t,r=1+e,n=C(m(1/r)),a=2*P(b/(t=b+4*n*r)),l=.5*a*(r+P(e*(2+e))),u=e*e,c=r*r;function f(f,d){var h,p,v=1-m(d);if(v&&v<2){var g,y=_-d,w=25;do{var k=m(y),T=s(y),A=n+o(k,r-T),M=1+c-2*r*T;y-=g=(y-u*n-r*k+M*A-.5*v*t)/(2*r*k*A)}while(i(g)>x&&--w>0);h=a*P(M),p=f*A/b}else h=a*(e+v),p=f*n/b;return[h*m(p),l-h*s(p)]}return f.invert=function(e,i){var s=e*e+(i-=l)*i,f=(1+c-s/(a*a))/(2*r),d=L(f),h=m(d),p=n+o(h,r-f);return[C(e/P(s))*b/p,C(1-2*(d-u*n-r*h+(1+c-2*r*f)*p)/t)]},f}function Xt(){var e=1,t=(0,n.U)(Zt),r=t(e);return r.ratio=function(r){return arguments.length?t(e=+r):e},r.scale(167.774).center([0,18.67])}var Kt=.7109889596207567,Jt=.0528035274542;function $t(e,t){return t>-Kt?((e=ae(e,t))[1]+=Jt,e):de(e,t)}function Qt(){return(0,n.c)($t).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function er(e,t){return i(t)>Kt?((e=ae(e,t))[1]-=t>0?Jt:-Jt,e):de(e,t)}function tr(){return(0,n.c)(er).scale(152.63)}function rr(e,t,r,n){var i=P(4*b/(2*r+(1+e-t/2)*m(2*r)+(e+t)/2*m(4*r)+t/2*m(6*r))),a=P(n*m(r)*P((1+e*s(2*r)+t*s(4*r))/(1+e+t))),o=r*u(1);function l(r){return P(1+e*s(2*r)+t*s(4*r))}function u(n){var i=n*r;return(2*i+(1+e-t/2)*m(2*i)+(e+t)/2*m(4*i)+t/2*m(6*i))/r}function c(e){return l(e)*m(e)}var f=function(e,t){var n=r*Q(u,o*m(t)/r,t/b);isNaN(n)&&(n=r*v(t));var c=i*l(n);return[c*a*e/b*s(n),c/a*m(n)]};return f.invert=function(e,t){var n=Q(c,t*a/i);return[e*b/(s(n)*i*a*l(n)),C(r*u(n/r)/o)]},0===r&&(i=P(n/b),(f=function(e,t){return[e*i,m(t)/i]}).invert=function(e,t){return[e/i,C(t*i)]}),f}function nr(){var e=1,t=0,r=45*E,i=2,a=(0,n.U)(rr),o=a(e,t,r,i);return o.a=function(n){return arguments.length?a(e=+n,t,r,i):e},o.b=function(n){return arguments.length?a(e,t=+n,r,i):t},o.psiMax=function(n){return arguments.length?a(e,t,r=+n*E,i):r*S},o.ratio=function(n){return arguments.length?a(e,t,r,i=+n):i},o.scale(180.739)}function ir(e,t,r,n,i,a,o,s,l,u,c){if(c.nanEncountered)return NaN;var f,d,h,p,v,m,g,y,x,b;if(d=e(t+.25*(f=r-t)),h=e(r-.25*f),isNaN(d))c.nanEncountered=!0;else{if(!isNaN(h))return b=((m=(p=f*(n+4*d+i)/12)+(v=f*(i+4*h+a)/12))-o)/15,u>l?(c.maxDepthCount++,m+b):Math.abs(b)e?r=n:t=n,n=t+r>>1}while(n>t);var i=u[n+1]-u[n];return i&&(i=(e-u[n+1])/i),(n+1+i)/s}var d=2*f(1)/b*o/r,p=function(e,t){var r=f(i(m(t))),a=n(r)*e;return r/=d,[a,t>=0?r:-r]};return p.invert=function(e,t){var r;return i(t*=d)<1&&(r=v(t)*C(a(i(t))*o)),[e/n(i(t)),r]},p}function sr(){var e=0,t=2.5,r=1.183136,i=(0,n.U)(or),a=i(e,t,r);return a.alpha=function(n){return arguments.length?i(e=+n,t,r):e},a.k=function(n){return arguments.length?i(e,t=+n,r):t},a.gamma=function(n){return arguments.length?i(e,t,r=+n):r},a.scale(152.63)}function lr(e,t){return i(e[0]-t[0])a[o][2][0];++o);var l=e(r-a[o][1][0],n);return l[0]+=e(a[o][1][0],i*n>i*a[o][0][1]?a[o][0][1]:n)[0],l}r?o.invert=r(o):e.invert&&(o.invert=function(r,n){for(var i=a[+(n<0)],s=t[+(n<0)],l=0,u=i.length;l=0;--s)r=(t=e[1][s])[0][0],n=t[0][1],i=t[1][1],a=t[2][0],o=t[2][1],l.push(ur([[a-y,o-y],[a-y,i+y],[r+y,i+y],[r+y,n-y]],30));return{type:"Polygon",coordinates:[(0,Bt.Uf)(l)]}}(r),t=r.map((function(e){return e.map((function(e){return[[e[0][0]*E,e[0][1]*E],[e[1][0]*E,e[1][1]*E],[e[2][0]*E,e[2][1]*E]]}))})),a=t.map((function(t){return t.map((function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),s):t.map((function(e){return e.map((function(e){return[[e[0][0]*S,e[0][1]*S],[e[1][0]*S,e[1][1]*S],[e[2][0]*S,e[2][1]*S]]}))}))},null!=t&&s.lobes(t),s}$t.invert=function(e,t){return t>-Kt?ae.invert(e,t-Jt):de.invert(e,t)},er.invert=function(e,t){return i(t)>Kt?ae.invert(e,t+(t>0?Jt:-Jt)):de.invert(e,t)};var fr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function dr(){return cr(ue,fr).scale(160.857)}var hr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function pr(){return cr(er,hr).scale(152.63)}var vr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function mr(){return cr(ae,vr).scale(169.529)}var gr=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function yr(){return cr(ae,gr).scale(169.529).rotate([20,0])}var xr=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function br(){return cr($t,xr,ee).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var _r=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function wr(){return cr(de,_r).scale(152.63).rotate([-20,0])}function kr(e,t){return[3/M*e*P(b*b/3-t*t),t]}function Tr(){return(0,n.c)(kr).scale(158.837)}function Ar(e){function t(t,r){if(i(i(r)-_)2)return null;var a=(t/=2)*t,s=(r/=2)*r,l=2*r/(1+a+s);return l=h((1+l)/(1-l),1/e),[o(2*t,1-a-s)/e,C((l-1)/(l+1))]},t}function Mr(){var e=.5,t=(0,n.U)(Ar),r=t(e);return r.spacing=function(r){return arguments.length?t(e=+r):e},r.scale(124.75)}kr.invert=function(e,t){return[M/3*e/P(b*b/3-t*t),t]};var Sr=b/T;function Er(e,t){return[e*(1+P(s(t)))/2,t/(s(t/2)*s(e/6))]}function Cr(){return(0,n.c)(Er).scale(97.2672)}function Lr(e,t){var r=e*e,n=t*t;return[e*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),t*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function Pr(){return(0,n.c)(Lr).scale(139.98)}function Or(e,t){return[m(e)/s(t),g(t)*s(e)]}function Ir(){return(0,n.c)(Or).scale(144.049).clipAngle(89.999)}function Rr(e){var t=s(e),r=g(w+e/2);function n(n,a){var o=a-e,s=i(o)=0;)d=(f=e[c])[0]+l*(i=d)-u*h,h=f[1]+l*h+u*i;return[d=l*(i=d)-u*h,h=l*h+u*i]}return r.invert=function(r,n){var l=20,u=r,c=n;do{for(var f,d=t,h=e[d],p=h[0],v=h[1],g=0,x=0;--d>=0;)g=p+u*(f=g)-c*x,x=v+u*x+c*f,p=(h=e[d])[0]+u*(f=p)-c*v,v=h[1]+u*v+c*f;var b,_,w=(g=p+u*(f=g)-c*x)*g+(x=v+u*x+c*f)*x;u-=b=((p=u*(f=p)-c*v-r)*g+(v=u*v+c*f-n)*x)/w,c-=_=(v*g-p*x)/w}while(i(b)+i(_)>y*y&&--l>0);if(l){var k=P(u*u+c*c),T=2*a(.5*k),A=m(T);return[o(u*A,k*s(T)),k?C(c*A/k):0]}},r}Er.invert=function(e,t){var r=i(e),n=i(t),a=y,o=_;ny||i(x)>y)&&--a>0);return a&&[r,n]},Or.invert=function(e,t){var r=e*e,n=t*t+1,i=r+n,a=e?k*P((i-P(i*i-4*r))/r):1/P(n);return[C(e*a),v(t)*L(a)]},zr.invert=function(e,t){return[e,2.5*a(l(.8*t))-.625*b]};var Br=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],jr=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ur=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],qr=[[.9245,0],[0,0],[.01943,0]],Vr=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hr(){return Xr(Br,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Gr(){return Xr(jr,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Wr(){return Xr(Ur,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Yr(){return Xr(qr,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Zr(){return Xr(Vr,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Xr(e,t){var r=(0,n.c)(Nr(e)).rotate(t).clipAngle(90),i=(0,_e.c)(t),a=r.center;return delete r.rotate,r.center=function(e){return arguments.length?a(i(e)):i.invert(a())},r}var Kr=P(6),Jr=P(7);function $r(e,t){var r=C(7*m(t)/(3*Kr));return[Kr*e*(2*s(2*r/3)-1)/Jr,9*m(r/3)/Jr]}function Qr(){return(0,n.c)($r).scale(164.859)}function en(e,t){for(var r,n=(1+k)*m(t),a=t,o=0;o<25&&(a-=r=(m(a/2)+m(a)-n)/(.5*s(a/2)+s(a)),!(i(r)x&&--l>0);return[e/(.84719-.13063*(n=s*s)+(o=n*(a=n*n))*o*(.05494*n-.04515-.02326*a+.00331*o)),s]},ln.invert=function(e,t){for(var r=t/2,n=0,a=1/0;n<10&&i(a)>y;++n){var o=s(t/2);t-=a=(t-g(t/2)-r)/(1-.5/(o*o))}return[2*e/(1+s(t)),t]};var cn=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function fn(){return cr(K(1/0),cn).rotate([20,0]).scale(152.63)}function dn(e,t){var r=m(t),n=s(t),a=v(e);if(0===e||i(t)===_)return[0,t];if(0===t)return[e,0];if(i(e)===_)return[e*n,_*r];var o=b/(2*e)-2*e/b,l=2*t/b,u=(1-l*l)/(r-l),c=o*o,f=u*u,d=1+c/f,h=1+f/c,p=(o*r/u-o/2)/d,g=(f*r/c+u/2)/h,y=g*g-(f*r*r/c+u*r-1)/h;return[_*(p+P(p*p+n*n/d)*a),_*(g+P(y<0?0:y)*v(-t*o)*a)]}function hn(){return(0,n.c)(dn).scale(127.267)}dn.invert=function(e,t){var r=(e/=_)*e,n=r+(t/=_)*t,i=b*b;return[e?(n-1+P((1-n)*(1-n)+4*r))/(2*e)*_:0,Q((function(e){return n*(b*m(e)-2*e)*b+4*e*e*(t-m(e))+2*b*e-i*t}),0)]};var pn=1.0148,vn=.23185,mn=-.14499,gn=.02406,yn=pn,xn=5*vn,bn=7*mn,_n=9*gn,wn=1.790857183;function kn(e,t){var r=t*t;return[e,t*(pn+r*r*(vn+r*(mn+gn*r)))]}function Tn(){return(0,n.c)(kn).scale(139.319)}function An(e,t){if(i(t)wn?t=wn:t<-1.790857183&&(t=-1.790857183);var r,n=t;do{var a=n*n;n-=r=(n*(pn+a*a*(vn+a*(mn+gn*a)))-t)/(yn+a*a*(xn+a*(bn+_n*a)))}while(i(r)>y);return[e,n]},An.invert=function(e,t){if(i(t)y&&--o>0);return l=g(a),[(i(t)=0;)if(n=t[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(t.face,r.face),i=Cn(n.map(r.project),n.map(t.project));t.transform=r.transform?Ln(r.transform,i):i;for(var a=r.edges,o=0,s=a.length;o0?[-t[0],0]:[180-t[0],180])};var t=Bn.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,r){var n=t[e];n&&(n.children||(n.children=[])).push(t[r])})),In(t[0],(function(e,r){return t[e<-b/2?r<0?6:4:e<0?r<0?2:0:en^h>n&&r<(d-u)*(n-c)/(h-c)+u&&(i=!i)}return i}(e[0],r))return e.push(t),!0}))||e.push([t])})),ei=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function ii(e){var t=e(_,0)[0]-e(-_,0)[0];function r(r,n){var a=i(r)<_,o=e(a?r:r>0?r-b:r+b,n),s=(o[0]-o[1])*k,l=(o[0]+o[1])*k;if(a)return[s,l];var u=t*k,c=s>0^l>0?-1:1;return[c*s-v(l)*u,c*l-v(s)*u]}return e.invert&&(r.invert=function(r,n){var a=(r+n)*k,o=(n-r)*k,s=i(a)<.5*t&&i(o)<.5*t;if(!s){var l=t*k,u=a>0^o>0?-1:1,c=-u*r+(o>0?1:-1)*l,f=-u*n+(a>0?1:-1)*l;a=(-c-f)*k,o=(c-f)*k}var d=e.invert(a,o);return s||(d[0]+=a>0?b:-b),d}),(0,n.c)(r).rotate([-90,-90,45]).clipAngle(179.999)}function ai(){return ii(Ct).scale(176.423)}function oi(){return ii(It).scale(111.48)}function si(e,t){if(!(0<=(t=+t)&&t<=20))throw new Error("invalid digits");function r(e){var r=e.length,n=2,i=new Array(r);for(i[0]=+e[0].toFixed(t),i[1]=+e[1].toFixed(t);n2||a[0]!=t[0]||a[1]!=t[1])&&(n.push(a),t=a)}return 1===n.length&&e.length>1&&n.push(r(e[e.length-1])),n}function a(e){return e.map(i)}function o(e){if(null==e)return e;var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(o)};break;case"Point":t={type:"Point",coordinates:r(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:n(e.coordinates)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:a(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(a)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function s(e){var t={type:"Feature",properties:e.properties,geometry:o(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return s(e);case"FeatureCollection":var l={type:"FeatureCollection",features:e.features.map(s)};return null!=e.bbox&&(l.bbox=e.bbox),l;default:return o(e)}return e}function li(e){var t=m(e);function r(r,n){var i=t?g(r*t/2)/t:r/2;if(!n)return[2*i,-e];var o=2*a(i*m(n)),l=1/g(n);return[m(o)*l,n+(1-s(o))*l-e]}return r.invert=function(r,n){if(i(n+=e)y&&--c>0);var p=r*(f=g(u)),v=g(i(n)0?_:-_)*(f+o*(p-l)/2+o*o*(p-2*f+l)/2)]}function di(){return(0,n.c)(fi).scale(152.63)}function hi(e,t){var r=function(e){function t(t,r){var n=s(r),i=(e-1)/(e-n*s(t));return[i*n*m(t),i*m(r)]}return t.invert=function(t,r){var n=t*t+r*r,i=P(n),a=(e-P(1-n*(e+1)/(e-1)))/((e-1)/i+i/(e-1));return[o(t*a,i*P(1-a*a)),i?C(r*a/i):0]},t}(e);if(!t)return r;var n=s(t),i=m(t);function a(t,a){var o=r(t,a),s=o[1],l=s*i/(e-1)+n;return[o[0]*n/l,s/l]}return a.invert=function(t,a){var o=(e-1)/(e-1-a*i);return r.invert(o*t,o*a*n)},a}function pi(){var e=2,t=0,r=(0,n.U)(hi),i=r(e,t);return i.distance=function(n){return arguments.length?r(e=+n,t):e},i.tilt=function(n){return arguments.length?r(e,t=n*E):t*S},i.scale(432.147).clipAngle(L(1/e)*S-1e-6)}ci.forEach((function(e){e[1]*=1.0144})),fi.invert=function(e,t){var r=t/_,n=90*r,a=d(18,i(n/5)),o=f(0,u(a));do{var s=ci[o][1],l=ci[o+1][1],c=ci[d(19,o+2)][1],h=c-s,p=c-2*l+s,v=2*(i(r)-l)/h,m=p/h,g=v*(1-m*v*(1-2*m*v));if(g>=0||1===o){n=(t>=0?5:-5)*(g+a);var y,b=50;do{g=(a=d(18,i(n)/5))-(o=u(a)),s=ci[o][1],l=ci[o+1][1],c=ci[d(19,o+2)][1],n-=(y=(t>=0?_:-_)*(l+g*(c-s)/2+g*g*(c-2*l+s)/2)-t)*S}while(i(y)>x&&--b>0);break}}while(--o>=0);var w=ci[o][0],k=ci[o+1][0],T=ci[d(19,o+2)][0];return[e/(k+g*(T-w)/2+g*g*(T-2*k+w)/2),n*E]};var vi=1e-4,mi=1e4,gi=-180,yi=gi+vi,xi=180,bi=xi-vi,_i=-90,wi=_i+vi,ki=90,Ti=ki-vi;function Ai(e){return e.length>0}function Mi(e){return e===_i||e===ki?[0,e]:[gi,(t=e,Math.floor(t*mi)/mi)];var t}function Si(e){var t=e[0],r=e[1],n=!1;return t<=yi?(t=gi,n=!0):t>=bi&&(t=xi,n=!0),r<=wi?(r=_i,n=!0):r>=Ti&&(r=ki,n=!0),n?[t,r]:e}function Ei(e){return e.map(Si)}function Ci(e,t,r){for(var n=0,i=e.length;n=bi||c<=wi||c>=Ti){a[o]=Si(l);for(var f=o+1;fyi&&hwi&&p=s)break;r.push({index:-1,polygon:t,ring:a=a.slice(f-1)}),a[0]=Mi(a[0][1]),o=-1,s=a.length}}}}function Li(e){var t,r,n,i,a,o,s=e.length,l={},u={};for(t=0;t0?b-l:l)*S],c=(0,n.c)(e(s)).rotate(u),f=(0,_e.c)(u),d=c.center;return delete c.rotate,c.center=function(e){return arguments.length?d(f(e)):f.invert(d())},c.clipAngle(90)}function Fi(e){var t=s(e);function r(e,r){var n=(0,Fn.Y)(e,r);return n[0]*=t,n}return r.invert=function(e,r){return Fn.Y.invert(e/t,r)},r}function Ni(){return Bi([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Bi(e,t){return zi(Fi,e,t)}function ji(e){if(!(e*=2))return W.O;var t=-e/2,r=-t,n=e*e,i=g(r),a=.5/m(r);function l(i,a){var o=L(s(a)*s(i-t)),l=L(s(a)*s(i-r));return[((o*=o)-(l*=l))/(2*e),(a<0?-1:1)*P(4*n*l-(n-o+l)*(n-o+l))/(2*e)]}return l.invert=function(e,n){var l,u,c=n*n,f=s(P(c+(l=e+t)*l)),d=s(P(c+(l=e+r)*l));return[o(u=f-d,l=(f+d)*i),(n<0?-1:1)*L(P(l*l+u*u)*a)]},l}function Ui(){return qi([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function qi(e,t){return zi(ji,e,t)}function Vi(e,t){if(i(t)y&&--l>0);return[v(e)*(P(a*a+4)+a)*b/4,_*s]};var ea=4*b+3*P(3),ta=2*P(2*b*P(3)/ea),ra=ie(ta*P(3)/b,ta,ea/6);function na(){return(0,n.c)(ra).scale(176.84)}function ia(e,t){return[e*P(1-3*t*t/(b*b)),t]}function aa(){return(0,n.c)(ia).scale(152.63)}function oa(e,t){var r=s(t),n=s(e)*r,i=1-n,a=s(e=o(m(e)*r,-m(t))),l=m(e);return[l*(r=P(1-n*n))-a*i,-a*r-l*i]}function sa(){return(0,n.c)(oa).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function la(e,t){var r=z(e,t);return[(r[0]+e/_)/2,(r[1]+t)/2]}function ua(){return(0,n.c)(la).scale(158.837)}ia.invert=function(e,t){return[e/P(1-3*t*t/(b*b)),t]},oa.invert=function(e,t){var r=(e*e+t*t)/-2,n=P(-r*(2+r)),i=t*r+e*n,a=e*r-t*n,s=P(a*a+i*i);return[o(n*i,s*(1+r)),s?-C(n*a/s):0]},la.invert=function(e,t){var r=e,n=t,a=25;do{var o,l=s(n),u=m(n),c=m(2*n),f=u*u,d=l*l,h=m(r),p=s(r/2),v=m(r/2),g=v*v,x=1-d*p*p,b=x?L(l*p)*P(o=1/x):o=0,w=.5*(2*b*l*v+r/_)-e,k=.5*(b*u+n)-t,T=.5*o*(d*g+b*l*p*f)+.5/_,A=o*(h*c/4-b*u*v),M=.125*o*(c*v-b*u*d*h),S=.5*o*(f*p+b*g*l)+.5,E=A*M-S*T,C=(k*A-w*S)/E,O=(w*M-k*T)/E;r-=C,n-=O}while((i(C)>y||i(O)>y)&&--a>0);return[r,n]}},88728:function(e,t,r){"use strict";function n(){return new i}function i(){this.reset()}r.d(t,{c:function(){return n}}),i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(e){o(a,e,this.t),o(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new i;function o(e,t,r){var n=e.s=t+r,i=n-t,a=n-i;e.t=t-a+(r-i)}},95384:function(e,t,r){"use strict";r.d(t,{cp:function(){return x},mQ:function(){return d},oB:function(){return p}});var n,i,a,o,s,l=r(88728),u=r(64528),c=r(70932),f=r(16016),d=(0,l.c)(),h=(0,l.c)(),p={point:c.c,lineStart:c.c,lineEnd:c.c,polygonStart:function(){d.reset(),p.lineStart=v,p.lineEnd=m},polygonEnd:function(){var e=+d;h.add(e<0?u.kD+e:e),this.lineStart=this.lineEnd=this.point=c.c},sphere:function(){h.add(u.kD)}};function v(){p.point=g}function m(){y(n,i)}function g(e,t){p.point=y,n=e,i=t,e*=u.qw,t*=u.qw,a=e,o=(0,u.W8)(t=t/2+u.wL),s=(0,u.g$)(t)}function y(e,t){e*=u.qw,t=(t*=u.qw)/2+u.wL;var r=e-a,n=r>=0?1:-1,i=n*r,l=(0,u.W8)(t),c=(0,u.g$)(t),f=s*c,h=o*l+f*(0,u.W8)(i),p=f*n*(0,u.g$)(i);d.add((0,u.WE)(p,h)),a=e,o=l,s=c}function x(e){return h.reset(),(0,f.c)(e,p),2*h}},13696:function(e,t,r){"use strict";r.d(t,{c:function(){return L}});var n,i,a,o,s,l,u,c,f,d,h=r(88728),p=r(95384),v=r(84220),m=r(64528),g=r(16016),y=(0,h.c)(),x={point:b,lineStart:w,lineEnd:k,polygonStart:function(){x.point=T,x.lineStart=A,x.lineEnd=M,y.reset(),p.oB.polygonStart()},polygonEnd:function(){p.oB.polygonEnd(),x.point=b,x.lineStart=w,x.lineEnd=k,p.mQ<0?(n=-(a=180),i=-(o=90)):y>m.Gg?o=90:y<-m.Gg&&(i=-90),d[0]=n,d[1]=a},sphere:function(){n=-(a=180),i=-(o=90)}};function b(e,t){f.push(d=[n=e,a=e]),to&&(o=t)}function _(e,t){var r=(0,v.ux)([e*m.qw,t*m.qw]);if(c){var l=(0,v.CW)(c,r),u=[l[1],-l[0],0],h=(0,v.CW)(u,l);(0,v.cJ)(h),h=(0,v.G)(h);var p,g=e-s,y=g>0?1:-1,x=h[0]*m.oh*y,b=(0,m.a2)(g)>180;b^(y*so&&(o=p):b^(y*s<(x=(x+360)%360-180)&&xo&&(o=t)),b?eS(n,a)&&(a=e):S(e,a)>S(n,a)&&(n=e):a>=n?(ea&&(a=e)):e>s?S(n,e)>S(n,a)&&(a=e):S(e,a)>S(n,a)&&(n=e)}else f.push(d=[n=e,a=e]);to&&(o=t),c=r,s=e}function w(){x.point=_}function k(){d[0]=n,d[1]=a,x.point=b,c=null}function T(e,t){if(c){var r=e-s;y.add((0,m.a2)(r)>180?r+(r>0?360:-360):r)}else l=e,u=t;p.oB.point(e,t),_(e,t)}function A(){p.oB.lineStart()}function M(){T(l,u),p.oB.lineEnd(),(0,m.a2)(y)>m.Gg&&(n=-(a=180)),d[0]=n,d[1]=a,c=null}function S(e,t){return(t-=e)<0?t+360:t}function E(e,t){return e[0]-t[0]}function C(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tS(s[0],s[1])&&(s[1]=l[1]),S(l[0],s[1])>S(s[0],s[1])&&(s[0]=l[0])):u.push(s=l);for(c=-1/0,t=0,s=u[r=u.length-1];t<=r;s=l,++t)l=u[t],(h=S(s[1],l[0]))>c&&(c=h,n=l[0],a=s[1])}return f=d=null,n===1/0||i===1/0?[[NaN,NaN],[NaN,NaN]]:[[n,i],[a,o]]}},84220:function(e,t,r){"use strict";r.d(t,{CW:function(){return s},Ez:function(){return o},G:function(){return i},cJ:function(){return c},mg:function(){return l},ux:function(){return a},wx:function(){return u}});var n=r(64528);function i(e){return[(0,n.WE)(e[1],e[0]),(0,n.qR)(e[2])]}function a(e){var t=e[0],r=e[1],i=(0,n.W8)(r);return[i*(0,n.W8)(t),i*(0,n.g$)(t),(0,n.g$)(r)]}function o(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function s(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function l(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function u(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function c(e){var t=(0,n._I)(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}},24052:function(e,t,r){"use strict";r.d(t,{c:function(){return I}});var n,i,a,o,s,l,u,c,f,d,h,p,v,m,g,y,x=r(64528),b=r(70932),_=r(16016),w={sphere:b.c,point:k,lineStart:A,lineEnd:E,polygonStart:function(){w.lineStart=C,w.lineEnd=L},polygonEnd:function(){w.lineStart=A,w.lineEnd=E}};function k(e,t){e*=x.qw,t*=x.qw;var r=(0,x.W8)(t);T(r*(0,x.W8)(e),r*(0,x.g$)(e),(0,x.g$)(t))}function T(e,t,r){++n,a+=(e-a)/n,o+=(t-o)/n,s+=(r-s)/n}function A(){w.point=M}function M(e,t){e*=x.qw,t*=x.qw;var r=(0,x.W8)(t);m=r*(0,x.W8)(e),g=r*(0,x.g$)(e),y=(0,x.g$)(t),w.point=S,T(m,g,y)}function S(e,t){e*=x.qw,t*=x.qw;var r=(0,x.W8)(t),n=r*(0,x.W8)(e),a=r*(0,x.g$)(e),o=(0,x.g$)(t),s=(0,x.WE)((0,x._I)((s=g*o-y*a)*s+(s=y*n-m*o)*s+(s=m*a-g*n)*s),m*n+g*a+y*o);i+=s,l+=s*(m+(m=n)),u+=s*(g+(g=a)),c+=s*(y+(y=o)),T(m,g,y)}function E(){w.point=k}function C(){w.point=P}function L(){O(p,v),w.point=k}function P(e,t){p=e,v=t,e*=x.qw,t*=x.qw,w.point=O;var r=(0,x.W8)(t);m=r*(0,x.W8)(e),g=r*(0,x.g$)(e),y=(0,x.g$)(t),T(m,g,y)}function O(e,t){e*=x.qw,t*=x.qw;var r=(0,x.W8)(t),n=r*(0,x.W8)(e),a=r*(0,x.g$)(e),o=(0,x.g$)(t),s=g*o-y*a,p=y*n-m*o,v=m*a-g*n,b=(0,x._I)(s*s+p*p+v*v),_=(0,x.qR)(b),w=b&&-_/b;f+=w*s,d+=w*p,h+=w*v,i+=_,l+=_*(m+(m=n)),u+=_*(g+(g=a)),c+=_*(y+(y=o)),T(m,g,y)}function I(e){n=i=a=o=s=l=u=c=f=d=h=0,(0,_.c)(e,w);var t=f,r=d,p=h,v=t*t+r*r+p*p;return v0?os)&&(o+=i*a.kD));for(var d,h=o;i>0?h>s:h0?i.pi:-i.pi,u=(0,i.a2)(o-r);(0,i.a2)(u-i.pi)0?i.or:-i.or),e.point(a,n),e.lineEnd(),e.lineStart(),e.point(l,n),e.point(o,n),t=0):a!==l&&u>=i.pi&&((0,i.a2)(r-a)i.Gg?(0,i.MQ)(((0,i.g$)(t)*(o=(0,i.W8)(n))*(0,i.g$)(r)-(0,i.g$)(n)*(a=(0,i.W8)(t))*(0,i.g$)(e))/(a*o*s)):(t+n)/2}(r,n,o,s),e.point(a,n),e.lineEnd(),e.lineStart(),e.point(l,n),t=0),e.point(r=o,n=s),a=l},lineEnd:function(){e.lineEnd(),r=n=NaN},clean:function(){return 2-t}}}),(function(e,t,r,n){var a;if(null==e)a=r*i.or,n.point(-i.pi,a),n.point(0,a),n.point(i.pi,a),n.point(i.pi,0),n.point(i.pi,-a),n.point(0,-a),n.point(-i.pi,-a),n.point(-i.pi,0),n.point(-i.pi,a);else if((0,i.a2)(e[0]-t[0])>i.Gg){var o=e[0]1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}},2728:function(e,t,r){"use strict";r.d(t,{c:function(){return l}});var n=r(84220),i=r(61780),a=r(64528),o=r(41860),s=r(14229);function l(e){var t=(0,a.W8)(e),r=6*a.qw,l=t>0,u=(0,a.a2)(t)>a.Gg;function c(e,r){return(0,a.W8)(e)*(0,a.W8)(r)>t}function f(e,r,i){var o=(0,n.ux)(e),s=(0,n.ux)(r),l=[1,0,0],u=(0,n.CW)(o,s),c=(0,n.Ez)(u,u),f=u[0],d=c-f*f;if(!d)return!i&&e;var h=t*c/d,p=-t*f/d,v=(0,n.CW)(l,u),m=(0,n.wx)(l,h),g=(0,n.wx)(u,p);(0,n.mg)(m,g);var y=v,x=(0,n.Ez)(m,y),b=(0,n.Ez)(y,y),_=x*x-b*((0,n.Ez)(m,m)-1);if(!(_<0)){var w=(0,a._I)(_),k=(0,n.wx)(y,(-x-w)/b);if((0,n.mg)(k,m),k=(0,n.G)(k),!i)return k;var T,A=e[0],M=r[0],S=e[1],E=r[1];M0^k[1]<((0,a.a2)(k[0]-A)a.pi^(A<=k[0]&&k[0]<=M)){var P=(0,n.wx)(y,(-x+w)/b);return(0,n.mg)(P,m),[k,(0,n.G)(P)]}}}function d(t,r){var n=l?e:a.pi-e,i=0;return t<-n?i|=1:t>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}return(0,s.c)(c,(function(e){var t,r,n,i,s;return{lineStart:function(){i=n=!1,s=1},point:function(h,p){var v,m=[h,p],g=c(h,p),y=l?g?0:d(h,p):g?d(h+(h<0?a.pi:-a.pi),p):0;if(!t&&(i=n=g)&&e.lineStart(),g!==n&&(!(v=f(t,m))||(0,o.c)(t,v)||(0,o.c)(m,v))&&(m[2]=1),g!==n)s=0,g?(e.lineStart(),v=f(m,t),e.point(v[0],v[1])):(v=f(t,m),e.point(v[0],v[1],2),e.lineEnd()),t=v;else if(u&&t&&l^g){var x;y&r||!(x=f(m,t,!0))||(s=0,l?(e.lineStart(),e.point(x[0][0],x[0][1]),e.point(x[1][0],x[1][1]),e.lineEnd()):(e.point(x[1][0],x[1][1]),e.lineEnd(),e.lineStart(),e.point(x[0][0],x[0][1],3)))}!g||t&&(0,o.c)(t,m)||e.point(m[0],m[1]),t=m,n=g,r=y},lineEnd:function(){n&&e.lineEnd(),t=null},clean:function(){return s|(i&&n)<<1}}}),(function(t,n,a,o){(0,i.Q)(o,e,r,a,t,n)}),l?[0,-e]:[-a.pi,e-a.pi])}},14229:function(e,t,r){"use strict";r.d(t,{c:function(){return l}});var n=r(97208),i=r(32232),a=r(64528),o=r(58196),s=r(84706);function l(e,t,r,a){return function(l){var f,d,h,p=t(l),v=(0,n.c)(),m=t(v),g=!1,y={point:x,lineStart:_,lineEnd:w,polygonStart:function(){y.point=k,y.lineStart=T,y.lineEnd=A,d=[],f=[]},polygonEnd:function(){y.point=x,y.lineStart=_,y.lineEnd=w,d=(0,s.Uf)(d);var e=(0,o.c)(f,a);d.length?(g||(l.polygonStart(),g=!0),(0,i.c)(d,c,e,r,l)):e&&(g||(l.polygonStart(),g=!0),l.lineStart(),r(null,null,1,l),l.lineEnd()),g&&(l.polygonEnd(),g=!1),d=f=null},sphere:function(){l.polygonStart(),l.lineStart(),r(null,null,1,l),l.lineEnd(),l.polygonEnd()}};function x(t,r){e(t,r)&&l.point(t,r)}function b(e,t){p.point(e,t)}function _(){y.point=b,p.lineStart()}function w(){y.point=x,p.lineEnd()}function k(e,t){h.push([e,t]),m.point(e,t)}function T(){m.lineStart(),h=[]}function A(){k(h[0][0],h[0][1]),m.lineEnd();var e,t,r,n,i=m.clean(),a=v.result(),o=a.length;if(h.pop(),f.push(h),h=null,o)if(1&i){if((t=(r=a[0]).length-1)>0){for(g||(l.polygonStart(),g=!0),l.lineStart(),e=0;e1&&2&i&&a.push(a.pop().concat(a.shift())),d.push(a.filter(u))}return y}}function u(e){return e.length>1}function c(e,t){return((e=e.x)[0]<0?e[1]-a.or-a.Gg:a.or-e[1])-((t=t.x)[0]<0?t[1]-a.or-a.Gg:a.or-t[1])}},21676:function(e,t,r){"use strict";r.d(t,{c:function(){return u}});var n=r(64528),i=r(97208),a=r(32232),o=r(84706),s=1e9,l=-s;function u(e,t,r,u){function c(n,i){return e<=n&&n<=r&&t<=i&&i<=u}function f(n,i,a,o){var s=0,l=0;if(null==n||(s=d(n,a))!==(l=d(i,a))||p(n,i)<0^a>0)do{o.point(0===s||3===s?e:r,s>1?u:t)}while((s=(s+a+4)%4)!==l);else o.point(i[0],i[1])}function d(i,a){return(0,n.a2)(i[0]-e)0?0:3:(0,n.a2)(i[0]-r)0?2:1:(0,n.a2)(i[1]-t)0?1:0:a>0?3:2}function h(e,t){return p(e.x,t.x)}function p(e,t){var r=d(e,1),n=d(t,1);return r!==n?r-n:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}return function(n){var d,p,v,m,g,y,x,b,_,w,k,T=n,A=(0,i.c)(),M={point:S,lineStart:function(){M.point=E,p&&p.push(v=[]),w=!0,_=!1,x=b=NaN},lineEnd:function(){d&&(E(m,g),y&&_&&A.rejoin(),d.push(A.result())),M.point=S,_&&T.lineEnd()},polygonStart:function(){T=A,d=[],p=[],k=!0},polygonEnd:function(){var t=function(){for(var t=0,r=0,n=p.length;ru&&(f-i)*(u-a)>(d-a)*(e-i)&&++t:d<=u&&(f-i)*(u-a)<(d-a)*(e-i)&&--t;return t}(),r=k&&t,i=(d=(0,o.Uf)(d)).length;(r||i)&&(n.polygonStart(),r&&(n.lineStart(),f(null,null,1,n),n.lineEnd()),i&&(0,a.c)(d,h,t,f,n),n.polygonEnd()),T=n,d=p=v=null}};function S(e,t){c(e,t)&&T.point(e,t)}function E(n,i){var a=c(n,i);if(p&&v.push([n,i]),w)m=n,g=i,y=a,w=!1,a&&(T.lineStart(),T.point(n,i));else if(a&&_)T.point(n,i);else{var o=[x=Math.max(l,Math.min(s,x)),b=Math.max(l,Math.min(s,b))],f=[n=Math.max(l,Math.min(s,n)),i=Math.max(l,Math.min(s,i))];!function(e,t,r,n,i,a){var o,s=e[0],l=e[1],u=0,c=1,f=t[0]-s,d=t[1]-l;if(o=r-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>u&&(u=o)}else if(f>0){if(o0)){if(o/=d,d<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=a-l,d||!(o<0)){if(o/=d,d<0){if(o>c)return;o>u&&(u=o)}else if(d>0){if(o0&&(e[0]=s+u*f,e[1]=l+u*d),c<1&&(t[0]=s+c*f,t[1]=l+c*d),!0}}}}}(o,f,e,t,r,u)?a&&(T.lineStart(),T.point(n,i),k=!1):(_||(T.lineStart(),T.point(o[0],o[1])),T.point(f[0],f[1]),a||T.lineEnd(),k=!1)}x=n,b=i,_=a}return M}}},32232:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(41860),i=r(64528);function a(e,t,r,n){this.x=e,this.z=t,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function o(e,t,r,o,l){var u,c,f=[],d=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,r,o=e[0],s=e[t];if((0,n.c)(o,s)){if(!o[2]&&!s[2]){for(l.lineStart(),u=0;u=0;--u)l.point((p=h[u])[0],p[1]);else o(m.x,m.p.x,-1,l);m=m.p}h=(m=m.o).z,g=!g}while(!m.v);l.lineEnd()}}}function s(e){if(t=e.length){for(var t,r,n=0,i=e[0];++n0&&(i=S(e[a],e[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))m.Gg})).map(l)).concat((0,F.ik)((0,m.Km)(a/h)*h,i,h).filter((function(e){return(0,m.a2)(e%v)>m.Gg})).map(u))}return y.lines=function(){return x().map((function(e){return{type:"LineString",coordinates:e}}))},y.outline=function(){return{type:"Polygon",coordinates:[c(n).concat(f(o).slice(1),c(r).reverse().slice(1),f(s).reverse().slice(1))]}},y.extent=function(e){return arguments.length?y.extentMajor(e).extentMinor(e):y.extentMinor()},y.extentMajor=function(e){return arguments.length?(n=+e[0][0],r=+e[1][0],s=+e[0][1],o=+e[1][1],n>r&&(e=n,n=r,r=e),s>o&&(e=s,s=o,o=e),y.precision(g)):[[n,s],[r,o]]},y.extentMinor=function(r){return arguments.length?(t=+r[0][0],e=+r[1][0],a=+r[0][1],i=+r[1][1],t>e&&(r=t,t=e,e=r),a>i&&(r=a,a=i,i=r),y.precision(g)):[[t,a],[e,i]]},y.step=function(e){return arguments.length?y.stepMajor(e).stepMinor(e):y.stepMinor()},y.stepMajor=function(e){return arguments.length?(p=+e[0],v=+e[1],y):[p,v]},y.stepMinor=function(e){return arguments.length?(d=+e[0],h=+e[1],y):[d,h]},y.precision=function(d){return arguments.length?(g=+d,l=N(a,i,90),u=B(t,e,g),c=N(s,o,90),f=B(n,r,g),y):g},y.extentMajor([[-180,-90+m.Gg],[180,90-m.Gg]]).extentMinor([[-180,-80-m.Gg],[180,80+m.Gg]])}function U(){return j()()}var q,V,H,G,W=r(27284),Y=r(7376),Z=(0,v.c)(),X=(0,v.c)(),K={point:g.c,lineStart:g.c,lineEnd:g.c,polygonStart:function(){K.lineStart=J,K.lineEnd=ee},polygonEnd:function(){K.lineStart=K.lineEnd=K.point=g.c,Z.add((0,m.a2)(X)),X.reset()},result:function(){var e=Z/2;return Z.reset(),e}};function J(){K.point=$}function $(e,t){K.point=Q,q=H=e,V=G=t}function Q(e,t){X.add(G*e-H*t),H=e,G=t}function ee(){Q(q,V)}var te,re,ne,ie,ae=K,oe=r(73784),se=0,le=0,ue=0,ce=0,fe=0,de=0,he=0,pe=0,ve=0,me={point:ge,lineStart:ye,lineEnd:_e,polygonStart:function(){me.lineStart=we,me.lineEnd=ke},polygonEnd:function(){me.point=ge,me.lineStart=ye,me.lineEnd=_e},result:function(){var e=ve?[he/ve,pe/ve]:de?[ce/de,fe/de]:ue?[se/ue,le/ue]:[NaN,NaN];return se=le=ue=ce=fe=de=he=pe=ve=0,e}};function ge(e,t){se+=e,le+=t,++ue}function ye(){me.point=xe}function xe(e,t){me.point=be,ge(ne=e,ie=t)}function be(e,t){var r=e-ne,n=t-ie,i=(0,m._I)(r*r+n*n);ce+=i*(ne+e)/2,fe+=i*(ie+t)/2,de+=i,ge(ne=e,ie=t)}function _e(){me.point=ge}function we(){me.point=Te}function ke(){Ae(te,re)}function Te(e,t){me.point=Ae,ge(te=ne=e,re=ie=t)}function Ae(e,t){var r=e-ne,n=t-ie,i=(0,m._I)(r*r+n*n);ce+=i*(ne+e)/2,fe+=i*(ie+t)/2,de+=i,he+=(i=ie*e-ne*t)*(ne+e),pe+=i*(ie+t),ve+=3*i,ge(ne=e,ie=t)}var Me=me;function Se(e){this._context=e}Se.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,m.kD)}},result:g.c};var Ee,Ce,Le,Pe,Oe,Ie=(0,v.c)(),Re={point:g.c,lineStart:function(){Re.point=De},lineEnd:function(){Ee&&ze(Ce,Le),Re.point=g.c},polygonStart:function(){Ee=!0},polygonEnd:function(){Ee=null},result:function(){var e=+Ie;return Ie.reset(),e}};function De(e,t){Re.point=ze,Ce=Pe=e,Le=Oe=t}function ze(e,t){Pe-=e,Oe-=t,Ie.add((0,m._I)(Pe*Pe+Oe*Oe)),Pe=e,Oe=t}var Fe=Re;function Ne(){this._string=[]}function Be(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function je(e,t){var r,n,i=4.5;function a(e){return e&&("function"===typeof i&&n.pointRadius(+i.apply(this,arguments)),(0,y.c)(e,r(n))),n.result()}return a.area=function(e){return(0,y.c)(e,r(ae)),ae.result()},a.measure=function(e){return(0,y.c)(e,r(Fe)),Fe.result()},a.bounds=function(e){return(0,y.c)(e,r(oe.c)),oe.c.result()},a.centroid=function(e){return(0,y.c)(e,r(Me)),Me.result()},a.projection=function(t){return arguments.length?(r=null==t?(e=null,Y.c):(e=t).stream,a):e},a.context=function(e){return arguments.length?(n=null==e?(t=null,new Ne):new Se(t=e),"function"!==typeof i&&n.pointRadius(i),a):t},a.pointRadius=function(e){return arguments.length?(i="function"===typeof e?e:(n.pointRadius(+e),+e),a):i},a.projection(e).context(t)}Ne.prototype={_radius:4.5,_circle:Be(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=Be(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};var Ue=r(87952);function qe(e){var t=0,r=m.pi/3,n=(0,Ue.U)(e),i=n(t,r);return i.parallels=function(e){return arguments.length?n(t=e[0]*m.qw,r=e[1]*m.qw):[t*m.oh,r*m.oh]},i}function Ve(e,t){var r=(0,m.g$)(e),n=(r+(0,m.g$)(t))/2;if((0,m.a2)(n)=.12&&i<.234&&n>=-.425&&n<-.214?s:i>=.166&&i<.234&&n>=-.214&&n<-.115?l:o).invert(e)},c.stream=function(r){return e&&t===r?e:e=function(e){var t=e.length;return{point:function(r,n){for(var i=-1;++i0?t<-m.or+m.Gg&&(t=-m.or+m.Gg):t>m.or-m.Gg&&(t=m.or-m.Gg);var r=i/(0,m.g3)(et(t),n);return[r*(0,m.g$)(n*e),i-r*(0,m.W8)(n*e)]}return a.invert=function(e,t){var r=i-t,a=(0,m.kq)(n)*(0,m._I)(e*e+r*r),o=(0,m.WE)(e,(0,m.a2)(r))*(0,m.kq)(r);return r*n<0&&(o-=m.pi*(0,m.kq)(e)*(0,m.kq)(r)),[o/n,2*(0,m.MQ)((0,m.g3)(i/a,1/n))-m.or]},a}function rt(){return qe(tt).scale(109.5).parallels([30,30])}Je.invert=function(e,t){return[e,2*(0,m.MQ)((0,m.oN)(t))-m.or]};var nt=r(69604);function it(e,t){var r=(0,m.W8)(e),n=e===t?(0,m.g$)(e):(r-(0,m.W8)(t))/(t-e),i=r/n+e;if((0,m.a2)(n)2?e[2]+90:90]):[(e=r())[0],e[1],e[2]-90]},r([0,0,90]).scale(159.155)}xt.invert=(0,yt.g)((function(e){return 2*(0,m.MQ)(e)})),_t.invert=function(e,t){return[-t,2*(0,m.MQ)((0,m.oN)(e))-m.or]}},27284:function(e,t,r){"use strict";r.d(t,{c:function(){return i}});var n=r(64528);function i(e,t){var r=e[0]*n.qw,i=e[1]*n.qw,a=t[0]*n.qw,o=t[1]*n.qw,s=(0,n.W8)(i),l=(0,n.g$)(i),u=(0,n.W8)(o),c=(0,n.g$)(o),f=s*(0,n.W8)(r),d=s*(0,n.g$)(r),h=u*(0,n.W8)(a),p=u*(0,n.g$)(a),v=2*(0,n.qR)((0,n._I)((0,n.SD)(o-i)+s*u*(0,n.SD)(a-r))),m=(0,n.g$)(v),g=v?function(e){var t=(0,n.g$)(e*=v)/m,r=(0,n.g$)(v-e)/m,i=r*f+t*h,a=r*d+t*p,o=r*l+t*c;return[(0,n.WE)(a,i)*n.oh,(0,n.WE)(o,(0,n._I)(i*i+a*a))*n.oh]}:function(){return[r*n.oh,i*n.oh]};return g.distance=v,g}},64528:function(e,t,r){"use strict";r.d(t,{Gg:function(){return n},Km:function(){return v},MQ:function(){return d},SD:function(){return A},W8:function(){return p},WE:function(){return h},Yz:function(){return g},_I:function(){return _},a2:function(){return f},a6:function(){return w},a8:function(){return i},g$:function(){return x},g3:function(){return y},kD:function(){return l},kq:function(){return b},mE:function(){return k},oN:function(){return m},oh:function(){return u},or:function(){return o},pi:function(){return a},qR:function(){return T},qw:function(){return c},wL:function(){return s}});var n=1e-6,i=1e-12,a=Math.PI,o=a/2,s=a/4,l=2*a,u=180/a,c=a/180,f=Math.abs,d=Math.atan,h=Math.atan2,p=Math.cos,v=Math.ceil,m=Math.exp,g=(Math.floor,Math.log),y=Math.pow,x=Math.sin,b=Math.sign||function(e){return e>0?1:e<0?-1:0},_=Math.sqrt,w=Math.tan;function k(e){return e>1?0:e<-1?a:Math.acos(e)}function T(e){return e>1?o:e<-1?-o:Math.asin(e)}function A(e){return(e=x(e/2))*e}},70932:function(e,t,r){"use strict";function n(){}r.d(t,{c:function(){return n}})},73784:function(e,t,r){"use strict";var n=r(70932),i=1/0,a=i,o=-i,s=o,l={point:function(e,t){eo&&(o=e),ts&&(s=t)},lineStart:n.c,lineEnd:n.c,polygonStart:n.c,polygonEnd:n.c,result:function(){var e=[[i,a],[o,s]];return o=s=-(a=i=1/0),e}};t.c=l},41860:function(e,t,r){"use strict";r.d(t,{c:function(){return i}});var n=r(64528);function i(e,t){return(0,n.a2)(e[0]-t[0])=0?1:-1,C=E*S,L=C>a.pi,P=x*A;if(o.add((0,a.WE)(P*E*(0,a.g$)(C),b*M+P*(0,a.W8)(C))),c+=L?S+E*a.kD:S,L^g>=r^k>=r){var O=(0,i.CW)((0,i.ux)(m),(0,i.ux)(w));(0,i.cJ)(O);var I=(0,i.CW)(u,O);(0,i.cJ)(I);var R=(L^S>=0?-1:1)*(0,a.qR)(I[2]);(n>R||n===R&&(O[0]||O[1]))&&(f+=L^S>=0?1:-1)}}return(c<-a.Gg||c4*t&&g--){var w=o+h,k=s+v,T=u+m,A=(0,l._I)(w*w+k*k+T*T),M=(0,l.qR)(T/=A),S=(0,l.a2)((0,l.a2)(T)-1)t||(0,l.a2)((x*P+b*O)/_-.5)>.3||o*h+s*v+u*m2?e[2]%360*l.qw:0,q()):[C*l.oh,L*l.oh,P*l.oh]},j.angle=function(e){return arguments.length?(O=e%360*l.qw,q()):O*l.oh},j.reflectX=function(e){return arguments.length?(I=e?-1:1,q()):I<0},j.reflectY=function(e){return arguments.length?(R=e?-1:1,q()):R<0},j.precision=function(e){return arguments.length?(x=v(b,B=e*e),V()):(0,l._I)(B)},j.fitExtent=function(e,t){return(0,f.QX)(j,e,t)},j.fitSize=function(e,t){return(0,f.UV)(j,e,t)},j.fitWidth=function(e,t){return(0,f.Qx)(j,e,t)},j.fitHeight=function(e,t){return(0,f.OW)(j,e,t)},function(){return t=e.apply(this,arguments),j.invert=t.invert&&U,q()}}},47984:function(e,t,r){"use strict";r.d(t,{c:function(){return o},g:function(){return a}});var n=r(87952),i=r(64528);function a(e,t){var r=t*t,n=r*r;return[e*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function o(){return(0,n.c)(a).scale(175.295)}a.invert=function(e,t){var r,n=t,a=25;do{var o=n*n,s=o*o;n-=r=(n*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-t)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while((0,i.a2)(r)>i.Gg&&--a>0);return[e/(.8707+(o=n*n)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),n]}},4888:function(e,t,r){"use strict";r.d(t,{c:function(){return s},t:function(){return o}});var n=r(64528),i=r(62280),a=r(87952);function o(e,t){return[(0,n.W8)(t)*(0,n.g$)(e),(0,n.g$)(t)]}function s(){return(0,a.c)(o).scale(249.5).clipAngle(90+n.Gg)}o.invert=(0,i.g)(n.qR)},92992:function(e,t,r){"use strict";r.d(t,{O:function(){return o},c:function(){return c}});var n=r(68120),i=r(64528);function a(e,t){return[(0,i.a2)(e)>i.pi?e+Math.round(-e/i.kD)*i.kD:e,t]}function o(e,t,r){return(e%=i.kD)?t||r?(0,n.c)(l(e),u(t,r)):l(e):t||r?u(t,r):a}function s(e){return function(t,r){return[(t+=e)>i.pi?t-i.kD:t<-i.pi?t+i.kD:t,r]}}function l(e){var t=s(e);return t.invert=s(-e),t}function u(e,t){var r=(0,i.W8)(e),n=(0,i.g$)(e),a=(0,i.W8)(t),o=(0,i.g$)(t);function s(e,t){var s=(0,i.W8)(t),l=(0,i.W8)(e)*s,u=(0,i.g$)(e)*s,c=(0,i.g$)(t),f=c*r+l*n;return[(0,i.WE)(u*a-f*o,l*r-c*n),(0,i.qR)(f*a+u*o)]}return s.invert=function(e,t){var s=(0,i.W8)(t),l=(0,i.W8)(e)*s,u=(0,i.g$)(e)*s,c=(0,i.g$)(t),f=c*a-u*o;return[(0,i.WE)(u*a+c*o,l*r+f*n),(0,i.qR)(f*r-l*n)]},s}function c(e){function t(t){return(t=e(t[0]*i.qw,t[1]*i.qw))[0]*=i.oh,t[1]*=i.oh,t}return e=o(e[0]*i.qw,e[1]*i.qw,e.length>2?e[2]*i.qw:0),t.invert=function(t){return(t=e.invert(t[0]*i.qw,t[1]*i.qw))[0]*=i.oh,t[1]*=i.oh,t},t}a.invert=a},16016:function(e,t,r){"use strict";function n(e,t){e&&a.hasOwnProperty(e.type)&&a[e.type](e,t)}r.d(t,{c:function(){return l}});var i={Feature:function(e,t){n(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,i=-1,a=r.length;++i=0;)t+=r[n].value;else t=1;e.value=t}function l(e,t){var r,n,i,a,o,s=new d(e),l=+e.value&&(s.value=e.value),c=[s];for(null==t&&(t=u);r=c.pop();)if(l&&(r.value=+r.data.value),(i=t(r.data))&&(o=i.length))for(r.children=new Array(o),a=o-1;a>=0;--a)c.push(n=r.children[a]=new d(i[a])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(f)}function u(e){return e.children}function c(e){e.data=e.data.data}function f(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function d(e){this.data=e,this.depth=this.height=0,this.parent=null}r.r(t),r.d(t,{cluster:function(){return o},hierarchy:function(){return l},pack:function(){return O},packEnclose:function(){return p},packSiblings:function(){return S},partition:function(){return N},stratify:function(){return H},tree:function(){return J},treemap:function(){return re},treemapBinary:function(){return ne},treemapDice:function(){return F},treemapResquarify:function(){return ae},treemapSlice:function(){return $},treemapSliceDice:function(){return ie},treemapSquarify:function(){return te}}),d.prototype=l.prototype={constructor:d,count:function(){return this.eachAfter(s)},each:function(e){var t,r,n,i,a=this,o=[a];do{for(t=o.reverse(),o=[];a=t.pop();)if(e(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return l(this).eachBefore(c)}};var h=Array.prototype.slice;function p(e){for(var t,r,n=0,i=(e=function(e){for(var t,r,n=e.length;n;)r=Math.random()*n--|0,t=e[n],e[n]=e[r],e[r]=t;return e}(h.call(e))).length,a=[];n0&&r*r>n*n+i*i}function y(e,t){for(var r=0;r(o*=o)?(n=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-n*n)),r.x=e.x-n*s-a*l,r.y=e.y-n*l+a*s):(n=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-n*n)),r.x=t.x+n*s-a*l,r.y=t.y+n*l+a*s)):(r.x=t.x+r.r,r.y=t.y)}function k(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function T(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,a=(t.y*r.r+r.y*t.r)/n;return i*i+a*a}function A(e){this._=e,this.next=null,this.previous=null}function M(e){if(!(i=e.length))return 0;var t,r,n,i,a,o,s,l,u,c,f;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(i>2))return t.r+r.r;w(r,t,n=e[2]),t=new A(t),r=new A(r),n=new A(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;e:for(s=3;s0)throw new Error("cycle");return a}return r.id=function(t){return arguments.length?(e=E(t),r):e},r.parentId=function(e){return arguments.length?(t=E(e),r):t},r}function G(e,t){return e.parent===t.parent?1:2}function W(e){var t=e.children;return t?t[0]:e.t}function Y(e){var t=e.children;return t?t[t.length-1]:e.t}function Z(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function X(e,t,r){return e.a.parent===t.parent?e.a:r}function K(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function J(){var e=G,t=1,r=1,n=null;function i(i){var l=function(e){for(var t,r,n,i,a,o=new K(e,0),s=[o];t=s.pop();)if(n=t._.children)for(t.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=t.children[i]=new K(n[i],i)),r.parent=t;return(o.parent=new K(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var u=i,c=i,f=i;i.eachBefore((function(e){e.xc.x&&(c=e),e.depth>f.depth&&(f=e)}));var d=u===c?1:e(u,c)/2,h=d-u.x,p=t/(c.x+d+h),v=r/(f.depth||1);i.eachBefore((function(e){e.x=(e.x+h)*p,e.y=e.depth*v}))}return i}function a(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var a=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,a=t,o=t,s=r,l=a.parent.children[0],u=a.m,c=o.m,f=s.m,d=l.m;s=Y(s),a=W(a),s&&a;)l=W(l),(o=Y(o)).a=t,(i=s.z+f-a.z-u+e(s._,a._))>0&&(Z(X(s,t,n),t,i),u+=i,c+=i),f+=s.m,u+=a.m,d+=l.m,c+=o.m;s&&!Y(o)&&(o.t=s,o.m+=f-c),a&&!W(l)&&(l.t=a,l.m+=u-d,n=t)}return n}(t,i,t.parent.A||n[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],i):n?null:[t,r]},i.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],i):n?[t,r]:null},i}function $(e,t,r,n,i){for(var a,o=e.children,s=-1,l=o.length,u=e.value&&(i-r)/e.value;++sd&&(d=s),m=c*c*v,(h=Math.max(d/m,m/f))>p){c-=s;break}p=h}g.push(o={value:c,dice:l1?t:1)},r}(Q);function re(){var e=te,t=!1,r=1,n=1,i=[0],a=C,o=C,s=C,l=C,u=C;function c(e){return e.x0=e.y0=0,e.x1=r,e.y1=n,e.eachBefore(f),i=[0],t&&e.eachBefore(z),e}function f(t){var r=i[t.depth],n=t.x0+r,c=t.y0+r,f=t.x1-r,d=t.y1-r;f=r-1){var c=s[t];return c.x0=i,c.y0=a,c.x1=o,void(c.y1=l)}for(var f=u[t],d=n/2+f,h=t+1,p=r-1;h>>1;u[v]l-a){var y=(i*g+o*m)/n;e(t,h,m,i,a,y,l),e(h,r,g,y,a,o,l)}else{var x=(a*g+l*m)/n;e(t,h,m,i,a,o,x),e(h,r,g,i,x,o,l)}}(0,l,e.value,t,r,n,i)}function ie(e,t,r,n,i){(1&e.depth?$:F)(e,t,r,n,i)}var ae=function e(t){function r(e,r,n,i,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,l,u,c,f=-1,d=o.length,h=e.value;++f1?t:1)},r}(Q)},10132:function(e,t,r){"use strict";r.d(t,{ak:function(){return y}});var n=Math.PI,i=2*n,a=1e-6,o=i-a;function s(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function l(){return new s}s.prototype=l.prototype={constructor:s,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,r,i,o){e=+e,t=+t,r=+r,i=+i,o=+o;var s=this._x1,l=this._y1,u=r-e,c=i-t,f=s-e,d=l-t,h=f*f+d*d;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>a)if(Math.abs(d*u-c*f)>a&&o){var p=r-s,v=i-l,m=u*u+c*c,g=p*p+v*v,y=Math.sqrt(m),x=Math.sqrt(h),b=o*Math.tan((n-Math.acos((m+h-g)/(2*y*x)))/2),_=b/x,w=b/y;Math.abs(_-1)>a&&(this._+="L"+(e+_*f)+","+(t+_*d)),this._+="A"+o+","+o+",0,0,"+ +(d*p>f*v)+","+(this._x1=e+w*u)+","+(this._y1=t+w*c)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,r,s,l,u){e=+e,t=+t,u=!!u;var c=(r=+r)*Math.cos(s),f=r*Math.sin(s),d=e+c,h=t+f,p=1^u,v=u?s-l:l-s;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+d+","+h:(Math.abs(this._x1-d)>a||Math.abs(this._y1-h)>a)&&(this._+="L"+d+","+h),r&&(v<0&&(v=v%i+i),v>o?this._+="A"+r+","+r+",0,1,"+p+","+(e-c)+","+(t-f)+"A"+r+","+r+",0,1,"+p+","+(this._x1=d)+","+(this._y1=h):v>a&&(this._+="A"+r+","+r+",0,"+ +(v>=n)+","+p+","+(this._x1=e+r*Math.cos(l))+","+(this._y1=t+r*Math.sin(l))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};var u=l,c=Array.prototype.slice;function f(e){return function(){return e}}function d(e){return e[0]}function h(e){return e[1]}function p(e){return e.source}function v(e){return e.target}function m(e){var t=p,r=v,n=d,i=h,a=null;function o(){var o,s=c.call(arguments),l=t.apply(this,s),f=r.apply(this,s);if(a||(a=o=u()),e(a,+n.apply(this,(s[0]=l,s)),+i.apply(this,s),+n.apply(this,(s[0]=f,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(r=e,o):r},o.x=function(e){return arguments.length?(n="function"===typeof e?e:f(+e),o):n},o.y=function(e){return arguments.length?(i="function"===typeof e?e:f(+e),o):i},o.context=function(e){return arguments.length?(a=null==e?null:e,o):a},o}function g(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function y(){return m(g)}},94336:function(e,t,r){"use strict";r.d(t,{Yn:function(){return p},m_:function(){return d},E9:function(){return v}});var n=r(8208),i=r(58931),a=r(46192),o=r(68936),s=r(32171),l=r(53528);function u(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 c(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 f(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function d(e){var t=e.dateTime,r=e.date,s=e.time,l=e.periods,d=e.days,h=e.shortDays,p=e.months,v=e.shortMonths,g=w(l),y=k(l),x=w(d),b=k(d),_=w(h),Se=k(h),Ee=w(p),Ce=k(p),Le=w(v),Pe=k(v),Oe={a:function(e){return h[e.getDay()]},A:function(e){return d[e.getDay()]},b:function(e){return v[e.getMonth()]},B:function(e){return p[e.getMonth()]},c:null,d:H,e:H,f:X,H:G,I:W,j:Y,L:Z,m:K,M:J,p:function(e){return l[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Ae,s:Me,S:$,u:Q,U:ee,V:te,w:re,W:ne,x:null,X:null,y:ie,Y:ae,Z:oe,"%":Te},Ie={a:function(e){return h[e.getUTCDay()]},A:function(e){return d[e.getUTCDay()]},b:function(e){return v[e.getUTCMonth()]},B:function(e){return p[e.getUTCMonth()]},c:null,d:se,e:se,f:de,H:le,I:ue,j:ce,L:fe,m:he,M:pe,p:function(e){return l[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Ae,s:Me,S:ve,u:me,U:ge,V:ye,w:xe,W:be,x:null,X:null,y:_e,Y:we,Z:ke,"%":Te},Re={a:function(e,t,r){var n=_.exec(t.slice(r));return n?(e.w=Se[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=x.exec(t.slice(r));return n?(e.w=b[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=Le.exec(t.slice(r));return n?(e.m=Pe[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=Ee.exec(t.slice(r));return n?(e.m=Ce[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return Fe(e,t,r,n)},d:R,e:R,f:j,H:z,I:z,j:D,L:B,m:I,M:F,p:function(e,t,r){var n=g.exec(t.slice(r));return n?(e.p=y[n[0].toLowerCase()],r+n[0].length):-1},q:O,Q:q,s:V,S:N,u:A,U:M,V:S,w:T,W:E,x:function(e,t,n){return Fe(e,r,t,n)},X:function(e,t,r){return Fe(e,s,t,r)},y:L,Y:C,Z:P,"%":U};function De(e,t){return function(r){var n,i,a,o=[],s=-1,l=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in d||(d.w=1),"Z"in d?(l=(s=c(f(d.y,0,1))).getUTCDay(),s=l>4||0===l?n.ot.ceil(s):(0,n.ot)(s),s=i.c.offset(s,7*(d.V-1)),d.y=s.getUTCFullYear(),d.m=s.getUTCMonth(),d.d=s.getUTCDate()+(d.w+6)%7):(l=(s=u(f(d.y,0,1))).getDay(),s=l>4||0===l?a.qT.ceil(s):(0,a.qT)(s),s=o.c.offset(s,7*(d.V-1)),d.y=s.getFullYear(),d.m=s.getMonth(),d.d=s.getDate()+(d.w+6)%7)}else("W"in d||"U"in d)&&("w"in d||(d.w="u"in d?d.u%7:"W"in d?1:0),l="Z"in d?c(f(d.y,0,1)).getUTCDay():u(f(d.y,0,1)).getDay(),d.m=0,d.d="W"in d?(d.w+6)%7+7*d.W-(l+5)%7:d.w+7*d.U-(l+6)%7);return"Z"in d?(d.H+=d.Z/100|0,d.M+=d.Z%100,c(d)):u(d)}}function Fe(e,t,r,n){for(var i,a,o=0,s=t.length,l=r.length;o=l)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=Re[i in m?t.charAt(o++):i])||(n=a(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Oe.x=De(r,Oe),Oe.X=De(s,Oe),Oe.c=De(t,Oe),Ie.x=De(r,Ie),Ie.X=De(s,Ie),Ie.c=De(t,Ie),{format:function(e){var t=De(e+="",Oe);return t.toString=function(){return e},t},parse:function(e){var t=ze(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=De(e+="",Ie);return t.toString=function(){return e},t},utcParse:function(e){var t=ze(e+="",!0);return t.toString=function(){return e},t}}}var h,p,v,m={"-":"",_:" ",0:"0"},g=/^\s*\d+/,y=/^%/,x=/[\\^$*+?|[\]().{}]/g;function b(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function P(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 O(e,t,r){var n=g.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function I(e,t,r){var n=g.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function R(e,t,r){var n=g.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function D(e,t,r){var n=g.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function z(e,t,r){var n=g.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function F(e,t,r){var n=g.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function N(e,t,r){var n=g.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function B(e,t,r){var n=g.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function j(e,t,r){var n=g.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function U(e,t,r){var n=y.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function q(e,t,r){var n=g.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function V(e,t,r){var n=g.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function H(e,t){return b(e.getDate(),t,2)}function G(e,t){return b(e.getHours(),t,2)}function W(e,t){return b(e.getHours()%12||12,t,2)}function Y(e,t){return b(1+o.c.count((0,s.c)(e),e),t,3)}function Z(e,t){return b(e.getMilliseconds(),t,3)}function X(e,t){return Z(e,t)+"000"}function K(e,t){return b(e.getMonth()+1,t,2)}function J(e,t){return b(e.getMinutes(),t,2)}function $(e,t){return b(e.getSeconds(),t,2)}function Q(e){var t=e.getDay();return 0===t?7:t}function ee(e,t){return b(a.uU.count((0,s.c)(e)-1,e),t,2)}function te(e,t){var r=e.getDay();return e=r>=4||0===r?(0,a.kD)(e):a.kD.ceil(e),b(a.kD.count((0,s.c)(e),e)+(4===(0,s.c)(e).getDay()),t,2)}function re(e){return e.getDay()}function ne(e,t){return b(a.qT.count((0,s.c)(e)-1,e),t,2)}function ie(e,t){return b(e.getFullYear()%100,t,2)}function ae(e,t){return b(e.getFullYear()%1e4,t,4)}function oe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+b(t/60|0,"0",2)+b(t%60,"0",2)}function se(e,t){return b(e.getUTCDate(),t,2)}function le(e,t){return b(e.getUTCHours(),t,2)}function ue(e,t){return b(e.getUTCHours()%12||12,t,2)}function ce(e,t){return b(1+i.c.count((0,l.c)(e),e),t,3)}function fe(e,t){return b(e.getUTCMilliseconds(),t,3)}function de(e,t){return fe(e,t)+"000"}function he(e,t){return b(e.getUTCMonth()+1,t,2)}function pe(e,t){return b(e.getUTCMinutes(),t,2)}function ve(e,t){return b(e.getUTCSeconds(),t,2)}function me(e){var t=e.getUTCDay();return 0===t?7:t}function ge(e,t){return b(n.EV.count((0,l.c)(e)-1,e),t,2)}function ye(e,t){var r=e.getUTCDay();return e=r>=4||0===r?(0,n.yA)(e):n.yA.ceil(e),b(n.yA.count((0,l.c)(e),e)+(4===(0,l.c)(e).getUTCDay()),t,2)}function xe(e){return e.getUTCDay()}function be(e,t){return b(n.ot.count((0,l.c)(e)-1,e),t,2)}function _e(e,t){return b(e.getUTCFullYear()%100,t,2)}function we(e,t){return b(e.getUTCFullYear()%1e4,t,4)}function ke(){return"+0000"}function Te(){return"%"}function Ae(e){return+e}function Me(e){return Math.floor(+e/1e3)}h=d({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"]}),p=h.format,h.parse,v=h.utcFormat,h.utcParse},68936:function(e,t,r){"use strict";r.d(t,{m:function(){return o}});var n=r(81628),i=r(69792),a=(0,n.c)((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.iy)/i.SK}),(function(e){return e.getDate()-1}));t.c=a;var o=a.range},69792:function(e,t,r){"use strict";r.d(t,{KK:function(){return s},SK:function(){return o},cg:function(){return a},iy:function(){return i},yc:function(){return n}});var n=1e3,i=6e4,a=36e5,o=864e5,s=6048e5},73220:function(e,t,r){"use strict";r.r(t),r.d(t,{timeDay:function(){return g.c},timeDays:function(){return g.m},timeFriday:function(){return y.iB},timeFridays:function(){return y.sJ},timeHour:function(){return v},timeHours:function(){return m},timeInterval:function(){return n.c},timeMillisecond:function(){return a},timeMilliseconds:function(){return o},timeMinute:function(){return d},timeMinutes:function(){return h},timeMonday:function(){return y.qT},timeMondays:function(){return y.QP},timeMonth:function(){return b},timeMonths:function(){return _},timeSaturday:function(){return y.Wc},timeSaturdays:function(){return y.aI},timeSecond:function(){return u},timeSeconds:function(){return c},timeSunday:function(){return y.uU},timeSundays:function(){return y.Ab},timeThursday:function(){return y.kD},timeThursdays:function(){return y.eC},timeTuesday:function(){return y.Mf},timeTuesdays:function(){return y.Oc},timeWednesday:function(){return y.eg},timeWednesdays:function(){return y.sn},timeWeek:function(){return y.uU},timeWeeks:function(){return y.Ab},timeYear:function(){return w.c},timeYears:function(){return w.Q},utcDay:function(){return C.c},utcDays:function(){return C.o},utcFriday:function(){return L.od},utcFridays:function(){return L.iG},utcHour:function(){return S},utcHours:function(){return E},utcMillisecond:function(){return a},utcMilliseconds:function(){return o},utcMinute:function(){return T},utcMinutes:function(){return A},utcMonday:function(){return L.ot},utcMondays:function(){return L.iO},utcMonth:function(){return O},utcMonths:function(){return I},utcSaturday:function(){return L.Ad},utcSaturdays:function(){return L.K8},utcSecond:function(){return u},utcSeconds:function(){return c},utcSunday:function(){return L.EV},utcSundays:function(){return L.Wq},utcThursday:function(){return L.yA},utcThursdays:function(){return L.ob},utcTuesday:function(){return L.sG},utcTuesdays:function(){return L.kl},utcWednesday:function(){return L._6},utcWednesdays:function(){return L.W_},utcWeek:function(){return L.EV},utcWeeks:function(){return L.Wq},utcYear:function(){return R.c},utcYears:function(){return R.i}});var n=r(81628),i=(0,n.c)((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?(0,n.c)((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):i:null};var a=i,o=i.range,s=r(69792),l=(0,n.c)((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*s.yc)}),(function(e,t){return(t-e)/s.yc}),(function(e){return e.getUTCSeconds()})),u=l,c=l.range,f=(0,n.c)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*s.yc)}),(function(e,t){e.setTime(+e+t*s.iy)}),(function(e,t){return(t-e)/s.iy}),(function(e){return e.getMinutes()})),d=f,h=f.range,p=(0,n.c)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*s.yc-e.getMinutes()*s.iy)}),(function(e,t){e.setTime(+e+t*s.cg)}),(function(e,t){return(t-e)/s.cg}),(function(e){return e.getHours()})),v=p,m=p.range,g=r(68936),y=r(46192),x=(0,n.c)((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()})),b=x,_=x.range,w=r(32171),k=(0,n.c)((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*s.iy)}),(function(e,t){return(t-e)/s.iy}),(function(e){return e.getUTCMinutes()})),T=k,A=k.range,M=(0,n.c)((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*s.cg)}),(function(e,t){return(t-e)/s.cg}),(function(e){return e.getUTCHours()})),S=M,E=M.range,C=r(58931),L=r(8208),P=(0,n.c)((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()})),O=P,I=P.range,R=r(53528)},81628:function(e,t,r){"use strict";r.d(t,{c:function(){return a}});var n=new Date,i=new Date;function a(e,t,r,o){function s(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return s.floor=function(t){return e(t=new Date(+t)),t},s.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},s.round=function(e){var t=s(e),r=s.ceil(e);return e-t0))return o;do{o.push(a=new Date(+r)),t(r,i),e(r)}while(a=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(s.count=function(t,a){return n.setTime(+t),i.setTime(+a),e(n),e(i),Math.floor(r(n,i))},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(o?function(t){return o(t)%e===0}:function(t){return s.count(0,t)%e===0}):s:null}),s}},58931:function(e,t,r){"use strict";r.d(t,{o:function(){return o}});var n=r(81628),i=r(69792),a=(0,n.c)((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/i.SK}),(function(e){return e.getUTCDate()-1}));t.c=a;var o=a.range},8208:function(e,t,r){"use strict";r.d(t,{Ad:function(){return d},EV:function(){return o},K8:function(){return x},W_:function(){return m},Wq:function(){return h},_6:function(){return u},iG:function(){return y},iO:function(){return p},kl:function(){return v},ob:function(){return g},od:function(){return f},ot:function(){return s},sG:function(){return l},yA:function(){return c}});var n=r(81628),i=r(69792);function a(e){return(0,n.c)((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)/i.KK}))}var o=a(0),s=a(1),l=a(2),u=a(3),c=a(4),f=a(5),d=a(6),h=o.range,p=s.range,v=l.range,m=u.range,g=c.range,y=f.range,x=d.range},53528:function(e,t,r){"use strict";r.d(t,{i:function(){return a}});var n=r(81628),i=(0,n.c)((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()}));i.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,n.c)((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},t.c=i;var a=i.range},46192:function(e,t,r){"use strict";r.d(t,{Ab:function(){return h},Mf:function(){return l},Oc:function(){return v},QP:function(){return p},Wc:function(){return d},aI:function(){return x},eC:function(){return g},eg:function(){return u},iB:function(){return f},kD:function(){return c},qT:function(){return s},sJ:function(){return y},sn:function(){return m},uU:function(){return o}});var n=r(81628),i=r(69792);function a(e){return(0,n.c)((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-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.iy)/i.KK}))}var o=a(0),s=a(1),l=a(2),u=a(3),c=a(4),f=a(5),d=a(6),h=o.range,p=s.range,v=l.range,m=u.range,g=c.range,y=f.range,x=d.range},32171:function(e,t,r){"use strict";r.d(t,{Q:function(){return a}});var n=r(81628),i=(0,n.c)((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()}));i.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,n.c)((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},t.c=i;var a=i.range},64348:function(e,t,r){"use strict";var n=r(39640)(),i=r(53664),a=n&&i("%Object.defineProperty%",!0);if(a)try{a({},"a",{value:1})}catch(u){a=!1}var o=i("%SyntaxError%"),s=i("%TypeError%"),l=r(2304);e.exports=function(e,t,r){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new s("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],f=!!l&&l(e,t);if(a)a(e,t,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===i&&f?f.writable:!i});else{if(!c&&(n||i||u))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},81288:function(e,t,r){"use strict";var n=r(41820),i="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),a=Object.prototype.toString,o=Array.prototype.concat,s=Object.defineProperty,l=r(39640)(),u=s&&l,c=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!==typeof(i=n)||"[object Function]"!==a.call(i)||!n())return;var i;u?s(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r},f=function(e,t){var r=arguments.length>2?arguments[2]:{},a=n(t);i&&(a=o.call(a,Object.getOwnPropertySymbols(t)));for(var s=0;ss*l){var h=(d-f)/s;o[c]=1e3*h}}return o}function i(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i0)return function(e,t){var r,n;for(r=new Array(e),n=0;n80*a){o=l=e[0],s=f=e[1];for(var b=a;bl&&(l=d),p>f&&(f=p);v=0!==(v=Math.max(l-o,f-s))?1/v:0}return i(y,x,a,o,s,v),x}function r(e,t,r,n,i){var a,o;if(i===M(e,t,r,n)>0)for(a=t;a=t;a-=n)o=k(a,e[a],e[a+1],o);return o&&g(o,o.next)&&(T(o),o=o.next),o}function n(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!g(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(T(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function i(e,t,r,u,c,f,h){if(e){!h&&f&&function(e,t,r,n){var i=e;do{null===i.z&&(i.z=d(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,r,n,i,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1)}(i)}(e,u,c,f);for(var p,v,m=e;e.prev!==e.next;)if(p=e.prev,v=e.next,f?o(e,u,c,f):a(e))t.push(p.i/r),t.push(e.i/r),t.push(v.i/r),T(e),e=v.next,m=v.next;else if((e=v)===m){h?1===h?i(e=s(n(e),t,r),t,r,u,c,f,2):2===h&&l(e,t,r,u,c,f):i(n(e),t,r,u,c,f,1);break}}}function a(e){var t=e.prev,r=e,n=e.next;if(m(t,r,n)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(p(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&m(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(e,t,r,n){var i=e.prev,a=e,o=e.next;if(m(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=d(s,l,t,r,n),h=d(u,c,t,r,n),v=e.prevZ,g=e.nextZ;v&&v.z>=f&&g&&g.z<=h;){if(v!==e.prev&&v!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,g!==e.prev&&g!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&m(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;v&&v.z>=f;){if(v!==e.prev&&v!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;g&&g.z<=h;){if(g!==e.prev&&g!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&m(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function s(e,t,r){var i=e;do{var a=i.prev,o=i.next.next;!g(a,o)&&y(a,i,i.next,o)&&_(a,o)&&_(o,a)&&(t.push(a.i/r),t.push(i.i/r),t.push(o.i/r),T(i),T(i.next),i=e=o),i=i.next}while(i!==e);return n(i)}function l(e,t,r,a,o,s){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&v(l,u)){var c=w(l,u);return l=n(l,l.next),c=n(c,c.next),i(l,t,r,a,o,s),void i(c,t,r,a,o,s)}u=u.next}l=l.next}while(l!==e)}function u(e,t){return e.x-t.x}function c(e,t){if(t=function(e,t){var r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&i!==n.x&&p(ar.x||n.x===r.x&&f(r,n)))&&(r=n,h=l)),n=n.next}while(n!==u);return r}(e,t),t){var r=w(t,e);n(t,t.next),n(r,r.next)}}function f(e,t){return m(e.prev,e,t.prev)<0&&m(t.next,e,e.next)<0}function d(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function h(e){var t=e,r=e;do{(t.x=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function v(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&y(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(_(e,t)&&_(t,e)&&function(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!==r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(m(e.prev,e,t.prev)||m(e,t.prev,t))||g(e,t)&&m(e.prev,e,e.next)>0&&m(t.prev,t,t.next)>0)}function m(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function g(e,t){return e.x===t.x&&e.y===t.y}function y(e,t,r,n){var i=b(m(e,t,r)),a=b(m(e,t,n)),o=b(m(r,n,e)),s=b(m(r,n,t));return i!==a&&o!==s||!(0!==i||!x(e,r,t))||!(0!==a||!x(e,n,t))||!(0!==o||!x(r,e,n))||!(0!==s||!x(r,t,n))}function x(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function b(e){return e>0?1:e<0?-1:0}function _(e,t){return m(e.prev,e,e.next)<0?m(e,t,e.next)>=0&&m(e,e.prev,t)>=0:m(e,t,e.prev)<0||m(e,e.next,t)<0}function w(e,t){var r=new A(e.i,e.x,e.y),n=new A(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function k(e,t,r,n){var i=new A(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function T(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function A(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(e,t,r,n){for(var i=0,a=t,o=r-n;a0&&(n+=e[i-1].length,r.holes.push(n))}return r}},6688:function(e,t,r){var n=r(78484);e.exports=function(e,t){var r,i=[],a=[],o=[],s={},l=[];function u(e){o[e]=!1,s.hasOwnProperty(e)&&Object.keys(s[e]).forEach((function(t){delete s[e][t],o[t]&&u(t)}))}function c(e){var t,n,i=!1;for(a.push(e),o[e]=!0,t=0;t=t}))}(t);for(var r,i=n(e).components.filter((function(e){return e.length>1})),a=1/0,o=0;o=55296&&y<=56319&&(w+=e[++r]),w=k?d.call(k,T,w,v):w,t?(h.value=w,p(m,v,h)):m[v]=w,++v;g=v}if(void 0===g)for(g=o(e.length),t&&(m=new t(g)),r=0;r0?1:-1}},96936:function(e,t,r){"use strict";var n=r(85608),i=Math.abs,a=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*a(i(e)):e}},81304:function(e,t,r){"use strict";var n=r(96936),i=Math.max;e.exports=function(e){return i(0,n(e))}},14428:function(e,t,r){"use strict";var n=r(34044),i=r(9252),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(r,u){var c,f=arguments[2],d=arguments[3];return r=Object(i(r)),n(u),c=s(r),d&&c.sort("function"===typeof d?a.call(d,r):void 0),"function"!==typeof e&&(e=c[e]),o.call(e,c,(function(e,n){return l.call(r,e)?o.call(u,f,r[e],e,r,n):t}))}}},38452:function(e,t,r){"use strict";e.exports=r(96276)()?Object.assign:r(81892)},96276:function(e){"use strict";e.exports=function(){var e,t=Object.assign;return"function"===typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},81892:function(e,t,r){"use strict";var n=r(54768),i=r(9252),a=Math.max;e.exports=function(e,t){var r,o,s,l=a(arguments.length,2);for(e=Object(i(e)),s=function(n){try{e[n]=t[n]}catch(i){r||(r=i)}},o=1;o-1}},29768:function(e){"use strict";var t=Object.prototype.toString,r=t.call("");e.exports=function(e){return"string"===typeof e||e&&"object"===typeof e&&(e instanceof String||t.call(e)===r)||!1}},82252:function(e){"use strict";var t=Object.create(null),r=Math.random;e.exports=function(){var e;do{e=r().toString(36).slice(2)}while(t[e]);return e}},52104:function(e,t,r){"use strict";var n,i=r(69932),a=r(71056),o=r(21092),s=r(92664),l=r(85512),u=Object.defineProperty;n=e.exports=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?a.call(t,"key+value")?"key+value":a.call(t,"key")?"key":"value":"value",u(this,"__kind__",o("",t))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),u(n.prototype,s.toStringTag,o("c","Array Iterator"))},76024:function(e,t,r){"use strict";var n=r(60948),i=r(34044),a=r(29768),o=r(76252),s=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;e.exports=function(e,t){var r,c,f,d,h,p,v,m,g=arguments[2];if(s(e)||n(e)?r="array":a(e)?r="string":e=o(e),i(t),f=function(){d=!0},"array"!==r)if("string"!==r)for(c=e.next();!c.done;){if(l.call(t,g,c.value,f),d)return;c=e.next()}else for(p=e.length,h=0;h=55296&&m<=56319&&(v+=e[++h]),l.call(t,g,v,f),!d);++h);else u.call(e,(function(e){return l.call(t,g,e,f),d}))}},76252:function(e,t,r){"use strict";var n=r(60948),i=r(29768),a=r(52104),o=r(80940),s=r(52891),l=r(92664).iterator;e.exports=function(e){return"function"===typeof s(e)[l]?e[l]():n(e)?new a(e):i(e)?new o(e):new a(e)}},85512:function(e,t,r){"use strict";var n,i=r(41476),a=r(38452),o=r(34044),s=r(9252),l=r(21092),u=r(27940),c=r(92664),f=Object.defineProperty,d=Object.defineProperties;e.exports=n=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");d(this,{__list__:l("w",s(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(o(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete n.prototype.constructor,d(n.prototype,a({_next:l((function(){var e;if(this.__list__)return this.__redo__&&void 0!==(e=this.__redo__.shift())?e:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(t,r){t>=e&&(this.__redo__[r]=++t)}),this),this.__redo__.push(e)):f(this,"__redo__",l("c",[e])))})),_onDelete:l((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,r){t>e&&(this.__redo__[r]=--t)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),f(n.prototype,c.iterator,l((function(){return this})))},76368:function(e,t,r){"use strict";var n=r(60948),i=r(42584),a=r(29768),o=r(92664).iterator,s=Array.isArray;e.exports=function(e){return!!i(e)&&(!!s(e)||!!a(e)||!!n(e)||"function"===typeof e[o])}},80940:function(e,t,r){"use strict";var n,i=r(69932),a=r(21092),o=r(92664),s=r(85512),l=Object.defineProperty;n=e.exports=function(e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");e=String(e),s.call(this,e),l(this,"__length__",a("",e.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:a((function(){if(this.__list__)return this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a("c","String Iterator"))},52891:function(e,t,r){"use strict";var n=r(76368);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not iterable");return e}},60964:function(e){"use strict";function t(e,t){if(void 0===e||null===e)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){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 f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"===typeof l)n(l,this,t);else{var u=l.length,c=p(l,u);for(r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},39072:function(e){var t=function(){if("object"===typeof self&&self)return self;if("object"===typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},12296:function(e,t,r){"use strict";e.exports=r(45072)()?globalThis:r(39072)},45072:function(e){"use strict";e.exports=function(){return"object"===typeof globalThis&&!!globalThis&&globalThis.Array===Array}},38248:function(e,t,r){"use strict";var n=r(94576);e.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}},47520:function(e,t,r){var n=r(72512);e.exports=function(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(e)&&e[0]&&"number"===typeof e[0][0]){var i,a,o,s,l=e[0].length,u=e.length*l;t&&"string"!==typeof t||(t=new(n(t||"float32"))(u+r));var c=t.length-r;if(u!==c)throw new Error("source length "+u+" ("+l+"x"+e.length+") does not match destination length "+c);for(i=0,o=r;it[0]-o[0]/2&&(d=o[0]/2,h+=o[1]);return r}},71920:function(e){"use strict";function t(e,a){a||(a={}),("string"===typeof e||Array.isArray(e))&&(a.family=e);var o=Array.isArray(a.family)?a.family.join(", "):a.family;if(!o)throw Error("`family` must be defined");var s=a.size||a.fontSize||a.em||48,l=a.weight||a.fontWeight||"",u=(e=[a.style||a.fontStyle||"",l,s].join(" ")+"px "+o,a.origin||"top");if(t.cache[o]&&s<=t.cache[o].em)return r(t.cache[o],u);var c=a.canvas||t.canvas,f=c.getContext("2d"),d={upper:void 0!==a.upper?a.upper:"H",lower:void 0!==a.lower?a.lower:"x",descent:void 0!==a.descent?a.descent:"p",ascent:void 0!==a.ascent?a.ascent:"h",tittle:void 0!==a.tittle?a.tittle:"i",overshoot:void 0!==a.overshoot?a.overshoot:"O"},h=Math.ceil(1.5*s);c.height=h,c.width=.5*h,f.font=e;var p="H",v={top:0};f.clearRect(0,0,h,h),f.textBaseline="top",f.fillStyle="black",f.fillText(p,0,0);var m=n(f.getImageData(0,0,h,h));f.clearRect(0,0,h,h),f.textBaseline="bottom",f.fillText(p,0,h);var g=n(f.getImageData(0,0,h,h));v.lineHeight=v.bottom=h-g+m,f.clearRect(0,0,h,h),f.textBaseline="alphabetic",f.fillText(p,0,h);var y=h-n(f.getImageData(0,0,h,h))-1+m;v.baseline=v.alphabetic=y,f.clearRect(0,0,h,h),f.textBaseline="middle",f.fillText(p,0,.5*h);var x=n(f.getImageData(0,0,h,h));v.median=v.middle=h-x-1+m-.5*h,f.clearRect(0,0,h,h),f.textBaseline="hanging",f.fillText(p,0,.5*h);var b=n(f.getImageData(0,0,h,h));v.hanging=h-b-1+m-.5*h,f.clearRect(0,0,h,h),f.textBaseline="ideographic",f.fillText(p,0,h);var _=n(f.getImageData(0,0,h,h));if(v.ideographic=h-_-1+m,d.upper&&(f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(d.upper,0,0),v.upper=n(f.getImageData(0,0,h,h)),v.capHeight=v.baseline-v.upper),d.lower&&(f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(d.lower,0,0),v.lower=n(f.getImageData(0,0,h,h)),v.xHeight=v.baseline-v.lower),d.tittle&&(f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(d.tittle,0,0),v.tittle=n(f.getImageData(0,0,h,h))),d.ascent&&(f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(d.ascent,0,0),v.ascent=n(f.getImageData(0,0,h,h))),d.descent&&(f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(d.descent,0,0),v.descent=i(f.getImageData(0,0,h,h))),d.overshoot){f.clearRect(0,0,h,h),f.textBaseline="top",f.fillText(d.overshoot,0,0);var w=i(f.getImageData(0,0,h,h));v.overshoot=w-y}for(var k in v)v[k]/=s;return v.em=s,t.cache[o]=v,r(v,u)}function r(e,t){var r={};for(var n in"string"===typeof t&&(t=e[t]),e)"em"!==n&&(r[n]=e[n]-t);return r}function n(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/t)}e.exports=t,t.canvas=document.createElement("canvas"),t.cache={}},46492:function(e,t,r){"use strict";var n=r(90720),i=Object.prototype.toString,a=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n1&&"boolean"!==typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===M(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=A(e,0,1),r=A(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return T(e,S,(function(e,t,r,i){n[n.length]=r?T(i,E,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",a=C("%"+n+"%",t),s=a.name,u=a.value,c=!1,f=a.alias;f&&(n=f[0],k(r,w([0,1],f)));for(var d=1,h=!0;d=r.length){var y=l(u,p);u=(h=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:u[p]}else h=_(u,p),u=u[p];h&&!c&&(m[s]=u)}}return u}},12408:function(e){e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],m=t[14],g=t[15];return e[0]=s*(d*g-h*m)-f*(l*g-u*m)+v*(l*h-u*d),e[1]=-(n*(d*g-h*m)-f*(i*g-a*m)+v*(i*h-a*d)),e[2]=n*(l*g-u*m)-s*(i*g-a*m)+v*(i*u-a*l),e[3]=-(n*(l*h-u*d)-s*(i*h-a*d)+f*(i*u-a*l)),e[4]=-(o*(d*g-h*m)-c*(l*g-u*m)+p*(l*h-u*d)),e[5]=r*(d*g-h*m)-c*(i*g-a*m)+p*(i*h-a*d),e[6]=-(r*(l*g-u*m)-o*(i*g-a*m)+p*(i*u-a*l)),e[7]=r*(l*h-u*d)-o*(i*h-a*d)+c*(i*u-a*l),e[8]=o*(f*g-h*v)-c*(s*g-u*v)+p*(s*h-u*f),e[9]=-(r*(f*g-h*v)-c*(n*g-a*v)+p*(n*h-a*f)),e[10]=r*(s*g-u*v)-o*(n*g-a*v)+p*(n*u-a*s),e[11]=-(r*(s*h-u*f)-o*(n*h-a*f)+c*(n*u-a*s)),e[12]=-(o*(f*m-d*v)-c*(s*m-l*v)+p*(s*d-l*f)),e[13]=r*(f*m-d*v)-c*(n*m-i*v)+p*(n*d-i*f),e[14]=-(r*(s*m-l*v)-o*(n*m-i*v)+p*(n*l-i*s)),e[15]=r*(s*d-l*f)-o*(n*d-i*f)+c*(n*l-i*s),e}},76860:function(e){e.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}},64492:function(e){e.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}},54212:function(e){e.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}},70800:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],d=e[11],h=e[12],p=e[13],v=e[14],m=e[15];return(t*o-r*a)*(f*m-d*v)-(t*s-n*a)*(c*m-d*p)+(t*l-i*a)*(c*v-f*p)+(r*s-n*o)*(u*m-d*h)-(r*l-i*o)*(u*v-f*h)+(n*l-i*s)*(u*p-c*h)}},61784:function(e){e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,d=i*o,h=i*s,p=i*l,v=a*o,m=a*s,g=a*l;return e[0]=1-f-p,e[1]=c+g,e[2]=d-m,e[3]=0,e[4]=c-g,e[5]=1-u-p,e[6]=h+v,e[7]=0,e[8]=d+m,e[9]=h-v,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},91616:function(e){e.exports=function(e,t,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(o*=u=1/u,s*=u,l*=u,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+l*n,e[2]=l*o*a-s*n,e[3]=0,e[4]=o*s*a-l*n,e[5]=s*s*a+i,e[6]=l*s*a+o*n,e[7]=0,e[8]=o*l*a+s*n,e[9]=s*l*a-o*n,e[10]=l*l*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}},51944:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,d=n*u,h=i*l,p=i*u,v=a*u,m=o*s,g=o*l,y=o*u;return e[0]=1-(h+v),e[1]=f+y,e[2]=d-g,e[3]=0,e[4]=f-y,e[5]=1-(c+v),e[6]=p+m,e[7]=0,e[8]=d+g,e[9]=p-m,e[10]=1-(c+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}},69444:function(e){e.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}},48268:function(e){e.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}},21856:function(e){e.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}},79216:function(e){e.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}},57736:function(e){e.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}},38848:function(e){e.exports=function(e,t,r,n,i,a,o){var s=1/(r-t),l=1/(i-n),u=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}},36635:function(e){e.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}},36524:function(e,t,r){e.exports={create:r(54212),clone:r(76860),copy:r(64492),identity:r(36635),transpose:r(86520),invert:r(4308),adjoint:r(12408),determinant:r(70800),multiply:r(80944),translate:r(35176),scale:r(68152),rotate:r(30016),rotateX:r(15456),rotateY:r(64840),rotateZ:r(4192),fromRotation:r(91616),fromRotationTranslation:r(51944),fromScaling:r(69444),fromTranslation:r(48268),fromXRotation:r(21856),fromYRotation:r(79216),fromZRotation:r(57736),fromQuat:r(61784),frustum:r(38848),perspective:r(51296),perspectiveFromFieldOfView:r(63688),ortho:r(97688),lookAt:r(56508),str:r(89412)}},4308:function(e){e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],m=t[14],g=t[15],y=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,k=i*u-a*l,T=c*v-f*p,A=c*m-d*p,M=c*g-h*p,S=f*m-d*v,E=f*g-h*v,C=d*g-h*m,L=y*C-x*E+b*S+_*M-w*A+k*T;return L?(L=1/L,e[0]=(s*C-l*E+u*S)*L,e[1]=(i*E-n*C-a*S)*L,e[2]=(v*k-m*w+g*_)*L,e[3]=(d*w-f*k-h*_)*L,e[4]=(l*M-o*C-u*A)*L,e[5]=(r*C-i*M+a*A)*L,e[6]=(m*b-p*k-g*x)*L,e[7]=(c*k-d*b+h*x)*L,e[8]=(o*E-s*M+u*T)*L,e[9]=(n*M-r*E-a*T)*L,e[10]=(p*w-v*b+g*y)*L,e[11]=(f*b-c*w-h*y)*L,e[12]=(s*A-o*S-l*T)*L,e[13]=(r*S-n*A+i*T)*L,e[14]=(v*x-p*_-m*y)*L,e[15]=(c*_-f*x+d*y)*L,e):null}},56508:function(e,t,r){var n=r(36635);e.exports=function(e,t,r,i){var a,o,s,l,u,c,f,d,h,p,v=t[0],m=t[1],g=t[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],k=r[2];return Math.abs(v-_)<1e-6&&Math.abs(m-w)<1e-6&&Math.abs(g-k)<1e-6?n(e):(f=v-_,d=m-w,h=g-k,p=1/Math.sqrt(f*f+d*d+h*h),a=x*(h*=p)-b*(d*=p),o=b*(f*=p)-y*h,s=y*d-x*f,(p=Math.sqrt(a*a+o*o+s*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),l=d*s-h*o,u=h*a-f*s,c=f*o-d*a,(p=Math.sqrt(l*l+u*u+c*c))?(l*=p=1/p,u*=p,c*=p):(l=0,u=0,c=0),e[0]=a,e[1]=l,e[2]=f,e[3]=0,e[4]=o,e[5]=u,e[6]=d,e[7]=0,e[8]=s,e[9]=c,e[10]=h,e[11]=0,e[12]=-(a*v+o*m+s*g),e[13]=-(l*v+u*m+c*g),e[14]=-(f*v+d*m+h*g),e[15]=1,e)}},80944:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],d=t[9],h=t[10],p=t[11],v=t[12],m=t[13],g=t[14],y=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*s+_*f+w*v,e[1]=x*i+b*l+_*d+w*m,e[2]=x*a+b*u+_*h+w*g,e[3]=x*o+b*c+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*n+b*s+_*f+w*v,e[5]=x*i+b*l+_*d+w*m,e[6]=x*a+b*u+_*h+w*g,e[7]=x*o+b*c+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*n+b*s+_*f+w*v,e[9]=x*i+b*l+_*d+w*m,e[10]=x*a+b*u+_*h+w*g,e[11]=x*o+b*c+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*n+b*s+_*f+w*v,e[13]=x*i+b*l+_*d+w*m,e[14]=x*a+b*u+_*h+w*g,e[15]=x*o+b*c+_*p+w*y,e}},97688:function(e){e.exports=function(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*u,e[15]=1,e}},51296:function(e){e.exports=function(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}},63688:function(e){e.exports=function(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(o-s)*l*.5,e[9]=(i-a)*u*.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}},30016:function(e){e.exports=function(e,t,r,n){var i,a,o,s,l,u,c,f,d,h,p,v,m,g,y,x,b,_,w,k,T,A,M,S,E=n[0],C=n[1],L=n[2],P=Math.sqrt(E*E+C*C+L*L);return Math.abs(P)<1e-6?null:(E*=P=1/P,C*=P,L*=P,i=Math.sin(r),a=Math.cos(r),o=1-a,s=t[0],l=t[1],u=t[2],c=t[3],f=t[4],d=t[5],h=t[6],p=t[7],v=t[8],m=t[9],g=t[10],y=t[11],x=E*E*o+a,b=C*E*o+L*i,_=L*E*o-C*i,w=E*C*o-L*i,k=C*C*o+a,T=L*C*o+E*i,A=E*L*o+C*i,M=C*L*o-E*i,S=L*L*o+a,e[0]=s*x+f*b+v*_,e[1]=l*x+d*b+m*_,e[2]=u*x+h*b+g*_,e[3]=c*x+p*b+y*_,e[4]=s*w+f*k+v*T,e[5]=l*w+d*k+m*T,e[6]=u*w+h*k+g*T,e[7]=c*w+p*k+y*T,e[8]=s*A+f*M+v*S,e[9]=l*A+d*M+m*S,e[10]=u*A+h*M+g*S,e[11]=c*A+p*M+y*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}},15456:function(e){e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],d=t[11];return 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]),e[4]=a*i+u*n,e[5]=o*i+c*n,e[6]=s*i+f*n,e[7]=l*i+d*n,e[8]=u*i-a*n,e[9]=c*i-o*n,e[10]=f*i-s*n,e[11]=d*i-l*n,e}},64840:function(e){e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],d=t[11];return 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]),e[0]=a*i-u*n,e[1]=o*i-c*n,e[2]=s*i-f*n,e[3]=l*i-d*n,e[8]=a*n+u*i,e[9]=o*n+c*i,e[10]=s*n+f*i,e[11]=l*n+d*i,e}},4192:function(e){e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],d=t[7];return 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]),e[0]=a*i+u*n,e[1]=o*i+c*n,e[2]=s*i+f*n,e[3]=l*i+d*n,e[4]=u*i-a*n,e[5]=c*i-o*n,e[6]=f*i-s*n,e[7]=d*i-l*n,e}},68152:function(e){e.exports=function(e,t,r){var n=r[0],i=r[1],a=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]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},89412:function(e){e.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]+")"}},35176:function(e){e.exports=function(e,t,r){var n,i,a,o,s,l,u,c,f,d,h,p,v=r[0],m=r[1],g=r[2];return t===e?(e[12]=t[0]*v+t[4]*m+t[8]*g+t[12],e[13]=t[1]*v+t[5]*m+t[9]*g+t[13],e[14]=t[2]*v+t[6]*m+t[10]*g+t[14],e[15]=t[3]*v+t[7]*m+t[11]*g+t[15]):(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],d=t[9],h=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=f,e[9]=d,e[10]=h,e[11]=p,e[12]=n*v+s*m+f*g+t[12],e[13]=i*v+l*m+d*g+t[13],e[14]=a*v+u*m+h*g+t[14],e[15]=o*v+c*m+p*g+t[15]),e}},86520:function(e){e.exports=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=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]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}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}},23352:function(e,t,r){"use strict";var n=r(42771),i=r(55616),a=r(28624),o=r(55212),s=r(60463),l=r(72160),u=r(33888),c=r(14144),f=r(51160),d=r(58908),h=r(65819),p=r(23464),v=r(63768),m=r(50896),g=r(71920),y=r(47520),x=r(308).nextPow2,b=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(_=!0),document.body.removeChild(w)}var k=function(e){!function(e){return"function"===typeof e&&e._gl&&e.prop&&e.texture&&e.buffer}(e)?this.gl=o(e):(e={regl:e},this.gl=e.regl._gl),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||a({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(d(e)?e:{})};k.prototype.createShader=function(){var e=this.regl,t=e({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.this("viewport"),vert:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:e,draw:t,atlas:{}}},k.prototype.update=function(e){var t=this;if("string"===typeof e)e={text:e};else if(!e)return;null!=(e=i(e,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(e.opacity)?this.opacity=e.opacity.map((function(e){return parseFloat(e)})):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=f(e.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"===typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||e.font||(e.font=k.baseFontSize+"px sans-serif");var r,a=!1,o=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach((function(e,r){if("string"===typeof e)try{e=n.parse(e)}catch(y){e=n.parse(k.baseFontSize+"px "+e)}else{var i=e.style,s=e.weight,l=e.stretch,u=e.variant;e=n.parse(n.stringify(e)),i&&(e.style=i),s&&(e.weight=s),l&&(e.stretch=l),u&&(e.variant=u)}var c=n.stringify({size:k.baseFontSize,family:e.family,stretch:_?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),f=h(e.size),d=Math.round(f[0]*p(f[1]));if(d!==t.fontSize[r]&&(o=!0,t.fontSize[r]=d),(!t.font[r]||c!=t.font[r].baseString)&&(a=!0,t.font[r]=k.fonts[c],!t.font[r])){var v=e.family.join(", "),m=[e.style];e.style!=e.variant&&m.push(e.variant),e.variant!=e.weight&&m.push(e.weight),_&&e.weight!=e.stretch&&m.push(e.stretch),t.font[r]={baseString:c,family:v,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:g(v,{origin:"top",fontSize:k.baseFontSize,fontStyle:m.join(" ")})},k.fonts[c]=t.font[r]}})),(a||o)&&this.font.forEach((function(r,i){var a=n.stringify({size:t.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(t.fontAtlas[i]=t.shader.atlas[a],!t.fontAtlas[i]){var o=r.metrics;t.shader.atlas[a]=t.fontAtlas[i]={fontString:a,step:2*Math.ceil(t.fontSize[i]*o.bottom*.5),em:t.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:t.regl.texture()}}null==e.text&&(e.text=t.text)})),"string"===typeof e.text&&e.position&&e.position.length>2){for(var s=Array(.5*e.position.length),d=0;d2){for(var w=!e.position[0].length,T=c.mallocFloat(2*this.count),A=0,M=0;A1?t.align[r]:t.align[0]:t.align;if("number"===typeof n)return n;switch(n){case"right":case"end":return-e;case"center":case"centre":case"middle":return.5*-e}return 0}))),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(e,r){var n=(t.font[r]||t.font[0]).metrics,i=0;return i+=.5*n.bottom,i+="number"===typeof e?e-n.baseline:-n[e],i*=-1}))),null!=e.color)if(e.color||(e.color="transparent"),"string"!==typeof e.color&&isNaN(e.color)){var H;if("number"===typeof e.color[0]&&e.color.length>this.counts.length){var G=e.color.length;H=c.mallocUint8(G);for(var W=(e.color.subarray||e.color.slice).bind(e.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var K=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(K);for(var J=0;J1?this.counts[J]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[J]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[J]:this.opacity,baseline:null!=this.baselineOffset[J]?this.baselineOffset[J]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[J]?this.alignOffset[J]:this.alignOffset[0]:0,atlas:this.fontAtlas[J]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*J,2*J+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={},e.exports=k},55212:function(e,t,r){"use strict";var n=r(55616);function i(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*r.g.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*r.g.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function a(e){return"function"===typeof e.getContext&&"width"in e&&"height"in e}function o(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}e.exports=function(e){var t;if(e?"string"===typeof e&&(e={container:e}):e={},(e=a(e)||"string"===typeof(t=e).nodeName&&"function"===typeof t.appendChild&&"function"===typeof t.getBoundingClientRect?{container:e}:function(e){return"function"===typeof e.drawArrays||"function"===typeof e.drawElements}(e)?{gl:e}:n(e,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(e.pixelRatio=r.g.pixelRatio||1),e.gl)return e.gl;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"===typeof e.container){var s=document.querySelector(e.container);if(!s)throw Error("Element "+e.container+" is not found");e.container=s}a(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=o(),e.container.appendChild(e.canvas),i(e))}else if(!e.canvas){if("undefined"===typeof document)throw Error("Not DOM environment. Use headless-gl.");e.container=document.body||document.documentElement,e.canvas=o(),e.container.appendChild(e.canvas),i(e)}return e.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(r){try{e.gl=e.canvas.getContext(r,e.attrs)}catch(t){}return e.gl})),e.gl}},26444:function(e){e.exports=function(e){"string"===typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n>1,c=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=d,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=d,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),a-=u}return(h?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(o=o<0;e[r+h]=255&o,h+=p,o/=256,u-=8);e[r+h-p]|=128*v}},6768:function(e){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},91148:function(e,t,r){"use strict";var n=r(46672)(),i=r(99676)("Object.prototype.toString"),a=function(e){return!(n&&e&&"object"===typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},o=function(e){return!!a(e)||null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},s=function(){return a(arguments)}();a.isLegacyArguments=o,e.exports=s?a:o},24200:function(e){e.exports=!0},90720:function(e){"use strict";var t,r,n=Function.prototype.toString,i="object"===typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"===typeof i&&"function"===typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,t)}catch(h){h!==r&&(i=null)}else i=null;var a=/^\s*class\b/,o=function(e){try{var t=n.call(e);return a.test(t)}catch(r){return!1}},s=function(e){try{return!o(e)&&(n.call(e),!0)}catch(t){return!1}},l=Object.prototype.toString,u="function"===typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),f=function(){return!1};if("object"===typeof document){var d=document.all;l.call(d)===l.call(document.all)&&(f=function(e){if((c||!e)&&("undefined"===typeof e||"object"===typeof e))try{var t=l.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(r){}return!1})}e.exports=i?function(e){if(f(e))return!0;if(!e)return!1;if("function"!==typeof e&&"object"!==typeof e)return!1;try{i(e,null,t)}catch(n){if(n!==r)return!1}return!o(e)&&s(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!==typeof e&&"object"!==typeof e)return!1;if(u)return s(e);if(o(e))return!1;var t=l.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},84420:function(e,t,r){"use strict";var n,i=Object.prototype.toString,a=Function.prototype.toString,o=/^\s*(?:function)?\*/,s=r(46672)(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!==typeof e)return!1;if(o.test(a.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!l)return!1;if("undefined"===typeof n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&l(t)}return l(e)===n}},96604:function(e){"use strict";e.exports="undefined"!==typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},85992:function(e){"use strict";e.exports=function(e){return e!==e}},1560:function(e,t,r){"use strict";var n=r(57916),i=r(81288),a=r(85992),o=r(57740),s=r(59736),l=n(o(),Number);i(l,{getPolyfill:o,implementation:a,shim:s}),e.exports=l},57740:function(e,t,r){"use strict";var n=r(85992);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},59736:function(e,t,r){"use strict";var n=r(81288),i=r(57740);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},18400:function(e){"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},58908:function(e){"use strict";var t=Object.prototype.toString;e.exports=function(e){var r;return"[object Object]"===t.call(e)&&(null===(r=Object.getPrototypeOf(e))||r===Object.getPrototypeOf({}))}},94576:function(e){"use strict";e.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}},53520:function(e){"use strict";e.exports=function(e){return"string"===typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},7728:function(e,t,r){"use strict";var n=r(46492),i=r(63436),a=r(99676),o=a("Object.prototype.toString"),s=r(46672)(),l=r(2304),u="undefined"===typeof globalThis?r.g:globalThis,c=i(),f=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1}return!!l&&function(e){var t=!1;return n(h,(function(r,n){if(!t)try{t=r.call(e)===n}catch(i){}})),t}(e)}},76244:function(e){"use strict";e.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}},62644:function(e,t,r){"use strict";e.exports=function(e,t){t||(t=e,e=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function u(e,s){var u=n.x(s),c=n.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||u!==i||c!==a||l(s))&&(r=0|e,i=u||0,a=c||0,t&&t(r,i,a,o))}function c(e){u(0,e)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,t&&t(0,0,0,o))}function d(e){l(e)&&t&&t(r,i,a,o)}function h(e){0===n.buttons(e)?u(0,e):u(r,e)}function p(e){u(r|n.buttons(e),e)}function v(e){u(r&~n.buttons(e),e)}function m(){s||(s=!0,e.addEventListener("mousemove",h),e.addEventListener("mousedown",p),e.addEventListener("mouseup",v),e.addEventListener("mouseleave",c),e.addEventListener("mouseenter",c),e.addEventListener("mouseout",c),e.addEventListener("mouseover",c),e.addEventListener("blur",f),e.addEventListener("keyup",d),e.addEventListener("keydown",d),e.addEventListener("keypress",d),e!==window&&(window.addEventListener("blur",f),window.addEventListener("keyup",d),window.addEventListener("keydown",d),window.addEventListener("keypress",d)))}m();var g={element:e};return Object.defineProperties(g,{enabled:{get:function(){return s},set:function(t){t?m():s&&(s=!1,e.removeEventListener("mousemove",h),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",v),e.removeEventListener("mouseleave",c),e.removeEventListener("mouseenter",c),e.removeEventListener("mouseout",c),e.removeEventListener("mouseover",c),e.removeEventListener("blur",f),e.removeEventListener("keyup",d),e.removeEventListener("keydown",d),e.removeEventListener("keypress",d),e!==window&&(window.removeEventListener("blur",f),window.removeEventListener("keyup",d),window.removeEventListener("keydown",d),window.removeEventListener("keypress",d)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),g};var n=r(93784)},29128:function(e){var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i,a=e.clientX||0,o=e.clientY||0,s=(i=r)===window||i===document||i===document.body?t:i.getBoundingClientRect();return n[0]=a-s.left,n[1]=o-s.top,n}},93784:function(e,t){"use strict";function r(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"===typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1<0&&a(s,r))}catch(m){c.call(new d(r),m)}}}function c(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(s,t))}function f(e,t,r,n){for(var i=0;i1&&(i*=g=Math.sqrt(g),s*=g);var y=i*i,x=s*s,b=(u==c?-1:1)*Math.sqrt(Math.abs((y*x-y*m*m-x*v*v)/(y*m*m+x*v*v)));b==1/0&&(b=1);var _=b*i*m/s+(e+f)/2,w=b*-s*v/i+(n+d)/2,k=Math.asin(((n-w)/s).toFixed(9)),T=Math.asin(((d-w)/s).toFixed(9));(k=e<_?t-k:k)<0&&(k=2*t+k),(T=f<_?t-T:T)<0&&(T=2*t+T),c&&k>T&&(k-=2*t),!c&&T>k&&(T-=2*t)}if(Math.abs(T-k)>r){var A=T,M=f,S=d;T=k+r*(c&&T>k?1:-1);var E=a(f=_+i*Math.cos(T),d=w+s*Math.sin(T),i,s,l,0,c,M,S,[T,A,_,w])}var C=Math.tan((T-k)/4),L=4/3*i*C,P=4/3*s*C,O=[2*e-(e+L*Math.sin(k)),2*n-(n-P*Math.cos(k)),f+L*Math.sin(T),d-P*Math.cos(T),f,d];if(h)return O;E&&(O=O.concat(E));for(var I=0;I7&&(r.push(g.splice(0,7)),g.unshift("C"));break;case"S":var x=h,b=p;"C"!=t&&"S"!=t||(x+=x-o,b+=b-l),g=["C",x,b,g[1],g[2],g[3],g[4]];break;case"T":"Q"==t||"T"==t?(f=2*h-f,d=2*p-d):(f=h,d=p),g=i(h,p,f,d,g[1],g[2]);break;case"Q":f=g[1],d=g[2],g=i(h,p,g[1],g[2],g[3],g[4]);break;case"L":g=n(h,p,g[1],g[2]);break;case"H":g=n(h,p,g[1],p);break;case"V":g=n(h,p,h,g[1]);break;case"Z":g=n(h,p,u,c)}t=y,h=g[g.length-2],p=g[g.length-1],g.length>4?(o=g[g.length-4],l=g[g.length-3]):(o=h,l=p),r.push(g)}return r}},50896:function(e){"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(i){return!1}}()?Object.assign:function(e,i){for(var a,o,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l0&&!i.call(e,0))for(var v=0;v0)for(var m=0;m=0&&"[object Function]"===t.call(e.callee)),n}},32868:function(e){"use strict";function t(e,t){if("string"!==typeof e)return[e];var r=[e];"string"===typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",a=!!t.flat;n.forEach((function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),n=[];function a(t,a,o){var s=r.push(t.slice(e[0].length,-e[1].length))-1;return n.push(s),i+s+i}r.forEach((function(e,n){for(var i,o=0;e!=i;)if(i=e,e=e.replace(t,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=e})),n=n.reverse(),r=r.map((function(t){return n.forEach((function(r){t=t.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),e[0]+"$1"+e[1])})),t}))}));var o=new RegExp("\\"+i+"([0-9]+)\\"+i);return a?r:function e(t,r,n){for(var i,a=[],s=0;i=o.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(t.slice(0,i.index)),a.push(e(r[i[1]],r)),t=t.slice(i.index+i[0].length)}return a.push(t),a}(r[0],r)}function r(e,t){if(t&&t.flat){var r,n=t&&t.escape||"___",i=e[0];if(!i)return"";for(var a=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;i!=r;){if(o++>1e4)throw Error("Circular references in "+e);r=i,i=i.replace(a,s)}return i}return e.reduce((function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r}),"");function s(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function n(e,n){return Array.isArray(e)?r(e,n):t(e,n)}n.parse=t,n.stringify=r,e.exports=n},51160:function(e,t,r){"use strict";var n=r(55616);e.exports=function(e){var t;return arguments.length>1&&(e=arguments),"string"===typeof e?e=e.split(/\s/).map(parseFloat):"number"===typeof e&&(e=[e]),e.length&&"number"===typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(t={x:(e=n(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}},21984:function(e){e.exports=function(e){var i=[];return e.replace(r,(function(e,r,a){var o=r.toLowerCase();for(a=function(e){var t=e.match(n);return t?t.map(Number):[]}(a),"m"==o&&a.length>2&&(i.push([r].concat(a.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(a.length==t[o])return a.unshift(r),i.push(a);if(a.lengtha!==h>a&&i<(d-c)*(a-f)/(h-f)+c&&(o=!o)}return o}},14756:function(e,t,r){var n,i=r(7688),a=r(28648),o=r(72200),s=r(11403),l=r(82368),u=r(17792),c=!1,f=a();function d(e,t,r){var i=n.segments(e),a=n.segments(t),o=r(n.combine(i,a));return n.polygon(o)}n={buildLog:function(e){return!0===e?c=i():!1===e&&(c=!1),!1!==c&&c.list},epsilon:function(e){return f.epsilon(e)},segments:function(e){var t=o(!0,f,c);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:o(!1,f,c).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:l.union(e.combined,c),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:l.intersect(e.combined,c),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:l.difference(e.combined,c),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:l.differenceRev(e.combined,c),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:l.xor(e.combined,c),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:s(e.segments,f,c),inverted:e.inverted}},polygonFromGeoJSON:function(e){return u.toPolygon(n,e)},polygonToGeoJSON:function(e){return u.fromPolygon(n,f,e)},union:function(e,t){return d(e,t,n.selectUnion)},intersect:function(e,t){return d(e,t,n.selectIntersect)},difference:function(e,t){return d(e,t,n.selectDifference)},differenceRev:function(e,t){return d(e,t,n.selectDifferenceRev)},xor:function(e,t){return d(e,t,n.selectXor)}},"object"===typeof window&&(window.PolyBool=n),e.exports=n},7688:function(e){e.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!==typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}},28648:function(e){e.exports=function(e){"number"!==typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"===typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=t[0];return(o-i)*(t[1]-a)-(s-a)*(l-i)>=-e},pointBetween:function(t,r,n){var i=t[1]-r[1],a=n[0]-r[0],o=t[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-i>e&&(a-u)*(i-c)/(o-c)+u-n>e&&(s=!s),a=u,o=c}return s}};return t}},17792:function(e){var t={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]),i=1;i0}))}function c(e,n){var i=e.seg,a=n.seg,o=i.start,s=i.end,u=a.start,c=a.end;r&&r.checkIntersection(i,a);var f=t.linesIntersect(o,s,u,c);if(!1===f){if(!t.pointsCollinear(o,s,u))return!1;if(t.pointsSame(o,c)||t.pointsSame(s,u))return!1;var d=t.pointsSame(o,u),h=t.pointsSame(s,c);if(d&&h)return n;var p=!d&&t.pointBetween(o,u,c),v=!h&&t.pointBetween(s,u,c);if(d)return v?l(n,s):l(e,c),n;p&&(h||(v?l(n,s):l(e,c)),l(n,o))}else 0===f.alongA&&(-1===f.alongB?l(e,u):0===f.alongB?l(e,f.pt):1===f.alongB&&l(e,c)),0===f.alongB&&(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&&l(n,s));return!1}for(var f=[];!a.isEmpty();){var d=a.getHead();if(r&&r.vert(d.pt[0]),d.isStart){r&&r.segmentNew(d.seg,d.primary);var h=u(d),p=h.before?h.before.ev:null,v=h.after?h.after.ev:null;function m(){if(p){var e=c(d,p);if(e)return e}return!!v&&c(d,v)}r&&r.tempStatus(d.seg,!!p&&p.seg,!!v&&v.seg);var g,y,x=m();if(x)e?(y=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=d.seg.myFill,r&&r.segmentUpdate(x.seg),d.other.remove(),d.remove();if(a.getHead()!==d){r&&r.rewind(d.seg);continue}e?(y=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below,d.seg.myFill.below=v?v.seg.myFill.above:i,d.seg.myFill.above=y?!d.seg.myFill.below:d.seg.myFill.below):null===d.seg.otherFill&&(g=v?d.primary===v.primary?v.seg.otherFill.above:v.seg.myFill.above:d.primary?o:i,d.seg.otherFill={above:g,below:g}),r&&r.status(d.seg,!!p&&p.seg,!!v&&v.seg),d.other.status=h.insert(n.node({ev:d}))}else{var b=d.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(b.prev)&&s.exists(b.next)&&c(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!d.primary){var _=d.seg.myFill;d.seg.myFill=d.seg.otherFill,d.seg.otherFill=_}f.push(d.seg)}a.getHead().remove()}return r&&r.done(),f}return e?{addRegion:function(e){for(var n,i,a,o=e[e.length-1],l=0;l0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}},n.prototype.read_uint16=function(e){var r=this.input;if(e+2>r.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?256*r[e]+r[e+1]:r[e]+256*r[e+1]},n.prototype.read_uint32=function(e){var r=this.input;if(e+4>r.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?16777216*r[e]+65536*r[e+1]+256*r[e+2]+r[e+3]:r[e]+256*r[e+1]+65536*r[e+2]+16777216*r[e+3]},n.prototype.is_subifd_link=function(e,t){return 0===e&&34665===t||0===e&&34853===t||34665===e&&40965===t},n.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},n.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t];case 6:return(r=this.input[t])|33554430*(128&r);case 3:return r=this.read_uint16(t);case 8:return(r=this.read_uint16(t))|131070*(32768&r);case 4:return r=this.read_uint32(t);case 9:return 0|(r=this.read_uint32(t));default:return null}},n.prototype.scan_ifd=function(e,n,i){var a=this.read_uint16(n);n+=2;for(var o=0;othis.input.length)throw t("unexpected EOF","EBADDATA");for(var p=[],v=d,m=0;m0&&(this.ifds_to_read.push({id:s,offset:p[0]}),h=!0),!1===i({is_big_endian:this.big_endian,ifd:e,tag:s,format:l,count:u,entry_offset:n+this.start,data_length:f,data_offset:d+this.start,value:p,is_subifd_link:h}))return void(this.aborted=!0);n+=12}0===e&&this.ifds_to_read.push({id:1,offset:this.read_uint32(n)})},e.exports.ExifParser=n,e.exports.get_orientation=function(e){var t=0;try{return new n(e,0,e.length).each((function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t=e.value[0],!1})),t}catch(r){return-1}}},44600:function(e,t,r){"use strict";var n=r(9696).eW,i=r(9696).eI;function a(e,t){if(e.length<4+t)return null;var r=i(e,t);return e.length>4&15,i=15&e[4],a=e[5]>>4&15,o=n(e,6),l=8,u=0;ut.width||e.width===t.width&&e.height>t.height?e:t})),r=e.reduce((function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t}));return t.width>r.height||t.width===r.height&&t.height>r.width?t:r}(t.sizes),n=1;t.transforms.forEach((function(e){var t={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===e.type&&(n=0===e.value?r[n]:t[n=t[n=r[n]]]),"irot"===e.type)for(var i=0;i1&&(d.variants=f.variants),f.orientation&&(d.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=e.length){var h=a(e,f.exif_location.offset),p=e.slice(f.exif_location.offset+h+4,f.exif_location.offset+f.exif_location.length),v=s.get_orientation(p);v>0&&(d.orientation=v)}return d}}}}}}},38728:function(e,t,r){"use strict";var n=r(9696).wR,i=r(9696).gS,a=r(9696).Bz,o=n("BM");e.exports=function(e){if(!(e.length<26)&&i(e,0,o))return{width:a(e,18),height:a(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},5588:function(e,t,r){"use strict";var n=r(9696).wR,i=r(9696).gS,a=r(9696).Bz,o=n("GIF87a"),s=n("GIF89a");e.exports=function(e){if(!(e.length<10)&&(i(e,0,o)||i(e,0,s)))return{width:a(e,6),height:a(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},41924:function(e,t,r){"use strict";var n=r(9696).Bz;e.exports=function(e){var t=n(e,0),r=n(e,2),i=n(e,4);if(0===t&&1===r&&i){for(var a=[],o={width:0,height:0},s=0;so.width||u>o.height)&&(o=c)}return{width:o.width,height:o.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},87968:function(e,t,r){"use strict";var n=r(9696).eW,i=r(9696).wR,a=r(9696).gS,o=r(11688),s=i("Exif\0\0");e.exports=function(e){if(!(e.length<2)&&255===e[0]&&216===e[1]&&255===e[2])for(var t=2;;){for(;;){if(e.length-t<2)return;if(255===e[t++])break}for(var r,i,l=e[t++];255===l;)l=e[t++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(e.length-t<2)return;r=n(e,t)-2,t+=2}if(217===l||218===l)return;if(225===l&&r>=10&&a(e,t,s)&&(i=o.get_orientation(e.slice(t+6,t+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(e.length-t0&&(u.orientation=i),u}t+=r}}},37276:function(e,t,r){"use strict";var n=r(9696).wR,i=r(9696).gS,a=r(9696).eI,o=n("\x89PNG\r\n\x1a\n"),s=n("IHDR");e.exports=function(e){if(!(e.length<24)&&i(e,0,o)&&i(e,12,s))return{width:a(e,16),height:a(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},90328:function(e,t,r){"use strict";var n=r(9696).wR,i=r(9696).gS,a=r(9696).eI,o=n("8BPS\0\x01");e.exports=function(e){if(!(e.length<22)&&i(e,0,o))return{width:a(e,18),height:a(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},16024:function(e){"use strict";function t(e){return"number"===typeof e&&isFinite(e)&&e>0}var r=/<[-_.:a-zA-Z0-9][^>]*>/,n=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,i=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,a=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,o=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,s=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function l(e){return s.test(e)?e.match(s)[0]:"px"}e.exports=function(e){if(function(e){var t,r=0,n=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(r=3);r>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function d(e,t){return{width:1+(e[t+6]<<16|e[t+5]<<8|e[t+4]),height:1+(e[t+9]<e.length)){for(;t+8=10?r=r||c(e,t+8):"VP8L"===h&&p>=9?r=r||f(e,t+8):"VP8X"===h&&p>=10?r=r||d(e,t+8):"EXIF"===h&&(n=s.get_orientation(e.slice(t+8,t+8+p)),t=1/0),t+=8+p}else t++;if(r)return n>0&&(r.orientation=n),r}}}},87480:function(e,t,r){"use strict";e.exports={avif:r(40528),bmp:r(38728),gif:r(5588),ico:r(41924),jpeg:r(87968),png:r(37276),psd:r(90328),svg:r(16024),tiff:r(98792),webp:r(20704)}},19480:function(e,t,r){"use strict";var n=r(87480);e.exports=function(e){return function(e){for(var t=Object.keys(n),r=0;r1)for(var r=1;r1&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],r(e),e.after&&e.after(e))}function k(e){if(e){null!=e.length?"number"===typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var t=0,r=0;if(b.groups=x=e.map((function(e,u){var c=x[u];return e?("function"===typeof e?e={after:e}:"number"===typeof e[0]&&(e={positions:e}),e=o(e,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),c||(x[u]=c={id:u,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},e=s({},y,e)),a(c,e,[{lineWidth:function(e){return.5*+e},capSize:function(e){return.5*+e},opacity:parseFloat,errors:function(e){return e=l(e),r+=e.length,e},positions:function(e,r){return e=l(e,"float64"),r.count=Math.floor(e.length/2),r.bounds=n(e,2),r.offset=t,t+=r.count,e}},{color:function(e,t){var r=t.count;if(e||(e="transparent"),!Array.isArray(e)||"number"===typeof e[0]){var n=e;e=Array(r);for(var a=0;a 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(o){t=i}return{fill:e({primitive:"triangle",elements:function(e,t){return t.triangles},offset:0,vert:"\nprecision highp float;\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n",frag:"\nprecision highp float;\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n",uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:function(e,t){return[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]}},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:t}},m.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},m.prototype.render=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];t.length&&(e=this).update.apply(e,t),this.draw()},m.prototype.draw=function(){for(var e=this,t=[],r=arguments.length;r--;)t[r]=arguments[r];return(t.length?t:this.passes).forEach((function(t,r){var n;if(t&&Array.isArray(t))return(n=e).draw.apply(n,t);"number"===typeof t&&(t=e.passes[t]),t&&t.count>1&&t.opacity&&(e.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&e.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>m.precisionThreshold||t.scale[1]*t.viewport.height>m.precisionThreshold||"rect"===t.join||!t.join&&(t.thickness<=2||t.count>=m.maxPoints)?e.shaders.rect(t):e.shaders.miter(t)))})),this},m.prototype.update=function(e){var t=this;if(e){null!=e.length?"number"===typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var r=this.regl,c=this.gl;if(e.forEach((function(e,h){var g=t.passes[h];if(void 0!==e)if(null!==e){if("number"===typeof e[0]&&(e={positions:e}),e=o(e,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),g||(t.passes[h]=g={id:h,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},e=a({},m.defaults,e)),null!=e.thickness&&(g.thickness=parseFloat(e.thickness)),null!=e.opacity&&(g.opacity=parseFloat(e.opacity)),null!=e.miterLimit&&(g.miterLimit=parseFloat(e.miterLimit)),null!=e.overlay&&(g.overlay=!!e.overlay,h=D}));(O=O.slice(0,z)).push(D)}for(var F=function(e){var t=T.slice(2*R,2*O[e]).concat(D?T.slice(2*D):[]),r=(g.hole||[]).map((function(t){return t-D+(O[e]-R)})),n=l(t,r);n=n.map((function(t){return t+R+(t+Re.length)&&(t=e.length);for(var r=0,n=new Array(t);r 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),u.vert=d(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),m&&(u.frag=u.frag.replace("smoothstep","smoothStep"),l.frag=l.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(u)}b.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;nn)?t.tree=c(e,{bounds:f}):n&&n.length&&(t.tree=n),t.tree){var d={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(d):t.elements=o.elements(d)}var h=g.float32(e);return i({data:h,usage:"dynamic"}),a({data:g.fract32(e,h),usage:"dynamic"}),s({data:new Uint8Array(u),type:"uint8",usage:"stream"}),e}},{marker:function(t,r,n){var i=r.activation;if(i.forEach((function(e){return e&&e.destroy&&e.destroy()})),i.length=0,t&&"number"!==typeof t[0]){for(var a=[],s=0,l=Math.min(t.length,r.count);s=0)return a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)t=e;else{t=new Uint8Array(e.length);for(var o=0,s=e.length;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},b.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*e.length/t);if(n>1)for(var i=.25*(e=e.slice()).length%t;i2?(s[0],s[2],n=s[1],i=s[3]):s.length?(n=s[0],i=s[1]):(s.x,n=s.y,s.x,s.width,i=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y,l.height),[a,n,o,i]}function h(e){if("number"===typeof e)return[e,e,e,e];if(2===e.length)return[e[0],e[1],e[0],e[1]];var t=l(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}e.exports=c,c.prototype.render=function(){for(var e,t=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&&(e=this).update.apply(e,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o((function(){t.draw(),t.dirty=!0,t.planned=null}))):(this.draw(),this.dirty=!0,o((function(){t.dirty=!1}))),this)},c.prototype.update=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];if(t.length){for(var n=0;nT))&&(s.lower||!(k>>=t))<<3,(t|=r=(15<(e>>>=r))<<2)|(r=(3<(e>>>=r))<<1)|e>>>r>>1}function h(){function e(e){e:{for(var t=16;268435456>=t;t*=16)if(e<=t){e=t;break e}e=0}return 0<(t=r[d(e)>>2]).length?t.pop():new ArrayBuffer(e)}function t(e){r[d(e.byteLength)>>2].push(e)}var r=f(8,(function(){return[]}));return{alloc:e,free:t,allocType:function(t,r){var n=null;switch(t){case 5120:n=new Int8Array(e(r),0,r);break;case 5121:n=new Uint8Array(e(r),0,r);break;case 5122:n=new Int16Array(e(2*r),0,r);break;case 5123:n=new Uint16Array(e(2*r),0,r);break;case 5124:n=new Int32Array(e(4*r),0,r);break;case 5125:n=new Uint32Array(e(4*r),0,r);break;case 5126:n=new Float32Array(e(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(e){t(e.buffer)}}}function p(e){return!!e&&"object"===typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"===typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||oe(e.data))}function v(e,t,r,n,i,a){for(var o=0;o(i=s)&&(i=n.buffer.byteLength,5123===c?i>>=1:5125===c&&(i>>=2)),n.vertCount=i,i=o,0>o&&(i=4,1===(o=n.buffer.dimension)&&(i=0),2===o&&(i=1),3===o&&(i=4)),n.primType=i}function o(e){n.elementsCount--,delete s[e.id],e.buffer.destroy(),e.buffer=null}var s={},l=0,u={uint8:5121,uint16:5123};t.oes_element_index_uint&&(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var c=[];return{create:function(e,t){function s(e){if(e)if("number"===typeof e)l(e),c.primType=4,c.vertCount=0|e,c.type=5121;else{var t=null,r=35044,n=-1,i=-1,o=0,f=0;Array.isArray(e)||oe(e)||p(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=fe[e.usage]),"primitive"in e&&(n=ve[e.primitive]),"count"in e&&(i=0|e.count),"type"in e&&(f=u[e.type]),"length"in e?o=0|e.length:(o=i,5123===f||5122===f?o*=2:5125!==f&&5124!==f||(o*=4))),a(c,t,r,n,i,o,f)}else l(),c.primType=4,c.vertCount=0,c.type=5121;return s}var l=r.create(null,34963,!0),c=new i(l._buffer);return n.elementsCount++,s(e),s._reglType="elements",s._elements=c,s.subdata=function(e,t){return l.subdata(e,t),s},s.destroy=function(){o(c)},s},createStream:function(e){var t=c.pop();return t||(t=new i(r.create(null,34963,!0,!1)._buffer)),a(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){c.push(e)},getElements:function(e){return"function"===typeof e&&e._elements instanceof i?e._elements:null},clear:function(){se(s).forEach(o)}}}function w(e){for(var t=ie.allocType(5123,e.length),r=0;r>>31<<15,i=(a<<1>>>24)-127,a=a>>13&1023;t[r]=-24>i?n:-14>i?n+(a+1024>>-14-i):15>=i,r.height>>=i,d(r,n[i]),e.mipmask|=1<t;++t)e.images[t]=null;return e}function T(e){for(var t=e.images,r=0;rt){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(a.getTotalTextureSize=function(){var e=0;return Object.keys(ae).forEach((function(t){e+=ae[t].stats.size})),e}),{create2D:function(t,r){function n(e,t){var r=i.texInfo;P.call(r);var a=_();return"number"===typeof e?y(a,0|e,"number"===typeof t?0|t:0|e):e?(O(r,e),x(a,e)):y(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,l(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,D(i),b(a,3553),I(r,3553),z(),T(a),o.profile&&(i.stats.size=L(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=Z[i.internalformat],n.type=X[i.type],n.mag=K[r.magFilter],n.min=J[r.minFilter],n.wrapS=$[r.wrapS],n.wrapT=$[r.wrapT],n}var i=new R(3553);return ae[i.id]=i,a.textureCount++,n(t,r),n.subimage=function(e,t,r,a){t|=0,r|=0,a|=0;var o=v();return l(o,i),o.width=0,o.height=0,d(o,e),o.width=o.width||(i.width>>a)-t,o.height=o.height||(i.height>>a)-r,D(i),h(o,3553,t,r,a),z(),m(o),n},n.resize=function(t,r){var a=0|t,s=0|r||a;if(a===i.width&&s===i.height)return n;n.width=i.width=a,n.height=i.height=s,D(i);for(var l=0;i.mipmask>>l;++l){var u=a>>l,c=s>>l;if(!u||!c)break;e.texImage2D(3553,l,i.format,u,c,0,i.format,i.type,null)}return z(),o.profile&&(i.stats.size=L(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType="texture2d",n._texture=i,o.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(t,r,n,i,s,c){function f(e,t,r,n,i,a){var s,c=p.texInfo;for(P.call(c),s=0;6>s;++s)g[s]=_();if("number"!==typeof e&&e){if("object"===typeof e)if(t)x(g[0],e),x(g[1],t),x(g[2],r),x(g[3],n),x(g[4],i),x(g[5],a);else if(O(c,e),u(p,e),"faces"in e)for(e=e.faces,s=0;6>s;++s)l(g[s],p),x(g[s],e[s]);else for(s=0;6>s;++s)x(g[s],e)}else for(e=0|e||1,s=0;6>s;++s)y(g[s],e,e);for(l(p,g[0]),p.mipmask=c.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,p.internalformat=g[0].internalformat,f.width=g[0].width,f.height=g[0].height,D(p),s=0;6>s;++s)b(g[s],34069+s);for(I(c,34067),z(),o.profile&&(p.stats.size=L(p.internalformat,p.type,f.width,f.height,c.genMipmaps,!0)),f.format=Z[p.internalformat],f.type=X[p.type],f.mag=K[c.magFilter],f.min=J[c.minFilter],f.wrapS=$[c.wrapS],f.wrapT=$[c.wrapT],s=0;6>s;++s)T(g[s]);return f}var p=new R(34067);ae[p.id]=p,a.cubeCount++;var g=Array(6);return f(t,r,n,i,s,c),f.subimage=function(e,t,r,n,i){r|=0,n|=0,i|=0;var a=v();return l(a,p),a.width=0,a.height=0,d(a,t),a.width=a.width||(p.width>>i)-r,a.height=a.height||(p.height>>i)-n,D(p),h(a,34069+e,r,n,i),z(),m(a),f},f.resize=function(t){if((t|=0)!==p.width){f.width=p.width=t,f.height=p.height=t,D(p);for(var r=0;6>r;++r)for(var n=0;p.mipmask>>n;++n)e.texImage2D(34069+r,n,p.format,t>>n,t>>n,0,p.format,p.type,null);return z(),o.profile&&(p.stats.size=L(p.internalformat,p.type,f.width,f.height,!1,!0)),f}},f._reglType="textureCube",f._texture=p,o.profile&&(f.stats=p.stats),f.destroy=function(){p.decRef()},f},clear:function(){for(var t=0;tr;++r)if(0!==(t.mipmask&1<>r,t.height>>r,0,t.internalformat,t.type,null);else for(var n=0;6>n;++n)e.texImage2D(34069+n,r,t.internalformat,t.width>>r,t.height>>r,0,t.internalformat,t.type,null);I(t.texInfo,t.target)}))},refresh:function(){for(var t=0;ti;++i){for(u=0;ue;++e)r[e].resize(n);return t.width=t.height=n,t},_reglType:"framebufferCube",destroy:function(){r.forEach((function(e){e.destroy()}))}})},clear:function(){se(T).forEach(m)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,se(T).forEach((function(t){t.framebuffer=e.createFramebuffer(),g(t)}))}})}function I(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function R(e,t,r,n,i,a,o){function s(e){if(e!==g.currentVAO){var r=t.oes_vertex_array_object;e?r.bindVertexArrayOES(e.vao):r.bindVertexArrayOES(null),g.currentVAO=e}}function l(r){if(r!==g.currentVAO){if(r)r.bindAttrs();else{for(var n=t.angle_instanced_arrays,i=0;i=f.byteLength?l.subdata(f):(l.destroy(),r.buffers[s]=null)),r.buffers[s]||(l=r.buffers[s]=i.create(u,34962,!1,!0)),c.buffer=i.getBuffer(l),c.size=0|c.buffer.dimension,c.normalized=!1,c.type=c.buffer.dtype,c.offset=0,c.stride=0,c.divisor=0,c.state=1,e[s]=1):i.getBuffer(u)?(c.buffer=i.getBuffer(u),c.size=0|c.buffer.dimension,c.normalized=!1,c.type=c.buffer.dtype,c.offset=0,c.stride=0,c.divisor=0,c.state=1):i.getBuffer(u.buffer)?(c.buffer=i.getBuffer(u.buffer),c.size=0|(+u.size||c.buffer.dimension),c.normalized=!!u.normalized||!1,c.type="type"in u?ce[u.type]:c.buffer.dtype,c.offset=0|(u.offset||0),c.stride=0|(u.stride||0),c.divisor=0|(u.divisor||0),c.state=1):"x"in u&&(c.x=+u.x||0,c.y=+u.y||0,c.z=+u.z||0,c.w=+u.w||0,c.state=2)}for(l=0;le&&(e=t.stats.uniformsCount)})),e},r.getMaxAttributesCount=function(){var e=0;return d.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var t=e.deleteShader.bind(e);se(u).forEach(t),u={},se(c).forEach(t),c={},d.forEach((function(t){e.deleteProgram(t.program)})),d.length=0,f={},r.shaderCount=0},program:function(t,n,i,a){var o=f[n];o||(o=f[n]={});var h=o[t];if(h&&(h.refCount++,!a))return h;var p=new s(n,t);return r.shaderCount++,l(p,i,a),h||(o[t]=p),d.push(p),Q(p,{destroy:function(){if(p.refCount--,0>=p.refCount){e.deleteProgram(p.program);var t=d.indexOf(p);d.splice(t,1),r.shaderCount--}0>=o[p.vertId].refCount&&(e.deleteShader(c[p.vertId]),delete c[p.vertId],delete f[p.fragId][p.vertId]),Object.keys(f[p.fragId]).length||(e.deleteShader(u[p.fragId]),delete u[p.fragId],delete f[p.fragId])}})},restore:function(){u={},c={};for(var e=0;e>2),r=0;r>5]|=(255&e.charCodeAt(r/8))<<24-r%32;var n,i,a,o,s,l,u,c,f,d,h,p=8*e.length;for(e=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],r=Array(64),t[p>>5]|=128<<24-p%32,t[15+(p+64>>9<<4)]=p,c=0;cf;f++){var v;16>f?r[f]=t[f+c]:(d=f,h=U(h=j(h=r[f-2],17)^j(h,19)^h>>>10,r[f-7]),v=j(v=r[f-15],7)^j(v,18)^v>>>3,r[d]=U(U(h,v),r[f-16])),d=U(U(U(U(u,d=j(d=o,6)^j(d,11)^j(d,25)),o&s^~o&l),Re[f]),r[f]),h=U(u=j(u=p,2)^j(u,13)^j(u,22),p&n^p&i^n&i),u=l,l=s,s=o,o=U(a,d),a=i,i=n,n=p,p=U(d,h)}e[0]=U(p,e[0]),e[1]=U(n,e[1]),e[2]=U(i,e[2]),e[3]=U(a,e[3]),e[4]=U(o,e[4]),e[5]=U(s,e[5]),e[6]=U(l,e[6]),e[7]=U(u,e[7])}for(t="",r=0;r<32*e.length;r+=8)t+=String.fromCharCode(e[r>>5]>>>24-r%32&255);return t}function N(e){for(var t,r="",n=0;n>>4&15)+"0123456789abcdef".charAt(15&t);return r}function B(e){for(var t,r,n="",i=-1;++i=t&&56320<=r&&57343>=r&&(t=65536+((1023&t)<<10)+(1023&r),i++),127>=t?n+=String.fromCharCode(t):2047>=t?n+=String.fromCharCode(192|t>>>6&31,128|63&t):65535>=t?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):2097151>=t&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return n}function j(e,t){return e>>>t|e<<32-t}function U(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function q(e){return Array.prototype.slice.call(e)}function V(e){return q(e).join("")}function H(e){function t(){var e=[],t=[];return Q((function(){e.push.apply(e,q(arguments))}),{def:function(){var r="v"+i++;return t.push(r),0"+t+"?"+i+".constant["+t+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",c,"=",a,".createStream(",34962,",",i,".buffer);","}else{",c,"=",a,".getBuffer(",i,".buffer);","}",f,'="type" in ',i,"?",o.glTypes,"[",i,".type]:",c,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",a,".destroyStream(",c,");","}"),l}))})),o}function P(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r=t[e];n[e]=X((function(e,t){return"number"===typeof r||"boolean"===typeof r?""+r:e.link(r)}))})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=K(t,(function(e,r){return e.invoke(r,t)}))})),n}function O(e,t,n,i,a){function o(e){var t=l[e];t&&(f[e]=t)}var s=A(e,t),l=T(e,h=w(e,a),a),c=S(e,a),f=E(e,a),d=M(e,a,s);o("viewport"),o(g("scissor.box"));var h,p=0>1)",s],");")}function t(){r(l,".drawArraysInstancedANGLE(",[p,v,m,s],");")}h&&"null"!==h?y?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}function o(){function e(){r(c+".drawElements("+[p,m,g,v+"<<(("+g+"-5121)>>1)"]+");")}function t(){r(c+".drawArrays("+[p,v,m]+");")}h&&"null"!==h?y?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}var s,l,u=e.shared,c=u.gl,f=u.draw,d=n.draw,h=function(){var i=d.elements,a=t;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(e,a),d.elementsActive&&a("if("+i+")"+c+".bindBuffer(34963,"+i+".buffer.buffer);")):(i=a.def(),a(i,"=",f,".","elements",";","if(",i,"){",c,".bindBuffer(",34963,",",i,".buffer.buffer);}","else if(",u.vao,".currentVAO){",i,"=",e.shared.elements+".getElements("+u.vao,".currentVAO.elements);",fe?"":"if("+i+")"+c+".bindBuffer(34963,"+i+".buffer.buffer);","}")),i}(),p=i("primitive"),v=i("offset"),m=function(){var i=d.count,a=t;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(e,a)):i=a.def(f,".","count"),i}();if("number"===typeof m){if(0===m)return}else r("if(",m,"){"),r.exit("}");le&&(s=i("instances"),l=e.instancing);var g=h+".type",y=d.elements&&Z(d.elements)&&!d.vaoActive;le&&("number"!==typeof s||0<=s)?"string"===typeof s?(r("if(",s,">0){"),a(),r("}else if(",s,"<0){"),o(),r("}")):a():o()}function q(e,t,r,n,i){return i=(t=b()).proc("body",i),le&&(t.instancing=i.def(t.shared.extensions,".angle_instanced_arrays")),e(t,i,r,n),t.compile().body}function V(e,t,r,n){F(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),B(e,t,r,n.attributes,(function(){return!0}))),j(e,t,r,n.uniforms,(function(){return!0}),!1),U(e,t,t,r)}function J(e,t){var r=e.proc("draw",1);F(e,r),I(e,r,t.context),R(e,r,t.framebuffer),D(e,r,t),z(e,r,t.state),N(e,r,t,!1,!0);var n=t.shader.progVar.append(e,r);if(r(e.shared.gl,".useProgram(",n,".program);"),t.shader.program)V(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var i=e.global.def("{}"),a=r.def(n,".id"),o=r.def(i,"[",a,"]");r(e.cond(o).then(o,".call(this,a0);").else(o,"=",i,"[",a,"]=",e.link((function(r){return q(V,e,t,r,1)})),"(",n,");",o,".call(this,a0);"))}0=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var e=0;return Object.keys(c).forEach((function(t){e+=c[t].stats.size})),e}),{create:function(t,r){function o(t,r){var n=0,a=0,c=32854;if("object"===typeof t&&t?("shape"in t?(n=0|(a=t.shape)[0],a=0|a[1]):("radius"in t&&(n=a=0|t.radius),"width"in t&&(n=0|t.width),"height"in t&&(a=0|t.height)),"format"in t&&(c=s[t.format])):"number"===typeof t?(n=0|t,a="number"===typeof r?0|r:n):t||(n=a=1),n!==u.width||a!==u.height||c!==u.format)return o.width=u.width=n,o.height=u.height=a,u.format=c,e.bindRenderbuffer(36161,u.renderbuffer),e.renderbufferStorage(36161,c,n,a),i.profile&&(u.stats.size=Le[u.format]*u.width*u.height),o.format=l[u.format],o}var u=new a(e.createRenderbuffer());return c[u.id]=u,n.renderbufferCount++,o(t,r),o.resize=function(t,r){var n=0|t,a=0|r||n;return n===u.width&&a===u.height||(o.width=u.width=n,o.height=u.height=a,e.bindRenderbuffer(36161,u.renderbuffer),e.renderbufferStorage(36161,u.format,n,a),i.profile&&(u.stats.size=Le[u.format]*u.width*u.height)),o},o._reglType="renderbuffer",o._renderbuffer=u,i.profile&&(o.stats=u.stats),o.destroy=function(){u.decRef()},o},clear:function(){se(c).forEach(o)},restore:function(){se(c).forEach((function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,t.renderbuffer),e.renderbufferStorage(36161,t.format,t.width,t.height)})),e.bindRenderbuffer(36161,null)}}},Oe=[];Oe[6408]=4,Oe[6407]=3;var Ie=[];Ie[5121]=1,Ie[5126]=4,Ie[36193]=2;var Re=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],De=["x","y","z","w"],ze="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Fe={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Ne={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Be={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},je={cw:2304,ccw:2305},Ue=new Y(!1,!1,!1,(function(){})),qe=function(e,t){function r(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function n(e,t,n){var i=o.pop()||new r;i.startQueryIndex=e,i.endQueryIndex=t,i.sum=0,i.stats=n,s.push(i)}if(!t.ext_disjoint_timer_query)return null;var i=[],a=[],o=[],s=[],l=[],u=[];return{beginQuery:function(e){var r=i.pop()||t.ext_disjoint_timer_query.createQueryEXT();t.ext_disjoint_timer_query.beginQueryEXT(35007,r),a.push(r),n(a.length-1,a.length,e)},endQuery:function(){t.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:n,update:function(){var e,r;if(0!==(e=a.length)){u.length=Math.max(u.length,e+1),l.length=Math.max(l.length,e+1),l[0]=0;var n=u[0]=0;for(r=e=0;r=W.length&&n()}var r=$(W,e);W[r]=t}}}function d(){var e=H.viewport,t=H.scissor_box;e[0]=e[1]=t[0]=t[1]=0,C.viewportWidth=C.framebufferWidth=C.drawingBufferWidth=e[2]=t[2]=m.drawingBufferWidth,C.viewportHeight=C.framebufferHeight=C.drawingBufferHeight=e[3]=t[3]=m.drawingBufferHeight}function h(){C.tick+=1,C.time=v(),d(),V.procs.poll()}function p(){j.refresh(),d(),V.procs.refresh(),A&&A.update()}function v(){return(ne()-M)/1e3}if(!(e=u(e)))return null;var m=e.gl,g=m.getContextAttributes();m.isContextLost();var y=c(m,e);if(!y)return null;var x=i(),w={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},k=e.cachedCode||{},T=y.extensions,A=qe(m,T),M=ne(),S=m.drawingBufferWidth,E=m.drawingBufferHeight,C={tick:0,time:0,viewportWidth:S,viewportHeight:E,framebufferWidth:S,framebufferHeight:E,drawingBufferWidth:S,drawingBufferHeight:E,pixelRatio:e.pixelRatio},L=(S={elements:null,primitive:4,count:-1,offset:0,instances:-1},ae(m,T)),I=b(m,w,e,(function(e){return N.destroyBuffer(e)})),F=_(m,T,I,w),N=R(m,T,L,w,I,F,S),B=D(m,x,w,e),j=P(m,T,L,(function(){V.procs.poll()}),C,w,e),U=Pe(m,T,L,w,e),q=O(m,T,L,j,U,w),V=J(m,x,T,L,I,F,j,q,{},N,B,S,C,A,k,e),H=(x=z(m,q,V.procs.poll,C,g,T,L),V.next),G=m.canvas,W=[],Y=[],Z=[],X=[e.onDestroy],K=null;G&&(G.addEventListener("webglcontextlost",a,!1),G.addEventListener("webglcontextrestored",o,!1));var ee=q.setFBO=s({framebuffer:te.define.call(null,1,"framebuffer")});return p(),g=Q(s,{clear:function(e){if("framebuffer"in e)if(e.framebuffer&&"framebufferCube"===e.framebuffer_reglType)for(var t=0;6>t;++t)ee(Q({framebuffer:e.framebuffer.faces[t]},e),l);else ee(e,l);else l(null,e)},prop:te.define.bind(null,1),context:te.define.bind(null,2),this:te.define.bind(null,3),draw:s({}),buffer:function(e){return I.create(e,34962,!1,!1)},elements:function(e){return F.create(e,!1)},texture:j.create2D,cube:j.createCube,renderbuffer:U.create,framebuffer:q.create,framebufferCube:q.createCube,vao:N.createVAO,attributes:g,frame:f,on:function(e,t){var r;switch(e){case"frame":return f(t);case"lost":r=Y;break;case"restore":r=Z;break;case"destroy":r=X}return r.push(t),{cancel:function(){for(var e=0;e4294967295||l(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&o){var c=o(e,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(u=!1)}return(n||u||!r)&&(a?i(e,"length",t,!0,!0):i(e,"length",t)),e}},29936:function(e,t,r){e.exports=i;var n=r(61252).EventEmitter;function i(){n.call(this)}r(6768)(i,n),i.Readable=r(12348),i.Writable=r(11288),i.Duplex=r(15316),i.Transform=r(22477),i.PassThrough=r(27136),i.finished=r(15932),i.pipeline=r(38180),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"===typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",a),r.removeListener("end",s),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},92784:function(e){"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"===typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,a,o,s;if("string"===typeof t&&(a="not ",t.substr(!o||o<0?0:+o,a.length)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var l=function(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(n(t,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.i=t},15316:function(e,t,r){"use strict";var n=r(4168),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var a=r(12348),o=r(11288);r(6768)(c,a);for(var s=i(o.prototype),l=0;l0)if("string"===typeof t||s.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),n)s.endEmitted?w(e,new _):S(e,s,t,!0);else if(s.ended)w(e,new x);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?S(e,s,t,!1):O(e,s)):S(e,s,t,!1)}else n||(s.reading=!1,O(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(P,e))}function P(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e)}function O(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){a("readable nexttick read 0"),e.read(0)}function z(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0)}function F(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(j,t,e))}function j(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return a("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):L(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return a("need readable",i),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){w(this,new b("_read()"))},A.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,a("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===i.stdout||e===i.stderr?m:u;function l(t,i){a("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,a("cleanup"),e.removeListener("close",p),e.removeListener("finish",v),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",l),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",d),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function u(){a("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",l);var c=function(e){return function(){var t=e._readableState;a("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,F(e))}}(r);e.on("drain",c);var f=!1;function d(t){a("ondata");var i=e.write(t);a("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!f&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){a("onerror",t),m(),e.removeListener("error",h),0===o(e,"error")&&w(e,t)}function p(){e.removeListener("finish",v),m()}function v(){a("onfinish"),e.removeListener("close",p),m()}function m(){a("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",v),e.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?L(this):n.reading||i.nextTick(D,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(R,this),r},A.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(R,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(z,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),(!r.objectMode||null!==i&&void 0!==i)&&(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new v("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var n=this._writableState;return"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(e,t){t(e)}},60328:function(e,t,r){"use strict";var n,i=r(4168);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(15932),s=Symbol("lastResolve"),l=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),d=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function v(e){var t=e[s];if(null!==t){var r=e[h].read();null!==r&&(e[f]=null,e[s]=null,e[l]=null,t(p(r,!1)))}}function m(e){i.nextTick(v,e)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((a(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[u]?r(e[u]):t(p(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[c]?r(p(void 0,!0)):t[d](r,n)}),n)}}(n,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(p(a,!1));r=new Promise(this[d])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),a(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),g);e.exports=function(e){var t,r=Object.create(y,(a(t={},h,{value:e,writable:!0}),a(t,s,{value:null,writable:!0}),a(t,l,{value:null,writable:!0}),a(t,u,{value:null,writable:!0}),a(t,c,{value:e._readableState.endEmitted,writable:!0}),a(t,d,{value:function(e,t){var n=r[h].read();n?(r[f]=null,r[s]=null,r[l]=null,e(p(n,!1))):(r[s]=e,r[l]=t)},writable:!0}),t));return r[f]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[l];return null!==t&&(r[f]=null,r[s]=null,r[l]=null,t(e)),void(r[u]=e)}var n=r[s];null!==n&&(r[f]=null,r[s]=null,r[l]=null,n(p(void 0,!0))),r[c]=!0})),e.on("readable",m.bind(null,r)),r}},47264:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){for(var r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,r,n,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=i,n=s,o.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0===(e-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){c||(c=e),e&&d.forEach(l),a||(d.forEach(l),f(c))}))}));return t.reduce(u)}},24888:function(e,t,r){"use strict";var n=r(92784).i.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},4776:function(e,t,r){e.exports=r(61252).EventEmitter},86032:function(e,t,r){"use strict";var n=r(30456).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.o=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},55619:function(e,t,r){var n=r(45408),i=r(86844)("stream-parser");e.exports=function(e){var t=e&&"function"==typeof e._transform,r=e&&"function"==typeof e._write;if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");i("extending Parser into stream"),e._bytes=c,e._skipBytes=f,t&&(e._passthrough=d),t?e._transform=p:e._write=h};var a=-1,o=0,s=1,l=2;function u(e){i("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=a,e._parserCallback=null,"function"==typeof e.push&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function c(e,t){n(!this._parserCallback,'there is already a "callback" set!'),n(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||u(this),i("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=o}function f(e,t){n(!this._parserCallback,'there is already a "callback" set!'),n(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||u(this),i("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=s}function d(e,t){n(!this._parserCallback,'There is already a "callback" set!'),n(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||u(this),i("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=l}function h(e,t,r){this._parserInit||u(this),i("write(%o bytes)",e.length),"function"==typeof t&&(r=t),m(this,e,null,r)}function p(e,t,r){this._parserInit||u(this),i("transform(%o bytes)",e.length),"function"!=typeof t&&(t=this._parserOutput),m(this,e,t,r)}function v(e,t,r,n){if(e._parserBytesLeft-=t.length,i("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===o?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===l&&r(t),0!==e._parserBytesLeft)return n;var s=e._parserCallback;if(s&&e._parserState===o&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==o&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=a,e._parserBuffers.splice(0),s){var u=[];t&&u.push(t),r&&u.push(r);var c=s.length>u.length;c&&u.push(g(n));var f=s.apply(e,u);if(!c||n===f)return n}}var m=g((function e(t,r,n,i){return t._parserBytesLeft<=0?i(new Error("got data but not currently parsing anything")):r.length<=t._parserBytesLeft?function(){return v(t,r,n,i)}:function(){var a=r.slice(0,t._parserBytesLeft);return v(t,a,n,(function(o){return o?i(o):r.length>a.length?function(){return e(t,r.slice(a.length),n,i)}:void 0}))}}));function g(e){return function(){for(var t=e.apply(this,arguments);"function"==typeof t;)t=t();return t}}},86844:function(e,t,r){var n=r(4168);function i(){var e;try{e=t.storage.debug}catch(r){}return!e&&"undefined"!==typeof n&&"env"in n&&(e=n.env.DEBUG),e}(t=e.exports=r(89416)).log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))})),e.splice(a,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(r){}},t.load=i,t.useColors=function(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},t.enable(i())},89416:function(e,t,r){var n;function i(e){function r(){if(r.enabled){var e=r,i=+new Date,a=i-(n||i);e.diff=a,e.prev=n,e.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s0)return function(e){if(!((e=String(e)).length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&!1===isNaN(e))return s.long?o(l=e,i,"day")||o(l,n,"hour")||o(l,r,"minute")||o(l,t,"second")||l+" ms":function(e){return e>=i?Math.round(e/i)+"d":e>=n?Math.round(e/n)+"h":e>=r?Math.round(e/r)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},39956:function(e,t,r){"use strict";var n=r(32868);e.exports=function(e,t,r){if(null==e)throw Error("First argument should be a string");if(null==t)throw Error("Separator should be a string or a RegExp");r?("string"===typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","\u201c\u201d","\xab\xbb"]:("string"===typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(e){return 1===e.length&&(e+=e),e})));var i=n.parse(e,{flat:!0,brackets:r.ignore}),a=i[0].split(t);if(r.escape){for(var o=[],s=0;s0;){t=u[u.length-1];var h=e[t];if(a[t]=0&&s[t].push(o[v])}a[t]=p}else{if(n[t]===r[t]){var m=[],g=[],y=0;for(p=l.length-1;p>=0;--p){var x=l[p];if(i[x]=!1,m.push(x),g.push(s[x]),y+=s[x].length,o[x]=f.length,x===t){l.length=p;break}}f.push(m);var b=new Array(y);for(p=0;p1&&(i=1),i<-1&&(i=-1),(e*n-t*r<0?-1:1)*Math.acos(i)};t.default=function(e){var t=e.px,r=e.py,l=e.cx,u=e.cy,c=e.rx,f=e.ry,d=e.xAxisRotation,h=void 0===d?0:d,p=e.largeArcFlag,v=void 0===p?0:p,m=e.sweepFlag,g=void 0===m?0:m,y=[];if(0===c||0===f)return[];var x=Math.sin(h*i/360),b=Math.cos(h*i/360),_=b*(t-l)/2+x*(r-u)/2,w=-x*(t-l)/2+b*(r-u)/2;if(0===_&&0===w)return[];c=Math.abs(c),f=Math.abs(f);var k=Math.pow(_,2)/Math.pow(c,2)+Math.pow(w,2)/Math.pow(f,2);k>1&&(c*=Math.sqrt(k),f*=Math.sqrt(k));var T=function(e,t,r,n,a,o,l,u,c,f,d,h){var p=Math.pow(a,2),v=Math.pow(o,2),m=Math.pow(d,2),g=Math.pow(h,2),y=p*v-p*g-v*m;y<0&&(y=0),y/=p*g+v*m;var x=(y=Math.sqrt(y)*(l===u?-1:1))*a/o*h,b=y*-o/a*d,_=f*x-c*b+(e+r)/2,w=c*x+f*b+(t+n)/2,k=(d-x)/a,T=(h-b)/o,A=(-d-x)/a,M=(-h-b)/o,S=s(1,0,k,T),E=s(k,T,A,M);return 0===u&&E>0&&(E-=i),1===u&&E<0&&(E+=i),[_,w,S,E]}(t,r,l,u,c,f,v,g,x,b,_,w),A=n(T,4),M=A[0],S=A[1],E=A[2],C=A[3],L=Math.abs(C)/(i/4);Math.abs(1-L)<1e-7&&(L=1);var P=Math.max(Math.ceil(L),1);C/=P;for(var O=0;Ot[2]&&(t[2]=u[c+0]),u[c+1]>t[3]&&(t[3]=u[c+1]);return t}},41976:function(e,t,r){"use strict";e.exports=function(e){for(var t,r=[],o=0,s=0,l=0,u=0,c=null,f=null,d=0,h=0,p=0,v=e.length;p4?(o=m[m.length-4],s=m[m.length-3]):(o=d,s=h),r.push(m)}return r};var n=r(92848);function i(e,t,r,n){return["C",e,t,r,n,r,n]}function a(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},20472:function(e,t,r){"use strict";var n,i=r(74840),a=r(21984),o=r(22235),s=r(53520),l=r(29620),u=document.createElement("canvas"),c=u.getContext("2d");e.exports=function(e,t){if(!s(e))throw Error("Argument should be valid svg path string");var r,f;t||(t={}),t.shape?(r=t.shape[0],f=t.shape[1]):(r=u.width=t.w||t.width||200,f=u.height=t.h||t.height||200);var d=Math.min(r,f),h=t.stroke||0,p=t.viewbox||t.viewBox||i(e),v=[r/(p[2]-p[0]),f/(p[3]-p[1])],m=Math.min(v[0]||0,v[1]||0)/2;if(c.fillStyle="black",c.fillRect(0,0,r,f),c.fillStyle="white",h&&("number"!=typeof h&&(h=1),c.strokeStyle=h>0?"white":"black",c.lineWidth=Math.abs(h)),c.translate(.5*r,.5*f),c.scale(m,m),function(){if(null!=n)return n;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return n=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var g=new Path2D(e);c.fill(g),h&&c.stroke(g)}else{var y=a(e);o(c,y),c.fill(),h&&c.stroke()}return c.setTransform(1,0,0,1,0,0),l(c,{cutoff:null!=t.cutoff?t.cutoff:.5,radius:null!=t.radius?t.radius:.5*d})}},49760:function(e,t,r){var n;!function(i){var a=/^\s+/,o=/\s+$/,s=0,l=i.round,u=i.min,c=i.max,f=i.random;function d(e,t){if(t=t||{},(e=e||"")instanceof d)return e;if(!(this instanceof d))return new d(e,t);var r=function(e){var t,r,n,s={r:0,g:0,b:0},l=1,f=null,d=null,h=null,p=!1,v=!1;return"string"==typeof e&&(e=function(e){e=e.replace(a,"").replace(o,"").toLowerCase();var t,r=!1;if(L[e])e=L[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=j.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=j.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=j.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=j.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=j.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=j.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=j.hex8.exec(e))?{r:D(t[1]),g:D(t[2]),b:D(t[3]),a:B(t[4]),format:r?"name":"hex8"}:(t=j.hex6.exec(e))?{r:D(t[1]),g:D(t[2]),b:D(t[3]),format:r?"name":"hex"}:(t=j.hex4.exec(e))?{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),a:B(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=j.hex3.exec(e))&&{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),format:r?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,r=e.g,n=e.b,s={r:255*I(t,255),g:255*I(r,255),b:255*I(n,255)},p=!0,v="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(f=F(e.s),d=F(e.v),s=function(e,t,r){e=6*I(e,360),t=I(t,100),r=I(r,100);var n=i.floor(e),a=e-n,o=r*(1-t),s=r*(1-a*t),l=r*(1-(1-a)*t),u=n%6,c=[r,s,o,o,l,r][u],f=[l,r,r,s,o,o][u],d=[o,o,l,r,r,s][u];return{r:255*c,g:255*f,b:255*d}}(e.h,f,d),p=!0,v="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(f=F(e.s),h=F(e.l),s=function(e,t,r){var n,i,a;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=I(e,360),t=I(t,100),r=I(r,100),0===t)n=i=a=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:255*n,g:255*i,b:255*a}}(e.h,f,h),p=!0,v="hsl"),e.hasOwnProperty("a")&&(l=e.a)),l=O(l),{ok:p,format:e.format||v,r:u(255,c(s.r,0)),g:u(255,c(s.g,0)),b:u(255,c(s.b,0)),a:l}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=l(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=r.ok,this._tc_id=s++}function h(e,t,r){e=I(e,255),t=I(t,255),r=I(r,255);var n,i,a=c(e,t,r),o=u(e,t,r),s=(a+o)/2;if(a==o)n=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case e:n=(t-r)/l+(t>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(d(n));return a}function C(e,t){t=t||6;for(var r=d(e).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/t;t--;)o.push(d({h:n,s:i,v:a})),a=(a+s)%1;return o}d.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 e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:i.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=O(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),r=l(100*e.s),n=l(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=l(360*e.h),r=l(100*e.s),n=l(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return v(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,i){var a=[z(l(e).toString(16)),z(l(t).toString(16)),z(l(r).toString(16)),z(N(n))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*I(this._r,255))+"%",g:l(100*I(this._g,255))+"%",b:l(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%)":"rgba("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[v(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+m(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=d(e);r="#"+m(i._r,i._g,i._b,i._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 d(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(b,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(T,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:F(e[n]));e=r}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:f(),g:f(),b:f()})},d.mix=function(e,t,r){r=0===r?0:r||50;var n=d(e).toRgb(),i=d(t).toRgb(),a=r/100;return d({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},d.readability=function(e,t){var r=d(e),n=d(t);return(i.max(r.getLuminance(),n.getLuminance())+.05)/(i.min(r.getLuminance(),n.getLuminance())+.05)},d.isReadable=function(e,t,r){var n,i,a=d.readability(e,t);switch(i=!1,(n=function(e){var t,r;return 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"),{level:t,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},d.mostReadable=function(e,t,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;ul&&(l=n,s=d(t[u]));return d.isReadable(e,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],r))};var L=d.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"},P=d.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(L);function O(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,c(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function R(e){return u(1,c(0,e))}function D(e){return parseInt(e,16)}function z(e){return 1==e.length?"0"+e:""+e}function F(e){return e<=1&&(e=100*e+"%"),e}function N(e){return i.round(255*parseFloat(e)).toString(16)}function B(e){return D(e)/255}var j=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",r="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+r),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 U(e){return!!j.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(n=function(){return d}.call(t,r,t,e))||(e.exports=n)}(Math)},37816:function(e){"use strict";e.exports=r,e.exports.float32=e.exports.float=r,e.exports.fract32=e.exports.fract=function(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=r(e));for(var n=0,i=t.length;n":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(i,(function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},7328:function(e,t,r){"use strict";var n=r(81680),i={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!n(e)&&hasOwnProperty.call(i,typeof e)}},87396:function(e,t,r){"use strict";var n=r(57980),i=r(85488);e.exports=function(e){return i(e)?e:n(e,"%v is not a plain function",arguments[1])}},85488:function(e,t,r){"use strict";var n=r(73384),i=/^\s*class[\s{/}]/,a=Function.prototype.toString;e.exports=function(e){return!!n(e)&&!i.test(a.call(e))}},54612:function(e,t,r){"use strict";var n=r(7328);e.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}}},33940:function(e,t,r){"use strict";var n=r(81680),i=r(7328),a=Object.prototype.toString;e.exports=function(e){if(!n(e))return null;if(i(e)){var t=e.toString;if("function"!==typeof t)return null;if(t===a)return null}try{return""+e}catch(r){return null}}},18496:function(e,t,r){"use strict";var n=r(57980),i=r(81680);e.exports=function(e){return i(e)?e:n(e,"Cannot use %v",arguments[1])}},81680:function(e){"use strict";e.exports=function(e){return void 0!==e&&null!==e}},14144:function(e,t,r){"use strict";var n=r(308),i=r(10352),a=r(33576).Buffer;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o="undefined"!==typeof Uint8ClampedArray,s="undefined"!==typeof BigUint64Array,l="undefined"!==typeof BigInt64Array,u=r.g.__TYPEDARRAY_POOL;u.UINT8C||(u.UINT8C=i([32,0])),u.BIGUINT64||(u.BIGUINT64=i([32,0])),u.BIGINT64||(u.BIGINT64=i([32,0])),u.BUFFER||(u.BUFFER=i([32,0]));var c=u.DATA,f=u.BUFFER;function d(e){if(e){var t=e.length||e.byteLength,r=n.log2(t);c[r].push(e)}}function h(e){e=n.nextPow2(e);var t=n.log2(e),r=c[t];return r.length>0?r.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(h(e),0,e)}function v(e){return new Uint16Array(h(2*e),0,e)}function m(e){return new Uint32Array(h(4*e),0,e)}function g(e){return new Int8Array(h(e),0,e)}function y(e){return new Int16Array(h(2*e),0,e)}function x(e){return new Int32Array(h(4*e),0,e)}function b(e){return new Float32Array(h(4*e),0,e)}function _(e){return new Float64Array(h(8*e),0,e)}function w(e){return o?new Uint8ClampedArray(h(e),0,e):p(e)}function k(e){return s?new BigUint64Array(h(8*e),0,e):null}function T(e){return l?new BigInt64Array(h(8*e),0,e):null}function A(e){return new DataView(h(e),0,e)}function M(e){e=n.nextPow2(e);var t=n.log2(e),r=f[t];return r.length>0?r.pop():new a(e)}t.free=function(e){if(a.isBuffer(e))f[n.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,r=0|n.log2(t);c[r].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){d(e.buffer)},t.freeArrayBuffer=d,t.freeBuffer=function(e){f[n.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return h(e);switch(t){case"uint8":return p(e);case"uint16":return v(e);case"uint32":return m(e);case"int8":return g(e);case"int16":return y(e);case"int32":return x(e);case"float":case"float32":return b(e);case"double":case"float64":return _(e);case"uint8_clamped":return w(e);case"bigint64":return T(e);case"biguint64":return k(e);case"buffer":return M(e);case"data":case"dataview":return A(e);default:return null}return null},t.mallocArrayBuffer=h,t.mallocUint8=p,t.mallocUint16=v,t.mallocUint32=m,t.mallocInt8=g,t.mallocInt16=y,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=b,t.mallocFloat64=t.mallocDouble=_,t.mallocUint8Clamped=w,t.mallocBigUint64=k,t.mallocBigInt64=T,t.mallocDataView=A,t.mallocBuffer=M,t.clearCache=function(){for(var e=0;e<32;++e)u.UINT8[e].length=0,u.UINT16[e].length=0,u.UINT32[e].length=0,u.INT8[e].length=0,u.INT16[e].length=0,u.INT32[e].length=0,u.FLOAT[e].length=0,u.DOUBLE[e].length=0,u.BIGUINT64[e].length=0,u.BIGINT64[e].length=0,u.UINT8C[e].length=0,c[e].length=0,f[e].length=0}},92384:function(e){var t=/[\'\"]/;e.exports=function(e){return e?(t.test(e.charAt(0))&&(e=e.substr(1)),t.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}},45223:function(e){"use strict";e.exports=function(e,t,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&t._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),d(n,e,n.depth)}function c(e,t){var r=u.styles[t];return r?"\x1b["+u.colors[r][0]+"m"+e+"\x1b["+u.colors[r][1]+"m":e}function f(e,t){return e}function d(e,r,n){if(e.customInspect&&r&&A(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return x(i)||(i=d(e,i,n)),i}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(x(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}(e,r);if(a)return a;var o=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),T(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(r);if(0===o.length){if(A(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return e.stylize(Date.prototype.toString.call(r),"date");if(T(r))return h(r)}var u,c="",f=!1,w=["{","}"];return v(r)&&(f=!0,w=["[","]"]),A(r)&&(c=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(c=" "+RegExp.prototype.toString.call(r)),k(r)&&(c=" "+Date.prototype.toUTCString.call(r)),T(r)&&(c=" "+h(r)),0!==o.length||f&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=f?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(u,c,w)):w[0]+c+w[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),C(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=g(r)?d(e,l.value,null):d(e,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function v(e){return Array.isArray(e)}function m(e){return"boolean"===typeof e}function g(e){return null===e}function y(e){return"number"===typeof e}function x(e){return"string"===typeof e}function b(e){return void 0===e}function _(e){return w(e)&&"[object RegExp]"===M(e)}function w(e){return"object"===typeof e&&null!==e}function k(e){return w(e)&&"[object Date]"===M(e)}function T(e){return w(e)&&("[object Error]"===M(e)||e instanceof Error)}function A(e){return"function"===typeof e}function M(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!o[e])if(s.test(e)){var r=n.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(41088),t.isArray=v,t.isBoolean=m,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=x,t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=b,t.isRegExp=_,t.types.isRegExp=_,t.isObject=w,t.isDate=k,t.types.isDate=k,t.isError=T,t.types.isNativeError=T,t.isFunction=A,t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=r(75272);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",function(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),E[e.getMonth()],t].join(" ")}(),t.format.apply(t,arguments))},t.inherits=r(6768),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var L="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(L&&e[L]){var t;if("function"!==typeof(t=e[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],a=0;a-1?t:"Object"===t&&function(e){var t=!1;return n(v,(function(r,n){if(!t)try{r(e),t=d(n,1)}catch(i){}})),t}(e)}return s?function(e){var t=!1;return n(v,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=d(n,1))}catch(i){}})),t}(e):null}},67020:function(e,t,r){var n=r(38700),i=r(50896),a=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(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(l);return r?r[0]:""}var n=this._validateYear(e),i=e.month(),a=""+this.toChineseMonth(n,i);return t&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(e){if("string"===typeof e){var t=e.match(u);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=["\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)&&(i="\u95f0"+i),i},monthNamesShort:function(e){if("string"===typeof e){var t=e.match(c);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="\u95f0"+i),i},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 i=t[t.length-1];r="i"===i||"I"===i}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 i=this.intercalaryMonth(e);if(r&&t!==i||t<1||t>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!r&&t<=i?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 i,o=this._validateYear(e,n.local.invalidyear),s=d[o-d[0]],l=s>>9&4095,u=s>>5&15,c=31&s;(i=a.newDate(l,u,c)).add(4-(i.dayOfWeek()||7),"d");var f=this.toJD(e,t,r)-i.toJD();return 1+Math.floor(f/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=f[e-f[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 i=this._validate(e,s,r,n.local.invalidDate);e=this._validateYear(i.year()),t=i.month(),r=i.day();var o=this.isIntercalaryMonth(e,t),s=this.toChineseMonth(e,t),l=function(e,t,r,n,i){var a,o,s;if("object"===typeof e)o=e,a=t||{};else{var l;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?(l=!1,a=n):(l=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:l}}s=o.day-1;var u,c=f[o.year-f[0]],h=c>>13;u=h&&(o.month>h||o.isIntercalary)?o.month:o.month-1;for(var p=0;p>9&4095,(v>>5&15)-1,(31&v)+s);return a.year=m.getFullYear(),a.month=1+m.getMonth(),a.day=m.getDate(),a}(e,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(e){var t=a.fromJD(e),r=function(e,t,r,n){var i,a;if("object"===typeof e)i=e,a=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");i={year:e,month:t,day:r},a=n||{}}var o=d[i.year-d[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=d[a.year-d[0]];var l,u=new Date(o>>9&4095,(o>>5&15)-1,31&o),c=new Date(i.year,i.month-1,i.day);l=Math.round((c-u)/864e5);var h,p=f[a.year-f[0]];for(h=0;h<13;h++){var v=p&1<<12-h?30:29;if(l>13;return!m||h=2&&n<=6},extraInfo:function(e,t,r){var i=this._validate(e,t,r,n.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(e,t,r){var i=this._validate(e,t,r,n.local.invalidDate);return e=i.year()+(i.year()<0?1:0),t=i.month(),(r=i.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=a},65168:function(e,t,r){var n=r(38700),i=r(50896);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.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 i=this._validate(e,t,r,n.local.invalidDate);return(e=i.year())<0&&e++,i.day()+30*(i.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,i=t-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},2084:function(e,t,r){var n=r(38700),i=r(50896);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}a.prototype=new n.baseCalendar,i(a.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 i=this._validate(e,t,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(e,t,r){var i=this._validate(e,t,r,n.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var a=e<=0?e+1:e,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(t<7){for(var s=7;s<=this.monthsInYear(e);s++)o+=this.daysInMonth(e,s);for(s=1;s=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=a},26368:function(e,t,r){var n=r(38700),i=r(50896);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.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 i=this._validate(e,t,r,n.local.invalidDate);return e=i.year(),t=i.month(),e=e<=0?e+1:e,(r=i.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=a},24747:function(e,t,r){var n=r(38700),i=r(50896);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.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 i=this._validate(e,t,r,n.local.invalidDate);return e=i.year(),t=i.month(),r=i.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),i=Math.floor((t-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=t-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),n.calendars.julian=a},65616:function(e,t,r){var n=r(38700),i=r(50896);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}function s(e,t){return o(e-1,t)+1}a.prototype=new n.baseCalendar,i(a.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 i=this._validate(e,t,r,n.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=o(8+(e-=this.jdEpoch)+340,365);return[Math.floor(t/20)+1,o(t,20)]},_toTzolkin:function(e){return[s(20+(e-=this.jdEpoch),20),s(e+4,13)]},toJD:function(e,t,r){var i=this._validate(e,t,r,n.local.invalidDate);return i.day()+20*i.month()+360*i.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=a},30632:function(e,t,r){var n=r(38700),i=r(50896);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar;var o=n.instance("gregorian");i(a.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 i=this._validate(e,t,r,n.local.invalidMonth);(e=i.year())<0&&e++;for(var a=i.day(),s=1;s=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=a},73040:function(e,t,r){var n=r(38700),i=r(50896);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.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(),"undefined"===typeof 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),"undefined"===typeof 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 i=this._validate(e,t,r,n.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var a=n.instance(),o=0,s=t,l=e;this._createMissingCalendarData(e);var u=e-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==t&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===t?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(e){var t=n.instance().fromJD(e),r=t.year(),i=t.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,u)},_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 i=this._validate(e,t,r,n.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var a=e-(e>=0?474:473),s=474+o(a,2820);return r+(t<=7?31*(t-1):30*(t-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(a/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),i=2820;if(1029982!==n){var a=Math.floor(n/366),s=o(n,366);i=Math.floor((2134*a+2816*s+2815)/1028522)+a+1}var l=i+2820*r+474;l=l<=0?l-1:l;var u=e-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),f=e-this.toJD(l,c,1)+1;return this.newDate(l,c,f)}}),n.calendars.persian=a,n.calendars.jalali=a},51456:function(e,t,r){var n=r(38700),i=r(50896),a=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(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);return e=this._t2gYear(t.year()),a.leapYear(e)},weekOfYear:function(e,t,r){var i=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(i.year()),a.weekOfYear(e,i.month(),i.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 i=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(i.year()),a.toJD(e,i.month(),i.day())},fromJD:function(e){var t=a.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},4592:function(e,t,r){var n=r(38700),i=r(50896),a=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(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);return e=this._t2gYear(t.year()),a.leapYear(e)},weekOfYear:function(e,t,r){var i=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(i.year()),a.weekOfYear(e,i.month(),i.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 i=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(i.year()),a.toJD(e,i.month(),i.day())},fromJD:function(e){var t=a.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},45348:function(e,t,r){var n=r(38700),i=r(50896);function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.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,i=0,a=0;ar)return o[i]-o[i-1];i++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var i=this._validate(e,t,r,n.local.invalidDate),a=12*(i.year()-1)+i.month()-15292;return i.day()+o[a-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,u=t-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(e,t,r){var i=n.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(e=null!=e.year?e.year:e)>=1276&&e<=1500),i},_validate:function(e,t,r,i){var a=n.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}}),n.calendars.ummalqura=a;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]},38700:function(e,t,r){var n=r(50896);function i(){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 a(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(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function s(){this.shortYearCutoff="+10"}function l(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}n(i.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,i){return(n=(null!=e&&e.year?e.calendar():"string"===typeof n?this.instance(n,i):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="",i=0;r>0;){var a=r%10;n=(0===a?"":e[a]+t[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),n(a.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(u.local.invalidDate||u.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(u.local.differentCalendars||u.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(s.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new a(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+o(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,u.local.invalidMonth||u.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,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,u.local.invalidDate||u.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,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,u.local.invalidDate||u.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),i=e.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0);i=e.day(),"y"===r?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(function(e){for(;ot-1+e.minMonth;)a++,o-=t,t=e.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(l){throw this._validateLevel--,l}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&("y"===n||"m"===n)&&(0===t[0]||e.year()>0!==t[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;t=this._add(e,r*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),i="m"===r?t:e.month(),a="d"===r?t:e.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),e.date(n,i,a)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var i=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var u=e.exports=new i;u.cdate=a,u.baseCalendar=s,u.calendars.gregorian=l},15168:function(e,t,r){var n=r(50896),i=r(38700);n(i.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"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(e,t){return"string"!==typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.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 i.local.invalidFormat||i.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var n=(r=r||{}).dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.monthNumbers||this.local.monthNumbers,s=r.monthNamesShort||this.local.monthNamesShort,l=r.monthNames||this.local.monthNames,u=(r.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;x+n1}),c=function(e,t,r,n){var i=""+t;if(u(e,n))for(;i.length1},x=function(e,r){var n=y(e,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=t.substring(A).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,A);return A+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if("function"===typeof l){y("m");var e=l.call(b,t.substring(A));return A+=e.length,e}return x("m")},w=function(e,r,n,a){for(var o=y(e,a)?n:r,s=0;s-1){h=1,p=v;for(var E=this.daysInMonth(d,h);p>E;E=this.daysInMonth(d,h))h++,p-=E}return f>-1?this.fromJD(f):this.newDate(d,h,p)},determineDate:function(e,t,r,n,i){r&&"object"!==typeof r&&(i=n,n=r,r=null),"string"!==typeof n&&(i=n,n="");var a=this;return t=t?t.newDate():null,e=null==e?t:"string"===typeof e?function(e){try{return a.parseDate(n,e,i)}catch(l){}for(var t=((e=e.toLowerCase()).match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(e);s;)t.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(e);return t}(e):"number"===typeof e?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e)}})},21576:function(){},19768:function(){},63436:function(e,t,r){"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"===typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?k(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?k(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=d.exec(e))?new A(t[1],t[2],t[3],1):(t=h.exec(e))?new A(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=p.exec(e))?k(t[1],t[2],t[3],t[4]):(t=v.exec(e))?k(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=m.exec(e))?P(t[1],t[2]/100,t[3]/100,1):(t=g.exec(e))?P(t[1],t[2]/100,t[3]/100,t[4]):y.hasOwnProperty(e)?w(y[e]):"transparent"===e?new A(NaN,NaN,NaN,0):null}function w(e){return new A(e>>16&255,e>>8&255,255&e,1)}function k(e,t,r,n){return n<=0&&(e=t=r=NaN),new A(e,t,r,n)}function T(e,t,r,n){return 1===arguments.length?((i=e)instanceof a||(i=_(i)),i?new A((i=i.rgb()).r,i.g,i.b,i.opacity):new A):new A(e,t,r,null==n?1:n);var i}function A(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function M(){return"#".concat(L(this.r)).concat(L(this.g)).concat(L(this.b))}function S(){var e=E(this.opacity);return"".concat(1===e?"rgb(":"rgba(").concat(C(this.r),", ").concat(C(this.g),", ").concat(C(this.b)).concat(1===e?")":", ".concat(e,")"))}function E(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function C(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function L(e){return((e=C(e))<16?"0":"")+e.toString(16)}function P(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new I(e,t,r,n)}function O(e){if(e instanceof I)return new I(e.h,e.s,e.l,e.opacity);if(e instanceof a||(e=_(e)),!e)return new I;if(e instanceof I)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),s=NaN,l=o-i,u=(o+i)/2;return l?(s=t===o?(r-n)/l+6*(r0&&u<1?0:s,new I(s,l,u,e.opacity)}function I(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function R(e){return(e=(e||0)%360)<0?e+360:e}function D(e){return Math.max(0,Math.min(1,e||0))}function z(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}function F(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}n(a,_,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:x,formatHex:x,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return O(this).formatHsl()},formatRgb:b,toString:b}),n(A,T,i(a,{brighter:function(e){return e=null==e?s:Math.pow(s,e),new A(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?o:Math.pow(o,e),new A(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},clamp:function(){return new A(C(this.r),C(this.g),C(this.b),E(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:M,formatHex:M,formatHex8:function(){return"#".concat(L(this.r)).concat(L(this.g)).concat(L(this.b)).concat(L(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:S,toString:S})),n(I,(function(e,t,r,n){return 1===arguments.length?O(e):new I(e,t,r,null==n?1:n)}),i(a,{brighter:function(e){return e=null==e?s:Math.pow(s,e),new I(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?o:Math.pow(o,e),new I(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new A(z(e>=240?e-240:e+120,i,n),z(e,i,n),z(e<120?e+240:e-120,i,n),this.opacity)},clamp:function(){return new I(R(this.h),D(this.s),D(this.l),E(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=E(this.opacity);return"".concat(1===e?"hsl(":"hsla(").concat(R(this.h),", ").concat(100*D(this.s),"%, ").concat(100*D(this.l),"%").concat(1===e?")":", ".concat(e,")"))}}));var N=function(e){return function(){return e}};function B(e,t){return function(r){return e+r*t}}function j(e){return 1===(e=+e)?U:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):N(isNaN(t)?r:t)}}function U(e,t){var r=t-e;return r?B(e,r):N(isNaN(e)?t:e)}var q=function e(t){var r=j(t);function n(e,t){var n=r((e=T(e)).r,(t=T(t)).r),i=r(e.g,t.g),a=r(e.b,t.b),o=U(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return n.gamma=e,n}(1);function V(e){return function(t){var r,n,i=t.length,a=new Array(i),o=new Array(i),s=new Array(i);for(r=0;r=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=na&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:W(r,n)})),a=K.lastIndex;return a{"use strict";r(42541)},32662:e=>{"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},38467:(e,t,r)=>{"use strict";var n=r(32662),i=r(91740),a=r(93143),o=r(37091).templatedArray,s=r(54654);function l(e){return["In order for absolute positioning of the arrow to work, *a"+e+"ref* must be exactly the same as *"+e+"ref*, otherwise *a"+e+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+e+"ref* can be set to *pixel*,","in which case the *a"+e+"* value is specified in pixels","relative to *"+e+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function u(e,t,r){return["Sets the",e,"component of the arrow tail about the arrow head.","If `a"+e+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",t,"("+t,"to",r+").","If `a"+e+"ref` is not `pixel` and is exactly the same as `"+e+"ref`,","this is an absolute value on that axis,","like `"+e+"`, specified in the same coordinates as `"+e+"ref`."].join(" ")}e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (
), bold (), italics (),","hyperlinks (
). Tags , , "," are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use
to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more
HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[u("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[u("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("x","left","right"),l("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("y","bottom","top"),l("y")].join(" ")},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",s.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",s.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:i({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}})},17992:(e,t)=>{"use strict";t.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],t.defaultLine="#444",t.lightLine="#eee",t.background="#fff",t.borderLine="#BEC8D9",t.lightFraction=1e3/11},7605:(e,t,r)=>{"use strict";var n=r(23498),i=r(22036),a=r(19045).isTypedArray,o=e.exports={},s=r(17992);o.defaults=s.defaults;var l=o.defaultLine=s.defaultLine;o.lightLine=s.lightLine;var u=o.background=s.background;function c(e){if(i(e)||"string"!==typeof e)return e;var t=e.trim();if("rgb"!==t.substr(0,3))return e;var r=t.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return e;var n=r[1].trim().split(/\s*[\s,]\s*/),a="a"===t.charAt(3)&&4===n.length;if(!a&&3!==n.length)return e;for(var o=0;o=0))return e;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}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 i=n(t||u).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.interpolate=function(e,t,r){var i=n(e).toRgb(),a=n(t).toRgb(),o={r:r*i.r+(1-r)*a.r,g:r*i.g+(1-r)*a.g,b:r*i.b+(1-r)*a.b};return n(o).toRgbString()},o.contrast=function(e,t,r){var i=n(e);return 1!==i.getAlpha()&&(i=n(o.combine(e,u))),(i.isDark()?t?i.lighten(t):u:r?i.darken(r):l).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,i,s=Object.keys(e);for(t=0;t{"use strict";var n=r(49080),i=r(91740),a=r(64022).extendFlat,o=r(72587).overrideAll;e.exports=o({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",description:["Sets the x position with respect to `xref` of the color bar (in plot fraction).","When `xref` is *paper*, defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*.","When `xref` is *container*, defaults to *1* when `orientation` is *v* and","0.5 when `orientation` is *h*.","Must be between *0* and *1* if `xref` is *container*","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",description:["Sets the y position with respect to `yref` of the color bar (in plot fraction).","When `yref` is *paper*, defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*.","When `yref` is *container*, defaults to 0.5 when `orientation` is *v* and","1 when `orientation` is *h*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:""}),ticklabeloverflow:a({},n.ticklabeloverflow,{description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","In other cases the default is *hide past div*."].join(" ")}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",description:["Determines where tick labels are drawn relative to the ticks.","Left and right options are used when `orientation` is *h*,","top and bottom when `orientation` is *v*."].join(" ")},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({description:"Sets the color bar's tick label font"}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:i({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:i({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root")},97570:(e,t,r)=>{"use strict";var n=r(84468),i=r(37091),a=r(43452),o=r(3118),s=r(83193),l=r(89655),u=r(31797);e.exports=function(e,t,r){var c=i.newContainer(t,"colorbar"),f=e.colorbar||{};function d(e,t){return n.coerce(f,c,u,e,t)}var h=r.margin||{t:0,b:0,l:0,r:0},p=r.width-h.l-h.r,v=r.height-h.t-h.b,m="v"===d("orientation"),g=d("thicknessmode");d("thickness","fraction"===g?30/(m?p:v):30);var y=d("lenmode");d("len","fraction"===y?1:m?v:p);var x,b,_,w="paper"===d("yref"),k="paper"===d("xref"),T="left";m?(_="middle",T=k?"left":"right",x=k?1.02:1,b=.5):(_=w?"bottom":"top",T="center",x=.5,b=w?1.02:1),n.coerce(f,c,{x:{valType:"number",min:k?-2:0,max:k?3:1,dflt:x}},"x"),n.coerce(f,c,{y:{valType:"number",min:w?-2:0,max:w?3:1,dflt:b}},"y"),d("xanchor",T),d("xpad"),d("yanchor",_),d("ypad"),n.noneOrAll(f,c,["x","y"]),d("outlinecolor"),d("outlinewidth"),d("bordercolor"),d("borderwidth"),d("bgcolor");var A=n.coerce(f,c,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:m?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");d("ticklabeloverflow",-1!==A.indexOf("inside")?"hide past domain":"hide past div"),a(f,c,d,"linear");var M=r.font,S={noAutotickangles:!0,outerTicks:!1,font:M};-1!==A.indexOf("inside")&&(S.bgColor="black"),l(f,c,d,"linear",S),s(f,c,d,"linear",S),o(f,c,d,"linear",S),d("title.text",r._dfltTitle.colorbar);var E=c.showticklabels?c.tickfont:M,C=n.extendFlat({},M,{family:E.family,size:n.bigFont(E.size)});n.coerceFont(d,"title.font",C),d("title.side",m?"top":"right")}},13753:(e,t,r)=>{"use strict";var n=r(84468);e.exports=function(e){return n.isPlainObject(e.colorbar)}},6636:(e,t,r)=>{"use strict";var n=r(31797),i=r(51195).counter,a=r(60693),o=r(28538).scales,s=a(o);function l(e){return"`"+e+"`"}e.exports=function(e,t){e=e||"";var r,a,u=(t=t||{}).cLetter||"c",c="onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),f="noScale"in t?t.noScale:"marker.line"===e,d="showScaleDflt"in t?t.showScaleDflt:"z"===u,h="string"===typeof t.colorscaleDflt?o[t.colorscaleDflt]:null,p=t.editTypeOverride||"",v=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,a=t.colorAttr):a="in "+l(v+(r={z:"z",c:"color"}[u]));var m=c?" Has an effect only if "+a+" is set to a numerical array.":"",g=u+"auto",y=u+"min",x=u+"max",b=u+"mid",_=l(v+g),w=l(v+y),k=l(v+x),T=w+" and "+k,A={};A[y]=A[x]=void 0;var M={};M[g]=!1;var S={};return"color"===r&&(S.color={valType:"color",arrayOk:!0,editType:p||"style",description:["Sets the",e,"color.","It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to",T,"if set."].join(" ")},t.anim&&(S.color.anim=!0)),S[g]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:A,description:["Determines whether or not the color domain is computed","with respect to the input data (here "+a+") or the bounds set in",T+m,"Defaults to `false` when",T,"are set by the user."].join(" ")},S[y]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:M,description:["Sets the lower bound of the color domain."+m,"Value should have the same units as",a,"and if set,",k,"must be set as well."].join(" ")},S[x]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:M,description:["Sets the upper bound of the color domain."+m,"Value should have the same units as",a,"and if set,",w,"must be set as well."].join(" ")},S[b]={valType:"number",dflt:null,editType:"calc",impliedEdits:A,description:["Sets the mid-point of the color domain by scaling",w,"and/or",k,"to be equidistant to this point."+m,"Value should have the same units as",a+".","Has no effect when",_,"is `false`."].join(" ")},S.colorscale={valType:"colorscale",editType:"calc",dflt:h,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+m,"The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use",T+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+s+"."].join(" ")},S.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether the colorscale is a default palette (`autocolorscale: true`)","or the palette determined by",l(v+"colorscale")+"."+m,"In case `colorscale` is unspecified or `autocolorscale` is true, the default","palette will be chosen according to whether numbers in the `color` array are","all positive, all negative or mixed."].join(" ")},S.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true."+m,"If true,",w,"will correspond to the last color","in the array and",k,"will correspond to the first color."].join(" ")},f||(S.showscale={valType:"boolean",dflt:d,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace."+m].join(" ")},S.colorbar=n),t.noColorAxis||(S.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc",description:["Sets a reference to a shared color axis.","References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc.","Settings for these shared color axes are set in the layout, under","`layout.coloraxis`, `layout.coloraxis2`, etc.","Note that multiple color scales can be linked to the same color axis."].join(" ")}),S}},95500:(e,t,r)=>{"use strict";var n=r(22036),i=r(84468),a=r(73084).extractOpts;e.exports=function(e,t,r){var o,s=e._fullLayout,l=r.vals,u=r.containerStr,c=u?i.nestedProperty(t,u).get():t,f=a(c),d=!1!==f.auto,h=f.min,p=f.max,v=f.mid,m=function(){return i.aggNums(Math.min,null,l)},g=function(){return i.aggNums(Math.max,null,l)};(void 0===h?h=m():d&&(h=c._colorAx&&n(h)?Math.min(h,m()):m()),void 0===p?p=g():d&&(p=c._colorAx&&n(p)?Math.max(p,g()):g()),d&&void 0!==v&&(p-v>v-h?h=v-(p-v):p-v=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync("colorscale",o))}},93408:(e,t,r)=>{"use strict";var n=r(84468),i=r(73084).hasColorscale,a=r(73084).extractOpts;e.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function o(e,i){var o=i.container?n.nestedProperty(e,i.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s{"use strict";var n=r(22036),i=r(84468),a=r(13753),o=r(97570),s=r(28538).isValid,l=r(38361).traceIs;function u(e,t){var r=t.slice(0,t.length-1);return t?i.nestedProperty(e,r).get()||{}:e}e.exports=function e(t,r,c,f,d){var h=d.prefix,p=d.cLetter,v="_module"in r,m=u(t,h),g=u(r,h),y=u(r._template||{},h)||{},x=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,c,f,d)};if(v){var b=c._colorAxes||{},_=f(h+"coloraxis");if(_){var w=l(r,"contour")&&i.nestedProperty(r,"contours.coloring").get()||"heatmap",k=b[_];return void(k?(k[2].push(x),k[0]!==w&&(k[0]=!1,i.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):b[_]=[w,r,[x]])}}var T=m[p+"min"],A=m[p+"max"],M=n(T)&&n(A)&&T{"use strict";var n=r(41871),i=r(23498),a=r(22036),o=r(84468),s=r(7605),l=r(28538).isValid;var u=["showscale","autocolorscale","colorscale","reversescale","colorbar"],c=["min","max","mid","auto"];function f(e){var t,r,n,i=e._colorAx,a=i||e,o={};for(r=0;r=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function p(e,t){t=t||{};for(var r=e.domain,o=e.range,l=o.length,u=new Array(l),c=0;c{"use strict";var n=r(28538),i=r(73084);e.exports={moduleType:"component",name:"colorscale",attributes:r(6636),layoutAttributes:r(10247),supplyLayoutDefaults:r(14592),handleDefaults:r(16155),crossTraceDefaults:r(93408),calc:r(95500),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}},10247:(e,t,r)=>{"use strict";var n=r(64022).extendFlat,i=r(6636),a=r(28538).scales,o="Note that `autocolorscale` must be true for this attribute to work.";e.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:a.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",o].join(" ")},sequentialminus:{valType:"colorscale",dflt:a.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",o].join(" ")},diverging:{valType:"colorscale",dflt:a.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",o].join(" ")}},coloraxis:n({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},14592:(e,t,r)=>{"use strict";var n=r(84468),i=r(37091),a=r(10247),o=r(16155);e.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,u=t._colorAxes;function c(e,t){return n.coerce(s,l,a.coloraxis,e,t)}for(var f in u){var d=u[f];if(d[0])s=e[f]||{},(l=i.newContainer(t,f,"coloraxis"))._name=f,o(s,l,t,c,{prefix:"",cLetter:"c"});else{for(var h=0;h{"use strict";var n=r(23498),i={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},a=i.RdBu;function o(e){var t=0;if(!Array.isArray(e)||e.length<2)return!1;if(!e[0]||!e[e.length-1])return!1;if(0!==+e[0][0]||1!==+e[e.length-1][0])return!1;for(var r=0;r{"use strict";e.exports=function(e,t,r,n,i){var a=(e-r)/(n-r),o=a+t/(n-r),s=(a+o)/2;return"left"===i||"bottom"===i?a:"center"===i||"middle"===i?s:"right"===i||"top"===i?o:a<2/3-s?a:o>4/3-s?o:s}},34240:(e,t,r)=>{"use strict";var n=r(84468),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(e,t,r,a){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*t),0,2),i[t][e]}},2705:(e,t)=>{"use strict";t.selectMode=function(e){return"lasso"===e||"select"===e},t.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.openMode=function(e){return"drawline"===e||"drawopenpath"===e},t.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}},25732:(e,t,r)=>{"use strict";var n=r(58530),i=r(59283),a=r(17390),o=r(84468).removeElement,s=r(93143),l=e.exports={};l.align=r(17645),l.getCursor=r(34240);var u=r(1751);function c(){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 f(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}l.unhover=u.wrapped,l.unhoverRaw=u.raw,l.init=function(e){var t,r,n,u,d,h,p,v,m=e.gd,g=1,y=m._context.doubleClickDelay,x=e.element;m._mouseDownTime||(m._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,a?(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&&(g=Math.max(g-1,1)),m._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(g,h),!v){var r;try{r=new MouseEvent("click",t)}catch(a){var n=f(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}},l.coverSlip=c},1751:(e,t,r)=>{"use strict";var n=r(13711),i=r(95938),a=r(51124).getGraphDiv,o=r(99961),s=e.exports={};s.wrapped=function(e,t,r){(e=a(e))._fullLayout&&i.clear(e._fullLayout._uid+o.HOVERID),s.raw(e,t,r)},s.raw=function(e,t){var r=e._fullLayout,i=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&&i&&e.emit("plotly_unhover",{event:t,points:i}))}},2703:(e,t)=>{"use strict";t.T={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style",description:["Sets the dash style of lines. Set to a dash type string","(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)","or a dash length list in px (eg *5px,10px,2px,2px*)."].join(" ")},t.k={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")}},3172:(e,t,r)=>{"use strict";var n=r(41871),i=r(84468),a=i.numberFormat,o=r(22036),s=r(23498),l=r(38361),u=r(7605),c=r(39265),f=i.strTranslate,d=r(13480),h=r(28795),p=r(83943).LINE_SPACING,v=r(64253).DESELECTDIM,m=r(31811),g=r(14204),y=r(82561).appendArrayPointValue,x=e.exports={};function b(e){return"none"===e?void 0:e}x.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,c=t.lineposition,f=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call(u.fill,a),i&&e.style("font-weight",i),n&&e.style("font-style",n),r&&e.style("font-variant",r),f&&e.style("text-transform",b(function(e){return _[e]}(f))),l&&e.style("text-shadow","auto"===l?d.makeTextShadow(u.contrast(a)):b(l)),c&&e.style("text-decoration-line",b(function(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(c)))};var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function w(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=i&&x.getPatternAttr(i.shape,0,"");if(o){var s=x.getPatternAttr(i.bgcolor,0,null),l=x.getPatternAttr(i.fgcolor,0,null),c=i.fgopacity,f=x.getPatternAttr(i.size,0,8),d=x.getPatternAttr(i.solidity,0,.3),h=t.uid;x.pattern(e,"point",r,h,o,f,d,void 0,i.fillmode,s,l,c)}else if(a&&"none"!==a.type){var p,v,m=a.type,g="scatterfill-"+t.uid;if(n&&(g="legendfill-"+t.uid),n||void 0===a.start&&void 0===a.stop)"horizontal"===m&&(m+="reversed"),e.call(x.gradient,r,g,m,a.colorscale,"fill");else"horizontal"===m?(p={x:a.start,y:0},v={x:a.stop,y:0}):"vertical"===m&&(p={x:0,y:a.start},v={x:0,y:a.stop}),p.x=t._xA.c2p(void 0===p.x?t._extremes.x.min[0].val:p.x,!0),p.y=t._yA.c2p(void 0===p.y?t._extremes.y.min[0].val:p.y,!0),v.x=t._xA.c2p(void 0===v.x?t._extremes.x.max[0].val:v.x,!0),v.y=t._yA.c2p(void 0===v.y?t._extremes.y.max[0].val:v.y,!0),e.call(E,r,g,"linear",a.colorscale,"fill",p,v,!0,!1)}else t.fillcolor&&e.call(u.fill,t.fillcolor)}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,i){e.call(x.setPosition,t,r).call(x.setSize,n,i)},x.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);return!!(o(i)&&o(a)&&t.node())&&("text"===t.node().nodeName?t.attr("x",i).attr("y",a):t.attr("transform",f(i,a)),!0)},x.translatePoints=function(e,t,r){e.each((function(e){var i=n.select(this);x.translatePoint(e,i,t,r)}))},x.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,i=t.yaxis;e.each((function(t){var a=t[0].trace,o=a.xcalendar,s=a.ycalendar,u=l.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(u).each((function(e){x.hideOutsideRangePoint(e,n.select(this),r,i,o,s)}))}))}},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,i){t.style("fill","none");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";u.stroke(t,n||a.color),x.dashLine(t,s,o)},x.lineGroupStyle=function(e,t,r,i){e.style("fill","none").each((function(e){var a=(((e||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=i||a.dash||"";n.select(this).call(u.stroke,r||a.color).call(x.dashLine,s,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,t){var r=n.select(e.node());w(e,((r.data()[0]||[])[0]||{}).trace||{},t,!1)},x.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each((function(e){var i=n.select(this);e[0].trace&&w(i,e[0].trace,t,r)}))};var k=r(54309);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(k).forEach((function(e){var t=k[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,x.symbolBackOffs[r]=t.backoff||0,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 T=x.symbolNames.length;function A(e,t,r,n){var i=e%100;return x.symbolFuncs[i](t,r,n)+(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>=T||e>=400?0:Math.floor(Math.max(e,0))};var M=a("~f"),S={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function E(e,t,r,a,o,l,c,f,d,h){var p,v=o.length;"linear"===a?p={node:"linearGradient",attrs:{x1:c.x,y1:c.y,x2:f.x,y2:f.y,gradientUnits:d?"userSpaceOnUse":"objectBoundingBox"},reversed:h}:"radial"===a&&(p={node:"radialGradient",reversed:h});for(var m=new Array(v),g=0;g=0&&void 0===e.i&&(e.i=o.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):void 0===e.mo?s.opacity:e.mo),n.ms2mrc){var c;c="various"===e.ms||"various"===s.size?3:n.ms2mrc(e.ms),e.mrc=c,n.selectedSizeFn&&(c=e.mrc=n.selectedSizeFn(e));var f=x.symbolNumber(e.mx||s.symbol)||0;e.om=f%200>=100;var d=ne(e,r),h=W(e,r);t.attr("d",A(f,c,d,h))}var p,v,m,g=!1;if(e.so)m=l.outlierwidth,v=l.outliercolor,p=s.outliercolor;else{var y=(l||{}).width;m=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,v="mlc"in e?e.mlcc=n.lineScale(e.mlc):i.isArrayOrTypedArray(l.color)?u.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(p=u.defaultLine,g=!0),p="mc"in e?e.mcc=n.markerScale(e.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(e))}if(e.om)t.call(u.stroke,p).style({"stroke-width":(m||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:m)+"px");var b=s.gradient,_=e.mgt;_?g=!0:_=b&&b.type,i.isArrayOrTypedArray(_)&&(_=_[0],S[_]||(_=0));var w=s.pattern,k=w&&x.getPatternAttr(w.shape,e.i,"");if(_&&"none"!==_){var T=e.mgc;T?g=!0:T=b.color;var M=r.uid;g&&(M+="-"+e.i),x.gradient(t,a,M,_,[[0,T],[1,p]],"fill")}else if(k){var E=!1,C=w.fgcolor;!C&&o&&o.color&&(C=o.color,E=!0);var L=x.getPatternAttr(C,e.i,o&&o.color||null),P=x.getPatternAttr(w.bgcolor,e.i,null),O=w.fgopacity,I=x.getPatternAttr(w.size,e.i,8),R=x.getPatternAttr(w.solidity,e.i,.3);E=E||e.mcc||i.isArrayOrTypedArray(w.shape)||i.isArrayOrTypedArray(w.bgcolor)||i.isArrayOrTypedArray(w.fgcolor)||i.isArrayOrTypedArray(w.size)||i.isArrayOrTypedArray(w.solidity);var D=r.uid;E&&(D+="-"+e.i),x.pattern(t,"point",a,D,k,I,R,e.mcc,w.fillmode,P,L,O)}else i.isArrayOrTypedArray(p)?u.fill(t,p[e.i]):u.fill(t,p);m&&u.stroke(t,v)}},x.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=x.tryColorscale(r,""),t.lineScale=x.tryColorscale(r,"line"),l.traceIs(e,"symbols")&&(t.ms2mrc=m.isBubble(e)?g(e):function(){return(r.size||6)/2}),e.selectedpoints&&i.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.marker||{},o=r.marker||{},s=n.marker||{},u=a.opacity,c=o.opacity,f=s.opacity,d=void 0!==c,h=void 0!==f;(i.isArrayOrTypedArray(u)||d||h)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?a.opacity:e.mo;return e.selected?d?c:t:h?f:v*t});var p=a.color,m=o.color,g=s.color;(m||g)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?m||t:g||t});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.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||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,c=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?l||t:c||(l?t:u.addOpacity(t,v))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedPointStyleFns(t),i=t.marker||{},a=[];r.selectedOpacityFn&&a.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&a.push((function(e,t){u.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&a.push((function(e,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);e.attr("d",A(x.symbolNumber(a),o,ne(n,t),W(n,t))),n.mrc2=o})),a.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 a;if(t.selectedpoints){var o=x.makeSelectedTextStyleFns(t);a=o.selectedTextColorFn}var s=t.texttemplate,l=r._fullLayout;e.each((function(e){var o=n.select(this),u=s?i.extractOption(e,t,"txt","texttemplate"):i.extractOption(e,t,"tx","text");if(u||0===u){if(s){var c=t._module.formatLabels,f=c?c(e,t,l):{},h={};y(h,t,e.i);var p=t._meta||{};u=i.texttemplateString(u,f,l._d3locale,h,e,p)}var v=e.tp||t.textposition,m=P(e,t),g=a?a(e):e.tc||t.textfont.color;o.call(x.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:m,color:g}).text(u).call(d.convertToTspans,r).call(L,v,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 i=n.select(this),a=r.selectedTextColorFn(e),o=e.tp||t.textposition,s=P(e,t);u.fill(i,a);var c=l.traceIs(t,"bar-like");L(i,o,s,e.mrc2||e.mrc,c)}))}};var O,I;function R(e,t,r){return r&&(e=j(e)),t?z(e[1]):D(e[0])}function D(e){var t=n.round(e,2);return O=t,t}function z(e){var t=n.round(e,2);return I=t,t}function F(e,t,r,n){var i=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+a*a,.25),u=Math.pow(o*o+s*s,.25),c=(u*u*i-l*l*o)*n,f=(u*u*a-l*l*s)*n,d=3*u*(l+u),h=3*l*(l+u);return[[D(t[0]+(d&&c/d)),z(t[1]+(d&&f/d))],[D(t[0]-(h&&c/h)),z(t[1]-(h&&f/h))]]}x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],i=[];for(r=1;r=u||w>=f&&w<=u)&&(k<=d&&k>=c||k>=d&&k<=c)&&(e=[w,k])}return e}x.steps=function(e){var t=N[e]||B;return function(e){for(var r="M"+D(e[0][0])+","+z(e[0][1]),n=e.length,i=1;i=1e4&&(x.savedBBoxes={},U=0),r&&(x.savedBBoxes[r]=m),U++,i.extendFlat({},m)},x.setClipUrl=function(e,t,r){e.attr("clip-path",V(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",i=e.attr?"attr":"setAttribute",a=e[n]("transform")||"";return t=t||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=f(t,r)).trim(),e[i]("transform",a),a},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",i=e.attr?"attr":"setAttribute",a=e[n]("transform")||"";return t=t||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+t+","+r+")").trim(),e[i]("transform",a),a};var H=/\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(H,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var G=/translate\([^)]*\)\s*$/;function W(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}x.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,i=n.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(G);e=1===t&&1===r?[]:[f(o,s),"scale("+t+","+r+")",f(-o,-s)],l&&e.push(l),i.attr("transform",e.join(""))}}))},x.getMarkerStandoff=W;var Y,Z,X,K,J,$,Q=Math.atan2,ee=Math.cos,te=Math.sin;function re(e,t){var r=t[0],n=t[1];return[r*ee(e)-n*te(e),r*te(e)+n*ee(e)]}function ne(e,t){var r,n,a=e.ma;void 0===a&&((a=t.marker.angle)&&!i.isArrayOrTypedArray(a)||(a=0));var s=t.marker.angleref;if("previous"===s||"north"===s){if(t._geo){var l=t._geo.project(e.lonlat);r=l[0],n=l[1]}else{var u=t._xA,c=t._yA;if(!u||!c)return 90;r=u.c2p(e.x),n=c.c2p(e.y)}if(t._geo){var f,d=e.lonlat[0],h=e.lonlat[1],p=t._geo.project([d,h+1e-5]),v=t._geo.project([d+1e-5,h]),m=Q(v[1]-n,v[0]-r),g=Q(p[1]-n,p[0]-r);if("north"===s)f=a/180*Math.PI;else if("previous"===s){var y=d/180*Math.PI,x=h/180*Math.PI,b=Y/180*Math.PI,_=Z/180*Math.PI,w=b-y,k=ee(_)*te(w),T=te(_)*ee(x)-ee(_)*te(x)*ee(w);f=-Q(k,T)-Math.PI,Y=d,Z=h}var A=re(m,[ee(f),0]),M=re(g,[te(f),0]);a=Q(A[1]+M[1],A[0]+M[0])/Math.PI*180,"previous"!==s||$===t.uid&&e.i===J+1||(a=null)}if("previous"===s&&!t._geo)if($===t.uid&&e.i===J+1&&o(r)&&o(n)){var S=r-X,E=n-K,C=t.line&&t.line.shape||"",L=C.slice(C.length-1);"h"===L&&(E=0),"v"===L&&(S=0),a+=Q(E,S)/Math.PI*180+90}else a=null}return X=r,K=n,J=e.i,$=t.uid,a}x.getMarkerAngle=ne},54309:(e,t,r)=>{"use strict";var n,i,a,o,s=r(24100),l=r(41871).round,u="M0,0Z",c=Math.sqrt(2),f=Math.sqrt(3),d=Math.PI,h=Math.cos,p=Math.sin;function v(e){return null===e}function m(e,t,r){if((!e||e%360===0)&&!t)return r;if(a===e&&o===t&&n===r)return i;function l(e,r){var n=h(e),i=p(e),a=r[0],o=r[1]+(t||0);return[a*n-o*i,a*i+o*n]}a=e,o=t,n=r;for(var u=e/180*d,c=0,f=0,v=s(r),m="",g=0;g{"use strict";var n=r(91740),i=r(97174).hoverlabel,a=r(64022).extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:a({},i.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:n({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:"none"}}},50079:(e,t,r)=>{"use strict";var n=r(84468),i=r(38361);function a(e,t,r,i){i=i||n.identity,Array.isArray(e)&&(t[0][r]=i(e))}e.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 s=0;s{"use strict";var n=r(38361),i=r(12914).hover;e.exports=function(e,t,r){var a=n.getComponentMethod("annotations","onClick")(e,e._hoverdata);function o(){e.emit("plotly_click",{points:e._hoverdata,event:t})}void 0!==r&&i(e,t,r,!0),e._hoverdata&&t&&t.target&&(a&&a.then?a.then(o):o(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}},99961:e=>{"use strict";e.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},62168:(e,t,r)=>{"use strict";var n=r(84468),i=r(25087),a=r(15171);e.exports=function(e,t,r,o){var s=n.extendFlat({},o.hoverlabel);t.hovertemplate&&(s.namelength=-1),a(e,t,(function(r,a){return n.coerce(e,t,i,r,a)}),s)}},82561:(e,t,r)=>{"use strict";var n=r(84468);t.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},t.isTraceInSubplots=function(e,r){if("splom"===e.type){for(var n=e.xaxes||[],i=e.yaxes||[],a=0;a=0&&r.index{"use strict";var n=r(41871),i=r(22036),a=r(23498),o=r(84468),s=o.pushUnique,l=o.strTranslate,u=o.strRotate,c=r(13711),f=r(13480),d=r(54015),h=r(3172),p=r(7605),v=r(25732),m=r(85729),g=r(38361),y=r(82561),x=r(99961),b=r(11217),_=r(81017),w=x.YANGLE,k=Math.PI*w/180,T=1/Math.sin(k),A=Math.cos(k),M=Math.sin(k),S=x.HOVERARROWSIZE,E=x.HOVERTEXTPAD,C={box:!0,ohlc:!0,violin:!0,candlestick:!0},L={scatter:!0,scattergl:!0,splom:!0};function P(e,t){return e.distance-t.distance}function O(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}t.hover=function(e,t,r,a){e=o.getGraphDiv(e);var l=t.target;o.throttle(e._fullLayout._uid+x.HOVERID,x.HOVERMINTIME,(function(){!function(e,t,r,a,l){r||(r="xy");var u,f,h,x=Array.isArray(r)?r:[r],b=e._fullLayout,_=b.hoversubplots,w=b._plots||[],k=w[r],A=b._has("cartesian"),M=t.hovermode||b.hovermode,E="x"===(M||"").charAt(0),I="y"===(M||"").charAt(0);if(A&&(E||I)&&"axis"===_)for(var D=x.length,U=0;UX[0]._length||be<0||be>K[0]._length)return v.unhoverRaw(e,t)}if(t.pointerX=xe+X[0]._offset,t.pointerY=be+K[0]._offset,re="xval"in t?y.flat(x,t.xval):y.p2c(X,xe),ne="yval"in t?y.flat(x,t.yval):y.p2c(K,be),!i(re[0])||!i(ne[0]))return o.warn("Fx.hover failed",t,e),v.unhoverRaw(e,t)}var Te=1/0;function Ae(r,n){for(ae=0;aepe&&(ve.splice(0,pe),Te=ve[0].distance),A&&0!==te&&0===ve.length){he.distance=te,he.index=!1;var c=se._module.hoverPoints(he,fe,de,"closest",{hoverLayer:b._hoverlayer});if(c&&(c=c.filter((function(e){return e.spikeDistance<=te}))),c&&c.length){var f,d=c.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(d.length){var h=d[0];i(h.x0)&&i(h.y0)&&(f=Se(h),(!ge.vLinePoint||ge.vLinePoint.spikeDistance>f.spikeDistance)&&(ge.vLinePoint=f))}var v=c.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(v.length){var m=v[0];i(m.x0)&&i(m.y0)&&(f=Se(m),(!ge.hLinePoint||ge.hLinePoint.spikeDistance>f.spikeDistance)&&(ge.hLinePoint=f))}}}}}function Me(e,t,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(e.distance)Ne-1;Be--)Ve(ve[Be]);ve=je,Pe()}var He=e._hoverdata,Ge=[],We=V(e),Ye=H(e);for(ie=0;ie1||ve.length>1)||"closest"===M&&ye&&ve.length>1,ot=p.combine(b.plot_bgcolor||p.background,b.paper_bgcolor),st=R(ve,{gd:e,hovermode:M,rotateLabels:at,bgColor:ot,container:b._hoverlayer,outerContainer:b._paper.node(),commonLabelOpts:b.hoverlabel,hoverdistance:b.hoverdistance}),lt=st.hoverLabels;y.isUnifiedHover(M)||(!function(e,t,r,n){var i,a,o,s,l,u,c,f=t?"xa":"ya",d=t?"ya":"xa",h=0,p=1,v=e.size(),m=new Array(v),g=0,y=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(e){return e*r._invScaleX},k=function(e){return e*r._invScaleY};function A(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,a>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=o;i=!1}if(i){var n=0;for(s=0;st.pmax&&n++;for(s=e.length-1;s>=0&&!(n<=0);s--)(u=e[s]).pos>t.pmax-1&&(u.del=!0,n--);for(s=0;s=0;l--)e[l].dp-=o;for(s=e.length-1;s>=0&&!(n<=0);s--)(u=e[s]).pos+u.dp+u.size>t.pmax&&(u.del=!0,n--)}}}e.each((function(e){var n=e[f],i=e[d],a="x"===n._id.charAt(0),o=n.range;0===g&&o&&o[0]>o[1]!==a&&(p=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var u,c,h=z(e,t),v=e.anchor,A="end"===v?-1:1;if("middle"===v)c=(u=e.crossPos+(a?k(h.y-e.by/2):w(e.bx/2+e.tx2width/2)))+(a?k(e.by):w(e.bx));else if(a)c=(u=e.crossPos+k(S+h.y)-k(e.by/2-S))+k(e.by);else{var M=w(A*S+h.x),E=M+w(A*e.bx);u=e.crossPos+Math.min(M,E),c=e.crossPos+Math.max(M,E)}a?void 0!==b&&void 0!==_&&Math.min(c,_)-Math.max(u,b)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==y&&void 0!==x&&Math.min(c,x)-Math.max(u,y)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}m[g++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?T:1)/2,pmin:s,pmax:l}]})),m.sort((function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)}));for(;!i&&h<=v;){for(h++,i=!0,s=0;s.01&&C.pmin===L.pmin&&C.pmax===L.pmax){for(l=E.length-1;l>=0;l--)E[l].dp+=a;for(M.push.apply(M,E),m.splice(s+1,1),c=0,l=M.length-1;l>=0;l--)c+=M[l].dp;for(o=c/M.length,l=M.length-1;l>=0;l--)M[l].dp-=o;i=!1}else s++}m.forEach(A)}for(s=m.length-1;s>=0;s--){var P=m[s];for(l=P.length-1;l>=0;l--){var O=P[l],I=O.datum;I.offset=O.dp,I.del=O.del}}}(lt,at,b,st.commonLabelBoundingBox),F(lt,at,b._invScaleX,b._invScaleY));if(l&&l.tagName){var ut=g.getComponentMethod("annotations","hasClickToShow")(e,Ge);d(n.select(l),ut?"pointer":"")}if(!l||a||!function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=e._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(e,0,He))return;He&&e.emit("plotly_unhover",{event:t,points:He});e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:X,yaxes:K,xvals:re,yvals:ne})}(e,t,r,a,l)}))},t.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var i=t.gd,a=V(i),o=H(i),s=!1,l=R(e.map((function(e){var r=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,u=e.eventData;if(u){var c=Math.min(r,n),f=Math.max(r,n),d=Math.min(s,l),h=Math.max(s,l),v=e.trace;if(g.traceIs(v,"gl3d")){var m=i._fullLayout[v.scene]._scene.container,y=m.offsetLeft,x=m.offsetTop;c+=y,f+=y,d+=x,h+=x}u.bbox={x0:c+o,x1:f+o,y0:d+a,y1:h+a},t.inOut_bbox&&t.inOut_bbox.push(u.bbox)}else u=!1;return{color:e.color||p.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,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,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:u}})),{gd:i,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||p.background,container:n.select(t.container),outerContainer:t.outerContainer||t.container}).hoverLabels,u=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 R(e,t){var r=t.gd,i=r._fullLayout,a=t.hovermode,s=t.rotateLabels,c=t.bgColor,d=t.container,v=t.outerContainer,m=t.commonLabelOpts||{};if(0===e.length)return[[]];var k=t.fontFamily||x.HOVERFONT,T=t.fontSize||x.HOVERFONTSIZE,A=t.fontWeight||i.font.weight,M=t.fontStyle||i.font.style,C=t.fontVariant||i.font.variant,L=t.fontTextcase||i.font.textcase,P=t.fontLineposition||i.font.lineposition,I=t.fontShadow||i.font.shadow,R=e[0],z=R.xa,F=R.ya,N=a.charAt(0),B=N+"Label",j=R[B];if(void 0===j&&"multicategory"===z.type)for(var U=0;Ui.width-w&&(O=i.width-w),t.attr("d","M"+(y-O)+",0L"+(y-O+S)+","+_+S+"H"+w+"v"+_+(2*E+b.height)+"H"+-w+"V"+_+S+"H"+(y-O-S)+"Z"),y=O,Q.minX=y-w,Q.maxX=y+w,"top"===z.side?(Q.minY=x-(2*E+b.height),Q.maxY=x-E):(Q.minY=x+E,Q.maxY=x+(2*E+b.height))}else{var D,N,B;"right"===F.side?(D="start",N=1,B="",y=z._offset+z._length):(D="end",N=-1,B="-",y=z._offset),x=F._offset+(R.y0+R.y1)/2,s.attr("text-anchor",D),t.attr("d","M0,0L"+B+S+","+S+"V"+(E+b.height/2)+"h"+B+(2*E+b.width)+"V-"+(E+b.height/2)+"H"+B+S+"V-"+S+"Z"),Q.minY=x-(E+b.height/2),Q.maxY=x+(E+b.height/2),"right"===F.side?(Q.minX=y+S,Q.maxX=y+S+(2*E+b.width)):(Q.minX=y-S-(2*E+b.width),Q.maxX=y-S);var U,q=b.height/2,H=V-b.top-q,W="clip"+i._uid+"commonlabel"+F._id;if(y=0?pe:ve+ye=0?ve:Me+ye=0?de:he+xe=0?he:Se+xe=0,"top"!==e.idealAlign&&J||!$?J?(B+=q/2,e.anchor="start"):e.anchor="middle":(B-=q/2,e.anchor="end"),e.crossPos=B;else{if(e.pos=B,J=N+U/2+Q<=H,$=N-U/2-Q>=0,"left"!==e.idealAlign&&J||!$)if(J)N+=U/2,e.anchor="start";else{e.anchor="middle";var ee=Q/2,te=N+ee-H,re=N-ee;te>0&&(N-=te),re<0&&(N+=-re)}else N-=U/2,e.anchor="end";e.crossPos=N}_.attr("text-anchor",e.anchor),R&&O.attr("text-anchor",e.anchor),t.attr("transform",l(N,B)+(s?u(w):""))})),{hoverLabels:Ee,commonLabelBoundingBox:Q}}function D(e,t,r,n,i,a){var s="",l="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=o.templateString(e.name,e.trace._meta)),s=U(e.name,e.nameLength));var u=r.charAt(0),c="x"===u?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(l+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(l+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(l+=(l?"z: ":"")+e.zLabel)):t&&e[u+"Label"]===i?l=e[c+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(l=e.yLabel):l=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(l+=(l?"
":"")+e.text),void 0!==e.extraText&&(l+=(l?"
":"")+e.extraText),a&&""===l&&!e.hovertemplate&&(""===s&&a.remove(),l=s);var f=e.hovertemplate||!1;if(f){var d=e.hovertemplateLabels||e;e[u+"Label"]!==i&&(d[u+"other"]=d[u+"Val"],d[u+"otherLabel"]=d[u+"Label"]),l=(l=o.hovertemplateString(f,d,n._d3locale,e.eventData[0]||{},e.trace._meta)).replace(I,(function(t,r){return s=U(r,e.nameLength),""}))}return[l,s]}function z(e,t){var r=0,n=e.offset;return t&&(n*=-M,r=e.offset*A),{x:r,y:n}}function F(e,t,r,i){var a=function(e){return e*r},o=function(e){return e*i};e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var i=r.select("text.nums"),s=e.anchor,l="end"===s?-1:1,u=function(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(S+E),n=r+t*(e.txwidth+E);return"middle"===e.anchor&&(r-=e.tx2width/2,n+=e.txwidth/2+E),{alignShift:t,textShiftX:r,text2ShiftX:n}}(e),c=z(e,t),d=c.x,p=c.y,v="middle"===s;r.select("path").attr("d",v?"M-"+a(e.bx/2+e.tx2width/2)+","+o(p-e.by/2)+"h"+a(e.bx)+"v"+o(e.by)+"h-"+a(e.bx)+"Z":"M0,0L"+a(l*S+d)+","+o(S+p)+"v"+o(e.by/2-S)+"h"+a(l*e.bx)+"v-"+o(e.by)+"H"+a(l*S+d)+"V"+o(p-S)+"Z");var m=d+u.textShiftX,g=p+e.ty0-e.by/2+E,y=e.textAlign||"auto";"auto"!==y&&("left"===y&&"start"!==s?(i.attr("text-anchor","start"),m=v?-e.bx/2-e.tx2width/2+E:-e.bx-E):"right"===y&&"end"!==s&&(i.attr("text-anchor","end"),m=v?e.bx/2-e.tx2width/2-E:e.bx+E)),i.call(f.positionText,a(m),o(g)),e.tx2width&&(r.select("text.name").call(f.positionText,a(u.text2ShiftX+u.alignShift*E+d),o(p+e.ty0-e.by/2+E)),r.select("rect").call(h.setRect,a(u.text2ShiftX+(u.alignShift-1)*e.tx2width/2+d),o(p-e.by/2-1),a(e.tx2width),o(e.by+2)))}))}function N(e,t){var r=e.index,n=e.trace||{},a=e.cd[0],s=e.cd[r]||{};function l(e){return e||i(e)&&0===e}var u=Array.isArray(r)?function(e,t){var i=o.castOption(a,r,e);return l(i)?i:o.extractOption({},n,"",t)}:function(e,t){return o.extractOption(s,n,e,t)};function c(t,r,n){var i=u(r,n);l(i)&&(e[t]=i)}if(c("hoverinfo","hi","hoverinfo"),c("bgcolor","hbg","hoverlabel.bgcolor"),c("borderColor","hbc","hoverlabel.bordercolor"),c("fontFamily","htf","hoverlabel.font.family"),c("fontSize","hts","hoverlabel.font.size"),c("fontColor","htc","hoverlabel.font.color"),c("fontWeight","htw","hoverlabel.font.weight"),c("fontStyle","hty","hoverlabel.font.style"),c("fontVariant","htv","hoverlabel.font.variant"),c("nameLength","hnl","hoverlabel.namelength"),c("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:m.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:m.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 f=m.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+f+" / -"+m.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xb1 "+f,"x"===t&&(e.distance+=1)}if(!isNaN(e.yerr)&&!("log"===e.ya.type&&e.yerr<=0)){var d=m.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+d+" / -"+m.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xb1 "+d,"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 B(e,t,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,u=r.event,c=!!t.hLinePoint,f=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),f||c){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(c){var v,g,y=t.hLinePoint;n=y&&y.xa,"cursor"===(i=y&&y.ya).spikesnap?(v=u.pointerX,g=u.pointerY):(v=n._offset+y.x,g=i._offset+y.y);var x,b,_=a.readability(y.color,d)<1.5?p.contrast(d):y.color,w=i.spikemode,k=i.spikethickness,T=i.spikecolor||_,A=m.getPxPosition(e,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,b=v),-1!==w.indexOf("across")){var M=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":k,stroke:T,"stroke-dasharray":h.dashStyle(i.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":k+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==i.side?k:-k),cy:g,r:k,fill:T}).classed("spikeline",!0)}if(f){var E,C,L=t.vLinePoint;n=L&&L.xa,i=L&&L.ya,"cursor"===n.spikesnap?(E=u.pointerX,C=u.pointerY):(E=n._offset+L.x,C=i._offset+L.y);var P,O,I=a.readability(L.color,d)<1.5?p.contrast(d):L.color,R=n.spikemode,D=n.spikethickness,z=n.spikecolor||I,F=m.getPxPosition(e,n);if(-1!==R.indexOf("toaxis")||-1!==R.indexOf("across")){if(-1!==R.indexOf("toaxis")&&(P=F,O=C),-1!==R.indexOf("across")){var N=n._counterDomainMin,B=n._counterDomainMax;"free"===n.anchor&&(N=Math.min(N,n.position),B=Math.max(B,n.position)),P=l.t+(1-B)*l.h,O=l.t+(1-N)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":D,stroke:z,"stroke-dasharray":h.dashStyle(n.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":D+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==R.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==n.side?D:-D),r:D,fill:z}).classed("spikeline",!0)}}}function j(e,t){return!t||(t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint)}function U(e,t){return f.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}function q(e,t,r){var n=t[e+"a"],i=t[e+"Val"],a=t.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=t.trace[e+"periodalignment"];if(o){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var u=s[e+"End"];void 0===u&&(u=s[e]);var c=u-l;"end"===o?i+=c:"middle"===o&&(i+=c/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=a.t.dPos)),i}function V(e){return e.offsetTop+e.clientTop}function H(e){return e.offsetLeft+e.clientLeft}function G(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,a=n.top,s=i+n.width,l=a+n.height,u=o.apply3DTransform(r._invTransform)(i,a),c=o.apply3DTransform(r._invTransform)(s,l),f=u[0],d=u[1],h=c[0],p=c[1];return{x:f,y:d,width:h-f,height:p-d,top:Math.min(d,p),left:Math.min(f,h),right:Math.max(f,h),bottom:Math.max(d,p)}}},15171:(e,t,r)=>{"use strict";var n=r(84468),i=r(7605),a=r(82561).isUnifiedHover;e.exports=function(e,t,r,o){o=o||{};var s=t.legend;function l(e){o.font[e]||(o.font[e]=s?t.legend.font[e]:t.font[e])}t&&a(t.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(o.bgcolor||(o.bgcolor=i.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)}},71886:(e,t,r)=>{"use strict";var n=r(84468),i=r(97174);e.exports=function(e,t){function r(r,a){return void 0!==t[r]?t[r]:n.coerce(e,t,i,r,a)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},32212:(e,t,r)=>{"use strict";var n=r(41871),i=r(84468),a=r(25732),o=r(82561),s=r(97174),l=r(12914);e.exports={moduleType:"component",name:"fx",constants:r(99961),schema:{layout:s},attributes:r(25087),layoutAttributes:s,supplyLayoutGlobalDefaults:r(43465),supplyDefaults:r(62168),supplyLayoutDefaults:r(80001),calc:r(50079),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,r){return i.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return i.castOption(e,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,loneUnhover:function(e){var t=i.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:r(84896)}},97174:(e,t,r)=>{"use strict";var n=r(99961),i=r(91740),a=i({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,e.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none",description:["Determines expansion of hover effects to other subplots","If *single* just the axis pair of the primary point is included without overlaying subplots.","If *overlaying* all subplots using the main axis and occupying the same space are included.","If *axis*, also include stacked subplots using the same axis","when `hovermode` is set to *x*, *x unified*, *y* or *y unified*."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:a,grouptitlefont:i({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}}},80001:(e,t,r)=>{"use strict";var n=r(84468),i=r(97174),a=r(71886),o=r(15171);e.exports=function(e,t){function r(r,a){return n.coerce(e,t,i,r,a)}a(e,t)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=t._has("mapbox"),l=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((s||l)&&1===u||s&&l&&2===u)&&(t.dragmode="pan"),o(e,t,r),n.coerceFont(r,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},43465:(e,t,r)=>{"use strict";var n=r(84468),i=r(15171),a=r(97174);e.exports=function(e,t){i(e,t,(function(r,i){return n.coerce(e,t,a,r,i)}))}},31334:(e,t,r)=>{"use strict";var n=r(91740),i=r(17992);e.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend",description:["Determines whether or not this legend is visible."].join(" ")},bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:n({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:n({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},entrywidth:{valType:"number",min:0,editType:"legend",description:["Sets the width (in px or fraction) of the legend.","Use 0 to size the entry based on the text width,","when `entrywidthmode` is set to *pixels*."].join(" ")},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend",description:"Determines what entrywidth means."},indentation:{valType:"number",min:-15,dflt:0,editType:"legend",description:"Sets the indentation (in px) of the legend entries."},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",editType:"legend",description:["Sets the x position with respect to `xref` (in normalized coordinates) of the legend.","When `xref` is *paper*, defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends.","When `xref` is *container*, defaults to *1* for vertical legends and","defaults to *0* for horizontal legends.","Must be between *0* and *1* if `xref` is *container*.","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",editType:"legend",description:["Sets the y position with respect to `yref` (in normalized coordinates) of the legend.","When `yref` is *paper*, defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders.","When `yref` is *container*, defaults to *1*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:n({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","top center and top right are for horizontal alignment","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"}},76730:e=>{"use strict";e.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},11217:(e,t,r)=>{"use strict";var n=r(38361),i=r(84468),a=r(37091),o=r(75622),s=r(31334),l=r(98005),u=r(11990);function c(e,t,r,c){var f=t[e]||{},d=a.newContainer(r,e);function h(e,t){return i.coerce(f,d,s,e,t)}var p=i.coerceFont(h,"font",r.font);if(h("bgcolor",r.paper_bgcolor),h("bordercolor"),h("visible")){for(var v,m=function(e,t){var r=v._input,n=v;return i.coerce(r,n,o,e,t)},g=r.font||{},y=i.coerceFont(h,"grouptitlefont",g,{overrideDflt:{size:Math.round(1.1*g.size)}}),x=0,b=!1,_="normal",w=(r.shapes||[]).filter((function(e){return e.showlegend})),k=c.concat(w).filter((function(t){return e===(t.legend||"legend")})),T=0;T("legend"===e?1:0));if(!1===M&&(r[e]=void 0),(!1!==M||f.uirevision)&&(h("uirevision",r.uirevision),!1!==M)){h("borderwidth");var S,E,C,L="h"===h("orientation"),P="paper"===h("yref"),O="paper"===h("xref"),I="left";if(L?(S=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?P?(E=1.1,C="bottom"):(E=1,C="top"):P?(E=-.1,C="top"):(E=0,C="bottom")):(E=1,C="auto",O?S=1.02:(S=1,I="right")),i.coerce(f,d,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:S}},"x"),i.coerce(f,d,{y:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:E}},"y"),h("traceorder",_),u.isGrouped(r[e])&&h("tracegroupgap"),h("entrywidth"),h("entrywidthmode"),h("indentation"),h("itemsizing"),h("itemwidth"),h("itemclick"),h("itemdoubleclick"),h("groupclick"),h("xanchor",I),h("yanchor",C),h("valign"),i.noneOrAll(f,d,["x","y"]),h("title.text")){h("title.side",L?"left":"top");var R=i.extendFlat({},p,{size:i.bigFont(p.size)});i.coerceFont(h,"title.font",R)}}}}e.exports=function(e,t,r){var n,a=r.slice(),o=t.shapes;if(o)for(n=0;n{"use strict";var n=r(41871),i=r(84468),a=r(68543),o=r(38361),s=r(13711),l=r(25732),u=r(3172),c=r(7605),f=r(13480),d=r(96050),h=r(76730),p=r(83943),v=p.LINE_SPACING,m=p.FROM_TL,g=p.FROM_BR,y=r(77978),x=r(44522),b=r(11990),_=1,w=/^legend[0-9]*$/;function k(e,t){var r,s,d=t||{},p=e._fullLayout,w=O(d),k=d._inHover;if(k?(s=d.layer,r="hover"):(s=p._infolayer,r=w),s){var S;if(r+=p._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0),k){if(!d.entries)return;S=y(d.entries,d)}else{for(var I=(e.calcdata||[]).slice(),R=p.shapes,D=0;D1)}var N=p.hiddenlabels||[];if(!k&&(!p.showlegend||!S.length))return s.selectAll("."+w).remove(),p._topdefs.select("#"+r).remove(),a.autoMargin(e,w);var B=i.ensureSingle(s,"g",w,(function(e){k||e.attr("pointer-events","all")})),j=i.ensureSingleById(p._topdefs,"clipPath",r,(function(e){e.append("rect")})),U=i.ensureSingle(B,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));U.call(c.stroke,d.bordercolor).call(c.fill,d.bgcolor).style("stroke-width",d.borderwidth+"px");var q,V=i.ensureSingle(B,"g","scrollbox"),H=d.title;d._titleWidth=0,d._titleHeight=0,H.text?((q=i.ensureSingle(V,"text",w+"titletext")).attr("text-anchor","start").call(u.font,H.font).text(H.text),C(q,V,e,d,_)):V.selectAll("."+w+"titletext").remove();var G=i.ensureSingle(B,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(c.fill,h.scrollBarColor)})),W=V.selectAll("g.groups").data(S);W.enter().append("g").attr("class","groups"),W.exit().remove();var Y=W.selectAll("g.traces").data(i.identity);Y.enter().append("g").attr("class","traces"),Y.exit().remove(),Y.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==N.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(M,e,d)})).call(x,e,d).each((function(){k||n.select(this).call(E,e,w)})),i.syncOrAsync([a.previousPromises,function(){return function(e,t,r,i){var a=e._fullLayout,o=O(i);i||(i=a[o]);var s=a._size,l=b.isVertical(i),c=b.isGrouped(i),f="fraction"===i.entrywidthmode,d=i.borderwidth,p=2*d,v=h.itemGap,m=i.indentation+i.itemwidth+2*v,g=2*(d+v),y=P(i),x=i.y<0||0===i.y&&"top"===y,_=i.y>1||1===i.y&&"bottom"===y,w=i.tracegroupgap,k={};i._maxHeight=Math.max(x||_?a.height/2:s.h,30);var A=0;i._width=0,i._height=0;var M=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]}(i);if(l)r.each((function(e){var t=e[0].height;u.setTranslate(this,d+M[0],d+M[1]+i._height+t/2+v),i._height+=t,i._width=Math.max(i._width,e[0].width)})),A=m+i._width,i._width+=v+m+p,i._height+=g,c&&(t.each((function(e,t){u.setTranslate(this,0,t*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var S=L(i),E=i.x<0||0===i.x&&"right"===S,C=i.x>1||1===i.x&&"left"===S,I=_||x,R=a.width/2;i._maxWidth=Math.max(E?I&&"left"===S?s.l+s.w:R:C?I&&"right"===S?s.r+s.w:R:s.w,2*m);var D=0,z=0;r.each((function(e){var t=T(e,i,m);D=Math.max(D,t),z+=t})),A=null;var F=0;if(c){var N=0,B=0,j=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=T(r,i,m),a=r[0].height;u.setTranslate(this,M[0],M[1]+d+v+a/2+t),t+=a,e=Math.max(e,n),k[r[0].trace.legendgroup]=e}));var r=e+v;B>0&&r+d+B>i._maxWidth?(F=Math.max(F,B),B=0,j+=N+w,N=t):N=Math.max(N,t),u.setTranslate(this,B,j),B+=r})),i._width=Math.max(F,B)+d,i._height=j+N+g}else{var U=r.size(),q=z+p+(U-1)*v=i._maxWidth&&(F=Math.max(F,W),H=0,G+=V,i._height+=V,V=0),u.setTranslate(this,M[0]+d+H,M[1]+d+G+t/2+v),W=H+r+v,H+=n,V=Math.max(V,t)})),q?(i._width=H+p,i._height=V+g):(i._width=Math.max(F,W)+p,i._height+=V+g)}}i._width=Math.ceil(Math.max(i._width+M[0],i._titleWidth+2*(d+h.titlePad))),i._height=Math.ceil(Math.max(i._height+M[1],i._titleHeight+2*(d+h.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var Y=e._context.edits,Z=Y.legendText||Y.legendPosition;r.each((function(e){var t=n.select(this).select("."+o+"toggle"),r=e[0].height,a=e[0].trace.legendgroup,s=T(e,i,m);c&&""!==a&&(s=k[a]);var d=Z?m:A||s;l||f||(d+=v/2),u.setRect(t,0,-r/2,d,r)}))}(e,W,Y,d)},function(){var t,c,y,x,b=p._size,_=d.borderwidth,T="paper"===d.xref,M="paper"===d.yref;if(H.text&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*v,i=0,a=e.node(),o=u.bBox(a).width;"top center"===t.title.side?i=.5*(t._width-2*r-2*h.titlePad-o):"top right"===t.title.side&&(i=t._width-2*r-2*h.titlePad-o),f.positionText(e,r+h.titlePad+i,r+n)}}(q,d,_),!k){var S,E;S=T?b.l+b.w*d.x-m[L(d)]*d._width:p.width*d.x-m[L(d)]*d._width,E=M?b.t+b.h*(1-d.y)-m[P(d)]*d._effHeight:p.height*(1-d.y)-m[P(d)]*d._effHeight;var C=function(e,t,r,n){var i=e._fullLayout,o=i[t],s=L(o),l=P(o),u="paper"===o.xref,c="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var f=o.y<.5?"b":"t",d=o.x<.5?"l":"r",h={r:i.width-r,l:r+o._width,b:i.height-n,t:n+o._effHeight};if(u&&c)return a.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*m[s],r:o._width*g[s],b:o._effHeight*g[l],t:o._effHeight*m[l]});u?e._fullLayout._reservedMargin[t][f]=h[f]:c||"v"===o.orientation?e._fullLayout._reservedMargin[t][d]=h[d]:e._fullLayout._reservedMargin[t][f]=h[f]}(e,w,S,E);if(C)return;if(p.margin.autoexpand){var O=S,I=E;S=T?i.constrain(S,0,p.width-d._width):O,E=M?i.constrain(E,0,p.height-d._effHeight):I,S!==O&&i.log("Constrain "+w+".x to make legend fit inside graph"),E!==I&&i.log("Constrain "+w+".y to make legend fit inside graph")}u.setTranslate(B,S,E)}if(G.on(".drag",null),B.on("wheel",null),k||d._height<=d._maxHeight||e._context.staticPlot){var R=d._effHeight;k&&(R=d._height),U.attr({width:d._width-_,height:R-_,x:_/2,y:_/2}),u.setTranslate(V,0,0),j.select("rect").attr({width:d._width-2*_,height:R-2*_,x:_,y:_}),u.setClipUrl(V,r,e),u.setRect(G,0,0,0,0),delete d._scrollY}else{var D,z,F,N=Math.max(h.scrollBarMinHeight,d._effHeight*d._effHeight/d._height),W=d._effHeight-N-2*h.scrollBarMargin,Y=d._height-d._effHeight,Z=W/Y,X=Math.min(d._scrollY||0,Y);U.attr({width:d._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:d._effHeight-_,x:_/2,y:_/2}),j.select("rect").attr({width:d._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:d._effHeight-2*_,x:_,y:_+X}),u.setClipUrl(V,r,e),$(X,N,Z),B.on("wheel",(function(){$(X=i.constrain(d._scrollY+n.event.deltaY/W*Y,0,Y),N,Z),0!==X&&X!==Y&&n.event.preventDefault()}));var K=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;D="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,F=X})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(z="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,X=function(e,t,r){var n=(r-t)/Z+e;return i.constrain(n,0,Y)}(F,D,z),$(X,N,Z))}));G.call(K);var J=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(D=e.changedTouches[0].clientY,F=X)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(z=e.changedTouches[0].clientY,X=function(e,t,r){var n=(t-r)/Z+e;return i.constrain(n,0,Y)}(F,D,z),$(X,N,Z))}));V.call(J)}function $(t,r,n){d._scrollY=e._fullLayout[w]._scrollY=t,u.setTranslate(V,0,-t),u.setRect(G,d._width,h.scrollBarMargin+t*n,h.scrollBarWidth,r),j.select("rect").attr("y",_+t)}e._context.edits.legendPosition&&(B.classed("cursor-move",!0),l.init({element:B.node(),gd:e,prepFn:function(e){if(e.target!==G.node()){var t=u.getTranslate(B);y=t.x,x=t.y}},moveFn:function(e,r){if(void 0!==y&&void 0!==x){var n=y+e,i=x+r;u.setTranslate(B,n,i),t=l.align(n,d._width,b.l,b.l+b.w,d.xanchor),c=l.align(i+d._height,-d._height,b.t+b.h,b.t,d.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==c){var r={};r[w+".x"]=t,r[w+".y"]=c,o.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=s.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));n.size()>0&&A(e,B,n,t,r)}}))}],e)}}function T(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return"fraction"===a?t._maxWidth*o:r+(o||i)}function A(e,t,r,n,i){var a=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};a._group&&(l.group=a._group),o.traceIs(a,"pie-like")&&(l.label=r.datum()[0].label);var u=s.triggerHandler(e,"plotly_legendclick",l);if(1===n){if(!1===u)return;t._clickTimeout=setTimeout((function(){e._fullLayout&&d(r,e,n)}),e._context.doubleClickDelay)}else if(2===n){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==s.triggerHandler(e,"plotly_legenddoubleclick",l)&&!1!==u&&d(r,e,n)}}function M(e,t,r){var n,a,s=O(r),l=e.data()[0][0],c=l.trace,d=o.traceIs(c,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!d,v=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,a=l.groupTitle.font):(a=r.font,r.entries?n=l.text:(n=d?l.label:c.name,c._meta&&(n=i.templateString(n,c._meta))));var m=i.ensureSingle(e,"text",s+"text");m.attr("text-anchor","start").call(u.font,a).text(p?S(n,v):n);var g=r.indentation+r.itemwidth+2*h.itemGap;f.positionText(m,g,0),p?m.call(f.makeEditable,{gd:t,text:n}).call(C,e,t,r).on("edit",(function(n){this.text(S(n,v)).call(C,e,t,r);var a=l.trace._fullInput||{},s={};if(o.hasTransform(a,"groupby")){var u=o.getTransformIndices(a,"groupby"),f=u[u.length-1],d=i.keyedContainer(a,"transforms["+f+"].styles","target","value.name");d.set(l.trace._group,n),s=d.constructUpdate()}else s.name=n;return a._isShape?o.call("_guiRelayout",t,"shapes["+c.index+"].name",s.name):o.call("_guiRestyle",t,s,c.index)})):C(m,e,t,r)}function S(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 E(e,t,r){var a,o=t._context.doubleClickDelay,s=1,l=i.ensureSingle(e,"rect",r+"toggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(l.on("mousedown",(function(){(a=(new Date).getTime())-t._legendMouseDownTimeo&&(s=Math.max(s-1,1)),A(t,i,e,s,n.event)}})))}function C(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),f.convertToTspans(e,r,(function(){!function(e,t,r,n){var i=e.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend)return void e.remove();var a=e.select("g[class*=math-group]"),o=a.node(),s=O(r);r||(r=t._fullLayout[s]);var l,c=r.borderwidth;l=n===_?r.title.font:i.groupTitle?i.groupTitle.font:r.font;var d,p,m=l.size*v;if(o){var g=u.bBox(o);d=g.height,p=g.width,n===_?u.setTranslate(a,c,c+.75*d):u.setTranslate(a,0,.25*d)}else{var y="."+s+(n===_?"title":"")+"text",x=e.select(y),b=f.lineCount(x),w=x.node();if(d=m*b,p=w?u.bBox(w).width:0,n===_)"left"===r.title.side&&(p+=2*h.itemGap),f.positionText(x,c+h.titlePad,c+m);else{var k=2*h.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(k=h.itemGap,p-=r.indentation+r.itemwidth),f.positionText(x,k,-m*((b-1)/2-.3))}}n===_?(r._titleWidth=p,r._titleHeight=d):(i.lineHeight=m,i.height=Math.max(d,16)+3,i.width=p)}(t,r,n,i)}))}function L(e){return i.isRightAnchor(e)?"right":i.isCenterAnchor(e)?"center":"left"}function P(e){return i.isBottomAnchor(e)?"bottom":i.isMiddleAnchor(e)?"middle":"top"}function O(e){return e._id||"legend"}e.exports=function(e,t){if(t)k(e,t);else{var r=e._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var e=n.select(this),t=e.attr("class").split(" ")[0];t.match(w)&&-1===i.indexOf(t)&&e.remove()}));for(var a=0;a{"use strict";var n=r(38361),i=r(11990);e.exports=function(e,t,r){var a,o,s=t._inHover,l=i.isGrouped(t),u=i.isReversed(t),c={},f=[],d=!1,h={},p=0,v=0;function m(e,n,a){if(!1!==t.visible&&(!r||e===t._id))if(""!==n&&i.isGrouped(t))-1===f.indexOf(n)?(f.push(n),d=!0,c[n]=[a]):c[n].push(a);else{var o="~~i"+p;f.push(o),c[o]=[a],p++}}for(a=0;aS&&(M=S)}T[a][0]._groupMinRank=M,T[a][0]._preGroupSort=a}var E=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(T.forEach((function(e,t){e[0]._preGroupSort=t})),T.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),a=0;a{"use strict";var n=r(38361),i=r(84468),a=i.pushUnique,o=!0;e.exports=function(e,t,r){var s=t._fullLayout;if(!t._dragged&&!t._editing){var l,u=s.legend.itemclick,c=s.legend.itemdoubleclick,f=s.legend.groupclick;if(1===r&&"toggle"===u&&"toggleothers"===c&&o&&t.data&&t._context.showTips?(i.notifier(i._(t,"Double-click on legend to isolate one trace"),"long"),o=!1):o=!1,1===r?l=u:2===r&&(l=c),l){var d="togglegroup"===f,h=s.hiddenlabels?s.hiddenlabels.slice():[],p=e.data()[0][0];if(!p.groupTitle||!p.noClick){var v=t._fullData,m=(s.shapes||[]).filter((function(e){return e.showlegend})),g=v.concat(m),y=p.trace;y._isShape&&(y=y._fullInput);var x,b,_,w,k,T=y.legendgroup,A={},M=[],S=[],E=[],C=(s.shapes||[]).map((function(e){return e._input})),L=!1,P=y.legend,O=y._fullInput;if(!(O&&O._isShape)&&n.traceIs(y,"pie-like")){var I=p.label,R=h.indexOf(I);if("toggle"===l)-1===R?h.push(I):h.splice(R,1);else if("toggleothers"===l){var D=-1!==R,z=[];for(x=0;x{"use strict";t.isGrouped=function(e){return-1!==(e.traceorder||"").indexOf("grouped")},t.isVertical=function(e){return"h"!==e.orientation},t.isReversed=function(e){return-1!==(e.traceorder||"").indexOf("reversed")}},44522:(e,t,r)=>{"use strict";var n=r(41871),i=r(38361),a=r(84468),o=a.strTranslate,s=r(3172),l=r(7605),u=r(73084).extractOpts,c=r(31811),f=r(32100),d=r(97367).castOption,h=r(76730);function p(e,t){return(t?"radial":"horizontal")+(e?"":"reversed")}function v(e){var t=e[0].trace,r=t.contours,n=c.hasLines(t),i=c.hasMarkers(t),a=t.visible&&t.fill&&"none"!==t.fill,o=!1,s=!1;if(r){var l=r.coloring;"lines"===l?o=!0:n="none"===l||"heatmap"===l||r.showlines,"constraint"===r.type?a="="!==r._operation:"fill"!==l&&"heatmap"!==l||(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function m(e,t,r){return e&&a.isArrayOrTypedArray(e)?t:e>r?r:e}e.exports=function(e,t,r){var g=t._fullLayout;r||(r=g.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 i;if(e+1)i=e;else{if(!(t&&t.width>0))return 0;i=t.width}return y?n:Math.min(i,r)};function k(e,a,o){var c=e[0].trace,f=c.marker||{},d=f.line||{},h=f.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=o?c.visible&&c.type===o:i.traceIs(c,"bar"),v=n.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(p?[e]:[]);v.enter().append("path").classed("legend"+o,!0).attr("d",h).attr("transform",_),v.exit().remove(),v.each((function(e){var i=n.select(this),a=e[0],o=w(a.mlw,f.line,5,2);i.style("stroke-width",o+"px");var h=a.mcc;if(!r._inHover&&"mc"in a){var p=u(f),v=p.mid;void 0===v&&(v=(p.max+p.min)/2),h=s.tryColorscale(f,"")(v)}var g=h||a.mc||f.color,y=f.pattern,x=y&&s.getPatternAttr(y.shape,0,"");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),k=y.fgopacity,T=m(y.size,8,10),A=m(y.solidity,.5,1),M="legend-"+c.uid;i.call(s.pattern,"legend",t,M,x,T,A,h,y.fillmode,b,_,k)}else i.call(l.fill,g);o&&l.stroke(i,a.mlc||d.color)}))}function T(e,r,o){var s=e[0],l=s.trace,u=o?l.visible&&l.type===o:i.traceIs(l,o),c=n.select(r).select("g.legendpoints").selectAll("path.legend"+o).data(u?[e]:[]);if(c.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),c.exit().remove(),c.size()){var h=l.marker||{},p=w(d(h.line.width,s.pts),h.line,5,2),v="pieLike",m=a.minExtend(l,{marker:{line:{width:p}}},v),g=a.minExtend(s,{trace:m},v);f(c,g,m,t)}}e.each((function(e){var t=n.select(this),i=a.ensureSingle(t,"g","layers");i.style("opacity",e[0].trace.opacity);var s=r.indentation,l=r.valign,u=e[0].lineHeight,c=e[0].height;if("middle"===l&&0===s||!u||!c)i.attr("transform",null);else{var f={top:1,bottom:-1}[l]*(.5*(u-c+3))||0,d=r.indentation;i.attr("transform",o(d,f))}i.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=i.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var r,i=e[0].trace,o=[];if(i.visible)switch(i.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 c=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);c.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),c.exit().remove(),c.each((function(e,o){var c,f=n.select(this),d=u(i),h=d.colorscale,v=d.reversescale;if(h){if(!r){var m=h.length;c=0===o?h[v?m-1:0][1]:1===o?h[v?0:m-1][1]:h[Math.floor((m-1)/2)][1]}}else{var g=i.vertexcolor||i.facecolor||i.color;c=a.isArrayOrTypedArray(g)?g[o]||g[0]:g}f.attr("d",e[0]),c?f.call(l.fill,c):f.call((function(e){if(e.size()){var n="legendfill-"+i.uid;s.gradient(e,t,n,p(v,"radial"===r),h,"fill")}}))}))})).each((function(e){var t=e[0].trace,r="waterfall"===t.type;if(e[0]._distinct&&r){var i=e[0].trace[e[0].dir].marker;return e[0].mc=i.color,e[0].mlw=i.line.width,e[0].mlc=i.line.color,k(e,this,"waterfall")}var a=[];t.visible&&r&&(a=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(a);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),i=t[e[0]].marker,a=w(void 0,i.line,5,2);r.attr("d",e[1]).style("stroke-width",a+"px").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(e){k(e,this,"funnel")})).each((function(e){k(e,this)})).each((function(e){var r=e[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.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!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);e.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(e,r.line.color)}else{var u=a.minExtend(r,{marker:{size:y?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,u,t)}}))})).each((function(e){T(e,this,"funnelarea")})).each((function(e){T(e,this,"pie")})).each((function(e){var r,i,o=v(e),l=o.showFill,f=o.showLine,d=o.showGradientLine,h=o.showGradientFill,m=o.anyFill,g=o.anyLine,y=e[0],b=y.trace,_=u(b),k=_.colorscale,T=_.reversescale,A=c.hasMarkers(b)||!m?"M5,0":g?"M5,-2":"M5,-3",M=n.select(this),S=M.select(".legendfill").selectAll("path").data(l||h?[e]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",A+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(l)s.fillGroupStyle(e,t,!0);else{var r="legendfill-"+b.uid;s.gradient(e,t,r,p(T),k,"fill")}})),f||d){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(y,{trace:i})]}var C=M.select(".legendlines").selectAll("path").data(f||d?[r]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",A+(d?"l"+x+",0.0001":"h"+x)).call(f?s.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;s.lineGroupStyle(e),s.gradient(e,t,r,p(T),k,"stroke")}})})).each((function(e){var r,i,o=v(e),l=o.anyFill,u=o.anyLine,f=o.showLine,d=o.showMarker,h=e[0],p=h.trace,m=!d&&!u&&!l&&c.hasText(p);function g(e,t,r,n){var i=a.nestedProperty(p,e).get(),o=a.isArrayOrTypedArray(i)&&t?t(i):i;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(d||m||f){var b={},w={};if(d){b.mc=g("marker.color",x),b.mx=g("marker.symbol",x),b.mo=g("marker.opacity",a.mean,[.2,1]),b.mlc=g("marker.line.color",x),b.mlw=g("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var k=g("marker.size",a.mean,[2,16],12);b.ms=k,w.marker.size=k}f&&(w.line={width:g("line.width",x,[0,10],5)}),m&&(b.tx="Aa",b.tp=g("textposition",x),b.ts=10,b.tc=g("textfont.color",x),b.tf=g("textfont.family",x),b.tw=g("textfont.weight",x),b.ty=g("textfont.style",x),b.tv=g("textfont.variant",x),b.tC=g("textfont.textcase",x),b.tE=g("textfont.lineposition",x),b.tS=g("textfont.shadow",x)),r=[a.minExtend(h,b)],(i=a.minExtend(p,w)).selectedpoints=null,i.texttemplate=null}var T=n.select(this).select("g.legendpoints"),A=T.selectAll("path.scatterpts").data(d?r:[]);A.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),A.exit().remove(),A.call(s.pointStyle,i,t),d&&(r[0].mrc=3);var M=T.selectAll("g.pointtext").data(m?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),M.exit().remove(),M.selectAll("text").call(s.textPointStyle,i,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 i=n.select(this),a=t[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(l.fill,a.fillcolor),o&&l.stroke(i,a.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 i=n.select(this),a=t[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("fill","none").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},84529:(e,t,r)=>{"use strict";var n=r(71507);e.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.","This may include *"+n.backButtons.join("*, *")+"*."].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.","This may include *"+n.foreButtons.join("*, *")+"*."].join(" ")}}},57367:(e,t,r)=>{"use strict";var n=r(38361),i=r(68543),a=r(11576),o=r(1351),s=r(98820).eraseActiveShape,l=r(84468),u=l._,c=e.exports={};function f(e,t){var r,i,o=t.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,u=e._fullLayout,c={},f=a.list(e,null,!0),d=u._cartesianSpikesEnabled;if("zoom"===s){var h,p="in"===l?.5:2,v=(1+p)/2,m=(1-p)/2;for(i=0;i{"use strict";var n=r(57367),i=Object.keys(n),a=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],o=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(a),s=[];i.forEach((function(e){!function(e){if(-1===o.indexOf(e._cat||e.name)){var t=e.name,r=(e._cat||e.name).toLowerCase();-1===s.indexOf(t)&&s.push(t),-1===s.indexOf(r)&&s.push(r)}}(n[e])})),s.sort(),e.exports={DRAW_MODES:a,backButtons:o,foreButtons:s}},2422:(e,t,r)=>{"use strict";var n=r(84468),i=r(7605),a=r(37091),o=r(84529);e.exports=function(e,t){var r=e.modebar||{},s=a.newContainer(t,"modebar");function l(e,t){return n.coerce(r,s,o,e,t)}l("orientation"),l("bgcolor",i.addOpacity(t.paper_bgcolor,.5));var u=i.contrast(i.rgb(t.modebar.bgcolor));l("color",i.addOpacity(u,.3)),l("activecolor",i.addOpacity(u,.7)),l("uirevision",t.uirevision),l("add"),l("remove")}},94082:(e,t,r)=>{"use strict";e.exports={moduleType:"component",name:"modebar",layoutAttributes:r(84529),supplyLayoutDefaults:r(2422),manage:r(81515)}},81515:(e,t,r)=>{"use strict";var n=r(11576),i=r(31811),a=r(38361),o=r(82561).isUnifiedHover,s=r(17402),l=r(57367),u=r(71507).DRAW_MODES,c=r(84468).extendDeep;e.exports=function(e){var t=e._fullLayout,r=e._context,f=t._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var d,h=r.modeBarButtons;d=Array.isArray(h)&&h.length?function(e){for(var t=c([],e),r=0;r1?(O=["toggleHover"],I=["resetViews"]):g?(P=["zoomInGeo","zoomOutGeo"],O=["hoverClosestGeo"],I=["resetGeo"]):m?(O=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(P=["zoomInMapbox","zoomOutMapbox"],O=["toggleHover"],I=["resetViewMapbox"]):b?O=["hoverClosestGl2d"]:y?O=["hoverClosestPie"]:A?(O=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):O=["toggleHover"];v&&(O=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]);(function(e){for(var t=0;t{"use strict";var n=r(41871),i=r(22036),a=r(84468),o=r(1351),s=r(17316).r,l=new DOMParser;function u(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var c=u.prototype;c.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",t=t.reverse());var o=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";a.deleteRelatedStyleRule(i),a.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+o.bgcolor),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+o.color),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+o.activecolor),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+o.activecolor);var l=!this.hasButtons(t),u=this.hasLogo!==r.displaylogo,c=this.locale!==r.locale;if(this.locale=r.locale,(l||u||c)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var f=this.getLogo();r.watermark&&(f.className=f.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()},c.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(e){var r=t.createGroup();e.forEach((function(e){var n=e.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");t.buttonsNames.push(n);var i=t.createButton(e);t.buttonElements.push(i),r.appendChild(i)})),t.element.appendChild(r)}))},c.createGroup=function(){var e=document.createElement("div");return e.className="modebar-group",e},c.createButton=function(e){var t=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=e.title;void 0===i?i=e.name:"function"===typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute("data-title",i),void 0!==e.attr&&r.setAttribute("data-attr",e.attr);var a=e.val;if(void 0!==a&&("function"===typeof a&&(a=a(this.graphInfo)),r.setAttribute("data-val",a)),"function"!==typeof e.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){e.click(t.graphInfo,r),t.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&n.select(r).classed("active",!0);var s=e.icon;return"function"===typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||o.question)),r.setAttribute("data-gravity",e.gravity||"n"),r},c.createIcon=function(e){var t,r=i(e.height)?Number(e.height):e.ascent-e.descent,n="http://www.w3.org/2000/svg";if(e.path){(t=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,e.width,r].join(" ")),t.setAttribute("class","icon");var a=document.createElementNS(n,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):void 0!==e.ascent&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(a)}e.svg&&(t=l.parseFromString(e.svg,"application/xml").childNodes[0]);return t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},c.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach((function(e){var i=e.getAttribute("data-val")||!0,o=e.getAttribute("data-attr"),s="true"===e.getAttribute("data-toggle"),l=n.select(e);if(s)o===r&&l.classed("active",!l.classed("active"));else{var u=null===o?o:a.nestedProperty(t,o).get();l.classed("active",u===i)}}))},c.hasButtons=function(e){var t=this.buttons;if(!t)return!1;if(e.length!==t.length)return!1;for(var r=0;r{"use strict";var n=r(38467),i=r(22049).line,a=r(2703).T,o=r(64022).extendFlat,s=r(72587).overrideAll,l=r(37091).templatedArray,u=r(54654);e.exports=s(l("selection",{type:{valType:"enumerated",values:["rect","path"],description:["Specifies the selection type to be drawn.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`).","If *path*, draw a custom SVG path using `path`."].join(" ")},xref:o({},n.xref,{description:["Sets the selection's x coordinate axis.",u.axisRefDescription("x","left","right")].join(" ")}),yref:o({},n.yref,{description:["Sets the selection's x coordinate axis.",u.axisRefDescription("y","bottom","top")].join(" ")}),x0:{valType:"any",description:"Sets the selection's starting x position."},x1:{valType:"any",description:"Sets the selection's end x position."},y0:{valType:"any",description:"Sets the selection's starting y position."},y1:{valType:"any",description:"Sets the selection's end y position."},path:{valType:"string",editType:"arraydraw",description:["For `type` *path* - a valid SVG path similar to `shapes.path` in data coordinates.","Allowed segments are: M, L and Z."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw",description:"Sets the opacity of the selection."},line:{color:i.color,width:o({},i.width,{min:1,dflt:1}),dash:o({},a,{dflt:"dot"})}}),"arraydraw","from-root")},93676:e=>{"use strict";e.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},62527:(e,t,r)=>{"use strict";var n=r(84468),i=r(85729),a=r(38851),o=r(37896),s=r(12057);function l(e,t,r){function a(r,i){return n.coerce(e,t,o,r,i)}var l=a("path"),u="path"!==a("type",l?"path":"rect");u&&delete t.path,a("opacity"),a("line.color"),a("line.width"),a("line.dash");for(var c=["x","y"],f=0;f<2;f++){var d,h,p,v=c[f],m={_fullLayout:r},g=i.coerceRef(e,t,m,v);if((d=i.getFromId(m,g))._selectionIndices.push(t._index),p=s.rangeToShapePosition(d),h=s.shapePositionToRange(d),u){var y=v+"0",x=v+"1",b=e[y],_=e[x];e[y]=h(e[y],!0),e[x]=h(e[x],!0),i.coercePosition(t,m,a,g,y),i.coercePosition(t,m,a,g,x);var w=t[y],k=t[x];void 0!==w&&void 0!==k&&(t[y]=p(w),t[x]=p(k),e[y]=b,e[x]=_)}}u&&n.noneOrAll(e,t,["x0","x1","y0","y1"])}e.exports=function(e,t){a(e,t,{name:"selections",handleItemDefaults:l});for(var r=t.selections,n=0;n{"use strict";var n=r(36542).readPaths,i=r(77422),a=r(35473).clearOutlineControllers,o=r(7605),s=r(3172),l=r(37091).arrayEditor,u=r(12057),c=u.getPathString;function f(e){var t=e._fullLayout;for(var r in a(e),t._selectionLayer.selectAll("path").remove(),t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;T--){var A=r.append("path").attr(m).style("opacity",T?.1:g).call(o.stroke,x).call(o.fill,y).call(s.dashLine,T?"solid":_,T?4+b:b);if(p(A,e,a),w){var M=l(e.layout,"selections",a);A.style({cursor:"move"});var S={element:A.node(),plotinfo:h,gd:e,editHelpers:M,isActiveSelection:!0},E=n(u,e);i(E,A,S)}else A.style("pointer-events",T?"all":"none");k[T]=A}var C=k[0];k[1].node().addEventListener("click",(function(){return function(e,t){if(!d(e))return;var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex)return void v(e);e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=v,f(e)}}(e,C)}))}(e._fullLayout._selectionLayer)}function p(e,t,r){var n=r.xref+r.yref;s.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function v(e){d(e)&&(e._fullLayout._activeSelectionIndex>=0&&(a(e),delete e._fullLayout._activeSelectionIndex,f(e)))}e.exports={draw:f,drawOne:h,activateLastSelection:function(e){if(!d(e))return;var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=v,f(e)}}},26724:(e,t,r)=>{"use strict";var n=r(2703).T,i=r(64022).extendFlat;e.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:i({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}}},74163:e=>{"use strict";e.exports=function(e,t,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},81904:(e,t,r)=>{"use strict";var n=r(2705).selectMode,i=r(35473).clearOutline,a=r(36542),o=a.readPaths,s=a.writePaths,l=a.fixDatesForPaths;e.exports=function(e,t){if(e.length){var r=e[0][0];if(r){var a=r.getAttribute("d"),u=t.gd,c=u._fullLayout.newselection,f=t.plotinfo,d=f.xaxis,h=f.yaxis,p=t.isActiveSelection,v=t.dragmode,m=(u.layout||{}).selections||[];if(!n(v)&&void 0!==p){var g=u._fullLayout._activeSelectionIndex;if(g{"use strict";var n=r(84468).strTranslate;function i(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}e.exports={p2r:i,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t="y"===e._id.charAt(0)?1:0;return function(r){return i(e,r[t])}},getTransform:function(e){return n(e.xaxis._offset,e.yaxis._offset)}}},76789:(e,t,r)=>{"use strict";var n=r(15463),i=r(82657);e.exports={moduleType:"component",name:"selections",layoutAttributes:r(37896),supplyLayoutDefaults:r(62527),supplyDrawNewSelectionDefaults:r(74163),includeBasePlot:r(84381)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},82657:(e,t,r)=>{"use strict";var n=r(72761),i=r(56734),a=r(38361),o=r(3172).dashStyle,s=r(7605),l=r(32212),u=r(82561).makeEventData,c=r(2705),f=c.freeMode,d=c.rectMode,h=c.drawMode,p=c.openMode,v=c.selectMode,m=r(12057),g=r(12833),y=r(77422),x=r(35473).clearOutline,b=r(36542),_=b.handleEllipse,w=b.readPaths,k=r(16275).newShapes,T=r(81904),A=r(15463).activateLastSelection,M=r(84468),S=M.sorterAsc,E=r(39926),C=r(95938),L=r(11576).getFromId,P=r(76574),O=r(88470).redrawReglTraces,I=r(93676),R=I.MINSELECT,D=E.filter,z=E.tester,F=r(77952),N=F.p2r,B=F.axValue,j=F.getTransform;function U(e){return void 0!==e.subplot}function q(e,t,r,n,i,a,o){var s,l,u,c,f,d,h,v,m,g=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(g)){W(e,t,a);var _=function(e,t){var r,n,i=e[0],a=-1,o=[];for(n=0;n0?function(e,t){var r,n,i,a=[];for(i=0;i0&&a.push(r);if(1===a.length&&a[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(i=0;i1)return!1;if((n+=t.selectedpoints.length)>1)return!1}return 1===n}(s)&&(d=J(_))){for(o&&o.remove(),m=0;m=0})(i)&&i._fullLayout._deactivateShape(i),function(e){return e._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,s=h(r),l=v(r);if(s||l){var u,c,f=o.selectAll(".select-outline-"+n.id);if(f&&i._fullLayout._outlining)s&&(u=k(f,e)),u&&a.call("_guiRelayout",i,{shapes:u}),l&&!U(e)&&(c=T(f,e)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:c}).then((function(){t&&A(i)}))),i._fullLayout._outlining=!1}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function Z(e){return e._id}function X(e,t,r,n){if(!e.calcdata)return[];var i,a,o,s=[],l=t.map(Z),u=r.map(Z);for(o=0;o0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(i)>-1}function $(e,t,r){var n,i;for(n=0;n-1&&t;if(!a&&t){var te=oe(e,!0);if(te.length){var ne=te[0].xref,he=te[0].yref;if(ne&&he){var pe=ue(te);ce([L(e,ne,"x"),L(e,he,"y")])(Q,pe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&fe(e,Q),d._reselect=!1}if(!a&&d._deselect){var ve=d._deselect;(function(e,t,r){for(var n=0;n=0)T._fullLayout._deactivateShape(T);else if(!x){var r=A.clickmode;C.done(Me).then((function(){if(C.clear(Me),2===e){for(be.remove(),J=0;J-1&&q(t,T,n.xaxes,n.yaxes,n.subplot,n,be),"event"===r&&fe(T,void 0);l.click(T,t,P.id)})).catch(M.error)}},n.doneFn=function(){Te.remove(),C.done(Me).then((function(){C.clear(Me),!S&&K&&n.selectionDefs&&(K.subtract=xe,n.selectionDefs.push(K),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Z)),(S||x)&&Y(n,S),n.doneFnCompleted&&n.doneFnCompleted(Se),b&&fe(T,ae)})).catch(M.error)}},clearOutline:x,clearSelectionsCache:Y,selectOnClick:q}},12833:e=>{"use strict";e.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},51778:(e,t,r)=>{"use strict";var n=r(84468),i=r(85729),a=r(13480),o=r(3172),s=r(36542).readPaths,l=r(12057),u=l.getPathString,c=r(20236),f=r(83943).FROM_TL;e.exports=function(e,t,r,d){if(d.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var h;if(r.label.texttemplate){var p={};if("path"!==r.type){var v=i.getFromId(e,r.xref),m=i.getFromId(e,r.yref);for(var g in c){var y=c[g](r,v,m);void 0!==y&&(p[g]=y)}}h=n.texttemplateStringForShapes(r.label.texttemplate,{},e._fullLayout._d3locale,p)}else h=r.label.text;var x,b,_,w,k={"data-index":t},T=r.label.font,A=d.append("g").attr(k).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(h);if(r.path){var M=u(e,r),S=s(M,e);x=1/0,_=1/0,b=-1/0,w=-1/0;for(var E=0;E=e?t-n:n-t;return-180/Math.PI*Math.atan2(i,a)}(x,_,b,w):0),A.call((function(t){return t.call(o.font,T).attr({}),a.convertToTspans(t,e),t}));var U=function(e,t,r,n,i,a,o){var s,l,u,c,d=i.label.textposition,h=i.label.textangle,p=i.label.padding,v=i.type,m=Math.PI/180*a,g=Math.sin(m),y=Math.cos(m),x=i.label.xanchor,b=i.label.yanchor;if("line"===v){"start"===d?(s=e,l=t):"end"===d?(s=r,l=n):(s=(e+r)/2,l=(t+n)/2),"auto"===x&&(x="start"===d?"auto"===h?r>e?"left":re?"right":re?"right":re?"left":r{"use strict";var n=r(84468).strTranslate,i=r(25732),a=r(2705),o=a.drawMode,s=a.selectMode,l=r(38361),u=r(7605),c=r(90706),f=c.i000,d=c.i090,h=c.i180,p=c.i270,v=r(35473).clearOutlineControllers,m=r(36542),g=m.pointsOnRectangle,y=m.pointsOnEllipse,x=m.writePaths,b=r(16275).newShapes,_=r(16275).createShapeObj,w=r(81904),k=r(51778);function T(e,t){var r,n,i,a=e[t][1],o=e[t][2],s=e.length;return n=e[r=(t+1)%s][1],i=e[r][2],n===a&&i===o&&(n=e[r=(t+2)%s][1],i=e[r][2]),[r,n,i]}e.exports=function e(t,r,a,c){c||(c=0);var m=a.gd;function A(){e(t,r,a,c++),(y(t[0])||a.hasText)&&M({redrawing:!0})}function M(e){var t={};void 0!==a.isActiveShape&&(a.isActiveShape=!1,t=b(r,a)),void 0!==a.isActiveSelection&&(a.isActiveSelection=!1,t=w(r,a),m._fullLayout._reselect=!0),Object.keys(t).length&&l.call((e||{}).redrawing?"relayout":"_guiRelayout",m,t)}var S,E,C,L,P,O=m._fullLayout._zoomlayer,I=a.dragmode,R=o(I),D=s(I);((R||D)&&(m._fullLayout._outlining=!0),v(m),r.attr("d",x(t)),c||!a.isActiveShape&&!a.isActiveSelection)||(P=function(e,t){for(var r=0;r1&&(2!==e.length||"Z"!==e[1][0])&&(0===L&&(e[0][0]="M"),t[C]=e,A(),M())}}()}}function q(e,r){!function(e,r){if(t.length)for(var n=0;n{"use strict";var n=r(41871),i=r(38361),a=r(84468),o=r(85729),s=r(36542).readPaths,l=r(77422),u=r(51778),c=r(35473).clearOutlineControllers,f=r(7605),d=r(3172),h=r(37091).arrayEditor,p=r(25732),v=r(29454),m=r(12833),g=r(12057),y=g.getPathString;function x(e){var t=e._fullLayout;for(var r in t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove(),t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;iz&&a>F&&!r.shiftKey?p.getCursor(o/i,1-s/a):"move";v(t,l),D=l.split("-")[0]}}function ne(n){b(e)||(N&&(w=Z(r.xanchor)),B&&(A=X(r.yanchor)),"path"===r.type?R=r.path:(f=N?r.x0:Z(r.x0),h=B?r.y0:X(r.y0),x=N?r.x1:Z(r.x1),_=B?r.y1:X(r.y1)),f_?(M=h,L="y0",S=_,P="y1"):(M=_,L="y1",S=h,P="y0"),re(n),le(l,r),ce(t,r,e),Q.moveFn="move"===D?oe:se,Q.altKey=n.altKey)}function ie(){b(e)||(v(t),ue(l),k(t,e,r),i.call("_guiRelayout",e,c.getUpdateObj()))}function ae(){b(e)||ue(l)}function oe(n,i){if("path"===r.type){var a=function(e){return e},o=a,c=a;N?q("xanchor",r.xanchor=K(w+n)):(o=function(e){return K(Z(e)+n)},H&&"date"===H.type&&(o=g.encodeDate(o))),B?q("yanchor",r.yanchor=J(A+i)):(c=function(e){return J(X(e)+i)},W&&"date"===W.type&&(c=g.encodeDate(c))),q("path",r.path=T(R,o,c))}else N?q("xanchor",r.xanchor=K(w+n)):(q("x0",r.x0=K(f+n)),q("x1",r.x1=K(x+n))),B?q("yanchor",r.yanchor=J(A+i)):(q("y0",r.y0=J(h+i)),q("y1",r.y1=J(_+i)));t.attr("d",y(e,r)),le(l,r),u(e,s,r,V)}function se(n,i){if(U){var a=function(e){return e},o=a,c=a;N?q("xanchor",r.xanchor=K(w+n)):(o=function(e){return K(Z(e)+n)},H&&"date"===H.type&&(o=g.encodeDate(o))),B?q("yanchor",r.yanchor=J(A+i)):(c=function(e){return J(X(e)+i)},W&&"date"===W.type&&(c=g.encodeDate(c))),q("path",r.path=T(R,o,c))}else if(j){if("resize-over-start-point"===D){var d=f+n,p=B?h-i:h+i;q("x0",r.x0=N?d:K(d)),q("y0",r.y0=B?p:J(p))}else if("resize-over-end-point"===D){var v=x+n,m=B?_-i:_+i;q("x1",r.x1=N?v:K(v)),q("y1",r.y1=B?m:J(m))}}else{var b=function(e){return-1!==D.indexOf(e)},k=b("n"),G=b("s"),Y=b("w"),$=b("e"),Q=k?M+i:M,ee=G?S+i:S,te=Y?E+n:E,re=$?C+n:C;B&&(k&&(Q=M-i),G&&(ee=S-i)),(!B&&ee-Q>F||B&&Q-ee>F)&&(q(L,r[L]=B?Q:J(Q)),q(P,r[P]=B?ee:J(ee))),re-te>z&&(q(O,r[O]=N?te:K(te)),q(I,r[I]=N?re:K(re)))}t.attr("d",y(e,r)),le(l,r),u(e,s,r,V)}function le(e,t){function r(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]),i=1;n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":i}).classed("visual-cue",!0);var o=Z(N?t.xanchor:a.midRange(r?[t.x0,t.x1]:g.extractPathCoords(t.path,m.paramIsX))),s=X(B?t.yanchor:a.midRange(r?[t.y0,t.y1]:g.extractPathCoords(t.path,m.paramIsY)));if(o=g.roundPositionForSharpStrokeRendering(o,i),s=g.roundPositionForSharpStrokeRendering(s,i),N&&B){var l="M"+(o-1-i)+","+(s-1-i)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",l)}else if(N){var u="M"+(o-1-i)+","+(s-9-i)+"v18 h2 v-18 Z";n.attr("d",u)}else{var c="M"+(o-9-i)+","+(s-1-i)+"h18 v2 h-18 Z";n.attr("d",c)}}(N||B)&&r()}function ue(e){e.selectAll(".visual-cue").remove()}function ce(e,t,r){var n=t.xref,i=t.yref,a=o.getFromId(r,n),s=o.getFromId(r,i),l="";"paper"===n||a.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),d.setClipUrl(e,l?"clip"+r._fullLayout._uid+l:null,r)}p.init(Q),$.node().onmousemove=re}(e,F,c,t,r,D):!0===c.editable&&F.style("pointer-events",I||f.opacity(C)*E<=.5?"stroke":"all");F.node().addEventListener("click",(function(){return function(e,t){if(!_(e))return;var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex)return void A(e);e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=A,x(e)}}(e,F)}))}}function k(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");d.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function T(e,t,r){return e.replace(m.segmentRE,(function(e){var n=0,i=e.charAt(0),a=m.paramIsX[i],o=m.paramIsY[i],s=m.numParams[i];return i+e.substr(1).replace(m.paramRE,(function(e){return n>=s||(a[n]?e=t(e):o[n]&&(e=r(e)),n++),e}))}))}function A(e){_(e)&&(e._fullLayout._activeShapeIndex>=0&&(c(e),delete e._fullLayout._activeShapeIndex,x(e)))}e.exports={draw:x,drawOne:w,eraseActiveShape:function(e){if(!_(e))return;c(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var n=r(72587).overrideAll,i=r(75622),a=r(91740),o=r(2703).T,s=r(64022).extendFlat,l=r(84425).LF,u=r(20236);e.exports=n({newshape:{visible:s({},i.visible,{description:["Determines whether or not new shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,description:["Determines whether or not new","shape is shown in the legend."].join(" ")},legend:s({},i.legend,{description:["Sets the reference to a legend to show new shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},i.legendgroup,{description:["Sets the legend group for new shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:a({description:["Sets this legend group's title font."].join(" ")})},legendrank:s({},i.legendrank,{description:["Sets the legend rank for new shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")}),legendwidth:s({},i.legendwidth,{description:"Sets the width (in px or fraction) of the legend for new shape."}),line:{color:{valType:"color",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,description:"Sets the line width (in px)."},dash:s({},o,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",description:["Specifies whether new shapes are drawn below gridlines (*below*),","between gridlines and traces (*between*) or above traces (*above*)."].join(" ")},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},name:s({},i.name,{description:["Sets new shape name.","The name appears as the legend item."].join(" ")}),label:{text:{valType:"string",dflt:"",description:["Sets the text to display with the new shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:l({newshape:!0},{keys:Object.keys(u)}),font:a({description:"Sets the new shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],description:["Sets the position of the label text relative to the new shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","new shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","new shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,description:"Sets padding (in px) between edge of label and edge of new shape."}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,description:"Sets the opacity of the active shape."}}},"none","from-root")},90706:e=>{"use strict";e.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},36542:(e,t,r)=>{"use strict";var n=r(24100),i=r(90706),a=i.CIRCLE_SIDES,o=i.SQRT2,s=r(77952),l=s.p2r,u=s.r2p,c=[0,3,4,5,6,1,2],f=[0,3,4,1,2];function d(e,t){return Math.abs(e-t)<=1e-6}function h(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}t.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var n=r(2705),i=n.drawMode,a=n.openMode,o=r(90706),s=o.i000,l=o.i090,u=o.i180,c=o.i270,f=o.cos45,d=o.sin45,h=r(77952),p=h.p2r,v=h.r2p,m=r(35473).clearOutline,g=r(36542),y=g.readPaths,x=g.writePaths,b=g.ellipseOver,_=g.fixDatesForPaths;function w(e,t,r){var n,i=e[0][0],o=t.gd,h=i.getAttribute("d"),m=o._fullLayout.newshape,g=t.plotinfo,w=t.isActiveShape,k=g.xaxis,T=g.yaxis,A=!!g.domain||!g.xaxis,M=!!g.domain||!g.yaxis,S=a(r),E=y(h,o,g,w),C={editable:!0,visible:m.visible,name:m.name,showlegend:m.showlegend,legend:m.legend,legendwidth:m.legendwidth,legendgroup:m.legendgroup,legendgrouptitle:{text:m.legendgrouptitle.text,font:m.legendgrouptitle.font},legendrank:m.legendrank,label:m.label,xref:A?"paper":k._id,yref:M?"paper":T._id,layer:m.layer,opacity:m.opacity,line:{color:m.line.color,width:m.line.width,dash:m.line.dash}};if(S||(C.fillcolor=m.fillcolor,C.fillrule=m.fillrule),1===E.length&&(n=E[0]),n&&5===n.length&&"drawrect"===r)C.type="rect",C.x0=n[0][1],C.y0=n[0][2],C.x1=n[2][1],C.y1=n[2][2];else if(n&&"drawline"===r)C.type="line",C.x0=n[0][1],C.y0=n[0][2],C.x1=n[1][1],C.y1=n[1][2];else if(n&&"drawcircle"===r){C.type="circle";var L=n[s][1],P=n[l][1],O=n[u][1],I=n[c][1],R=n[s][2],D=n[l][2],z=n[u][2],F=n[c][2],N=g.xaxis&&("date"===g.xaxis.type||"log"===g.xaxis.type),B=g.yaxis&&("date"===g.yaxis.type||"log"===g.yaxis.type);N&&(L=v(g.xaxis,L),P=v(g.xaxis,P),O=v(g.xaxis,O),I=v(g.xaxis,I)),B&&(R=v(g.yaxis,R),D=v(g.yaxis,D),z=v(g.yaxis,z),F=v(g.yaxis,F));var j=(P+I)/2,U=(R+z)/2,q=b({x0:j,y0:U,x1:j+(I-P+O-L)/2*f,y1:U+(F-D+z-R)/2*d});N&&(q.x0=p(g.xaxis,q.x0),q.x1=p(g.xaxis,q.x1)),B&&(q.y0=p(g.yaxis,q.y0),q.y1=p(g.yaxis,q.y1)),C.x0=q.x0,C.y0=q.y0,C.x1=q.x1,C.y1=q.y1}else C.type="path",k&&T&&_(E,k,T),C.path=x(E),n=null;return C}e.exports={newShapes:function(e,t){if(e.length&&e[0][0]){var r=t.gd,n=t.isActiveShape,a=t.dragmode,o=(r.layout||{}).shapes||[];if(!i(a)&&void 0!==n){var s=r._fullLayout._activeShapeIndex;if(s{"use strict";e.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}},12057:(e,t,r)=>{"use strict";var n=r(12833),i=r(84468),a=r(85729);t.rangeToShapePosition=function(e){return"log"===e.type?e.r2d:function(e){return e}},t.shapePositionToRange=function(e){return"log"===e.type?e.d2r:function(e){return e}},t.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}},t.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}},t.extractPathCoords=function(e,t,r){var a=[];return e.match(n.segmentRE).forEach((function(e){var o=t[e.charAt(0)].drawn;if(void 0!==o){var s=e.substr(1).match(n.paramRE);if(s&&!(s.lengthh&&(e="X"),e}));return a>h&&(p=p.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+e)),c+p}))}(r,s,u);if("pixel"===r.xsizemode){var b=s(r.xanchor);c=b+r.x0,f=b+r.x1}else c=s(r.x0),f=s(r.x1);if("pixel"===r.ysizemode){var _=u(r.yanchor);d=_-r.y0,h=_-r.y1}else d=u(r.y0),h=u(r.y1);if("line"===p)return"M"+c+","+d+"L"+f+","+h;if("rect"===p)return"M"+c+","+d+"H"+f+"V"+h+"H"+c+"Z";var w=(c+f)/2,k=(d+h)/2,T=Math.abs(w-c),A=Math.abs(k-d),M="A"+T+","+A,S=w+T+","+k;return"M"+S+M+" 0 1,1 "+(w+","+(k-A))+M+" 0 0,1 "+S+"Z"}},20236:e=>{"use strict";function t(e,t){return t?t.d2l(e):e}function r(e,t){return t?t.l2d(e):e}function n(e,r){return t(e.x1,r)-t(e.x0,r)}function i(e,r,n){return t(e.y1,n)-t(e.y0,n)}e.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:i(e,0,r)/n(e,t)},dx:n,dy:i,width:function(e,t){return Math.abs(n(e,t))},height:function(e,t,r){return Math.abs(i(e,0,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(n(e,t),2)+Math.pow(i(e,0,r),2))},xcenter:function(e,n){return r((t(e.x1,n)+t(e.x0,n))/2,n)},ycenter:function(e,n,i){return r((t(e.y1,i)+t(e.y0,i))/2,i)}}},13701:(e,t,r)=>{"use strict";var n=r(41871),i=r(22036),a=r(68543),o=r(38361),s=r(84468),l=s.strTranslate,u=r(3172),c=r(7605),f=r(13480),d=r(64253),h=r(83943).OPPOSITE_SIDE,p=/ [XY][0-9]* /;e.exports={draw:function(e,t,r){var v,m=r.propContainer,g=r.propName,y=r.placeholder,x=r.traceIndex,b=r.avoid||{},_=r.attributes,w=r.transform,k=r.containerGroup,T=e._fullLayout,A=1,M=!1,S=m.title,E=(S&&S.text?S.text:"").trim(),C=S&&S.font?S.font:{},L=C.family,P=C.size,O=C.color,I=C.weight,R=C.style,D=C.variant,z=C.textcase,F=C.lineposition,N=C.shadow;"title.text"===g?v="titleText":-1!==g.indexOf("axis")?v="axisTitleText":g.indexOf(!0)&&(v="colorbarTitleText");var B=e._context.edits[v];""===E?A=0:E.replace(p," % ")===y.replace(p," % ")&&(A=.2,M=!0,B||(E="")),r._meta?E=s.templateString(E,r._meta):T._meta&&(E=s.templateString(E,T._meta));var j,U=E||B;k||(k=s.ensureSingle(T._infolayer,"g","g-"+t),j=T._hColorbarMoveTitle);var q=k.selectAll("text").data(U?[0]:[]);if(q.enter().append("text"),q.text(E).attr("class",t),q.exit().remove(),!U)return k;function V(e){s.syncOrAsync([H,G],e)}function H(t){var r;return!w&&j&&(w={}),w?(r="",w.rotate&&(r+="rotate("+[w.rotate,_.x,_.y]+")"),(w.offset||j)&&(r+=l(0,(w.offset||0)-(j||0)))):r=null,t.attr("transform",r),t.style("opacity",A*c.opacity(O)).call(u.font,{color:c.rgb(O),size:n.round(P,2),family:L,weight:I,style:R,variant:D,textcase:z,shadow:N,lineposition:F}).attr(_).call(f.convertToTspans,e),a.previousPromises(e)}function G(t){var r=n.select(t.node().parentNode);if(b&&b.selection&&b.side&&E){r.attr("transform",null);var a=h[b.side],o="left"===b.side||"top"===b.side?-1:1,c=i(b.pad)?b.pad:2,f=u.bBox(r.node()),d={t:0,b:0,l:0,r:0},p=e._fullLayout._reservedMargin;for(var v in p)for(var g in p[v]){var y=p[v][g];d[g]=Math.max(d[g],y)}var x={left:d.l,top:d.t,right:T.width-d.r,bottom:T.height-d.b},_=b.maxShift||o*(x[b.side]-f[b.side]),w=0;if(_<0)w=_;else{var k=b.offsetLeft||0,A=b.offsetTop||0;f.left-=k,f.right-=k,f.top-=A,f.bottom-=A,b.selection.each((function(){var e=u.bBox(this);s.bBoxIntersect(f,e,c)&&(w=Math.max(w,o*(e[b.side]-f[a])+c))})),w=Math.min(_,w),m._titleScoot=Math.abs(w)}if(w>0||_<0){var M={left:[-w,0],right:[w,0],top:[0,-w],bottom:[0,w]}[b.side];r.attr("transform",l(M[0],M[1]))}}}return q.call(V),B&&(E?q.on(".opacity",null):(A=0,M=!0,q.text(y).on("mouseover.opacity",(function(){n.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)}))),q.call(f.makeEditable,{gd:e}).on("edit",(function(t){void 0!==x?o.call("_guiRestyle",e,g,t,x):o.call("_guiRelayout",e,g,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(V)})).on("input",(function(e){this.text(e||" ").call(f.positionText,_.x,_.y)}))),q.classed("js-placeholder",M),k}}},83943:e=>{"use strict";e.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"}}},54654:e=>{"use strict";e.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(" ")}}},3127:e=>{"use strict";e.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"}},64253:e=>{"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},65004:e=>{"use strict";e.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"}},28795:(e,t)=>{"use strict";t.xmlns="http://www.w3.org/2000/xmlns/",t.svg="http://www.w3.org/2000/svg",t.xlink="http://www.w3.org/1999/xlink",t.svgAttrs={xmlns:t.svg,"xmlns:xlink":t.xlink}},1351:e=>{"use strict";e.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},49553:(e,t)=>{"use strict";t.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},t.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},t.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},t.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},t.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},t.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},32510:(e,t,r)=>{"use strict";var n=r(95260),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(e){return Math.abs(e[1]-e[0])>s-1e-14}function u(e,t){return a(t-e,s)}function c(e,t){if(l(t))return!0;var r,n;t[0](n=i(n,s))&&(n+=s);var a=i(e,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(e,t,r,n,i,a,u){i=i||0,a=a||0;var c,f,d,h,p,v=l([r,n]);function m(e,t){return[e*Math.cos(t)+i,a-e*Math.sin(t)]}v?(c=0,f=o,d=s):r=i&&e<=a);var i,a},pathArc:function(e,t,r,n,i){return f(null,e,t,r,n,i,0)},pathSector:function(e,t,r,n,i){return f(null,e,t,r,n,i,1)},pathAnnulus:function(e,t,r,n,i,a){return f(e,t,r,n,i,a,1)}}},19045:(e,t,r)=>{"use strict";var n=r(12160).decode,i=r(30167),a=Array.isArray,o=ArrayBuffer,s=DataView;function l(e){return o.isView(e)&&!(e instanceof s)}function u(e){return a(e)||l(e)}t.isTypedArray=l,t.isArrayOrTypedArray=u,t.isArray1D=function(e){return!u(e[0])},t.ensureArray=function(e,t){return a(e)||(e=[]),e.length=t,e};var c={u1c:"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"===typeof Int8Array?void 0:Int8Array,u1:"undefined"===typeof Uint8Array?void 0:Uint8Array,i2:"undefined"===typeof Int16Array?void 0:Int16Array,u2:"undefined"===typeof Uint16Array?void 0:Uint16Array,i4:"undefined"===typeof Int32Array?void 0:Int32Array,u4:"undefined"===typeof Uint32Array?void 0:Uint32Array,f4:"undefined"===typeof Float32Array?void 0:Float32Array,f8:"undefined"===typeof Float64Array?void 0:Float64Array};function f(e){return e.constructor===ArrayBuffer}function d(e,t,r){if(u(e)){if(u(e[0])){for(var n=r,i=0;i{"use strict";var n=r(22036),i=r(65004).BADNUM,a=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;e.exports=function(e){return"string"===typeof e&&(e=e.replace(a,"")),n(e)?Number(e):i}},76574:e=>{"use strict";e.exports=function(e){var t=e._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each((function(e){e.regl&&e.regl.clear({color:!0,depth:!0})}))}},36250:e=>{"use strict";e.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}},50347:(e,t,r)=>{"use strict";var n=r(22036),i=r(23498),a=r(64022).extendFlat,o=r(75622),s=r(28538),l=r(7605),u=r(64253).DESELECTDIM,c=r(46189),f=r(51195).counter,d=r(95260).modHalf,h=r(19045).isArrayOrTypedArray,p=r(19045).isTypedArraySpec,v=r(19045).decodeTypedArraySpec;function m(e,r){var n=t.valObjectMeta[r.valType];if(r.arrayOk&&h(e))return!0;if(n.validateFunction)return n.validateFunction(e,r);var i={},a=i,o={set:function(e){a=e}};return n.coerceFunction(e,o,i,r),a!==i}t.valObjectMeta={data_array:{description:["An {array} of data.","The value must represent an {array} or it will be ignored,","but this array can be provided in several forms:","(1) a regular {array} object","(2) a typed array (e.g. Float32Array)","(3) an object with keys dtype, bdata, and optionally shape.","In this 3rd form, dtype is one of","*f8*, *f4*.","*i4*, *u4*,","*i2*, *u2*,","*i1*, *u1* or *u1c* for Uint8ClampedArray.","In addition to shorthand `dtype` above one could also use the following forms:","*float64*, *float32*,","*int32*, *uint32*,","*int16*, *uint16*,","*int8*, *uint8* or *uint8c* for Uint8ClampedArray.","`bdata` is either a base64-encoded string or the ArrayBuffer of","an integer or float typed array.","For either multi-dimensional arrays you must also","provide its dimensions separated by comma via `shape`.","For example using `dtype`: *f4* and `shape`: *5,100* you can","declare a 2-D array that has 5 rows and 100 columns","containing float32 values i.e. 4 bits per value.","`shape` is optional for one dimensional arrays."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,r){t.set(h(e)?e:p(e)?v(e):r)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),-1===n.values.indexOf(e)?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;ni.max?t.set(r):t.set(+e)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk","extras"],coerceFunction:function(e,t,r,i){-1===(i.extras||[]).indexOf(e)?(p(e)&&(e=v(e)),e%1||!n(e)||void 0!==i.min&&ei.max?t.set(r):t.set(+e)):t.set(e)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(e,t,r,n){if("string"!==typeof e){var i="number"===typeof e;!0!==n.strict&&i?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(e,t,r){p(e)&&(e=v(e)),i(e).isValid()?t.set(e):t.set(r)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return i(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(s.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,r){t.set(s.get(e,r))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(e,t,r){p(e)&&(e=v(e)),"auto"===e?t.set("auto"):n(e)?t.set(d(+e,360)):t.set(r)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(e,t,r,n){var i=n.regex||f(r);"string"===typeof e&&i.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"===typeof e&&!!f(r).test(e)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(e,t,r,n){if(-1===(n.extras||[]).indexOf(e))if("string"===typeof e){for(var i=e.split("+"),a=0;a{"use strict";var n,i,a=r(66354).DC,o=r(22036),s=r(98073),l=r(95260).mod,u=r(65004),c=u.BADNUM,f=u.ONEDAY,d=u.ONEHOUR,h=u.ONEMIN,p=u.ONESEC,v=u.EPOCHJD,m=r(38361),g=r(66354).aL,y=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,b=(new Date).getFullYear()-70;function _(e){return e&&m.componentsRegistry.calendars&&"string"===typeof e&&"gregorian"!==e}function w(e,t){return String(e+Math.pow(10,t)).substr(1)}t.dateTick0=function(e,r){var n=function(e,t){return _(e)?t?m.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:m.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}(e,!!r);if(r<2)return n;var i=t.dateTime2ms(n,e);return i+=f*(r-1),t.ms2DateTime(i,0,e)},t.dfltRange=function(e){return _(e)?m.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]},t.isJSDate=function(e){return"object"===typeof e&&null!==e&&"function"===typeof e.getTime},t.dateTime2ms=function(e,r){if(t.isJSDate(e)){var a=e.getTimezoneOffset()*h,o=(e.getUTCMinutes()-e.getMinutes())*h+(e.getUTCSeconds()-e.getSeconds())*p+(e.getUTCMilliseconds()-e.getMilliseconds());if(o){var s=3*h;a=a-s/2+l(o-a+s/2,s)}return(e=Number(e)-a)>=n&&e<=i?e:c}if("string"!==typeof e&&"number"!==typeof e)return c;e=String(e);var u=_(r),g=e.charAt(0);!u||"G"!==g&&"g"!==g||(e=e.substr(1),r="");var w=u&&"chinese"===r.substr(0,7),k=e.match(w?x:y);if(!k)return c;var T=k[1],A=k[3]||"1",M=Number(k[5]||1),S=Number(k[7]||0),E=Number(k[9]||0),C=Number(k[11]||0);if(u){if(2===T.length)return c;var L;T=Number(T);try{var P=m.getComponentMethod("calendars","getCal")(r);if(w){var O="i"===A.charAt(A.length-1);A=parseInt(A,10),L=P.newDate(T,P.toMonthIndex(T,A,O),M)}else L=P.newDate(T,Number(A),M)}catch(R){return c}return L?(L.toJD()-v)*f+S*d+E*h+C*p:c}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),A-=1;var I=new Date(Date.UTC(2e3,A,M,S,E));return I.setUTCFullYear(T),I.getUTCMonth()!==A||I.getUTCDate()!==M?c:I.getTime()+C*p},n=t.MIN_MS=t.dateTime2ms("-9999"),i=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(e,r){return t.dateTime2ms(e,r)!==c};var k=90*f,T=3*d,A=5*h;function M(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+w(t,2)+":"+w(r,2),(n||i)&&(e+=":"+w(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+w(i,a)}return e}t.ms2DateTime=function(e,t,r){if("number"!==typeof e||!(e>=n&&e<=i))return c;t||(t=0);var a,o,s,u,y,x,b=Math.floor(10*l(e+.05,1)),w=Math.round(e-b/10);if(_(r)){var S=Math.floor(w/f)+v,E=Math.floor(l(e,f));try{a=m.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(C){a=g("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=t=n+f&&e<=i-f))return c;var t=Math.floor(10*l(e+.05,1)),r=new Date(Math.round(e-t/10));return M(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},t.cleanDate=function(e,r,n){if(e===c)return r;if(t.isJSDate(e)||"number"===typeof e&&isFinite(e)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(!(e=t.ms2DateTimeLocal(+e))&&void 0!==r)return r}else if(!t.isDateTime(e,n))return s.error("unrecognized date",e),r;return e};var S=/%\d?f/g,E=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function L(e,t,r,n){e=e.replace(S,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(t+.05));if(e=e.replace(E,(function(){return C[r("%q")(i)]})),_(n))try{e=m.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var P=[59,59.9,59.99,59.999,59.9999];t.formatDate=function(e,t,r,n,i,a){if(i=_(i)&&i,!t)if("y"===r)t=a.year;else if("m"===r)t=a.month;else{if("d"!==r)return function(e,t){var r=l(e+.05,f),n=w(Math.floor(r/d),2)+":"+w(l(Math.floor(r/h),60),2);if("M"!==t){o(t)||(t=0);var i=(100+Math.min(l(e/p,60),P[t])).toFixed(t).substr(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(e,r)+"\n"+L(a.dayMonthYear,e,n,i);t=a.dayMonth+"\n"+a.year}return L(t,e,n,i)};var O=3*f;t.incrementMonth=function(e,t,r){r=_(r)&&r;var n=l(e,f);if(e=Math.round(e-n),r)try{var i=Math.round(e/f)+v,a=m.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-v)*f+n}catch(c){s.error("invalid ms "+e+" in calendar "+r)}var u=new Date(e+O);return u.setUTCMonth(u.getUTCMonth()+t)+n-O},t.findExactDates=function(e,t){for(var r,n,i=0,a=0,s=0,l=0,u=_(t)&&m.getComponentMethod("calendars","getCal")(t),c=0;c{"use strict";var n=r(41871),i=r(98073),a=r(69975),o=r(82588);function s(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function l(e,t,r){var n="plotly.js-style-"+e,a=document.getElementById(n);a||((a=document.createElement("style")).setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var o=a.sheet;o.insertRule?o.insertRule(t+"{"+r+"}",0):o.addRule?o.addRule(t,r,0):i.warn("addStyleRule failed")}function u(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(e){return+e}))}function c(e){for(var t=[];f(e);)t.push(e),e=e.parentNode,"function"===typeof ShadowRoot&&e instanceof ShadowRoot&&(e=e.host);return t}function f(e){return e&&(e instanceof Element||e instanceof HTMLElement)}e.exports={getGraphDiv:function(e){var t;if("string"===typeof e){if(null===(t=document.getElementById(e)))throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}if(null===e||void 0===e)throw new Error("DOM element provided is null or undefined");return e},isPlotDiv:function(e){var t=n.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(e,t){l("global",e,t)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&s(r)},getFullTransformMatrix:function(e){var t=c(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach((function(e){var t=u(e);if(t){var n=a.convertCssMatrix(t);r=o.multiply(r,r,n)}})),r},getElementTransformMatrix:u,getElementAndAncestors:c,equalDomRects:function(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}}},13711:(e,t,r)=>{"use strict";var n=r(27284).EventEmitter,i={init:function(e){if(e._ev instanceof n)return e;var t=new n,r=new n;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,i){"undefined"!==typeof jQuery&&jQuery(e).trigger(n,i),t.emit(n,i),r.emit(n,i)},e},triggerHandler:function(e,t,r){var n,i;"undefined"!==typeof jQuery&&(n=jQuery(e).triggerHandler(t,r));var a=e._ev;if(!a)return n;var o,s=a._events[t];if(!s)return n;function l(e){return e.listener?(a.removeListener(t,e.listener),e.fired?void 0:(e.fired=!0,e.listener.apply(a,[r]))):e.apply(a,[r])}for(s=Array.isArray(s)?s:[s],o=0;o{"use strict";var n=r(30167),i=Array.isArray;function a(e,t,r,o){var s,l,u,c,f,d,h,p=e[0],v=e.length;if(2===v&&i(p)&&i(e[1])&&0===p.length){if(h=function(e,t){var r,n;for(r=0;r{"use strict";e.exports=function(e){for(var t={},r=[],n=0,i=0;i{"use strict";function t(e){return!0===e.visible}function r(e){var t=e[0].trace;return!0===t.visible&&0!==t._length}e.exports=function(e){for(var n,i=(n=e,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:t),a=[],o=0;o{"use strict";var n,i,a,o=r(95260).mod;function s(e,t,r,n,i,a,o,s){var l=r-e,u=i-e,c=o-i,f=n-t,d=a-t,h=s-a,p=l*h-c*f;if(0===p)return null;var v=(u*h-c*d)/p,m=(u*f-l*d)/p;return m<0||m>1||v<0||v>1?null:{x:e+l*v,y:t+f*v}}function l(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}var l=n*t-i*e;return l*l/r}t.segmentsIntersect=s,t.segmentDistance=function(e,t,r,n,i,a,o,u){if(s(e,t,r,n,i,a,o,u))return 0;var c=r-e,f=n-t,d=o-i,h=u-a,p=c*c+f*f,v=d*d+h*h,m=Math.min(l(c,f,p,i-e,a-t),l(c,f,p,o-e,u-t),l(d,h,v,e-i,t-a),l(d,h,v,r-i,n-a));return Math.sqrt(m)},t.getTextLocation=function(e,t,r,s){if(e===i&&s===a||(n={},i=e,a=s),n[r])return n[r];var l=e.getPointAtLength(o(r-s/2,t)),u=e.getPointAtLength(o(r+s/2,t)),c=Math.atan((u.y-l.y)/(u.x-l.x)),f=e.getPointAtLength(o(r,t)),d={x:(4*f.x+l.x+u.x)/6,y:(4*f.y+l.y+u.y)/6,theta:c};return n[r]=d,d},t.clearLocationCache=function(){i=null},t.getVisibleSegment=function(e,t,r){var n,i,a=t.left,o=t.right,s=t.top,l=t.bottom,u=0,c=e.getTotalLength(),f=c;function d(t){var r=e.getPointAtLength(t);0===t?n=r:t===c&&(i=r);var u=r.xo?r.x-o:0,f=r.yl?r.y-l:0;return Math.sqrt(u*u+f*f)}for(var h=d(u);h;){if((u+=h+r)>f)return;h=d(u)}for(h=d(f);h;){if(u>(f-=h+r))return;h=d(f)}return{min:u,max:f,len:f-u,total:c,isClosed:0===u&&f===c&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},t.findPointOnPath=function(e,t,r,n){for(var i,a,o,s=(n=n||{}).pathLength||e.getTotalLength(),l=n.tolerance||.001,u=n.iterationLimit||30,c=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,f=0,d=0,h=s;f0?h=i:d=i,f++}return a}},77892:e=>{"use strict";e.exports=function(e){return e}},40461:e=>{"use strict";e.exports=function(e,t){if(!t)return e;var r=1/Math.abs(t),n=r>1?(r*e+r*t)/r:e+t,i=String(n).length;if(i>16){var a=String(t).length;if(i>=String(e).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},84468:(e,t,r)=>{"use strict";var n=r(41871),i=r(66354).aL,a=r(80902).GP,o=r(22036),s=r(65004),l=s.FP_SAFE,u=-l,c=s.BADNUM,f=e.exports={};f.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 d={};f.warnBadFormat=function(e){var t=String(e);d[t]||(d[t]=1,f.warn('encountered bad format: "'+t+'"'))},f.noFormat=function(e){return String(e)},f.numberFormat=function(e){var t;try{t=a(f.adjustFormat(e))}catch(r){return f.warnBadFormat(e),f.noFormat}return t},f.nestedProperty=r(46189),f.keyedContainer=r(30010),f.relativeAttr=r(99290),f.isPlainObject=r(30167),f.toLogRange=r(46396),f.relinkPrivateKeys=r(60143);var h=r(19045);f.isArrayBuffer=h.isArrayBuffer,f.isTypedArray=h.isTypedArray,f.isArrayOrTypedArray=h.isArrayOrTypedArray,f.isArray1D=h.isArray1D,f.ensureArray=h.ensureArray,f.concat=h.concat,f.maxRowLength=h.maxRowLength,f.minRowLength=h.minRowLength;var p=r(95260);f.mod=p.mod,f.modHalf=p.modHalf;var v=r(50347);f.valObjectMeta=v.valObjectMeta,f.coerce=v.coerce,f.coerce2=v.coerce2,f.coerceFont=v.coerceFont,f.coercePattern=v.coercePattern,f.coerceHoverinfo=v.coerceHoverinfo,f.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,f.validate=v.validate;var m=r(78765);f.dateTime2ms=m.dateTime2ms,f.isDateTime=m.isDateTime,f.ms2DateTime=m.ms2DateTime,f.ms2DateTimeLocal=m.ms2DateTimeLocal,f.cleanDate=m.cleanDate,f.isJSDate=m.isJSDate,f.formatDate=m.formatDate,f.incrementMonth=m.incrementMonth,f.dateTick0=m.dateTick0,f.dfltRange=m.dfltRange,f.findExactDates=m.findExactDates,f.MIN_MS=m.MIN_MS,f.MAX_MS=m.MAX_MS;var g=r(41222);f.findBin=g.findBin,f.sorterAsc=g.sorterAsc,f.sorterDes=g.sorterDes,f.distinctVals=g.distinctVals,f.roundUp=g.roundUp,f.sort=g.sort,f.findIndexOfMin=g.findIndexOfMin,f.sortObjectKeys=r(60693);var y=r(26423);f.aggNums=y.aggNums,f.len=y.len,f.mean=y.mean,f.median=y.median,f.midRange=y.midRange,f.variance=y.variance,f.stdev=y.stdev,f.interp=y.interp;var x=r(69975);f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(32510);f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=r(49553);f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=r(15624);f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var k=r(64022);f.extendFlat=k.extendFlat,f.extendDeep=k.extendDeep,f.extendDeepAll=k.extendDeepAll,f.extendDeepNoArrays=k.extendDeepNoArrays;var T=r(98073);f.log=T.log,f.warn=T.warn,f.error=T.error;var A=r(51195);f.counterRegex=A.counter;var M=r(95938);f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=r(51124);function E(e){var t={};for(var r in e)for(var n=e[r],i=0;il||e=t)&&(o(e)&&e>=0&&e%1===0)},f.noop=r(17266),f.identity=r(77892),f.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))},f.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},f.simpleMap=function(e,t,r,n,i){for(var a=e.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn("randstr failed uniqueness"),l):e(t,r,n,(i||0)+1):l},f.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},f.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,i,a,o=e.length,s=2*o,l=2*t-1,u=new Array(l),c=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=e[i]*u[n];c[r]=a}return c},f.syncOrAsync=function(e,t,r){var n;function i(){return f.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(i);return r&&r(t)},f.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},f.noneOrAll=function(e,t,r){if(e){var n,i,a=!1,o=!0;for(n=0;n0?t:0}))},f.fillArray=function(e,t,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(e))for(var i=0;i1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var D=/^\w*$/;f.templateString=function(e,t){var r={};return e.replace(f.TEMPLATE_STRING_REGEX,(function(e,n){var i;return D.test(n)?i=t[n]:(r[n]=r[n]||f.nestedProperty(t,n).get,i=r[n]()),f.isValidTextValue(i)?i:""}))};var z={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return U.apply(z,arguments)};var F={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return U.apply(F,arguments)};var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;var B={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=function(){return U.apply(B,arguments)};var j=/^[:|\|]/;function U(e,t,r){var n=this,a=arguments;t||(t={});var o={};return e.replace(f.TEMPLATE_STRING_REGEX,(function(e,s,l){var u="_xother"===s||"_yother"===s,c="_xother_"===s||"_yother_"===s,d="xother_"===s||"yother_"===s,h="xother"===s||"yother"===s||u||d||c,p=s;(u||c)&&(p=p.substring(1)),(d||c)&&(p=p.substring(0,p.length-1));var v,m,g,y=null,x=null;if(n.parseMultDiv){var b=function(e){var t=e.match(N);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(p);p=b.key,y=b.op,x=b.number}if(h){if(void 0===(v=t[p]))return""}else for(g=3;g=48&&o<=57,u=s>=48&&s<=57;if(l&&(n=10*n+o-48),u&&(i=10*i+s-48),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var q=2e9;f.seedPseudoRandom=function(){q=2e9},f.pseudoRandom=function(){var e=q;return q=(69069*q+1)%4294967296,Math.abs(q-e)<429496729?f.pseudoRandom():q/4294967296},f.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},i=f.extractOption(e,t,"htx","hovertext");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(e,t,"tx","text");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(e){return e||0===e},f.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&&(u=1):u=0,f.strTranslate(i-u*(r+o),a-u*(n+s))+f.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(e,t){e.attr("transform",f.getTextTransform(t)),e.style("display",t.scale?null:"none")},f.ensureUniformFontSize=function(e,t){var r=f.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},f.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)},f.bigFont=function(e){return Math.round(1.2*e)};var V=f.getFirefoxVersion(),H=null!==V&&V<86;f.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},30167:e=>{"use strict";e.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")}},30010:(e,t,r)=>{"use strict";var n=r(46189),i=/^\w*$/;e.exports=function(e,t,r,a){var o,s,l;r=r||"name",a=a||"value";var u={};t&&t.length?(l=n(e,t),s=l.get()):s=e,t=t||"";var c={};if(s)for(o=0;o2)return u[t]=2|u[t],d.set(e,null);if(f){for(o=t;o{"use strict";var n=r(38361);e.exports=function(e,t){for(var r=e._context.locale,i=0;i<2;i++){for(var a=e._context.locales,o=0;o<2;o++){var s=(a[r]||{}).dictionary;if(s){var l=s[t];if(l)return l}a=n.localeRegistry}var u=r.split("-")[0];if(u===r)break;r=u}return t}},98073:(e,t,r)=>{"use strict";var n=r(20075).dfltConfig,i=r(55684),a=e.exports={};a.log=function(){var e;if(n.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}},a.warn=function(){var e;if(n.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}},a.error=function(){var e;if(n.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}},1849:(e,t,r)=>{"use strict";var n=r(41871);e.exports=function(e,t,r){var i=e.selectAll("g."+r.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var a=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(e){e[0][a]=n.select(this)})),i}},69975:(e,t,r)=>{"use strict";var n=r(82588);t.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";e.exports={mod:function(e,t){var r=e%t;return r<0?r+t:r},modHalf:function(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}}},46189:(e,t,r)=>{"use strict";var n=r(22036),i=r(19045).isArrayOrTypedArray;function a(e,t){return function(){var r,n,o,s,l,u=e;for(s=0;s{"use strict";e.exports=function(){}},55684:(e,t,r)=>{"use strict";var n=r(41871),i=r(22036),a=[];e.exports=function(e,t){if(-1===a.indexOf(e)){a.push(e);var r=1e3;i(t)?r=t:"long"===t&&(r=3e3);var o=n.select("body").selectAll(".plotly-notifier").data([0]);o.enter().append("div").classed("plotly-notifier",!0),o.selectAll(".notifier-note").data(a).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(e){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",(function(){i.transition().call(s)}));for(var a=i.append("p"),o=e.split(//g),l=0;l{"use strict";var n=r(29454),i="data-savedcursor";e.exports=function(e,t){var r=e.attr(i);if(t){if(!r){for(var a=(e.attr("class")||"").split(" "),o=0;o{"use strict";var n=r(69975).dot,i=r(65004).BADNUM,a=e.exports={};a.tester=function(e){var t,r=e.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),t=1;ta||u===i||us)&&(!t||!l(e))}:function(e,t){var l=e[0],u=e[1];if(l===i||la||u===i||us)return!1;var c,f,d,h,p,v=r.length,m=r[0][0],g=r[0][1],y=0;for(c=1;cMath.max(f,m)||u>Math.max(d,g)))if(uc||Math.abs(n(o,d))>i)return!0;return!1},a.filter=function(e,t){var r=[e[0]],n=0,i=0;function o(o){e.push(o);var s=r.length,l=n;r.splice(i+1);for(var u=l+1;u1&&o(e.pop());return{addPt:o,raw:e,filtered:r}}},23136:(e,t,r)=>{"use strict";var n=r(22036),i=r(94561);e.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=i({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var a=t.split(" "),o=1;o-1;s--){var l=a[s];if("Version/"===l.substr(0,8)){var u=l.substr(8).split(".")[0];if(n(u)&&(u=+u),u>=13)return!0}}}return r}},52942:e=>{"use strict";e.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;n{"use strict";t.counter=function(e,t,r,n){var i=(t||"")+(r?"":"$"),a=!1===n?"":"^";return"xy"===e?new RegExp(a+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(a+e+"([2-9]|[1-9][0-9]+)?"+i)}},99290:e=>{"use strict";var t=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;e.exports=function(e,n){for(;n;){var i=e.match(t);if(i)e=i[1];else{if(!e.match(r))throw new Error("bad relativeAttr call:"+[e,n]);e=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return e&&"["!==n.charAt(0)?e+"."+n:e+n}},60143:(e,t,r)=>{"use strict";var n=r(19045).isArrayOrTypedArray,i=r(30167);e.exports=function e(t,r){for(var a in r){var o=r[a],s=t[a];if(s!==o)if("_"===a.charAt(0)||"function"===typeof o){if(a in t)continue;t[a]=o}else if(n(o)&&n(s)&&i(o[0])){if("customdata"===a||"ids"===a)continue;for(var l=Math.min(o.length,s.length),u=0;u{"use strict";var n=r(22036),i=r(98073),a=r(77892),o=r(65004).BADNUM,s=1e-9;function l(e,t){return et}function f(e,t){return e>=t}t.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-s)-1:Math.floor((e-t.start)/t.size+s);var a,o,d=0,h=t.length,p=0,v=h>1?(t[h-1]-t[0])/(h-1):1;for(o=v>=0?r?l:u:r?f:c,e+=v*s*(r?-1:1)*(v>=0?1:-1);d90&&i.log("Long binary search..."),d-1},t.sorterAsc=function(e,t){return e-t},t.sorterDes=function(e,t){return t-e},t.distinctVals=function(e){var r,n=e.slice();for(n.sort(t.sorterAsc),r=n.length-1;r>-1&&n[r]===o;r--);for(var i,a=n[r]-n[0]||1,s=a/(r||1)/1e4,l=[],u=0;u<=r;u++){var c=n[u],f=c-i;void 0===i?(l.push(c),i=c):f>s&&(a=Math.min(a,f),l.push(c),i=c)}return{vals:l,minDiff:a}},t.roundUp=function(e,t,r){for(var n,i=0,a=t.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},t.findIndexOfMin=function(e,t){t=t||a;for(var r,n=1/0,i=0;i{"use strict";e.exports=function(e,t){(e.attr("class")||"").split(" ").forEach((function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)})),t&&e.classed("cursor-"+t,!0)}},60693:e=>{"use strict";e.exports=function(e){return Object.keys(e).sort()}},26423:(e,t,r)=>{"use strict";var n=r(22036),i=r(19045).isArrayOrTypedArray;t.aggNums=function(e,r,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),n(r)||(r=!1),i(a[0])){for(l=new Array(o),s=0;se.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},13480:(e,t,r)=>{"use strict";var n=r(41871),i=r(84468),a=i.strTranslate,o=r(28795),s=r(83943).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(e,r,m){var S=e.text(),E=!e.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!==typeof MathJax&&S.match(l),P=n.select(e.node().parentNode);if(!P.empty()){var O=e.attr("class")?e.attr("class").split(" ")[0]:"text";return O+="-math",P.selectAll("svg."+O).remove(),P.selectAll("g."+O+"-group").remove(),e.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),E?(r&&r._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 a,o,s,l,d=parseInt((MathJax.version||"").split(".")[0]);if(2!==d&&3!==d)return void i.warn("No MathJax version:",MathJax.version);var h=function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:f},displayAlign:"left"})},p=function(){o=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=f},v=function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},m=function(){"svg"!==(a=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg")},g=function(){var r="math-output-"+i.randstr({},64),a=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(e.replace(u,"\\lt ").replace(c,"\\gt "))).node();return 2===d?MathJax.Hub.Typeset(a):MathJax.typeset([a])},y=function(){var t=l.select(2===d?".MathJax_SVG":".MathJax"),a=!t.empty()&&l.select("svg").node();if(a){var o,s=a.getBoundingClientRect();o=2===d?n.select("body").select("#MathJax_SVG_glyphs"):t.select("defs"),r(t,o,s)}else i.log("There was an error in the tex syntax.",e),r();l.remove()},x=function(){if("SVG"!==a)return MathJax.Hub.setRenderer(a)},b=function(){"svg"!==a&&(MathJax.config.startup.output=a)},_=function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)},w=function(){MathJax.config=o};2===d?MathJax.Hub.Queue(h,v,g,y,x,_):3===d&&(p(),m(),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){g(),y(),b(),w()})))}(E[2],o,(function(n,i,o){P.selectAll("svg."+O).remove(),P.selectAll("g."+O+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return I(),void t();var l=P.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var u=o.width,c=o.height;s.attr({class:O,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=e.node().style.fill||"black",d=s.select("g");d.attr({fill:f,stroke:f});var h=d.node().getBoundingClientRect(),p=h.width,v=h.height;(p>u||v>c)&&(s.style("overflow","hidden"),p=(h=s.node().getBoundingClientRect()).width,v=h.height);var g=+e.attr("x"),y=+e.attr("y"),x=-(r||e.node().getBoundingClientRect().height)/4;if("y"===O[0])l.attr({transform:"rotate("+[-90,g,y]+")"+a(-p/2,x-v/2)});else if("l"===O[0])y=x-v/2;else if("a"===O[0]&&0!==O.indexOf("atitle"))g=0,y=x;else{var b=e.attr("text-anchor");g-=p*("middle"===b?.5:"end"===b?1:0),y=y+x-v/2}s.attr({x:g,y:y}),m&&m.call(e,l),t(l)}))}))):I(),e}function I(){P.empty()||(O=e.attr("class")+"-math",P.select("svg."+O).remove()),e.text("").style("white-space","pre");var r=function(e,t){t=t.replace(g," ");var r,a=!1,l=[],u=-1;function c(){u++;var t=document.createElementNS(o.svg,"tspan");n.select(t).attr({class:"line",dy:u*s+"em"}),e.appendChild(t),r=t;var i=l;if(l=[{node:t}],i.length>1)for(var a=1;a doesnt match end tag <"+e+">. Pretending it did match.",t),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",t)}var E=b.test(t);E?c():(r=e,l=[{node:e}]);for(var P=t.split(y),O=0;O|>|>)/g;var f=[["$","$"],["\\(","\\)"]];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"},h={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},v="\u200b",m=["http:","https:","mailto:","",void 0,":"],g=t.NEWLINES=/(\r\n?|\n)/g,y=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;t.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&C(n)}var M=/(^|;)\s*color:/;t.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"],i=e.split(y),a=[],o="",s=0,l=0;l3?a.push(u.substr(0,h-3)+"..."):a.push(u.substr(0,h));break}o=""}}return a.join("")};var S={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(e){return e.replace(E,(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)):S[t])||e}))}function L(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var i=r.protocol,a=n.protocol;return-1!==m.indexOf(i)&&-1!==m.indexOf(a)?t:""}function P(e,t,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||"top",u=e.node().getBoundingClientRect(),c=t.node().getBoundingClientRect();return a="bottom"===l?function(){return u.bottom-n.height}:"middle"===l?function(){return u.top+(u.height-n.height)/2}:function(){return u.top},o="right"===s?function(){return u.right-n.width}:"center"===s?function(){return u.left+(u.width-n.width)/2}:function(){return u.left},function(){n=this.node().getBoundingClientRect();var e=o()-c.left,t=a()-c.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}t.convertEntities=C,t.sanitizeHTML=function(e){e=e.replace(g," ");for(var t=document.createElement("p"),r=t,i=[],a=e.split(y),o=0;o{"use strict";var r={};function n(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}t.throttle=function(e,t,i){var a=r[e],o=Date.now();if(!a){for(var s in r)r[s].tsa.ts+t?l():a.timer=setTimeout((function(){l(),a.timer=null}),t)},t.done=function(e){var t=r[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},t.clear=function(e){if(e)n(r[e]),delete r[e];else for(var i in r)t.clear(i)}},46396:(e,t,r)=>{"use strict";var n=r(22036);e.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}},72587:(e,t,r)=>{"use strict";var n=r(64022).extendFlat,i=r(30167),a={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"],description:["trace attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*clearAxisTypes* resets the types of the axes this trace is on, because new data could","cause the automatic axis type detection to change. Log type will not be cleared, as that","is never automatically chosen so must have been user-specified.","*plot* (re)plots but without first clearing `gd.calcdata`.","*style* only calls `module.style` (or module.editStyle) for all trace modules and redraws the legend.","*markerSize* is like *style*, but propagate axis-range changes due to scatter `marker.size`","*colorbars* only redraws colorbars."].join(" ")},o={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"],description:["layout attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*plot* (re)plots but without first clearing `gd.calcdata`.","*legend* only redraws the legend.","*ticks* only redraws axis ticks, labels, and gridlines.","*axrange* minimal sequence when updating axis ranges.","*layoutstyle* reapplies global and SVG cartesian axis styles.","*modebar* just updates the modebar.","*camera* just updates the camera settings for gl3d scenes.","*arraydraw* allows component arrays to invoke the redraw routines just for the","component(s) that changed.","*colorbars* only redraws colorbars."].join(" ")},s=a.flags.slice().concat(["fullReplot"]),l=o.flags.slice().concat("layoutReplot");function u(e){for(var t={},r=0;r{"use strict";var t={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},editSelection:{valType:"boolean",dflt:!0,description:"Enables moving selections."},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},r={};!function e(t,r){for(var n in t){var i=t[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),e(i,r[n]))}}(t,r),e.exports={configAttributes:t,dfltConfig:r}},30166:(e,t,r)=>{"use strict";var n=r(38361),i=r(84468),a=r(75622),o=r(98005),s=r(44380),l=r(34765),u=r(20075).configAttributes,c=r(72587),f=i.extendDeepAll,d=i.isPlainObject,h=i.isArrayOrTypedArray,p=i.nestedProperty,v=i.valObjectMeta,m="_isSubplotObj",g="_isLinkedToArray",y="_deprecated",x=[m,g,"_arrayAttrRegexps",y];function b(e,t,r){if(!e)return!1;if(e._isLinkedToArray)if(_(t[r]))r++;else if(r=a.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!_(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function _(e){return e===Math.round(e)&&e>=0}function w(){var e,t,r={};for(e in f(r,o),n.subplotsRegistry){if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[u].type]||{}).attributes)&&r[t[2]],s=3}else{var c=e._module;if(c||(c=(n.modules[e.type||a.type.dflt]||{})._module),!c)return!1;if(!(i=(r=c.attributes)&&r[o])){var f=c.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return b(i,t,s)},t.getLayoutValObject=function(e,t){var r=function(e,t){var r,i,a,s,l=e._basePlotModules;if(l){var u;for(r=0;r{"use strict";var n=r(84468),i=r(75622),a="templateitemname",o={name:{valType:"string",editType:"none",description:["When used in a template, named items are created in the output figure","in addition to any items the figure already has in this array.","You can modify these items in the output figure by making your own","item with `templateitemname` matching this `name`","alongside your modifications (including `visible: false` or","`enabled: false` to hide it).","Has no effect outside of a template."].join(" ")}};function s(e){return e&&"string"===typeof e}function l(e){var t=e.length-1;return"s"!==e.charAt(t)&&n.warn("bad argument to arrayDefaultKey: "+e),e.substr(0,e.length-1)+"defaults"}o[a]={valType:"string",editType:"calc",description:["Used to refer to a named item in this array in the template. Named","items from the template will be created even without a matching item","in the input figure, but you can modify one by making an item with","`templateitemname` matching its `name`, alongside your modifications","(including `visible: false` or `enabled: false` to hide it).","If there is no template or no matching item, this item will be","hidden unless you explicitly show it with `visible: true`."].join(" ")},t.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=o.name,t[a]=o[a],t},t.traceTemplater=function(e){var t,r,a={};for(t in e)r=e[t],Array.isArray(r)&&r.length&&(a[t]=0);return{newTrace:function(o){var s={type:t=n.coerce(o,{},i,"type"),_template:null};if(t in a){r=e[t];var l=a[t]%r.length;a[t]++,s._template=r[l]}return s}}},t.newContainer=function(e,t,r){var i=e._template,a=i&&(i[t]||r&&i[r]);return n.isPlainObject(a)||(a=null),e[t]={_template:a}},t.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[l(t)],o=n&&n[t];Array.isArray(o)&&o.length||(o=[]);var u={};return{newItem:function(e){var t={name:e.name,_input:e},n=t[a]=e[a];if(!s(n))return t._template=i,t;for(var l=0;l=i&&(r._input||{})._templateitemname;s&&(o=i);var l,u=t+"["+o+"]";function c(){l={},s&&(l[u]={},l[u][a]=s)}function f(e,t){s?n.nestedProperty(l[u],e).set(t):l[u+"."+e]=t}function d(){var e=l;return c(),e}return c(),{modifyBase:function(e,t){l[e]=t},modifyItem:f,getUpdateObj:d,applyUpdate:function(t,r){t&&f(t,r);var i=d();for(var a in i)n.nestedProperty(e,a).set(i[a])}}}},88470:(e,t,r)=>{"use strict";var n=r(41871),i=r(38361),a=r(68543),o=r(84468),s=r(13480),l=r(76574),u=r(7605),c=r(3172),f=r(13701),d=r(94082),h=r(85729),p=r(83943),v=r(80038),m=v.enforce,g=v.clean,y=r(49618).doAutoRange,x="start",b="middle",_="end";function w(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&(a[0]t[0]))return!0}return!1}function k(e){var r,i,s,l,f,v,m=e._fullLayout,g=m._size,y=g.p,x=h.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),t.drawMainTitle(e),d.manage(e),!m._has("cartesian"))return a.previousPromises(e);function b(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-y-n:t._offset+t._length+y+n:g.t+g.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+y+n:t._offset-y-n:g.l+g.w*(e.position||0)+n%1}for(r=0;r.5?"t":"b",o=e._fullLayout.margin[a],s=0;"paper"===t.yref?s=r+t.pad.t+t.pad.b:"container"===t.yref&&(s=function(e,t,r,n,i){var a=0;"middle"===r&&(a+=i/2);"t"===e?("top"===r&&(a+=i),a+=n-t*n):("bottom"===r&&(a+=i),a+=t*n);return a}(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b);if(s>o)return s;return 0}(e,t,v);if(m>0){!function(e,t,r,n){var i="title.automargin",s=e._fullLayout.title,l=s.y>.5?"t":"b",u={x:s.x,y:s.y,t:0,b:0},c={};"paper"===s.yref&&function(e,t,r,n,i){var a="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,s=o.isTopAnchor(t)?n:n-i,l="b"===r?a-s:s;return!(o.isTopAnchor(t)&&"t"===r||o.isBottomAnchor(t)&&"b"===r)&&l{"use strict";e.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"],description:["Describes how a new animate call interacts with currently-running","animations. If `immediate`, current animations are interrupted and","the new animation is started. If `next`, the current frame is allowed","to complete, after which the new animation is started. If `afterall`","all existing frames are animated to completion before the new animation","is started."].join(" ")},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward",description:["The direction in which to play the frames triggered by the animation call"].join(" ")},fromcurrent:{valType:"boolean",dflt:!1,description:["Play frames starting at the current frame instead of the beginning."].join(" ")},frame:{duration:{valType:"number",min:0,dflt:500,description:["The duration in milliseconds of each frame. If greater than the frame","duration, it will be limited to the frame duration."].join(" ")},redraw:{valType:"boolean",dflt:!0,description:["Redraw the plot at completion of the transition. This is desirable","for transitions that include properties that cannot be transitioned,","but may significantly slow down updates that do not require a full","redraw of the plot"].join(" ")}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none",description:["The duration of the transition, in milliseconds. If equal to zero,","updates are synchronous."].join(" ")},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none",description:"The easing function used for the transition"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none",description:["Determines whether the figure's layout or traces smoothly transitions","during updates that make both traces and layout change."].join(" ")}}}},38851:(e,t,r)=>{"use strict";var n=r(84468),i=r(37091);e.exports=function(e,t,r){var a,o,s=r.name,l=r.inclusionAttr||"visible",u=t[s],c=n.isArrayOrTypedArray(e[s])?e[s]:[],f=t[s]=[],d=i.arrayTemplater(t,s,l);for(a=0;a{"use strict";var n=r(91740),i=r(25087);e.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legend:{valType:"subplotid",dflt:"legend",editType:"style",description:["Sets the reference to a legend to show this trace in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:n({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")},legendwidth:{valType:"number",min:0,editType:"style",description:"Sets the width (in px or fraction) of the legend for this trace."},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appears as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}}},35087:(e,t,r)=>{"use strict";var n=r(22036),i=r(84468),a=i.dateTime2ms,o=i.incrementMonth,s=r(65004).ONEAVGMONTH;e.exports=function(e,t,r,i){if("date"!==t.type)return{vals:i};var l=e[r+"periodalignment"];if(!l)return{vals:i};var u,c=e[r+"period"];if(n(c)){if((c=+c)<=0)return{vals:i}}else if("string"===typeof c&&"M"===c.charAt(0)){var f=+c.substring(1);if(!(f>0&&Math.round(f)===f))return{vals:i};u=f}for(var d=t.calendar,h="start"===l,p="end"===l,v=e[r+"period0"],m=a(v,d)||0,g=[],y=[],x=[],b=i.length,_=0;_A;)T=o(T,-u,d);for(;T<=A;)T=o(T,u,d);k=o(T,-u,d)}else{for(T=m+(w=Math.round((A-m)/c))*c;T>A;)T-=c;for(;T<=A;)T+=c;k=T-c}g[_]=h?k:p?T:(k+T)/2,y[_]=k,x[_]=T}return{vals:g,starts:y,ends:x}}},86237:e=>{"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}},49618:(e,t,r)=>{"use strict";var n=r(41871),i=r(22036),a=r(84468),o=r(65004).FP_SAFE,s=r(38361),l=r(3172),u=r(11576),c=u.getFromId,f=u.isLinked;function d(e,t){var r,n,i=[],o=e._fullLayout,s=p(o,t,0),l=p(o,t,1),u=m(e,t),c=u.min,f=u.max;if(0===c.length||0===f.length)return a.simpleMap(t.range,t.r2l);var d=c[0].val,v=f[0].val;for(r=1;r0&&((A=L-s(b)-l(_))>P?M/A>O&&(w=b,k=_,O=M/A):M/L>O&&(w={val:b.val,nopad:1},k={val:_.val,nopad:1},O=M/L));if(d===v){var I=d-1,R=d+1;if(E)if(0===d)i=[0,1];else{var D=(d>0?f:c).reduce((function(e,t){return Math.max(e,l(t))}),0),z=d/(1-Math.min(.5,D/L));i=d>0?[0,z]:[z,0]}else i=C?[Math.max(0,I),Math.max(1,R)]:[I,R]}else E?(w.val>=0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):C&&(w.val-O*s(w)<0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),O=(k.val-w.val-h(t,b.val,_.val))/(L-s(w)-l(k)),i=[w.val-O*s(w),k.val+O*l(k)];return i=T(i,t),t.limitRange&&t.limitRange(),y&&i.reverse(),a.simpleMap(i,t.l2r||Number)}function h(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),C=A(r.vpadminus||r.vpad);if(!k){if(d=1/0,h=-1/0,w)for(n=0;n0&&(d=a),a>h&&a-o&&(d=a),a>h&&a=O;n--)P(n);return{min:p,max:v,opts:r}},concatExtremes:m};var v=3;function m(e,t,r){var n,i,a,o=t._id,s=e._fullData,l=e._fullLayout,u=[],f=[];function d(e,t){for(n=0;n=r&&(u.extrapad||!o)){s=!1;break}i(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&0===t;e.push({val:t,pad:c?0:r,extrapad:!c&&o})}}function b(e){return i(e)&&Math.abs(e)=t}function k(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))<(r=e.d2l(r))}function T(e,t){if(!t||!t.autorangeoptions)return e;var r=e[0],n=e[1],i=t.autorangeoptions.include;if(void 0!==i){var o=t.d2l(r),s=t.d2l(n);a.isArrayOrTypedArray(i)||(i=[i]);for(var l=0;l=u&&(o=u,r=u),s<=u&&(s=u,n=u)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&k(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&k(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&k(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&k(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}},87832:e=>{"use strict";e.exports=function(e,t,r){var n,i;if(r){var a="reversed"===t||"min reversed"===t||"max reversed"===t;n=r[a?1:0],i=r[a?0:1]}var o=e("autorangeoptions.minallowed",null===i?n:void 0),s=e("autorangeoptions.maxallowed",null===n?i:void 0);void 0===o&&e("autorangeoptions.clipmin"),void 0===s&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},85729:(e,t,r)=>{"use strict";var n=r(41871),i=r(22036),a=r(68543),o=r(38361),s=r(84468),l=s.strTranslate,u=r(13480),c=r(13701),f=r(7605),d=r(3172),h=r(49080),p=r(13530),v=r(65004),m=v.ONEMAXYEAR,g=v.ONEAVGYEAR,y=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,w=v.ONEMAXMONTH,k=v.ONEAVGMONTH,T=v.ONEMINMONTH,A=v.ONEWEEK,M=v.ONEDAY,S=M/2,E=v.ONEHOUR,C=v.ONEMIN,L=v.ONESEC,P=v.MINUS_SIGN,O=v.BADNUM,I={K:"zeroline"},R={K:"gridline",L:"path"},D={K:"minor-gridline",L:"path"},z={K:"tick",L:"path"},F={K:"tick",L:"text"},N={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},B=r(83943),j=B.MID_SHIFT,U=B.CAP_SHIFT,q=B.LINE_SPACING,V=B.OPPOSITE_SIDE,H=e.exports={};H.setConvert=r(45958);var G=r(84339),W=r(11576),Y=W.idSort,Z=W.isLinked;H.id2name=W.id2name,H.name2id=W.name2id,H.cleanId=W.cleanId,H.list=W.list,H.listIds=W.listIds,H.getFromId=W.getFromId,H.getFromTrace=W.getFromTrace;var X=r(49618);H.getAutoRange=X.getAutoRange,H.findExtremes=X.findExtremes;var K=1e-4;function J(e){var t=(e[1]-e[0])*K;return[e[0]-t,e[1]+t]}H.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],u=n+"ref",c={};return i||(i=l[0]||("string"===typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(e){return e+" domain"}))),c[u]={valType:"enumerated",values:l.concat(a?"string"===typeof a?[a]:a:[]),dflt:i},s.coerce(e,t,c,u)},H.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},H.coercePosition=function(e,t,r,n,i,a){var o,l;if("range"!==H.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var u=H.getFromId(t,n);l=r(i,a=u.fraction2r(a)),o=u.cleanPos}e[i]=o(l)},H.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?s.ensureNumber:H.getFromId(t,r).cleanPos)(e)},H.redrawComponents=function(e,t){t=t||H.listIds(e);var r=e._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),u={},c=0;cn&&d2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},H.saveRangeInitial=function(e,t){for(var r=H.list(e,"",!0),n=!1,i=0;i.3*d||c(n)||c(a))){var h=r.dtick/2;e+=e+ho){var l=Number(r.substr(1));a.exactYears>o&&l%12===0?e=H.tickIncrement(e,"M6","reverse")+1.5*M:a.exactMonths>o?e=H.tickIncrement(e,"M1","reverse")+15.5*M:e-=S;var u=H.tickIncrement(e,r);if(u<=n)return u}return e}(y,e,g,u,a)),m=y,0;m<=c;)m=H.tickIncrement(m,g,!1,a);return{start:t.c2r(y,0,a),end:t.c2r(m,0,a),size:g,_dataSpan:c-u}},H.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n,a=t.dtick&&i(t._tmin);if(a){var o=H.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,.99*o+.01*t._tmin]}else{var l=s.simpleMap(t.range,t.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(e.range=s.simpleMap(n,t.l2r),e._isMinor=!0,H.prepTicks(e,r),a){var u=i(t.dtick),c=i(e.dtick),f=u?t.dtick:+t.dtick.substring(1),d=c?e.dtick:+e.dtick.substring(1);u&&c?te(f,d)?f===2*A&&d===2*M&&(e.dtick=A):f===2*A&&d===3*M?e.dtick=A:f!==A||(t._input.minor||{}).nticks?re(f/d,2.5)?e.dtick=f/2:e.dtick=f:e.dtick=M:"M"===String(t.dtick).charAt(0)?c?e.dtick="M1":te(f,d)?f>=12&&2===d&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?te(f,d)||(e.dtick=re(f/d,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},H.prepTicks=function(e,t){var r=s.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,a=e.nticks;a||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?s.bigFont(e.tickfont.size||12):15,a=e._length/n):(n="y"===e._id.charAt(0)?40:80,a=s.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(a*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(a*=100),e._roughDTick=Math.abs(r[1]-r[0])/a,H.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(i(e.dtick)||"M"!==e.dtick.charAt(0))}var n=r(),a=H.getTickFormat(e);if(a){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(t=E,o&&!n&&e.dtick=(I?0:1);R--){var D=!R;R?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var z=R?e:s.extendFlat({},e,e.minor);if(D?H.prepMinorTicks(z,e,t):H.prepTicks(z,t),"array"!==z.tickmode)if("sync"!==z.tickmode){var F=J(c),N=F[0],B=F[1],j=i(z.dtick),U="log"===a&&!(j||"L"===z.dtick.charAt(0)),q=H.tickFirst(z,t);if(R){if(e._tmin=q,q=B:Y<=B;Y=H.tickIncrement(Y,Z,f,o)){if(R&&V++,z.rangebreaks&&!f){if(Y=h)break}if(L.length>p||Y===W)break;W=Y;var X={value:Y};R?(U&&Y!==(0|Y)&&(X.simpleLabel=!0),l>1&&V%l&&(X.skipLabel=!0),L.push(X)):(X.minor=!0,P.push(X))}}else L=[],v=ae(e);else R?(L=[],v=oe(e,!D)):(P=[],C=oe(e,!D))}if(I&&!("inside"===e.minor.ticks&&"outside"===e.ticks||"outside"===e.minor.ticks&&"inside"===e.ticks)){for(var K=L.map((function(e){return e.value})),$=[],Q=0;Q0?(a=n-1,o=n):(a=n,o=n);var s,l=e[a].value,u=e[o].value,c=Math.abs(u-l),f=r||c,d=0;f>=y?d=c>=y&&c<=m?c:g:r===b&&f>=_?d=c>=_&&c<=x?c:b:f>=T?d=c>=T&&c<=w?c:k:r===A&&f>=A?d=A:f>=M?d=M:r===S&&f>=S?d=S:r===E&&f>=E&&(d=E),d>=c&&(d=c,s=!0);var h=i+d;if(t.rangebreaks&&d>0){for(var p=0,v=0;v<84;v++){var C=(v+.5)/84;t.maskBreaks(i*(1-C)+C*h)!==O&&p++}(d*=p/84)||(e[n].drop=!0),s&&c>A&&(d=c)}(d>0||0===n)&&(e[n].periodX=i+d/2)}}(L,e,e._definedDelta),e.rangebreaks){var ie="y"===e._id.charAt(0),se=1;"auto"===e.tickmode&&(se=e.tickfont?e.tickfont.size:12);var le=NaN;for(r=L.length-1;r>-1;r--)if(L[r].drop)L.splice(r,1);else{L[r].value=De(L[r].value,e);var ue=e.c2p(L[r].value);(ie?le>ue-se:leh||feh&&(ce.periodX=h),fe10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=M&&a<=10||t>=15*M)e._tickround="d";else if(t>=C&&a<=16||t>=E)e._tickround="M";else if(t>=L&&a<=19||t>=C)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(i(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);i(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),u=Math.floor(Math.log(l)/Math.LN10+.01),c=void 0===e.minexponent?3:e.minexponent;Math.abs(u)>c&&(ye(e.exponentformat)&&!xe(u)?e._tickexponent=3*Math.round((u-1)/3):e._tickexponent=u)}else e._tickround=null}function me(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}H.autoTicks=function(e,t,r){var n;function a(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=s.dateTick0(e.calendar,0);var o=2*t;if(o>g)t/=g,n=a(10),e.dtick="M"+12*pe(t,n,se);else if(o>k)t/=k,e.dtick="M"+pe(t,1,le);else if(o>M){if(e.dtick=pe(t,M,e._hasDayOfWeekBreaks?[1,2,7,14]:ce),!r){var l=H.getTickFormat(e),u="period"===e.ticklabelmode;u&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=s.dateTick0(e.calendar,2):e.tick0=s.dateTick0(e.calendar,1),u&&(e._dowTick0=e.tick0)}}else o>E?e.dtick=pe(t,E,le):o>C?e.dtick=pe(t,C,ue):o>L?e.dtick=pe(t,L,ue):(n=a(10),e.dtick=pe(t,n,se))}else if("log"===e.type){e.tick0=0;var c=s.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(c[1]-c[0])<1){var f=1.5*Math.abs((c[1]-c[0])/t);t=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/f,n=a(10),e.dtick="L"+pe(t,n,se)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Re(e)?(e.tick0=0,n=1,e.dtick=pe(t,n,he)):(e.tick0=0,n=a(10),e.dtick=pe(t,n,se));if(0===e.dtick&&(e.dtick=1),!i(e.dtick)&&"string"!==typeof e.dtick){var d=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(d)}},H.tickIncrement=function(e,t,r,a){var o=r?-1:1;if(i(t))return s.increment(e,o*t);var l=t.charAt(0),u=o*Number(t.substr(1));if("M"===l)return s.incrementMonth(e,u,a);if("L"===l)return Math.log(Math.pow(10,e)+u)/Math.LN10;if("D"===l){var c="D2"===t?de:fe,f=e+.01*o,d=s.roundUp(s.mod(f,1),c,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(t)},H.tickFirst=function(e,t){var r=e.r2l||Number,a=s.simpleMap(e.range,r,void 0,void 0,t),o=a[1]=0&&r<=e._length?t:null};if(l&&s.isArrayOrTypedArray(e.ticktext)){var h=s.simpleMap(e.range,e.r2l),p=(Math.abs(h[1]-h[0])-(e._lBreaks||0))/1e4;for(a=0;a ")}else e._prevDateHead=l,u+="
"+l;t.text=u}(e,o,r,u):"log"===c?function(e,t,r,n,a){var o=e.dtick,l=t.x,u=e.tickformat,c="string"===typeof o&&o.charAt(0);"never"===a&&(a="");n&&"L"!==c&&(o="L3",c="L");if(u||"L"===c)t.text=be(Math.pow(10,l),e,a,n);else if(i(o)||"D"===c&&s.mod(l+.01,1)<.1){var f=Math.round(l),d=Math.abs(f),h=e.exponentformat;"power"===h||ye(h)&&xe(f)?(t.text=0===f?1:1===f?"10":"10"+(f>1?"":P)+d+"",t.fontSize*=1.25):("e"===h||"E"===h)&&d>2?t.text="1"+h+(f>0?"+":P)+d:(t.text=be(Math.pow(10,l),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==c)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,s.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var 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*(l<0?.5:.25)))}}(e,o,0,u,m):"category"===c?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r="");t.text=String(r)}(e,o):"multicategory"===c?function(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}(e,o,r):Re(e)?function(e,t,r,n,i){if("radians"!==e.thetaunit||r)t.text=be(t.x,e,i,n);else{var a=t.x/180;if(0===a)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}function r(e,n){return t(n,0)?e:r(n,e%n)}function n(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}(a);if(o[1]>=100)t.text=be(s.deg2rad(t.x),e,i,n);else{var l=t.x<0;1===o[1]?1===o[0]?t.text="\u03c0":t.text=o[0]+"\u03c0":t.text=["",o[0],"","\u2044","",o[1],"","\u03c0"].join(""),l&&(t.text=P+t.text)}}}}(e,o,r,u,m):function(e,t,r,n,i){"never"===i?i="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide");t.text=be(t.x,e,i,n)}(e,o,0,u,m),n||(e.tickprefix&&!v(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!v(e.showticksuffix)&&(o.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(o.text)){var g=e.labelalias[o.text];"string"===typeof g&&(o.text=g)}return("boundaries"===e.tickson||e.showdividers)&&(o.xbnd=[d(o.x-.5),d(o.x+e.dtick-.5)]),o},H.hoverLabelText=function(e,t,r){r&&(e=s.extendFlat({},e,{hoverformat:r}));var n=s.isArrayOrTypedArray(t)?t[0]:t,i=s.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==i&&i!==n)return H.hoverLabelText(e,n,r)+" - "+H.hoverLabelText(e,i,r);var a="log"===e.type&&n<=0,o=H.tickText(e,e.c2l(a?-n:n),"hover").text;return a?0===n?"0":P+o:o};var ge=["f","p","n","\u03bc","m","","k","M","G","T"];function ye(e){return"SI"===e||"B"===e}function xe(e){return e>14||e<-15}function be(e,t,r,n){var a=e<0,o=t._tickround,l=r||t.exponentformat||"B",u=t._tickexponent,c=H.getTickFormat(t),f=t.separatethousands;if(n){var d={exponentformat:l,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:i(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};ve(d),o=(Number(d._tickround)||0)+4,u=d._tickexponent,t.hoverformat&&(c=t.hoverformat)}if(c)return t._numFormat(c)(e).replace(/-/g,P);var h,p=Math.pow(10,-o)/2;if("none"===l&&(u=0),(e=Math.abs(e))"+h+"
":"B"===l&&9===u?e+="B":ye(l)&&(e+=ge[u/3+5]));return a?P+e:e}function _e(e,t){if(e){var r=Object.keys(N).reduce((function(e,r){return-1!==t.indexOf(r)&&N[r].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){r[t]||(1===t.length?e[t]=0:delete e[t])}))}}function we(e,t){for(var r=[],n={},i=0;i1&&r=i.min&&e=n(e))}function s(e,t){var r=null===t[0],n=null===t[1],i=a(e,t[0])>=0,o=a(e,t[1])<=0;return(r||i)&&(n||o)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=0&&i.unshift(i.splice(n,1).shift())}}));var o={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(t){return function(){if(t){var n=H.getFromId(e,t);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=a;var i=H.drawOne(e,n,r);return n._shiftPusher&&Ne(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},H.drawOne=function(e,t,r){var n,i,l,h=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];t.setScale();var v=e._fullLayout,m=t._id,g=m.charAt(0),y=H.counterLetter(m),x=v._plots[t._mainSubplot];if(x){if(t._shiftPusher=t.autoshift||-1!==p.indexOf(t._id)||-1!==p.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var b=t.linewidth/2||0;"inside"===t.ticks&&(b+=t.ticklen),Ne(t,b,h,!0),Ne(t,t.shift||0,h,!1)}!0===r.skipTitle&&void 0!==t._shift||(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,h));var _=x[g+"axislayer"],w=t._mainLinePosition,k=w+=t._shift,T=t._mainMirrorPosition,A=t._vals=H.calcTicks(t),M=[t.mirror,k,T].join("_");for(n=0;n0?r.bottom-c:0,f))));var d=0,h=0;if(t._shiftPusher&&(d=Math.max(f,r.height>0?"l"===l?c-r.left:r.right-c:0),t.title.text!==v._dfltTitle[g]&&(h=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(h+=Ae(t))),t._fullDepth=Math.max(d,h)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],m="number"===typeof t._shift?t._shift:0;if("x"===g){if("b"===l?n[l]=t._depth:(n[l]=t._depth=Math.max(r.width>0?c-r.top:0,f),p.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var b=t._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===l?(t._depth=Math.max(r.height>0?c-r.left:0,f),n[l]=t._depth-m):(t._depth=Math.max(r.height>0?r.right-c:0,f),n[l]=t._depth+m,p.reverse()),r.height>0){var _=r.bottom-(t._offset+t._length);_>0&&(n.yb=0,n.b=_);var w=t._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[y]="free"===t.anchor?t.position:t._anchorAxis.domain[p[0]],t.title.text!==v._dfltTitle[g]&&(n[l]+=Ae(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=t.linewidth,t.mirror&&!0!==t.mirror&&(i[u]+=f),!0===t.mirror||"ticks"===t.mirror?i[y]=t._anchorAxis.domain[p[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(i[y]=[t._counterDomainMin,t._counterDomainMax][p[1]]))}fe&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"===typeof t.automargin&&(_e(n,t.automargin),_e(i,t.automargin)),a.autoMargin(e,Ee(t),n),a.autoMargin(e,Ce(t),i),a.autoMargin(e,Le(t),s)})),s.syncOrAsync(ue)}}function de(e){var r=m+(e||"tick");return S[r]||(S[r]=function(e,t,r){var n,i,a,o;if(e._selections[t].size())n=1/0,i=-1/0,a=1/0,o=-1/0,e._selections[t].each((function(){var e=Se(this),t=d.bBox(e.node().parentNode);n=Math.min(n,t.top),i=Math.max(i,t.bottom),a=Math.min(a,t.left),o=Math.max(o,t.right)}));else{var s=H.makeLabelFns(e,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}(t,r,k)),S[r]}},H.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],i=e.side===n?1:-1,a=[-1,1,i,-i];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)===("x"===r)&&(a=a.map((function(e){return-e}))),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a},H.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return l(e._offset+e.l2p(t.x),0)}:function(t){return l(0,e._offset+e.l2p(t.x))}},H.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=function(e){return-1!==t.indexOf(e)},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var u=e.side,c=l?(e.tickwidth||0)/2:0,f=3,d=e.tickfont?e.tickfont.size:12;(o||n)&&(c+=d*U,f+=(e.linewidth||0)/2);(i||a)&&(c+=(e.linewidth||0)/2,f+=3);s&&"top"===u&&(f-=d*(1-U));(i||n)&&(c=-c);"bottom"!==u&&"right"!==u||(f=-f);return[l?c:0,s?f:0]}(e),r=t[0],n=t[1];return"x"===e._id.charAt(0)?function(t){return l(r+e._offset+e.l2p(ke(t)),n)}:function(t){return l(n,r+e._offset+e.l2p(ke(t)))}},H.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var a=void 0!==n.len?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r},H.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",a=function(e){return-1!==n.indexOf(e)},o=a("top"),l=a("left"),u=a("right"),c=a("bottom")||l||o||u,f=a("inside"),d="inside"===n&&"inside"===e.ticks||!f&&"outside"===e.ticks&&"boundaries"!==e.tickson,h=0,p=0,v=d?e.ticklen:0;if(f?v*=-1:c&&(v=0),d&&(h+=v,r)){var m=s.deg2rad(r);h=v*Math.cos(m)+1,p=v*Math.sin(m)}e.showticklabels&&(d||e.showline)&&(h+=.2*e.tickfont.size);var g,y,x,b,_,w={labelStandoff:h+=(e.linewidth||1)/2*(f?-1:1),labelShift:p},k=0,T=e.side,A=e._id.charAt(0),M=e.tickangle;if("x"===A)b=(_=!f&&"bottom"===T||f&&"top"===T)?1:-1,f&&(b*=-1),g=p*b,y=t+h*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=j:x=-90===M&&"bottom"===T?U:90===M&&"top"===T?j:.5,k=j/2*(M/90)),w.xFn=function(e){return e.dx+g+k*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*x},w.anchorFn=function(e,t){if(c){if(l)return"end";if(u)return"start"}return i(t)&&0!==t&&180!==t?t*b<0!==f?"end":"start":"middle"},w.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==f?-n:0};else if("y"===A){if(b=(_=!f&&"left"===T||f&&"right"===T)?1:-1,f&&(b*=-1),g=h,y=p*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&"left"===T||90===M&&"right"===T?U:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);k=Math.abs(Math.sin(E))*U*b,x=0}}w.xFn=function(e){return e.dx+t-(g+e.fontSize*x)*b+k*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*j},w.anchorFn=function(e,t){return i(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},H.drawTicks=function(e,t,r){r=r||{};var i=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?r.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?r.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),o=r.layer.selectAll("path."+i).data(a,Te);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(e){return f.stroke(n.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(r){return d.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Fe(t,[z]),o.attr("transform",r.transFn)},H.drawGrid=function(e,t,r){if(r=r||{},"sync"!==t.tickmode){var i=t._id+"grid",a=t.minor&&t.minor.showgrid,o=a?r.vals.filter((function(e){return e.minor})):[],s=t.showgrid?r.vals.filter((function(e){return!e.minor})):[],l=r.counterAxis;if(l&&H.shouldShowZeroLine(e,t,l))for(var u="array"===t.tickmode,c=0;c=0;g--){var y=g?v:m;if(y){var x=y.selectAll("path."+i).data(g?s:o,Te);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each((function(e){return f.stroke(n.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return d.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?p:t._gw)+"px"})).style("display",null),"function"===typeof r.path&&x.attr("d",r.path)}}Fe(t,[R,D])}},H.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=H.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return Y(e.id,t.id)}))})),a.attr("transform",r.transFn).attr("d",r.path).call(f.stroke,t.zerolinecolor||f.defaultLine).style("stroke-width",d.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Fe(t,[I])},H.drawLabels=function(e,t,r){r=r||{};var a=e._fullLayout,o=t._id,c=r.cls||o+"tick",f=r.vals.filter((function(e){return e.text})),h=r.labelFns,p=r.secondary?0:t.tickangle,v=(t._prevTickAngles||{})[c],m=r.layer.selectAll("g."+c).data(t.showticklabels?f:[],Te),g=[];function y(e,a){e.each((function(e){var o=n.select(this),s=o.select(".text-math-group"),c=h.anchorFn(e,a),f=r.transFn.call(o.node(),e)+(i(a)&&0!==+a?" rotate("+a+","+h.xFn(e)+","+(h.yFn(e)-e.fontSize/2)+")":""),p=u.lineCount(o),v=q*e.fontSize,m=h.heightFn(e,i(a)?+a:0,(p-1)*v);if(m&&(f+=l(0,m)),s.empty()){var g=o.select("text");g.attr({transform:f,"text-anchor":c}),g.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var y=d.bBox(s.node()).width*{end:-.5,start:.5}[c];s.attr("transform",f+l(y,0))}}))}m.enter().append("g").classed(c,1).append("text").attr("text-anchor","middle").each((function(t){var r=n.select(this),i=e._promises.length;r.call(u.positionText,h.xFn(t),h.yFn(t)).call(d.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(u.convertToTspans,e),e._promises[i]?g.push(e._promises.pop().then((function(){y(r,p)}))):y(r,p)})),Fe(t,[F]),m.exit().remove(),r.repositionOnUpdate&&m.each((function(e){n.select(this).select("text").call(u.positionText,h.xFn(e),h.yFn(e))})),t._adjustTickLabelsOverflow=function(){var r=t.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),o="x"===t._id.charAt(0),l=0,u=o?e._fullLayout.width:e._fullLayout.height;if(-1!==r.indexOf("domain")){var c=s.simpleMap(t.range,t.r2l);l=t.l2p(c[0])+t._offset,u=t.l2p(c[1])+t._offset}var f=Math.min(l,u),h=Math.max(l,u),p=t.side,v=1/0,g=-1/0;for(var y in m.each((function(e){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=d.bBox(r.node()),s=0;o?(a.right>h||a.lefth||a.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==e.K||i||l.style("display",null)}))}))}))}))},y(m,v+1?v:p);var x=null;t._selections&&(t._selections[c]=m);var b=[function(){return g.length&&Promise.all(g)}];t.automargin&&a._redrawFromAutoMarginCount&&90===v?(x=v,b.push((function(){y(m,v)}))):b.push((function(){if(y(m,p),f.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){x=t.autotickangles[0];var e,n=0,i=[],a=1;m.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),o=Se(this),s=d.bBox(o.node());a=Math.max(a,u.lineCount(o)),i.push({top:0,bottom:10,height:10,left:r-s.width/2,right:r+s.width/2+2,width:s.width+2})}));var o=("boundaries"===t.tickson||t.showdividers)&&!r.secondary,l=f.length,c=Math.abs((f[l-1].x-f[0].x)*t._m)/(l-1),h=o?c/2:c,v=o?t.ticklen:1.25*n*a,g=h/Math.sqrt(Math.pow(h,2)+Math.pow(v,2)),b=t.autotickangles.map((function(e){return e*Math.PI/180})),_=b.find((function(e){return Math.abs(Math.cos(e))<=g}));void 0===_&&(_=b.reduce((function(e,t){return Math.abs(Math.cos(e))j*B&&(P=B,E[S]=C[S]=O[S])}var U=Math.abs(P-L);U-T>0?T*=1+T/(U-=T):T=0,"y"!==t._id.charAt(0)&&(T=-T),E[M]=w.p2r(w.r2p(C[M])+A*T),"min"===w.autorange||"max reversed"===w.autorange?(E[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(E[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[w._name+".range"]=E}var V=s.syncOrAsync(b);return V&&V.then&&e._promises.push(V),V},H.getPxPosition=function(e,t){var r,n=e._fullLayout._size,i=t._id.charAt(0),a=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===i?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===a||"left"===a?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},H.shouldShowZeroLine=function(e,t,r){var n=s.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===O)&&(Me(t,0)||!function(e,t,r,n){var i=r._mainAxis;if(!i)return;var a=e._fullLayout,o=t._id.charAt(0),s=H.counterLetter(t._id),l=t._offset+(Math.abs(n[0])1)for(n=1;n{"use strict";var n=r(22036),i=r(84468),a=r(65004).BADNUM,o=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,u=Math.round;function c(e,t){return t?n(e):"number"===typeof e}function f(e){return Math.max(1,(e-1)/1e3)}e.exports=function(e,t,r){var i=e,d=r.noMultiCategory;if(o(i)&&!i.length)return"-";if(!d&&function(e){return o(e[0])&&o(e[1])}(i))return"multicategory";if(d&&Array.isArray(i[0])){for(var h=[],p=0;p2*o}(i,t))return"date";var m="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=f(r),i=0,o=0,s={},c=0;c2*i}(i,m)?"category":function(e,t){for(var r=e.length,n=0;n{"use strict";var n=r(22036),i=r(38361),a=r(84468),o=r(37091),s=r(38851),l=r(49080),u=r(43452),c=r(3118),f=r(83193),d=r(89655),h=r(74128),p=r(40190),v=r(60696),m=r(45958),g=r(93143).WEEKDAY_PATTERN,y=r(93143).HOUR_PATTERN;function x(e,t,r){function i(r,n){return a.coerce(e,t,l.rangebreaks,r,n)}if(i("enabled")){var o=i("bounds");if(o&&o.length>=2){var s,u,c="";if(2===o.length)for(s=0;s<2;s++)if(u=_(o[s])){c=g;break}var f=i("pattern",c);if(f===g)for(s=0;s<2;s++)(u=_(o[s]))&&(t.bounds[s]=o[s]=u-1);if(f)for(s=0;s<2;s++)switch(u=o[s],f){case g:if(!n(u))return void(t.enabled=!1);if((u=+u)!==Math.floor(u)||u<0||u>=7)return void(t.enabled=!1);t.bounds[s]=o[s]=u;break;case y:if(!n(u))return void(t.enabled=!1);if((u=+u)<0||u>24)return void(t.enabled=!1);t.bounds[s]=o[s]=u}if(!1===r.autorange){var d=r.range;if(d[0]d[1])return void(t.enabled=!1)}else if(o[0]>d[0]&&o[1]{"use strict";var n=r(3127),i=n.FORMAT_LINK,a=n.DATE_FORMAT_LINK;function o(e,t){return["Sets the "+e+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(e,t){return o(e,t)+[" And for dates see: "+a+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}e.exports={axisHoverFormat:function(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?o:s)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:o,descriptionWithDates:s}},11576:(e,t,r)=>{"use strict";var n=r(38361),i=r(93143);function a(e,t){if(t&&t.length)for(var r=0;rn?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},t.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},t.isLinked=function(e,t){return a(t,e._axisMatchGroups)||a(t,e._axisConstraintGroups)}},74128:(e,t,r)=>{"use strict";var n=r(19045).isTypedArraySpec;e.exports=function(e,t,r,i){if("category"===t.type){var a,o=e.categoryarray,s=Array.isArray(o)&&o.length>0||n(o);s&&(a="array");var l,u=r("categoryorder",a);"array"===u&&(l=r("categoryarray")),s||"array"!==u||(u=t.categoryorder="trace"),"trace"===u?t._initialCategories=[]:"array"===u?t._initialCategories=l.slice():(l=function(e,t){var r,n,i,a=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;n{"use strict";var n=r(22036),i=r(84468),a=r(65004),o=a.ONEDAY,s=a.ONEWEEK;t.dtick=function(e,t){var r="log"===t,i="date"===t,a="category"===t,s=i?o:1;if(!e)return s;if(n(e))return(e=Number(e))<=0?s:a?Math.max(1,Math.round(e)):i?Math.max(.1,e):e;if("string"!==typeof e||!i&&!r)return s;var l=e.charAt(0),u=e.substr(1);return(u=n(u)?Number(u):0)<=0||!(i&&"M"===l&&u===Math.round(u)||r&&"L"===l||r&&"D"===l&&(1===u||2===u))?s:e},t.tick0=function(e,t,r,a){return"date"===t?i.cleanDate(e,i.dateTick0(r,a%s===0?1:0)):"D1"!==a&&"D2"!==a?n(e)?Number(e):0:void 0}},93143:(e,t,r)=>{"use strict";var n=r(51195).counter;e.exports={idRegex:{x:n("x","( domain)?"),y:n("y","( domain)?")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},80038:(e,t,r)=>{"use strict";var n=r(84468),i=r(49618),a=r(11576).id2name,o=r(49080),s=r(57008),l=r(45958),u=r(65004).ALMOST_EQUAL,c=r(83943).FROM_BL;function f(e,t,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,u=s._axisConstraintGroups,c=s._axisMatchGroups,f=t._id,v=f.charAt(0),m=((s._splomAxes||{})[v]||{})[f]||{},g=t._id,y="x"===g.charAt(0);function x(r,i){return n.coerce(e,t,o,r,i)}t._matchGroup=null,t._constraintGroup=null,x("constrain",l?"domain":"range"),n.coerce(e,t,{constraintoward:{valType:"enumerated",values:y?["left","center","right"]:["bottom","middle","top"],dflt:y?"center":"middle"}},"constraintoward");var b,_,w=t.type,k=[];for(b=0;bn?i.substr(n):a.substr(r))+o:i+a+e*t:o}function m(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;ou*x)||k)for(r=0;rI&&FP&&(P=F);d/=(P-L)/(2*O),L=l.l2r(L),P=l.l2r(P),l.range=l._input.range=S{"use strict";var n=r(41871),i=r(84468),a=i.numberFormat,o=r(23498),s=r(17390),l=r(38361),u=i.strTranslate,c=r(13480),f=r(7605),d=r(3172),h=r(32212),p=r(85729),v=r(29454),m=r(25732),g=r(2705),y=g.selectingOrDrawing,x=g.freeMode,b=r(83943).FROM_TL,_=r(76574),w=r(88470).redrawReglTraces,k=r(68543),T=r(11576).getFromId,A=r(76789).prepSelect,M=r(76789).clearOutline,S=r(76789).selectOnClick,E=r(57008),C=r(93143),L=C.MINDRAG,P=C.MINZOOM,O=!0;function I(e,t,r,n){var a=i.ensureSingle(e.draglayer,t,r,(function(t){t.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",e.id)}));return a.call(v,n),a.node()}function R(e,t,r,i,a,o,s){var l=I(e,"rect",t,r);return n.select(l).call(d.setRect,i,a,o,s),l}function D(e,t){for(var r=0;r=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function B(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",u(r,n)).attr("d",i+"Z")}function j(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",u(t,r)).attr("d","M0,0Z")}function U(e,t,r,n,i,a){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),q(e,t,i,a)}function q(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 V(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(e){O&&e.data&&e._context.showTips&&(i.notifier(i._(e,"Double-click to zoom back out"),"long"),O=!1)}function G(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,P)/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 W(e,t,r,n,a){for(var o,s,l,u,c=!1,f={},d={},h=(a||{}).xaHash,p=(a||{}).yaHash,v=0;v=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(V(i),2!==e||ge||He(),me)o.indexOf("select")>-1&&S(r,i,K,J,t.id,Pe),o.indexOf("event")>-1&&h.click(i,r,t.id);else if(1===e&&ge){var s=v?I:O,u="s"===v||"w"===g?0:1,f=s._name+".range["+u+"]",d=function(e,t){var r,n=e.range[t],i=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(s,u),p="left",m="middle";if(s.fixedrange)return;v?(m="n"===v?"top":"bottom","right"===s.side&&(p="right")):"e"===g&&(p="right"),i._context.showAxisRangeEntryBoxes&&n.select(be).call(c.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(d),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:m}).on("edit",(function(e){var t=s.d2r(e);void 0!==t&&l.call("_guiRelayout",i,f,t)}))}}}function Re(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,he*t+_e)),i=Math.max(0,Math.min(te,pe*r+we)),a=Math.abs(n-_e),o=Math.abs(i-we);function s(){Se="",ke.r=ke.l,ke.t=ke.b,Ce.attr("d","M0,0Z")}if(ke.l=Math.min(_e,n),ke.r=Math.max(_e,n),ke.t=Math.min(we,i),ke.b=Math.max(we,i),re.isSubplotConstrained)a>P||o>P?(Se="xy",a/ee>o/te?(o=a*te/ee,we>i?ke.t=we-o:ke.b=we+o):(a=o*ee/te,_e>n?ke.l=_e-a:ke.r=_e+a),Ce.attr("d",G(ke))):s();else if(ne.isSubplotConstrained)if(a>P||o>P){Se="xy";var l=Math.min(ke.l/ee,(te-ke.b)/te),u=Math.max(ke.r/ee,(te-ke.t)/te);ke.l=l*ee,ke.r=u*ee,ke.b=(1-l)*te,ke.t=(1-u)*te,Ce.attr("d",G(ke))}else s();else!ae||o0){var c;if(ne.isSubplotConstrained||!ie&&1===ae.length){for(c=0;c1&&(void 0!==a.maxallowed&&se===(a.range[0]1&&(void 0!==o.maxallowed&&le===(o.range[0]{"use strict";var n=r(41871),i=r(32212),a=r(25732),o=r(29454),s=r(15133).makeDragBox,l=r(93143).DRAGGERSIZE;t.initInteractions=function(e){var r=e._fullLayout;if(e._context.staticPlot)n.select(e).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(e,t){if((r._plots[e].mainplot&&!0)===(r._plots[t].mainplot&&!0)){var n=e.split("y"),i=t.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[e].mainplot?1:-1})).forEach((function(t){var n=r._plots[t],o=n.xaxis,u=n.yaxis;if(!n.mainplot){var c=s(e,n,o._offset,u._offset,o._length,u._length,"ns","ew");c.onmousemove=function(r){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===t&&e._fullLayout._plots[t]&&i.hover(e,r,t)},i.hover(e,r,t),e._fullLayout._lasthover=c,e._fullLayout._hoversubplot=t},c.onmouseout=function(t){e._dragging||(e._fullLayout._hoversubplot=null,a.unhover(e,t))},e._context.showAxisDragHandles&&(s(e,n,o._offset-l,u._offset-l,l,l,"n","w"),s(e,n,o._offset+o._length,u._offset-l,l,l,"n","e"),s(e,n,o._offset-l,u._offset+u._length,l,l,"s","w"),s(e,n,o._offset+o._length,u._offset+u._length,l,l,"s","e"))}if(e._context.showAxisDragHandles){if(t===o._mainSubplot){var f=o._mainLinePosition;"top"===o.side&&(f-=l),s(e,n,o._offset+.1*o._length,f,.8*o._length,l,"","ew"),s(e,n,o._offset,f,.1*o._length,l,"","w"),s(e,n,o._offset+.9*o._length,f,.1*o._length,l,"","e")}if(t===u._mainSubplot){var d=u._mainLinePosition;"right"!==u.side&&(d-=l),s(e,n,d,u._offset+.1*u._length,l,.8*u._length,"ns",""),s(e,n,d,u._offset+.9*u._length,l,.1*u._length,"s",""),s(e,n,d,u._offset,l,.1*u._length,"n","")}}}));var o=r._hoverlayer.node();o.onmousemove=function(t){t.target=e._fullLayout._lasthover,i.hover(e,t,r._hoversubplot)},o.onclick=function(t){t.target=e._fullLayout._lasthover,i.click(e,t)},o.onmousedown=function(t){e._fullLayout._lasthover.onmousedown(t)},t.updateFx(e)}},t.updateFx=function(e){var t=e._fullLayout,r="pan"===t.dragmode?"move":"crosshair";o(t._draggers,r)}},84381:(e,t,r)=>{"use strict";var n=r(38361),i=r(84468),a=r(11576);e.exports=function(e){return function(t,r){var o=t[e];if(Array.isArray(o))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,u=r._subplots,c=u.xaxis,f=u.yaxis,d=u.cartesian,h=r._has("cartesian")||r._has("gl2d"),p=0;p{"use strict";var n=r(41871),i=r(38361),a=r(84468),o=r(68543),s=r(3172),l=r(50246).eV,u=r(11576),c=r(93143),f=r(28795),d=a.ensureSingle;function h(e,t,r){return a.ensureSingle(e,t,r,(function(e){e.datum(r)}))}function p(e,t,r,o,u){for(var f,d,h,p=c.traceLayerClasses,v=e._fullLayout,m=v._modules,g={},y=0;y{"use strict";var n=r(91740),i=r(17992),a=r(2703).T,o=r(64022).extendFlat,s=r(37091).templatedArray,l=r(39363).descriptionWithDates,u=r(65004).ONEDAY,c=r(93143),f=c.HOUR_PATTERN,d=c.WEEKDAY_PATTERN,h={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0},description:["Sets the tick mode for this axis.","If *auto*, the number of ticks is set via `nticks`.","If *linear*, the placement of the ticks is determined by","a starting position `tick0` and a tick step `dtick`","(*linear* is the default value if `tick0` and `dtick` are provided).","If *array*, the placement of the ticks is set via `tickvals`","and the tick text is `ticktext`.","(*array* is the default value if `tickvals` is provided)."].join(" ")},p=o({},h,{values:h.values.slice().concat(["sync"]),description:[h.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function v(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")}}var m={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the placement of the first tick on this axis.","Use with `dtick`.","If the axis `type` is *log*, then you must take the log of your starting tick","(e.g. to set the starting tick to 100, set the `tick0` to 2)","except when `dtick`=*L* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},y={valType:"data_array",editType:"ticks",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},x={valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")};function b(e){var t={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return e||(t.dflt=5),t}function _(e){var t={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return e||(t.dflt=1),t}var w={valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the tick color."},k={valType:"color",dflt:i.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function T(e){var t={valType:"number",min:0,editType:"ticks",description:"Sets the width (in px) of the grid lines."};return e||(t.dflt=1),t}var A=o({},a,{editType:"ticks"}),M={valType:"boolean",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")};e.exports={visible:{valType:"boolean",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided and it has a value for both the","lower and upper bound, `autorange` is set to *false*.","Using *min* applies autorange only to set the minimum.","Using *max* applies autorange only to set the maximum.","Using *min reversed* applies autorange only to set the minimum on a reversed axis.","Using *max reversed* applies autorange only to set the maximum on a reversed axis.","Using *reversed* applies autorange on both ends and reverses the axis direction."].join(" ")},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange minimum."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange maximum."].join(" ")},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange minimum if it goes beyond this value.","Has no effect when `autorangeoptions.minallowed` is provided."].join(" ")},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange maximum if it goes beyond this value.","Has no effect when `autorangeoptions.maxallowed` is provided."].join(" ")},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Ensure this value is included in autorange."].join(" ")},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears.","Leaving either or both elements `null` impacts the default `autorange`."].join(" ")},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the minimum range of this axis."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the maximum range of this axis."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Could be used to set the desired inside range of this axis","(excluding the labels) when `ticklabelposition` of","the anchored axis has *inside*.","Not implemented for axes with `type` *log*.","This would be ignored when `range` is provided."].join(" ")},scaleanchor:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString(),!1],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Setting `false` allows to remove a default constraint (occasionally,","you may need to prevent a default `scaleanchor` constraint from",'being applied, eg. when having an image trace `yaxis: {scaleanchor: "x"}`',"is set automatically in order for pixels to be rendered as squares,","setting `yaxis: {scaleanchor: false}` allows to remove the constraint)."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"calc",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","will match the range of the corresponding axis in data-coordinates space.","Moreover, matching axes share auto-range values, category lists and","histogram auto-bins.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Moreover, note that matching axes must have the same `type`."].join(" ")},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this axis rangebreak is enabled or disabled.","Please note that `rangebreaks` only work for *date* axis type."].join(" ")},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the lower and upper bounds of this axis rangebreak.","Can be used with `pattern`."].join(" ")},pattern:{valType:"enumerated",values:[d,f,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+d+"* - days of the week in English e.g. 'Sunday' or `sun`","(matching is case-insensitive and considers only the first three characters),","as well as Sunday-based integers between 0 and 6.","If *"+f+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+d+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+f+"', bounds: [17, 8] }"," breaks from 5pm to 8am (i.e. skips non-work hours)."].join(" ")},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"},description:["Sets the coordinate values corresponding to the rangebreaks.","An alternative to `bounds`.","Use `dvalue` to set the size of the values along the axis."].join(" ")},dvalue:{valType:"number",editType:"calc",min:0,dflt:u,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:p,nticks:v(),tick0:m,dtick:g,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks",description:["Sets the spacing between tick labels as compared to the spacing between ticks.","A value of 1 (default) means each tick gets a label.","A value of 2 means shows every 2nd label.","A larger value n means only every nth tick is labeled.","`tick0` determines which labels are shown.","Not implemented for axes with `type` *log* or *multicategory*, or when `tickmode` is *array*."].join(" ")},tickvals:y,ticktext:{valType:"data_array",editType:"ticks",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:x,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:b(),tickwidth:_(),tickcolor:w,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},labelalias:{valType:"any",dflt:!1,editType:"ticks",description:["Replacement text for specific tick or hover labels.","For example using {US: 'USA', CA: 'Canada'} changes US to USA","and CA to Canada. The labels we would have shown must match","the keys exactly, after adding any tickprefix or ticksuffix.","For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash.","That means you need to use \u22121 instead of -1.","labelalias can be used with any axis type, and both keys (if needed)","and values (if desired) can include html-like tags or MathJax."].join(" ")},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:o({},a,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:n({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks",description:["When `tickangle` is set to *auto*, it will be set to the first","angle in this array that is large enough to prevent label","overlap."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not this stop is used.","If `false`, this stop is ignored even within its `dtickrange`."].join(" ")},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",editType:"ticks",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:M,gridcolor:k,gridwidth:T(),griddash:A,zeroline:{valType:"boolean",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets the color of the dividers","Only has an effect on *multicategory* axes."].join(" ")},dividerwidth:{valType:"number",dflt:1,editType:"ticks",description:["Sets the width (in px) of the dividers","Only has an effect on *multicategory* axes."].join(" ")},anchor:{valType:"enumerated",values:["free",c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"plot",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},minor:{tickmode:h,nticks:v("minor"),tick0:m,dtick:g,tickvals:y,ticks:x,ticklen:b("minor"),tickwidth:_("minor"),tickcolor:w,gridcolor:k,gridwidth:T("minor"),griddash:A,showgrid:M,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},autoshift:{valType:"boolean",dflt:!1,editType:"plot",description:["Automatically reposition the axis to avoid","overlap with other axes with the same `overlaying` value.","This repositioning will account for any `shift` amount applied to other","axes on the same side with `autoshift` is set to true.","Only has an effect if `anchor` is set to *free*."].join(" ")},shift:{valType:"number",editType:"plot",description:["Moves the axis a given number of pixels from where it would have been otherwise.","Accepts both positive and negative values, which will shift the axis either right","or left, respectively.","If `autoshift` is set to true, then this defaults to a padding of -3 if `side` is set to *left*.","and defaults to +3 if `side` is set to *right*. Defaults to 0 if `autoshift` is set to false.","Only has an effect if `anchor` is set to *free*."].join(" ")},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:n({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},85647:(e,t,r)=>{"use strict";var n=r(84468),i=r(7605),a=r(82561).isUnifiedHover,o=r(71886),s=r(37091),l=r(98005),u=r(49080),c=r(18453),f=r(42730),d=r(80038),h=r(44528),p=r(11576),v=p.id2name,m=p.name2id,g=r(93143).AX_ID_PATTERN,y=r(38361),x=y.traceIs,b=y.getComponentMethod;function _(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}e.exports=function(e,t,r){var y,w,k=t.autotypenumbers,T={},A={},M={},S={},E={},C={},L={},P={},O={},I={};for(y=0;y{"use strict";var n=r(23498).mix,i=r(17992),a=r(84468);e.exports=function(e,t,r,o){var s=(o=o||{}).dfltColor;function l(r,n){return a.coerce2(e,t,o.attributes,r,n)}var u=l("linecolor",s),c=l("linewidth");r("showline",o.showLine||!!u||!!c)||(delete t.linecolor,delete t.linewidth);var f=l("gridcolor",n(s,o.bgColor,o.blend||i.lightFraction).toRgbString()),d=l("gridwidth"),h=l("griddash");if(r("showgrid",o.showGrid||!!f||!!d||!!h)||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var p=l("minor.gridcolor",n(t.gridcolor,o.bgColor,67).toRgbString()),v=l("minor.gridwidth",t.gridwidth||1),m=l("minor.griddash",t.griddash||"solid");r("minor.showgrid",!!p||!!v||!!m)||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){var g=l("zerolinecolor",s),y=l("zerolinewidth");r("zeroline",o.showGrid||!!g||!!y)||(delete t.zerolinecolor,delete t.zerolinewidth)}}},44528:(e,t,r)=>{"use strict";var n=r(22036),i=r(84468);e.exports=function(e,t,r,a){var o,s,l,u,c,f,d=a.counterAxes||[],h=a.overlayableAxes||[],p=a.letter,v=a.grid,m=a.overlayingDomain;v&&(s=v._domains[p][v._axisMap[t._id]],o=v._anchors[t._id],s&&(l=v[p+"side"].split(" ")[0],u=v.domain[p]["right"===l||"top"===l?1:0])),s=s||[0,1],o=o||(n(e.position)?"free":d[0]||"free"),l=l||("x"===p?"bottom":"left"),u=u||0,c=0,f=!1;var g=i.coerce(e,t,{anchor:{valType:"enumerated",values:["free"].concat(d),dflt:o}},"anchor"),y=i.coerce(e,t,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:l}},"side");if("free"===g){if("y"===p)r("autoshift")&&(u="left"===y?m[0]:m[1],f=!t.automargin||t.automargin,c="left"===y?-3:3),r("shift",c);r("position",u)}r("automargin",f);var x=!1;if(h.length&&(x=i.coerce(e,t,{overlaying:{valType:"enumerated",values:[!1].concat(h),dflt:!1}},"overlaying")),!x){var b=r("domain",s);b[0]>b[1]-1/4096&&(t.domain=s),i.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return r("layer"),t}},89655:(e,t,r)=>{"use strict";var n=r(46518);e.exports=function(e,t,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(e);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",o)&&r("showticksuffix",s)}},60696:(e,t,r)=>{"use strict";var n=r(87832);e.exports=function(e,t,r,i){var a=t._template||{},o=t.type||a.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||(i.noInsiderange||"log"===o||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(t.insiderange=!1,s=void 0),s&&(l=r("range",s))));var u,c=t.getAutorangeDflt(l,i),f=r("autorange",c);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==f&&!0!==f)&&(null===l[0]||"min"!==f&&"max reversed"!==f)&&(null===l[1]||"max"!==f&&"min reversed"!==f)||(l=void 0,delete t.range,t.autorange=!0,u=!0),u||(f=r("autorange",c=t.getAutorangeDflt(l,i))),f&&(n(r,f,l),"linear"!==o&&"-"!==o||r("rangemode")),t.cleanRange()}},57008:(e,t,r)=>{"use strict";var n=r(83943).FROM_BL;e.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],a=i[0]+(i[1]-i[0])*r;e.range=e._input.range=[e.l2r(a+(i[0]-a)*t),e.l2r(a+(i[1]-a)*t)],e.setScale()}},45958:(e,t,r)=>{"use strict";var n=r(41871),i=r(66354).aL,a=r(84468),o=a.numberFormat,s=r(22036),l=a.cleanNumber,u=a.ms2DateTime,c=a.dateTime2ms,f=a.ensureNumber,d=a.isArrayOrTypedArray,h=r(65004),p=h.FP_SAFE,v=h.BADNUM,m=h.LOG_CLIP,g=h.ONEWEEK,y=h.ONEDAY,x=h.ONEHOUR,b=h.ONEMIN,_=h.ONESEC,w=r(11576),k=r(93143),T=k.HOUR_PATTERN,A=k.WEEKDAY_PATTERN;function M(e){return Math.pow(10,e)}function S(e){return null!==e&&void 0!==e}e.exports=function(e,t){t=t||{};var r=e._id||"x",h=r.charAt(0);function E(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],i=e.range[1];return.5*(n+i-2*m*Math.abs(n-i))}return v}function C(t,r,n,i){if((i||{}).msUTC&&s(t))return+t;var o=c(t,n||e.calendar);if(o===v){if(!s(t))return v;t=+t;var l=Math.floor(10*a.mod(t+.05,1)),u=Math.round(t-l/10);o=c(new Date(u))+l/10}return o}function L(t,r,n){return u(t,r,n||e.calendar)}function P(t){return e._categories[Math.round(t)]}function O(t){if(S(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 v}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function R(e){var t=I(e);return void 0!==t?t:s(e)?+e:void 0}function D(e){return s(e)?+e:I(e)}function z(e,t,r){return n.round(r+t*e,2)}function F(e,t,r){return(e-r)/t}var N=function(t){return s(t)?z(t,e._m,e._b):v},B=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var j="y"===h;N=function(t){if(!s(t))return v;var r=e._rangebreaks.length;if(!r)return z(t,e._m,e._b);var n=j;e.range[0]>e.range[1]&&(n=!n);for(var i=n?-1:1,a=i*t,o=0,l=0;lc)){o=a<(u+c)/2?l:l+1;break}o=l+1}var f=e._B[o]||0;return isFinite(f)?z(t,e._m2,f):0},B=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,i=0;ie._rangebreaks[i].pmax&&(n=i+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?E:f,e.l2c="log"===e.type?M:f,e.l2p=N,e.p2l=B,e.c2p="log"===e.type?function(e,t){return N(E(e,t))}:N,e.p2c="log"===e.type?function(e){return M(B(e))}:B,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=l,e.c2d=e.c2r=e.l2d=e.l2r=f,e.d2p=e.r2p=function(t){return e.l2p(l(t))},e.p2d=e.p2r=B,e.cleanPos=f):"log"===e.type?(e.d2r=e.d2l=function(e,t){return E(l(e),t)},e.r2d=e.r2c=function(e){return M(l(e))},e.d2c=e.r2l=l,e.c2d=e.l2r=f,e.c2r=E,e.l2d=M,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return M(B(e))},e.r2p=function(t){return e.l2p(l(t))},e.p2r=B,e.cleanPos=f):"date"===e.type?(e.d2r=e.r2d=a.identity,e.d2c=e.r2c=e.d2l=e.r2l=C,e.c2d=e.c2r=e.l2d=e.l2r=L,e.d2p=e.r2p=function(t,r,n){return e.l2p(C(t,0,n))},e.p2d=e.p2r=function(e,t,r){return L(B(e),t,r)},e.cleanPos=function(t){return a.cleanDate(t,v,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=O,e.r2d=e.c2d=e.l2d=P,e.d2r=e.d2l_noadd=R,e.r2c=function(t){var r=D(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=f,e.r2l=D,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return P(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return"string"===typeof e&&""!==e?e:f(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=P,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=f,e.r2l=R,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return P(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return Array.isArray(e)||"string"===typeof e&&""!==e?e:f(e)},e.setupMultiCategory=function(n){var i,o,s=e._traceIndices,l=e._matchGroup;if(l&&0===e._categories.length)for(var u in l)if(u!==r){var c=t[w.id2name(u)];s=s.concat(c._traceIndices)}var f=[[0,{}],[0,{}]],p=[];for(i=0;il[1]&&(i[s?0:1]=n),i[0]===i[1]){var u=e.l2r(r),c=e.l2r(n);if(void 0!==r){var f=u+1;void 0!==n&&(f=Math.min(f,c)),i[s?1:0]=f}if(void 0!==n){var d=c+1;void 0!==r&&(d=Math.max(d,u)),i[s?0:1]=d}}}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,i,o=a.nestedProperty(e,t).get();if(i=(i="date"===e.type?a.dfltRange(e.calendar):"y"===h?k.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||k.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(i[0]=0),o&&2===o.length){var l=null===o[0],u=null===o[1];for("date"!==e.type||e.autorange||(o[0]=a.cleanDate(o[0],v,e.calendar),o[1]=a.cleanDate(o[1],v,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!a.isDateTime(o[n],e.calendar)){e[t]=i;break}if(e.r2l(o[0])===e.r2l(o[1])){var c=a.constrain(e.r2l(o[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);o[0]=e.l2r(c-1e3),o[1]=e.l2r(c+1e3);break}}else{if(!s(o[n])){if(l||u||!s(o[1-n])){e[t]=i;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-p?o[n]=-p:o[n]>p&&(o[n]=p),o[0]===o[1]){var f=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=f,o[1]+=f}}}else a.nestedProperty(e,t).set(i)},e.setScale=function(r){var n=t._size;if(e.overlaying){var i=w.getFromId({_fullLayout:t},e.overlaying);e.domain=i.domain}var a=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(a);var s,l,u=e.r2l(e[a][0],o),c=e.r2l(e[a][1],o),f="y"===h;if((f?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks)&&(e._rangebreaks=e.locateBreaks(Math.min(u,c),Math.max(u,c)),e._rangebreaks.length)){for(s=0;sc&&(d=!d),d&&e._rangebreaks.reverse();var p=d?-1:1;for(e._m2=p*e._length/(Math.abs(c-u)-e._lBreaks),e._B.push(-e._m2*(f?c:u)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&t=s.min&&(es.max&&(s.max=n),i=!1)}i&&u.push({min:e,max:n})}};for(n=0;n{"use strict";e.exports=function(e){var t=["showexponent","showtickprefix","showticksuffix"].filter((function(t){return void 0!==e[t]}));if(t.every((function(r){return e[r]===e[t[0]]}))||1===t.length)return e[t[0]]}},83193:(e,t,r)=>{"use strict";var n=r(84468),i=r(7605).contrast,a=r(49080),o=r(46518),s=r(38851);function l(e,t){function r(r,i){return n.coerce(e,t,a.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}e.exports=function(e,t,r,u,c){c||(c={});var f=r("labelalias");n.isPlainObject(f)||delete t.labelalias;var d=o(e);if(r("showticklabels")){var h=c.font||{},p=t.color,v=-1!==(t.ticklabelposition||"").indexOf("inside")?i(c.bgColor):p&&p!==a.color.dflt?p:h.color;if(n.coerceFont(r,"tickfont",h,{overrideDflt:{color:v}}),c.noTicklabelstep||"multicategory"===u||"log"===u||r("ticklabelstep"),!c.noAng){var m=r("tickangle");c.noAutotickangles||"auto"!==m||r("autotickangles")}if("category"!==u){var g=r("tickformat");s(e,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),t.tickformatstops.length||delete t.tickformatstops,c.noExp||g||"date"===u||(r("showexponent",d),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},3118:(e,t,r)=>{"use strict";var n=r(84468),i=r(49080);e.exports=function(e,t,r,a){var o=a.isMinor,s=o?e.minor||{}:e,l=o?t.minor:t,u=o?i.minor:i,c=o?"minor.":"",f=n.coerce2(s,l,u,"ticklen",o?.6*(t.ticklen||5):void 0),d=n.coerce2(s,l,u,"tickwidth",o?t.tickwidth||1:void 0),h=n.coerce2(s,l,u,"tickcolor",(o?t.tickcolor:void 0)||l.color);r(c+"ticks",!o&&a.outerTicks||f||d||h?"outside":"")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},43452:(e,t,r)=>{"use strict";var n=r(13530),i=r(84468).isArrayOrTypedArray,a=r(19045).isTypedArraySpec,o=r(19045).decodeTypedArraySpec;e.exports=function(e,t,r,s,l){l||(l={});var u=l.isMinor,c=u?e.minor||{}:e,f=u?t.minor:t,d=u?"minor.":"";function h(e){var t=c[e];return a(t)&&(t=o(t)),void 0!==t?t:(f._template||{})[e]}var p=h("tick0"),v=h("dtick"),m=h("tickvals"),g=r(d+"tickmode",i(m)?"array":v?"linear":"auto");if("auto"===g||"sync"===g)r(d+"nticks");else if("linear"===g){var y=f.dtick=n.dtick(v,s);f.tick0=n.tick0(p,s,t.calendar,y)}else if("multicategory"!==s){void 0===r(d+"tickvals")?f.tickmode="auto":u||r("ticktext")}}},85695:(e,t,r)=>{"use strict";var n=r(41871),i=r(38361),a=r(84468),o=r(3172),s=r(85729);e.exports=function(e,t,r,l){var u=e._fullLayout;if(0!==t.length){var c,f,d,h;l&&(c=l());var p=n.ease(r.easing);return e._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(h),h=null,function(){for(var r={},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,i=n.xaxis,l=n.yaxis,u=i._length,c=l._length,f=!!t.xr1,d=!!t.yr1,h=[];if(f){var p=a.simpleMap(t.xr0,i.r2l),v=a.simpleMap(t.xr1,i.r2l),m=p[1]-p[0],g=v[1]-v[0];h[0]=(p[0]*(1-r)+r*v[0]-p[0])/(p[1]-p[0])*u,h[2]=u*(1-r+r*g/m),i.range[0]=i.l2r(p[0]*(1-r)+r*v[0]),i.range[1]=i.l2r(p[1]*(1-r)+r*v[1])}else h[0]=0,h[2]=u;if(d){var y=a.simpleMap(t.yr0,l.r2l),x=a.simpleMap(t.yr1,l.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])*c,h[3]=c*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else h[1]=0,h[3]=c;s.drawOne(e,i,{skipTitle:!0}),s.drawOne(e,l,{skipTitle:!0}),s.redrawComponents(e,[i._id,l._id]);var w=f?u/h[2]:1,k=d?c/h[3]:1,T=f?h[0]:0,A=d?h[1]:0,M=f?h[0]/h[2]*u:0,S=d?h[1]/h[3]*c:0,E=i._offset-M,C=l._offset-S;n.clipRect.call(o.setTranslate,T,A).call(o.setScale,1/w,1/k),n.plot.call(o.setTranslate,E,C).call(o.setScale,w,k),o.setPointGroupScale(n.zoomScalePts,1/w,1/k),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}s.redrawComponents(e)}},18453:(e,t,r)=>{"use strict";var n=r(38361).traceIs,i=r(84339);function a(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var r=a(e),i=n(e,"box-violin"),o=n(e._fullInput||{},"candlestick");return i&&!o&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}e.exports=function(e,t,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(!function(e,t){if("-"!==e.type)return;var r,s=e._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var u=function(e,t,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(o(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(t,s,l);if(!u)return;if("histogram"===u.type&&l==={v:"y",h:"x"}[u.orientation||"v"])return void(e.type="linear");var c=l+"calendar",f=u[c],d={noMultiCategory:!n(u,"cartesian")||n(u,"noMultiCategory")};"box"===u.type&&u._hasPreCompStats&&l==={h:"x",v:"y"}[u.orientation||"v"]&&(d.noMultiCategory=!0);if(d.autotypenumbers=e.autotypenumbers,o(u,l)){var h=a(u),p=[];for(r=0;r{"use strict";var n=r(38361),i=r(84468);function a(e,t,r){var n,a,o,s=!1;if("data"===t.type)n=e._fullData[null!==t.traces?t.traces[0]:0];else{if("layout"!==t.type)return!1;n=e._fullLayout}return a=i.nestedProperty(n,t.prop).get(),(o=r[t.type]=r[t.type]||{}).hasOwnProperty(t.prop)&&o[t.prop]!==a&&(s=!0),o[t.prop]=a,{changed:s,value:a}}function o(e,t){var r=[],n=t[0],a={};if("string"===typeof n)a[n]=t[1];else{if(!i.isPlainObject(n))return r;a=n}return l(a,(function(e,t,n){r.push({type:"layout",prop:e,value:n})}),"",0),r}function s(e,t){var r,n,a,o,s=[];if(n=t[0],a=t[1],r=t[2],o={},"string"===typeof n)o[n]=a;else{if(!i.isPlainObject(n))return s;o=n,void 0===r&&(r=a)}return void 0===r&&(r=null),l(o,(function(t,n,i){var a,o;if(Array.isArray(i)){o=i.slice();var l=Math.min(o.length,e.data.length);r&&(l=Math.min(l,r.length)),a=[];for(var u=0;u0?".":"")+a;i.isPlainObject(o)?l(o,t,s,n+1):t(s,a,o)}}))}t.manageCommandObserver=function(e,r,n,o){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var u=t.hasSimpleAPICommandBindings(e,n,s.lookupTable);if(r&&r._commandObserver){if(u)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(u){a(e,u,s.cache),s.check=function(){if(l){var t=a(e,u,s.cache);return t.changed&&o&&void 0!==s.lookupTable[t.value]&&(s.disable(),Promise.resolve(o({value:t.value,type:u.type,prop:u.prop,traces:u.traces,index:s.lookupTable[t.value]})).then(s.enable,s.enable)),t.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f{"use strict";e.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;void 0===n&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal",description:["Sets the weight (or boldness) of the font."].join(" ")};e.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal",description:["Sets whether a font should be styled with a normal or italic face from its family."].join(" ")},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal",description:["Sets the variant of the font."].join(" ")},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal",description:["Sets capitalization of text.","It can be used to make text appear in all-uppercase or all-lowercase,","or with each word capitalized."].join(" ")},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none",description:["Sets the kind of decoration line(s) with text,","such as an *under*, *over* or *through*","as well as combinations e.g. *under+over*, etc."].join(" ")},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none",description:["Sets the shape and color of the shadow behind text.","*auto* places minimal shadow and applies contrast text font color.","See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options."].join(" ")},editType:r,description:""+(e.description||"")};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}},44380:e=>{"use strict";e.exports={_isLinkedToArray:"frames_entry",group:{valType:"string",description:["An identifier that specifies the group to which the frame belongs,","used by animate to select a subset of frames."].join(" ")},name:{valType:"string",description:"A label by which to identify the frame"},traces:{valType:"any",description:["A list of trace indices that identify the respective traces in the","data attribute"].join(" ")},baseframe:{valType:"string",description:["The name of the frame into which this frame's properties are merged","before applying. This is used to unify properties and avoid needing","to specify the same values for the same properties in multiple frames."].join(" ")},data:{valType:"any",description:["A list of traces this frame modifies. The format is identical to the","normal trace definition."].join(" ")},layout:{valType:"any",description:["Layout properties which this frame modifies. The format is identical","to the normal layout definition."].join(" ")}}},50246:(e,t,r)=>{"use strict";var n=r(38361),i=r(93143).SUBPLOT_PATTERN;t.eV=function(e,t,r){var i,a=[],o=[];if(!(i="string"===typeof t?n.getModule(t).plot:"function"===typeof t?t:t.plot))return[a,e];for(var s=r,l=0;l{"use strict";var n=r(91740),i=r(34765),a=r(17992),o=r(3374),s=r(26724),l=r(18420),u=r(64022).extendFlat,c=n({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=a.defaultLine,e.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:u(l({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether the title can automatically push the figure margins.","If `yref='paper'` then the margin will expand to ensure that the title doesn\u2019t","overlap with the edges of the container. If `yref='container'` then the margins","will ensure that the title doesn\u2019t overlap with the plot area, tick labels,","and axis titles. If `automargin=true` and the margins need to be expanded,","then y will be set to a default 1 and yanchor will be set to an appropriate","default to ensure that minimal margin space is needed. Note that when `yref='paper'`,","only 1 or 0 are allowed y values. Invalid values will be reset to the default 1."].join(" ")},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:a.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:a.background,editType:"layoutstyle",description:["Sets the background color of the plotting area in-between x and y axes."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","This is the default value; however it could be overridden for individual axes."].join(" ")},separators:{valType:"string",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise)."].join(" ")},showlegend:{valType:"boolean",editType:"legend",description:["Determines whether or not a legend is drawn.","Default is `true` if there is a trace to show and any of these:","a) Two or more traces would by default be shown in the legend.","b) One pie trace is shown in the legend.","c) One trace is explicitly given with `showlegend: true`."].join(" ")},colorway:{valType:"colorlist",dflt:a.defaults,editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Used to allow user interactions with the plot to persist after","`Plotly.react` calls that are unaware of these interactions.","If `uirevision` is omitted, or if it is given and it changed from","the previous `Plotly.react` call, the exact new figure is used.","If `uirevision` is truthy and did NOT change, any attribute","that has been affected by user interactions and did not receive a","different value in the new figure will keep the interaction value.","`layout.uirevision` attribute serves as the default for","`uirevision` attributes in various sub-containers. For finer","control you can set these sub-attributes directly. For example,","if your app separately controls the data on the x and y axes you","might set `xaxis.uirevision=*time*` and `yaxis.uirevision=*cost*`.","Then if only the y data is changed, you can update","`yaxis.uirevision=*quantity*` and the y axis range will reset but","the x axis range will retain any user-driven zoom."].join(" ")},editrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in `editable: true`","configuration, other than trace names and axis titles.","Defaults to `layout.uirevision`."].join(" ")},selectionrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in selected points","from all traces."].join(" ")},template:{valType:"any",editType:"calc",description:["Default attributes to be applied to the plot. Templates can be","created from existing plots using `Plotly.makeTemplate`, or","created manually. They should be objects with format:","`{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`","`layoutTemplate` and `traceTemplate` are objects matching the","attribute structure of `layout` and a data trace. ","Trace templates are applied cyclically to traces of each type.","Container arrays (eg `annotations`) have special handling:","An object ending in `defaults` (eg `annotationdefaults`) is applied","to each array item. But if an item has a `templateitemname` key","we look in the template array for an item with matching `name` and","apply that instead. If no matching `name` is found we mark the item","invisible. Any named template item not referenced is appended to","the end of the array, so you can use this for a watermark annotation","or a logo image, for example. To omit one of these items on the plot,","make an item with matching `templateitemname` and `visible: false`."].join(" ")},newshape:o.newshape,activeshape:o.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:u({},i.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:n({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},18420:e=>{"use strict";e.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) on the left side of the component."},editType:t}}},68543:(e,t,r)=>{"use strict";var n=r(41871),i=r(66354).de,a=r(80902).OE,o=r(22036),s=r(12160),l=r(38361),u=r(30166),c=r(37091),f=r(84468),d=r(7605),h=r(65004).BADNUM,p=r(11576),v=r(35473).clearOutline,m=r(92716),g=r(34765),y=r(44380),x=r(50246).eV,b=f.relinkPrivateKeys,_=f._,w=e.exports={};f.extendFlat(w,l),w.attributes=r(75622),w.attributes.type.values=w.allTypes,w.fontAttrs=r(91740),w.layoutAttributes=r(98005);var k=w.transformsRegistry,T=r(46854);w.executeAPICommand=T.executeAPICommand,w.computeAPICommandBindings=T.computeAPICommandBindings,w.manageCommandObserver=T.manageCommandObserver,w.hasSimpleAPICommandBindings=T.hasSimpleAPICommandBindings,w.redrawText=function(e){return e=f.getGraphDiv(e),new Promise((function(t){setTimeout((function(){e._fullLayout&&(l.getComponentMethod("annotations","draw")(e),l.getComponentMethod("legend","draw")(e),l.getComponentMethod("colorbar","draw")(e),t(w.previousPromises(e)))}),300)}))},w.resize=function(e){var t;e=f.getGraphDiv(e);var r=new Promise((function(r,n){e&&!f.isHidden(e)||n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=r,e._redrawTimer=setTimeout((function(){if(!e.layout||e.layout.width&&e.layout.height||f.isHidden(e))r(e);else{delete e.layout.width,delete e.layout.height;var t=e.changed;e.autoplay=!0,l.call("relayout",e,{autosize:!0}).then((function(){e.changed=t,e._resolveResize===r&&(delete e._resolveResize,r(e))}))}}),100)}));return t&&t(r),r},w.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then((function(){e._promises=[]}))},w.addLinks=function(e){if(e._context.showLink||e._context.showSources){var t=e._fullLayout,r=f.ensureSingle(t._paper,"text","js-plot-link-container",(function(e){e.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:d.defaultLine,"pointer-events":"all"}).each((function(){var e=n.select(this);e.append("tspan").classed("js-link-to-tool",!0),e.append("tspan").classed("js-link-spacer",!0),e.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),a={y:t._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=t.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=t._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)r.on("click",(function(){w.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(e,o),s.text(o.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(e,!1,"keepdata"),i.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var A=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],M=["year","month","dayMonth","dayMonthYear"];function S(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,i={};function a(e){for(var r=!0,a=0;a1&&R.length>1){for(l.getComponentMethod("grid","sizeDefaults")(u,s),o=0;o15&&R.length>15&&0===s.shapes.length&&0===s.images.length,w.linkSubplots(d,s,c,n),w.cleanPlot(d,s,c,n);var B=!(!n._has||!n._has("gl2d")),j=!(!s._has||!s._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||B,q=!(!s._has||!s._has("cartesian"))||j;U&&!q?n._bgLayer.remove():q&&!U&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&v({_fullLayout:n}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i0){var c=1-2*s;n=Math.round(c*n),i=Math.round(c*i)}}var d=w.layoutAttributes.width.min,h=w.layoutAttributes.height.min;n1,v=!t.height&&Math.abs(r.height-i)>1;(v||p)&&(p&&(r.width=n),v&&(r.height=i)),e._initialAutoSize||(e._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,n){var i,a,o,s=l.componentsRegistry,u=t._basePlotModules,c=l.subplotsRegistry.cartesian;for(i in s)(o=s[i]).includeBasePlot&&o.includeBasePlot(e,t);for(var d in u.length||u.push(c),t._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(e,t),c.finalizeSubplots(e,t)),t._subplots)t._subplots[d].sort(f.subplotSort);for(a=0;a1&&(r.l/=g,r.r/=g)}if(h){var y=(r.t+r.b)/h;y>1&&(r.t/=y,r.b/=y)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,k=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+m},r:{val:b,size:r.r+m},b:{val:k,size:r.b+m},t:{val:_,size:r.t+m}},v[t]=1}else delete p[t],delete v[t];if(!n._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),O(t);var i=t._size,a=t.margin,s={t:0,b:0,l:0,r:0},u=f.extendFlat({},i),c=a.l,d=a.r,h=a.t,v=a.b,m=t._pushmargin,g=t._pushmarginIds,y=t.minreducedwidth,x=t.minreducedheight;if(!1!==a.autoexpand){for(var b in m)g[b]||delete m[b];var _=e._fullLayout._reservedMargin;for(var k in _)for(var T in _[k]){var A=_[k][T];s[T]=Math.max(s[T],A)}for(var M in m.base={l:{val:0,size:c},r:{val:1,size:d},t:{val:1,size:h},b:{val:0,size:v}},s){var S=0;for(var E in m)"base"!==E&&o(m[E][M].size)&&(S=m[E][M].size>S?m[E][M].size:S);var C=Math.max(0,a[M]-S);s[M]=Math.max(0,s[M]-C)}for(var L in m){var P=m[L].l||{},I=m[L].b||{},R=P.val,D=P.size,z=I.val,F=I.size,N=r-s.r-s.l,B=n-s.t-s.b;for(var j in m){if(o(D)&&m[j].r){var U=m[j].r.val,q=m[j].r.size;if(U>R){var V=(D*U+(q-N)*R)/(U-R),H=(q*(1-R)+(D-N)*(1-U))/(U-R);V+H>c+d&&(c=V,d=H)}}if(o(F)&&m[j].t){var G=m[j].t.val,W=m[j].t.size;if(G>z){var Y=(F*G+(W-B)*z)/(G-z),Z=(W*(1-z)+(F-B)*(1-G))/(G-z);Y+Z>v+h&&(v=Y,h=Z)}}}}}var X=f.constrain(r-a.l-a.r,2,y),K=f.constrain(n-a.t-a.b,2,x),J=Math.max(0,r-X),$=Math.max(0,n-K);if(J){var Q=(c+d)/J;Q>1&&(c/=Q,d/=Q)}if($){var ee=(v+h)/$;ee>1&&(v/=ee,h/=ee)}if(i.l=Math.round(c)+s.l,i.r=Math.round(d)+s.r,i.t=Math.round(h)+s.t,i.b=Math.round(v)+s.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(w.didMarginChange(u,i)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=p.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(g).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return l.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function s(){return a++,function(){o++,n||o!==a||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)}(i)}}r.runFn(s),setTimeout(s())}))}],a=f.syncOrAsync(i,e);return a&&a.then||(a=Promise.resolve()),a.then((function(){return e}))}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var o=i?e._fullData:e.data,l=i?e._fullLayout:e.layout,u=(e._transitionData||{})._frames;function c(e,t){if("function"===typeof e)return t?"_function_":null;if(f.isPlainObject(e)){var n,i={};return Object.keys(e).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0)))if("function"!==typeof e[a]){if("keepdata"===r){if("src"===a.substr(a.length-3))return}else if("keepstream"===r){if("string"===typeof(n=e[a+"src"])&&n.indexOf(":")>0&&!f.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"===typeof(n=e[a+"src"])&&n.indexOf(":")>0)return;i[a]=c(e[a],t)}else t&&(i[a]="_function")})),i}var a=Array.isArray(e),o=f.isTypedArray(e);if((a||o)&&e.dtype&&e.shape){var l=e.bdata;return c({dtype:e.dtype,shape:e.shape,bdata:f.isArrayBuffer(l)?s.encode(l):l},t)}return a?e.map((function(e){return c(e,t)})):o?f.simpleMap(e,f.identity):f.isJSDate(e)?f.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),i)){var h=l._size;d.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return u&&(d.frames=c(u)),a&&(d.config=c(e._context,!0)),"object"===n?d:JSON.stringify(d)},w.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r=0;a--)if(l[a].enabled){r._indexToPoints=l[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(e,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[t]=o}}for(z(o,s,c),i=0;i{"use strict";var n=r(3127),i=n.FORMAT_LINK,a=n.DATE_FORMAT_LINK;function o(e){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e&&e.supportOther?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),'Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".',a,"for details on the date formatting syntax."].join(" ")}function s(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var n=[],i=0;i` is displayed in the secondary box, for example "{fullData.name}".',"To hide the secondary box completely, use an empty tag ``."].join(" ")};return!1!==e.arrayOk&&(n.arrayOk=!0),n},t.ay=function(e,t){e=e||{};var r=s(t=t||{}),n={valType:"string",dflt:"",editType:e.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",o(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return!1!==e.arrayOk&&(n.arrayOk=!0),n},t.LF=function(e,t){t=t||{};var r=(e=e||{}).newshape?"new ":"",n=s(t);return{valType:"string",dflt:"",editType:e.editType||"arraydraw",description:["Template string used for rendering the "+r+"shape's label.","Note that this will override `text`.",["Variables are inserted using %{variable},",'for example "x0: %{x0}".','Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{x0:$.2f}". See',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{x0|%m %b %Y}". See',a,"for details on the date formatting syntax.","A single multiplication or division operation may be applied to numeric variables, and combined with",'d3 number formatting, for example "Length in cm: %{x0*2.54}", "%{slope*60:.1f} meters per second."',"For log axes, variable values are given in log units.","For date axes, x/y coordinate variables and center variables use datetimes, while all other variable values use values in ms."].join(" "),n].join(" ")}}},38361:(e,t,r)=>{"use strict";var n=r(98073),i=r(17266),a=r(52942),o=r(30167),s=r(51124).addStyleRule,l=r(64022),u=r(75622),c=r(98005),f=l.extendFlat,d=l.extendDeepAll;function h(e){var r=e.name,i=e.categories,a=e.meta;if(t.modules[r])n.log("Type "+r+" already registered");else{t.subplotsRegistry[e.basePlotModule.name]||function(e){var r=e.name;if(t.subplotsRegistry[r])return void n.log("Plot type "+r+" already registered.");for(var i in g(e),t.subplotsRegistry[r]=e,t.componentsRegistry)b(i,e.name)}(e.basePlotModule);for(var o={},l=0;l{"use strict";var n=r(84468);e.exports=function(e,t){for(var r=0;r{"use strict";var n=r(22049),i=r(39363).axisHoverFormat,a=r(84425).rb,o=r(84425).ay,s=r(6636),l=r(91740),u=r(41508),c=r(2703).k,f=r(64022).extendFlat,d=l({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),h=f({},n.marker.line.width,{dflt:0}),p=f({width:h,editType:"calc"},s("marker.line")),v=f({line:p,editType:"calc"},s("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:c,cornerradius:{valType:"any",editType:"calc",description:["Sets the rounding of corners. May be an integer number of pixels,","or a percentage of bar width (as a string ending in %). Defaults to `layout.barcornerradius`.","In stack or relative barmode, the first trace to set cornerradius is used for the whole stack."].join(" ")}});e.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),text:n.text,texttemplate:o({editType:"plot"},{keys:u.eventDataKeys}),hovertext:n.hovertext,hovertemplate:a({},{keys:u.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc",description:["Specifies the location of the `text`.","*inside* positions `text` inside, next to the bar end","(rotated and scaled if needed).","*outside* positions `text` outside, next to the bar end","(scaled if needed), unless there is another bar stacked on","this one, then the text gets pushed inside.","*auto* tries to position `text` inside the bar, but if","the bar is too small and no bar is stacked on this one","the text is moved outside.","If *none*, no text appears."].join(" ")},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot",description:["Determines if texts are kept at center or start/end points in `textposition` *inside* mode."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"plot",description:["Sets the angle of the tick labels with respect to the bar.","For example, a `tickangle` of -90 draws the tick labels","vertically. With *auto* the texts may automatically be","rotated to fit with the maximum size in bars."].join(" ")},textfont:f({},d,{description:"Sets the font used for `text`."}),insidetextfont:f({},d,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:f({},d,{description:"Sets the font used for `text` lying outside the bar."}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc",description:["Constrain the size of text inside or outside a bar to be no","larger than the bar itself."].join(" ")},cliponaxis:f({},n.cliponaxis,{description:["Determines whether the text nodes","are clipped about the subplot axes.","To show the text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes",description:["Sets the orientation of the bars.","With *v* (*h*), the value of the each bar spans","along the vertical (horizontal)."].join(" ")},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc",description:["Sets where the bar base is drawn (in position axis units).","In *stack* or *relative* barmode,","traces that set *base* will be excluded","and drawn in *overlay* mode instead."].join(" ")},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc",description:["Shifts the position where the bar is drawn","(in position axis units).","In *group* barmode,","traces that set *offset* will be excluded","and drawn in *overlay* mode instead."].join(" ")},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc",description:["Sets the bar width (in position axis units)."].join(" ")},marker:v,offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:"style"},textfont:n.selected.textfont,editType:"style"},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:"style"},textfont:n.unselected.textfont,editType:"style"},zorder:n.zorder,_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"],description:"Renamed to `orientation`."}}}},63520:(e,t,r)=>{"use strict";var n=r(85729),i=r(35087),a=r(73084).hasColorscale,o=r(95500),s=r(15251),l=r(40304);e.exports=function(e,t){var r,u,c,f,d,h,p=n.getFromId(e,t.xaxis||"x"),v=n.getFromId(e,t.yaxis||"y"),m={msUTC:!(!t.base&&0!==t.base)};"h"===t.orientation?(r=p.makeCalcdata(t,"x",m),c=v.makeCalcdata(t,"y"),f=i(t,v,"y",c),d=!!t.yperiodalignment,h="y"):(r=v.makeCalcdata(t,"y",m),c=p.makeCalcdata(t,"x"),f=i(t,p,"x",c),d=!!t.xperiodalignment,h="x"),u=f.vals;for(var g=Math.min(u.length,r.length),y=new Array(g),x=0;x{"use strict";e.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},51203:(e,t,r)=>{"use strict";var n=r(22036),i=r(84468).isArrayOrTypedArray,a=r(65004).BADNUM,o=r(38361),s=r(85729),l=r(80038).getAxisGroup,u=r(70891);function c(e,t,r,o,c){if(o.length){var b,_,w,k;switch(function(e,t){var r,a;for(r=0;rf+u||!n(c))}for(var h=0;h{"use strict";var n=r(22036),i=r(84468),a=r(7605),o=r(38361),s=r(53124),l=r(26386),u=r(4241),c=r(53558),f=r(29744),d=i.coerceFont;function h(e){if(n(e)){if((e=+e)>=0)return e}else if("string"===typeof e&&"%"===(e=e.trim()).slice(-1)&&n(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function p(e,t,r,n,a,o){var s=!(!1===(o=o||{}).moduleHasSelected),l=!(!1===o.moduleHasUnselected),u=!(!1===o.moduleHasConstrain),c=!(!1===o.moduleHasCliponaxis),f=!(!1===o.moduleHasTextangle),h=!(!1===o.moduleHasInsideanchor),p=!!o.hasPathbar,v=Array.isArray(a)||"auto"===a,m=v||"inside"===a,g=v||"outside"===a;if(m||g){var y=d(n,"textfont",r.font),x=i.extendFlat({},y),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,d(n,"insidetextfont",x),p){var _=i.extendFlat({},y);b&&delete _.color,d(n,"pathbar.textfont",_)}g&&d(n,"outsidetextfont",y),s&&n("selected.textfont.color"),l&&n("unselected.textfont.color"),u&&n("constraintext"),c&&n("cliponaxis"),f&&n("textangle"),n("texttemplate")}m&&h&&n("insidetextanchor")}e.exports={supplyDefaults:function(e,t,r,n){function c(r,n){return i.coerce(e,t,f,r,n)}if(s(e,t,n,c)){l(e,t,n,c),c("xhoverformat"),c("yhoverformat"),c("zorder"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate");var d=c("textposition");p(e,t,n,c,d,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u(e,t,c,r,n);var h=(t.marker.line||{}).color,v=o.getComponentMethod("errorbars","supplyDefaults");v(e,t,h||a.defaultLine,{axis:"y"}),v(e,t,h||a.defaultLine,{axis:"x",inherit:"y"}),i.coerceSelectionMarkerOpacity(t,c)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,n;function a(e,t){return i.coerce(n._input,n,f,e,t)}for(var o=0;o{"use strict";e.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},30792:(e,t,r)=>{"use strict";var n=r(22036),i=r(23498),a=r(84468).isArrayOrTypedArray;t.coerceString=function(e,t,r){if("string"===typeof t){if(t||!e.noBlank)return t}else if(("number"===typeof t||!0===t)&&!e.strict)return String(t);return void 0!==r?r:e.dflt},t.coerceNumber=function(e,t,r){if(n(t)){t=+t;var i=e.min,a=e.max;if(!(void 0!==i&&ta))return t}return void 0!==r?r:e.dflt},t.coerceColor=function(e,t,r){return i(t).isValid()?t:void 0!==r?r:e.dflt},t.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},t.getValue=function(e,t){var r;return a(e)?t{"use strict";var n=r(32212),i=r(38361),a=r(7605),o=r(84468).fillText,s=r(30792).getLineWidth,l=r(85729).hoverLabelText,u=r(65004).BADNUM;function c(e,t,r,i,a){var s,c,f,d,h,p,v,m=e.cd,g=m[0].trace,y=m[0].t,x="closest"===i,b="waterfall"===g.type,_=e.maxHoverDistance,w=e.maxSpikeDistance;"h"===g.orientation?(s=r,c=t,f="y",d="x",h=R,p=O):(s=t,c=r,f="x",d="y",p=R,h=O);var k=g[f+"period"],T=x||k;function A(e){return S(e,-1)}function M(e){return S(e,1)}function S(e,t){var r=e.w;return e[f]+t*r/2}function E(e){return e[f+"End"]-e[f+"Start"]}var C=x?A:k?function(e){return e.p-E(e)/2}:function(e){return Math.min(A(e),e.p-y.bardelta/2)},L=x?M:k?function(e){return e.p+E(e)/2}:function(e){return Math.max(M(e),e.p+y.bardelta/2)};function P(e,t,r){return a.finiteRange&&(r=0),n.inbox(e-s,t-s,r+Math.min(1,Math.abs(t-e)/v)-1)}function O(e){return P(C(e),L(e),_)}function I(e){var t=e[d];if(b){var r=Math.abs(e.rawS)||0;c>0?t+=r:c<0&&(t-=r)}return t}function R(e){var t=c,r=e.b,i=I(e);return n.inbox(r-t,i-t,_+(i-t)/(i-r)-1)}var D=e[f+"a"],z=e[d+"a"];v=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var F=n.getDistanceFunction(i,h,p,(function(e){return(h(e)+p(e))/2}));if(n.getClosest(m,F,e),!1!==e.index&&m[e.index].p!==u){T||(C=function(e){return Math.min(A(e),e.p-y.bargroupwidth/2)},L=function(e){return Math.max(M(e),e.p+y.bargroupwidth/2)});var N=m[e.index],B=g.base?N.b+N.s:N.s;e[d+"0"]=e[d+"1"]=z.c2p(N[d],!0),e[d+"LabelVal"]=B;var j=y.extents[y.extents.round(N.p)];e[f+"0"]=D.c2p(x?C(N):j[0],!0),e[f+"1"]=D.c2p(x?L(N):j[1],!0);var U=void 0!==N.orig_p;return e[f+"LabelVal"]=U?N.orig_p:N.p,e.labelLabel=l(D,e[f+"LabelVal"],g[f+"hoverformat"]),e.valueLabel=l(z,e[d+"LabelVal"],g[d+"hoverformat"]),e.baseLabel=l(z,N.b,g[d+"hoverformat"]),e.spikeDistance=(function(e){var t=c,r=e.b,i=I(e);return n.inbox(r-t,i-t,w+(i-t)/(i-r)-1)}(N)+function(e){return P(A(e),M(e),w)}(N))/2,e[f+"Spike"]=D.c2p(N.p,!0),o(N,g,e),e.hovertemplate=g.hovertemplate,e}}function f(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=s(e,t);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(e,t,r,n,a){var o=c(e,t,r,n,a);if(o){var s=o.cd,l=s[0].trace,u=s[o.index];return o.color=f(l,u),i.getComponentMethod("errorbars","hoverInfo")(u,l,o),[o]}},hoverOnBars:c,getTraceColor:f}},42541:(e,t,r)=>{"use strict";e.exports={attributes:r(29744),layoutAttributes:r(23707),supplyDefaults:r(81543).supplyDefaults,crossTraceDefaults:r(81543).crossTraceDefaults,supplyLayoutDefaults:r(57724),calc:r(63520),crossTraceCalc:r(51203).crossTraceCalc,colorbar:r(17789),arraysToCalcdata:r(15251),plot:r(32018).plot,style:r(52464).style,styleOnSelect:r(52464).styleOnSelect,hoverPoints:r(80951).hoverPoints,eventData:r(60604),selectPoints:r(12969),moduleType:"trace",name:"bar",basePlotModule:r(9510),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{description:["The data visualized by the span of the bars is set in `y`","if `orientation` is set to *v* (the default)","and the labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}}},23707:e=>{"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *relative*, the bars are stacked on top of one another,","with negative values below the axis, positive values above","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Sets the normalization for bar traces on the graph.","With *fraction*, the value of each bar is divided by the sum of all","values at that location coordinate.","*percent* is the same but multiplied by 100 to show percentages."].join(" ")},bargap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")},barcornerradius:{valType:"any",editType:"calc",description:["Sets the rounding of bar corners. May be an integer number of pixels,","or a percentage of bar width (as a string ending in %)."].join(" ")}}},57724:(e,t,r)=>{"use strict";var n=r(38361),i=r(85729),a=r(84468),o=r(23707),s=r(81543).validateCornerradius;e.exports=function(e,t,r){function l(r,n){return a.coerce(e,t,o,r,n)}for(var u=!1,c=!1,f=!1,d={},h=l("barmode"),p=0;p{"use strict";var n=r(41871),i=r(22036),a=r(84468),o=r(13480),s=r(7605),l=r(3172),u=r(38361),c=r(85729).tickText,f=r(35655),d=f.recordMinTextSize,h=f.clearMinTextSize,p=r(52464),v=r(30792),m=r(41508),g=r(29744),y=g.text,x=g.textposition,b=r(82561).appendArrayPointValue,_=m.TEXTPAD;function w(e){return e.id}function k(e){if(e.ids)return w}function T(e){return(e>0)-(e<0)}function A(e,t){return e0}function E(e,t,r,n,i){return!(e<0||t<0)&&(r<=e&&n<=t||r<=t&&n<=e||(i?e>=r*(t/n):t>=n*(e/r)))}function C(e){return"auto"===e?0:e}function L(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function P(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c="end"===u,f="start"===u,d=((a.leftToRight||0)+1)/2,h=1-d,p=a.hasB,v=a.r,m=a.overhead,g=i.width,y=i.height,x=Math.abs(t-e),b=Math.abs(n-r),w=x>2*_&&b>2*_?_:0;x-=2*w,b-=2*w;var k=C(l);"auto"!==l||g<=x&&y<=b||!(g>x||y>b)||(g>b||y>x)&&g_){var E=function(e,t,r,n,i,a,o,s,l){var u,c,f,d,h,p=Math.max(0,Math.abs(t-e)-2*_),v=Math.max(0,Math.abs(n-r)-2*_),m=a-_,g=o?m-Math.sqrt(m*m-(m-o)*(m-o)):m,y=l?2*m:s?m-o:2*g,x=l?2*m:s?2*g:m-o;i.y/i.x>=v/(p-y)?d=v/i.y:i.y/i.x<=(v-x)/p?d=p/i.x:!l&&s?(u=i.x*i.x+i.y*i.y/4,f=(p-m)*(p-m)+(v/2-m)*(v/2-m)-m*m,d=(-(c=-2*i.x*(p-m)-i.y*(v/2-m))+Math.sqrt(c*c-4*u*f))/(2*u)):l?(u=(i.x*i.x+i.y*i.y)/4,f=(p/2-m)*(p/2-m)+(v/2-m)*(v/2-m)-m*m,d=(-(c=-i.x*(p/2-m)-i.y*(v/2-m))+Math.sqrt(c*c-4*u*f))/(2*u)):(u=i.x*i.x/4+i.y*i.y,f=(p/2-m)*(p/2-m)+(v-m)*(v-m)-m*m,d=(-(c=-i.x*(p/2-m)-2*i.y*(v-m))+Math.sqrt(c*c-4*u*f))/(2*u));d=Math.min(1,d),h=s?Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(v-i.y*d)/2)*(m-(v-i.y*d)/2)))-o):Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(p-i.x*d)/2)*(m-(p-i.x*d)/2)))-o);return{scale:d,pad:h}}(e,t,r,n,S,v,m,o,p);T=E.scale,M=E.pad}else T=1,s&&(T=Math.min(1,x/S.x,b/S.y)),M=0;var P=i.left*h+i.right*d,O=(i.top+i.bottom)/2,I=(e+_)*h+(t-_)*d,R=(r+n)/2,D=0,z=0;if(f||c){var F=(o?S.x:S.y)/2;v&&(c||p)&&(w+=M);var N=o?A(e,t):A(r,n);o?f?(I=e+N*w,D=-N*F):(I=t-N*w,D=N*F):f?(R=r+N*w,z=-N*F):(R=n-N*w,z=N*F)}return{textX:P,textY:O,targetX:I,targetY:R,anchorX:D,anchorY:z,scale:T,rotate:k}}e.exports={plot:function(e,t,r,f,m,g){var w=t.xaxis,O=t.yaxis,I=e._fullLayout,R=e._context.staticPlot;m||(m={mode:I.barmode,norm:I.barmode,gap:I.bargap,groupgap:I.bargroupgap},h("bar",I));var D=a.makeTraceGroups(f,r,"trace bars").each((function(r){var u=n.select(this),f=r[0].trace,h=r[0].t,D="waterfall"===f.type,z="funnel"===f.type,F="histogram"===f.type,N="bar"===f.type,B=N||z,j=0;D&&f.connector.visible&&"between"===f.connector.mode&&(j=f.connector.line.width/2);var U="h"===f.orientation,q=S(m),V=a.ensureSingle(u,"g","points"),H=k(f),G=V.selectAll("g.point").data(a.identity,H);G.enter().append("g").classed("point",!0),G.exit().remove(),G.each((function(u,k){var S,D,z=n.select(this),V=function(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n?[i,a]:[a,i]}(u,w,O,U),H=V[0][0],G=V[0][1],W=V[1][0],Y=V[1][1],Z=0===(U?G-H:Y-W);if(Z&&B&&v.getLineWidth(f,u)&&(Z=!1),Z||(Z=!i(H)||!i(G)||!i(W)||!i(Y)),u.isBlank=Z,Z&&(U?G=H:Y=W),j&&!Z&&(U?(H-=A(H,G)*j,G+=A(H,G)*j):(W-=A(W,Y)*j,Y+=A(W,Y)*j)),"waterfall"===f.type){if(!Z){var X=f[u.dir].marker;S=X.line.width,D=X.color}}else S=v.getLineWidth(f,u),D=u.mc||f.marker.color;function K(e){var t=n.round(S/2%1,2);return 0===m.gap&&0===m.groupgap?n.round(Math.round(e)-t,2):e}var J=s.opacity(D)<1||S>.01?K:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?K(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(H=J(H,G,U),G=J(G,H,U),W=J(W,Y,!U),Y=J(Y,W,!U));var $,Q=U?w.c2p:O.c2p;$=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var ee,te,re=N||F?function(e,t){if(!e)return 0;var r,n=U?Math.abs(Y-W):Math.abs(G-H),i=U?Math.abs(G-H):Math.abs(Y-W),a=J(Math.abs(Q($,!0)-Q(0,!0))),o=u.hasB?Math.min(n/2,i/2):Math.min(n/2,a);return r="%"===t?n*(Math.min(50,e)/100):e,J(Math.max(Math.min(r,o),0))}(h.cornerradiusvalue,h.cornerradiusform):0,ne="M"+H+","+W+"V"+Y+"H"+G+"V"+W+"Z",ie=0;if(re&&u.s){var ae=0===T(u.s0)||T(u.s)===T(u.s0)?u.s1:u.s0;if((ie=J(u.hasB?0:Math.abs(Q($,!0)-Q(ae,!0))))0?Math.sqrt(ie*(2*re-ie)):0,fe=oe>0?Math.max:Math.min;ee="M"+H+","+W+"V"+(Y-ue*se)+"H"+fe(G-(re-ie)*oe,H)+"A "+re+","+re+" 0 0 "+le+" "+G+","+(Y-re*se-ce)+"V"+(W+re*se+ce)+"A "+re+","+re+" 0 0 "+le+" "+fe(G-(re-ie)*oe,H)+","+(W+ue*se)+"Z"}else if(u.hasB)ee="M"+(H+re*oe)+","+W+"A "+re+","+re+" 0 0 "+le+" "+H+","+(W+re*se)+"V"+(Y-re*se)+"A "+re+","+re+" 0 0 "+le+" "+(H+re*oe)+","+Y+"H"+(G-re*oe)+"A "+re+","+re+" 0 0 "+le+" "+G+","+(Y-re*se)+"V"+(W+re*se)+"A "+re+","+re+" 0 0 "+le+" "+(G-re*oe)+","+W+"Z";else{var de=(te=Math.abs(Y-W)+ie)0?Math.sqrt(ie*(2*re-ie)):0,pe=se>0?Math.max:Math.min;ee="M"+(H+de*oe)+","+W+"V"+pe(Y-(re-ie)*se,W)+"A "+re+","+re+" 0 0 "+le+" "+(H+re*oe-he)+","+Y+"H"+(G-re*oe+he)+"A "+re+","+re+" 0 0 "+le+" "+(G-de*oe)+","+pe(Y-(re-ie)*se,W)+"V"+W+"Z"}}else ee=ne}else ee=ne;var ve=M(a.ensureSingle(z,"path"),I,m,g);if(ve.style("vector-effect",R?"none":"non-scaling-stroke").attr("d",isNaN((G-H)*(Y-W))||Z&&e._context.staticPlot?"M0,0Z":ee).call(l.setClipUrl,t.layerClipId,e),!I.uniformtext.mode&&q){var me=l.makePointStyleFns(f);l.singlePointStyle(u,ve,f,me,e)}!function(e,t,r,n,i,s,u,f,h,m,g,w,k){var T,S=t.xaxis,O=t.yaxis,I=e._fullLayout;function R(t,r,n){return a.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+T,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,e)}var D=n[0].trace,z="h"===D.orientation,F=function(e,t,r,n,i){var o,s=t[0].trace,l=s.texttemplate;o=l?function(e,t,r,n,i){var o=t[0].trace,s=a.castOption(o,r,"texttemplate");if(!s)return"";var l,u,f,d,h="histogram"===o.type,p="waterfall"===o.type,v="funnel"===o.type,m="h"===o.orientation;m?(l="y",u=i,f="x",d=n):(l="x",u=n,f="y",d=i);function g(e){return c(u,u.c2l(e),!0).text}function y(e){return c(d,d.c2l(e),!0).text}var x=t[r],_={};_.label=x.p,_.labelLabel=_[l+"Label"]=g(x.p);var w=a.castOption(o,x.i,"text");(0===w||w)&&(_.text=w);_.value=x.s,_.valueLabel=_[f+"Label"]=y(x.s);var k={};b(k,o,x.i),(h||void 0===k.x)&&(k.x=m?_.value:_.label);(h||void 0===k.y)&&(k.y=m?_.label:_.value);(h||void 0===k.xLabel)&&(k.xLabel=m?_.valueLabel:_.labelLabel);(h||void 0===k.yLabel)&&(k.yLabel=m?_.labelLabel:_.valueLabel);p&&(_.delta=+x.rawS||x.s,_.deltaLabel=y(_.delta),_.final=x.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial));v&&(_.value=x.s,_.valueLabel=y(_.value),_.percentInitial=x.begR,_.percentInitialLabel=a.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=a.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=a.formatPercent(x.sumR));var T=a.castOption(o,x.i,"customdata");T&&(_.customdata=T);return a.texttemplateString(s,_,e._d3locale,k,_,o._meta||{})}(e,t,r,n,i):s.textinfo?function(e,t,r,n){var i=e[0].trace,o="h"===i.orientation,s="waterfall"===i.type,l="funnel"===i.type;function u(e){return c(o?n:r,e,!0).text}function f(e){return c(o?r:n,+e,!0).text}var d,h=i.textinfo,p=e[t],v=h.split("+"),m=[],g=function(e){return-1!==v.indexOf(e)};g("label")&&m.push(u(e[t].p));g("text")&&(0===(d=a.castOption(i,p.i,"text"))||d)&&m.push(d);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;g("initial")&&m.push(f(b)),g("delta")&&m.push(f(y)),g("final")&&m.push(f(x))}if(l){g("value")&&m.push(f(p.s));var _=0;g("percent initial")&&_++,g("percent previous")&&_++,g("percent total")&&_++;var w=_>1;g("percent initial")&&(d=a.formatPercent(p.begR),w&&(d+=" of initial"),m.push(d)),g("percent previous")&&(d=a.formatPercent(p.difR),w&&(d+=" of previous"),m.push(d)),g("percent total")&&(d=a.formatPercent(p.sumR),w&&(d+=" of total"),m.push(d))}return m.join("
")}(t,r,n,i):v.getValue(s.text,r);return v.coerceString(y,o)}(I,n,i,S,O);T=function(e,t){var r=v.getValue(e.textposition,t);return v.coerceEnumerated(x,r)}(D,i);var N="stack"===w.mode||"relative"===w.mode,B=n[i],j=!N||B._outmost,U=B.hasB,q=m&&m-g>_;if(!F||"none"===T||(B.isBlank||s===u||f===h)&&("auto"===T||"inside"===T))return void r.select("text").remove();var V=I.font,H=p.getBarColor(n[i],D),G=p.getInsideTextFont(D,i,V,H),W=p.getOutsideTextFont(D,i,V),Y=D.insidetextanchor||"end",Z=r.datum();z?"log"===S.type&&Z.s0<=0&&(s=S.range[0]0&&$>0;ie=q?U?E(re-2*m,ne,J,$,z)||E(re,ne-2*m,J,$,z):z?E(re-(m-g),ne,J,$,z)||E(re,ne-2*(m-g),J,$,z):E(re,ne-(m-g),J,$,z)||E(re-2*(m-g),ne,J,$,z):E(re,ne,J,$,z),ae&&ie?T="inside":(T="outside",X.remove(),X=null)}else T="inside";if(!X){var oe=(X=R(r,F,Q=a.ensureUniformFontSize(e,"outside"===T?W:G))).attr("transform");if(X.attr("transform",""),J=(K=l.bBox(X.node())).width,$=K.height,X.attr("transform",oe),J<=0||$<=0)return void X.remove()}var se,le=D.textangle;se="outside"===T?function(e,t,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,u=a.angle||0,c=i.width,f=i.height,d=Math.abs(t-e),h=Math.abs(n-r);o=s?h>2*_?_:0:d>2*_?_:0;var p=1;l&&(p=s?Math.min(1,h/f):Math.min(1,d/c));var v=C(u),m=L(i,v),g=(s?m.x:m.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(e+t)/2,w=(r+n)/2,k=0,T=0,M=s?A(t,e):A(r,n);s?(b=t-M*o,k=M*g):(w=n+M*o,T=-M*g);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:k,anchorY:T,scale:p,rotate:v}}(s,u,f,h,K,{isHorizontal:z,constrained:"both"===D.constraintext||"outside"===D.constraintext,angle:le}):P(s,u,f,h,K,{isHorizontal:z,constrained:"both"===D.constraintext||"inside"===D.constraintext,angle:le,anchor:Y,hasB:U,r:m,overhead:g});se.fontSize=Q.size,d("histogram"===D.type?"bar":D.type,se,I),B.transform=se;var ue=M(X,I,w,k);a.setTransormAndDisplay(ue,se)}(e,t,z,r,k,H,G,W,Y,re,ie,m,g),t.layerClipId&&l.hideOutsideRangePoint(u,z.select("text"),w,O,f.xcalendar,f.ycalendar)}));var W=!1===f.cliponaxis;l.setClipUrl(u,W?null:t.layerClipId,e)}));u.getComponentMethod("errorbars","plot")(e,D,t,m)},toMoveInsideBar:P}},12969:e=>{"use strict";function t(e,t,r,n,i){var a=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(e,r){var n,i=e.cd,a=e.xaxis,o=e.yaxis,s=i[0].trace,l="funnel"===s.type,u="h"===s.orientation,c=[];if(!1===r)for(n=0;n{"use strict";e.exports=i;var n=r(84468).distinctVals;function i(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,i=t.posAxis._id.charAt(0),a=[],o=0;o{"use strict";var n=r(41871),i=r(7605),a=r(3172),o=r(84468),s=r(38361),l=r(35655).resizeText,u=r(29744),c=u.textfont,f=u.insidetextfont,d=u.outsidetextfont,h=r(30792);function p(e,t,r){a.pointStyle(e.selectAll("path"),t,r),v(e,t,r)}function v(e,t,r){e.selectAll("text").each((function(e){var i=n.select(this),s=o.ensureUniformFontSize(r,m(i,e,t,r));a.font(i,s)}))}function m(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=_(t,r);a=y(r,t.i,i,o)}else e.classed("bartext-outside")&&(a=x(r,t.i,i));return a}function g(e,t,r){return b(c,e.textfont,t,r)}function y(e,t,r,n){var a=g(e,t,r);return(void 0===e._input.textfont||void 0===e._input.textfont.color||Array.isArray(e.textfont.color)&&void 0===e.textfont.color[t])&&(a={color:i.contrast(n),family:a.family,size:a.size,weight:a.weight,style:a.style,variant:a.variant,textcase:a.textcase,lineposition:a.lineposition,shadow:a.shadow}),b(f,e.insidetextfont,t,a)}function x(e,t,r){var n=g(e,t,r);return b(d,e.outsidetextfont,t,n)}function b(e,t,r,n){t=t||{};var i=h.getValue(t.family,r),a=h.getValue(t.size,r),o=h.getValue(t.color,r),s=h.getValue(t.weight,r),l=h.getValue(t.style,r),u=h.getValue(t.variant,r),c=h.getValue(t.textcase,r),f=h.getValue(t.lineposition,r),d=h.getValue(t.shadow,r);return{family:h.coerceString(e.family,i,n.family),size:h.coerceNumber(e.size,a,n.size),color:h.coerceColor(e.color,o,n.color),weight:h.coerceString(e.weight,s,n.weight),style:h.coerceString(e.style,l,n.style),variant:h.coerceString(e.variant,u,n.variant),textcase:h.coerceString(e.variant,c,n.textcase),lineposition:h.coerceString(e.variant,f,n.lineposition),shadow:h.coerceString(e.variant,d,n.shadow)}}function _(e,t){return"waterfall"===t.type?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}e.exports={style:function(e){var t=n.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");l(e,t,"bar");var r=t.size(),i=e._fullLayout;t.style("opacity",(function(e){return e[0].trace.opacity})).each((function(e){("stack"===i.barmode&&r>1||0===i.bargap&&0===i.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(n.select(this),t[0].trace,e)})),s.getComponentMethod("errorbars","style")(t)},styleTextPoints:v,styleOnSelect:function(e,t,r){var i=t[0].trace;i.selectedpoints?function(e,t,r){a.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var i,s=n.select(this);if(e.selected){i=o.ensureUniformFontSize(r,m(s,e,t,r));var l=t.selected.textfont&&t.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,t)}))}(e.selectAll("text"),t,r)}(r,i,e):(p(r,i,e),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},4241:(e,t,r)=>{"use strict";var n=r(7605),i=r(73084).hasColorscale,a=r(16155),o=r(84468).coercePattern;e.exports=function(e,t,r,s,l){var u=r("marker.color",s),c=i(e,"marker");c&&a(e,t,l,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(e,"marker.line")&&a(e,t,l,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",u,c),r("selected.marker.color"),r("unselected.marker.color")}},35655:(e,t,r)=>{"use strict";var n=r(41871),i=r(84468);function a(e){return"_"+e+"Text_minsize"}e.exports={recordMinTextSize:function(e,t,r){if(r.uniformtext.mode){var n=a(e),i=r.uniformtext.minsize,o=t.scale*t.fontSize;t.hide=o{"use strict";var n=r(3172),i=r(7605);e.exports=function(e,t,r,a){var o=r.marker.pattern;o&&o.shape?n.pointStyle(e,r,a,t):i.fill(e,t.color)}},97367:(e,t,r)=>{"use strict";var n=r(84468);function i(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}t.formatPiePercent=function(e,t){var r=i((100*e).toPrecision(3));return n.numSeparate(r,t)+"%"},t.formatPieValue=function(e,t){var r=i(e.toPrecision(10));return n.numSeparate(r,t)},t.getFirstFilled=function(e,t){if(n.isArrayOrTypedArray(e))for(var r=0;r{"use strict";var n=r(7605),i=r(97367).castOption,a=r(16074);e.exports=function(e,t,r,o){var s=r.marker.line,l=i(s.color,t.pts)||n.defaultLine,u=i(s.width,t.pts)||0;e.call(a,t,r,o).style("stroke-width",u).call(n.stroke,l)}},22049:(e,t,r)=>{"use strict";var n=r(39363).axisHoverFormat,i=r(84425).ay,a=r(84425).rb,o=r(6636),s=r(91740),l=r(2703).T,u=r(2703).k,c=r(3172),f=r(56003),d=r(64022).extendFlat,h=r(50821);function p(e){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M* on the "+e+" axis.","Special values in the form of *M* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function v(e){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+e+" axis.","When `"+e+"period` is round number of weeks,","the `"+e+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function m(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+e+" axis."].join(" ")}}e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:p("x"),yperiod:p("y"),xperiod0:v("x0"),yperiod0:v("y0"),xperiodalignment:m("x"),yperiodalignment:m("y"),xhoverformat:n("x"),yhoverformat:n("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant in the following cases:","1. when `scattermode` is set to *group*.","2. when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:i({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+f.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:a({},{keys:f.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:d({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot",description:["Sets the line back off from the end point of the nth line segment (in px).","This option is useful e.g. to avoid overlap with arrowhead markers.","With *auto* the lines would trim before markers if `marker.angleref` is set to *previous*."].join(" ")},simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:h(!0),fillgradient:d({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc",description:["Sets the type/orientation of the color gradient for the fill.","Defaults to *none*."].join(" ")},start:{valType:"number",editType:"calc",description:["Sets the gradient start value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and start from the x-position","given by start. If omitted, the gradient starts at the lowest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},stop:{valType:"number",editType:"calc",description:["Sets the gradient end value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and end at the x-position","given by end. If omitted, the gradient ends at the highest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},colorscale:{valType:"colorscale",editType:"style",description:["Sets the fill gradient colors as a color scale.","The color scale is interpreted as a gradient","applied in the direction specified by *orientation*,","from the lowest to the highest value of the scatter","plot along that axis, or from the center to the most","distant point from it, if orientation is *radial*."].join(" ")},editType:"calc",description:["Sets a fill gradient.","If not specified, the fillcolor is used instead."].join(" ")}),fillpattern:u,marker:d({symbol:{valType:"enumerated",values:c.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:d({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."}),zorder:{valType:"integer",dflt:0,editType:"plot",description:["Sets the layer on which this trace is displayed, relative to","other SVG traces on the same subplot. SVG traces with higher `zorder`","appear in front of those with lower `zorder`."].join(" ")}}},40304:(e,t,r)=>{"use strict";var n=r(84468);e.exports=function(e,t){n.isArrayOrTypedArray(t.selectedpoints)&&n.tagSelected(e,t)}},56003:e=>{"use strict";e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},50821:e=>{"use strict";e.exports=function(e){return{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."+(e?" If fillgradient is specified, fillcolor is ignored except for setting the background color of the hover label, if any.":"")].join(" ")}}},53558:(e,t,r)=>{"use strict";var n=r(80038).getAxisGroup;e.exports=function(e,t,r,i){var a=t.orientation,o=t[{v:"x",h:"y"}[a]+"axis"],s=n(r,o)+a,l=r._alignmentOpts||{},u=i("alignmentgroup"),c=l[s];c||(c=l[s]={});var f=c[u];f?f.traces.push(t):f=c[u]={traces:[t],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var d=i("offsetgroup"),h=f.offsetGroups,p=h[d];d&&(p||(p=h[d]={offsetIndex:Object.keys(h).length}),t._offsetIndex=p.offsetIndex)}},92716:e=>{"use strict";e.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc",description:["Determines how scatter points at the same location coordinate","are displayed on the graph.","With *group*, the scatter points are plotted next to one another","centered around the shared location.","With *overlay*, the scatter points are plotted over one another,","you might need to reduce *opacity* to see multiple scatter points."].join(" ")},scattergap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between scatter points of","adjacent location coordinates.","Defaults to `bargap`."].join(" ")}}},14204:(e,t,r)=>{"use strict";var n=r(22036);e.exports=function(e,t){t||(t=2);var r=e.marker,i=r.sizeref||1,a=r.sizemin||0,o="area"===r.sizemode?function(e){return Math.sqrt(e/i)}:function(e){return e/i};return function(e){var r=o(e/t);return n(r)&&r>0?Math.max(r,a):0}}},17789:e=>{"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},26386:(e,t,r)=>{"use strict";var n=r(84468).dateTick0,i=r(65004).ONEWEEK;function a(e,t){return n(t,e%i===0?1:0)}e.exports=function(e,t,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",a(o,t.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",a(s,t.ycalendar)),n("yperiodalignment"))}}},31811:(e,t,r)=>{"use strict";var n=r(84468),i=r(19045).isTypedArraySpec;e.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){var t=e.marker;return n.isPlainObject(t)&&(n.isArrayOrTypedArray(t.size)||i(t.size))}}},53124:(e,t,r)=>{"use strict";var n=r(84468),i=r(38361);e.exports=function(e,t,r,a){var o,s=a("x"),l=a("y");if(i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],r),s){var u=n.minRowLength(s);l?o=Math.min(u,n.minRowLength(l)):(o=u,a("y0"),a("dy"))}else{if(!l)return 0;o=n.minRowLength(l),a("x0"),a("dx")}return t._length=o,o}},17316:(e,t)=>{"use strict";t.r="2.33.0"},56734:e=>{e.exports=function(e,t,r,n){var i=e[0],a=e[1],o=!1;void 0===r&&(r=0),void 0===n&&(n=t.length);for(var s=n-r,l=0,u=s-1;la!==h>a&&i<(d-c)*(a-f)/(h-f)+c&&(o=!o)}return o}},72761:(e,t,r)=>{var n,i=r(16746),a=r(64011),o=r(16479),s=r(49971),l=r(58732),u=r(74282),c=!1,f=a();function d(e,t,r){var i=n.segments(e),a=n.segments(t),o=r(n.combine(i,a));return n.polygon(o)}n={buildLog:function(e){return!0===e?c=i():!1===e&&(c=!1),!1!==c&&c.list},epsilon:function(e){return f.epsilon(e)},segments:function(e){var t=o(!0,f,c);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:o(!1,f,c).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:l.union(e.combined,c),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:l.intersect(e.combined,c),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:l.difference(e.combined,c),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:l.differenceRev(e.combined,c),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:l.xor(e.combined,c),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:s(e.segments,f,c),inverted:e.inverted}},polygonFromGeoJSON:function(e){return u.toPolygon(n,e)},polygonToGeoJSON:function(e){return u.fromPolygon(n,f,e)},union:function(e,t){return d(e,t,n.selectUnion)},intersect:function(e,t){return d(e,t,n.selectIntersect)},difference:function(e,t){return d(e,t,n.selectDifference)},differenceRev:function(e,t){return d(e,t,n.selectDifferenceRev)},xor:function(e,t){return d(e,t,n.selectXor)}},"object"===typeof window&&(window.PolyBool=n),e.exports=n},16746:e=>{e.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!==typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}},64011:e=>{e.exports=function(e){"number"!==typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"===typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=t[0];return(o-i)*(t[1]-a)-(s-a)*(l-i)>=-e},pointBetween:function(t,r,n){var i=t[1]-r[1],a=n[0]-r[0],o=t[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-i>e&&(a-u)*(i-c)/(o-c)+u-n>e&&(s=!s),a=u,o=c}return s}};return t}},74282:e=>{var t={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]),i=1;i{var n=r(4729);e.exports=function(e,t,r){function i(e,t,n){return{id:r?r.segmentId():-1,start:e,end:t,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var a=n.create();function o(e,r){a.insertBefore(e,(function(n){return function(e,r,n,i,a,o){var s=t.pointsCompare(r,a);return 0!==s?s:t.pointsSame(n,o)?0:e!==i?e?1:-1:t.pointAboveOrOnLine(n,i?a:o,i?o:a)?1:-1}(e.isStart,e.pt,r,n.isStart,n.pt,n.other.pt)<0}))}function s(e,t){var r=function(e,t){var r=n.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return o(r,e.end),r}(e,t);return function(e,t,r){var i=n.node({isStart:!1,pt:t.end,seg:t,primary:r,other:e,status:null});e.other=i,o(i,e.pt)}(r,e,t),r}function l(e,t){var n=i(t,e.seg.end,e.seg);return function(e,t){r&&r.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,o(e.other,e.pt)}(e,t),s(n,e.primary)}function u(i,o){var s=n.create();function u(e){return s.findTransition((function(r){return function(e,r){var n=e.seg.start,i=e.seg.end,a=r.seg.start,o=r.seg.end;return t.pointsCollinear(n,a,o)?t.pointsCollinear(i,a,o)||t.pointAboveOrOnLine(i,a,o)?1:-1:t.pointAboveOrOnLine(n,a,o)?1:-1}(e,r.ev)>0}))}function c(e,n){var i=e.seg,a=n.seg,o=i.start,s=i.end,u=a.start,c=a.end;r&&r.checkIntersection(i,a);var f=t.linesIntersect(o,s,u,c);if(!1===f){if(!t.pointsCollinear(o,s,u))return!1;if(t.pointsSame(o,c)||t.pointsSame(s,u))return!1;var d=t.pointsSame(o,u),h=t.pointsSame(s,c);if(d&&h)return n;var p=!d&&t.pointBetween(o,u,c),v=!h&&t.pointBetween(s,u,c);if(d)return v?l(n,s):l(e,c),n;p&&(h||(v?l(n,s):l(e,c)),l(n,o))}else 0===f.alongA&&(-1===f.alongB?l(e,u):0===f.alongB?l(e,f.pt):1===f.alongB&&l(e,c)),0===f.alongB&&(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&&l(n,s));return!1}for(var f=[];!a.isEmpty();){var d=a.getHead();if(r&&r.vert(d.pt[0]),d.isStart){r&&r.segmentNew(d.seg,d.primary);var h=u(d),p=h.before?h.before.ev:null,v=h.after?h.after.ev:null;function m(){if(p){var e=c(d,p);if(e)return e}return!!v&&c(d,v)}r&&r.tempStatus(d.seg,!!p&&p.seg,!!v&&v.seg);var g,y=m();if(y){var x;if(e)(x=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=d.seg.myFill;r&&r.segmentUpdate(y.seg),d.other.remove(),d.remove()}if(a.getHead()!==d){r&&r.rewind(d.seg);continue}if(e)x=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below,d.seg.myFill.below=v?v.seg.myFill.above:i,d.seg.myFill.above=x?!d.seg.myFill.below:d.seg.myFill.below;else if(null===d.seg.otherFill)g=v?d.primary===v.primary?v.seg.otherFill.above:v.seg.myFill.above:d.primary?o:i,d.seg.otherFill={above:g,below:g};r&&r.status(d.seg,!!p&&p.seg,!!v&&v.seg),d.other.status=h.insert(n.node({ev:d}))}else{var b=d.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(b.prev)&&s.exists(b.next)&&c(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!d.primary){var _=d.seg.myFill;d.seg.myFill=d.seg.otherFill,d.seg.otherFill=_}f.push(d.seg)}a.getHead().remove()}return r&&r.done(),f}return e?{addRegion:function(e){for(var n,i,a,o=e[e.length-1],l=0;l{e.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;null!==i;){if(r(i))return t.prev=i.prev,t.next=i,i.prev.next=t,void(i.prev=t);n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;null!==n&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(e){return e.prev=r,e.next=n,r.next=e,null!==n&&(n.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}},49971:e=>{e.exports=function(e,t,r){var n=[],i=[];return e.forEach((function(e){var a=e.start,o=e.end;if(t.pointsSame(a,o))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(e);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},u=s,c=0;c{function t(e,t,r){var n=[];return e.forEach((function(e){var i=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);0!==t[i]&&n.push({id:r?r.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[i],below:2===t[i]},otherFill:null})})),r&&r.selected(n),n}var r={union:function(e,r){return t(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return t(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return t(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return t(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return t(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};e.exports=r},87938:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printIteratorEntries=function(e,t,r,n,i,a){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:": ",s="",l=e.next();if(!l.done){s+=t.spacingOuter;const u=r+t.indent;for(;!l.done;){s+=u+a(l.value[0],t,u,n,i)+o+a(l.value[1],t,u,n,i),l=e.next(),l.done?t.min||(s+=","):s+=","+t.spacingInner}s+=t.spacingOuter+r}return s},t.printIteratorValues=function(e,t,r,n,i,a){let o="",s=e.next();if(!s.done){o+=t.spacingOuter;const l=r+t.indent;for(;!s.done;)o+=l+a(s.value,t,l,n,i),s=e.next(),s.done?t.min||(o+=","):o+=","+t.spacingInner;o+=t.spacingOuter+r}return o},t.printListItems=function(e,t,r,n,i,a){let o="";if(e.length){o+=t.spacingOuter;const s=r+t.indent;for(let r=0;r{const r=Object.keys(e).sort(t);return Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach((t=>{Object.getOwnPropertyDescriptor(e,t).enumerable&&r.push(t)})),r}},90295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DEFAULT_OPTIONS=void 0,t.format=N,t.plugins=void 0;var n=d(r(40124)),i=r(87938),a=d(r(55160)),o=d(r(47856)),s=d(r(56244)),l=d(r(25914)),u=d(r(8232)),c=d(r(2007)),f=d(r(53136));function d(e){return e&&e.__esModule?e:{default:e}}const h=Object.prototype.toString,p=Date.prototype.toISOString,v=Error.prototype.toString,m=RegExp.prototype.toString,g=e=>"function"===typeof e.constructor&&e.constructor.name||"Object",y=e=>"undefined"!==typeof window&&e===window,x=/^Symbol\((.*)\)(.*)$/,b=/\n/gi;class _ extends Error{constructor(e,t){super(e),this.stack=t,this.name=this.constructor.name}}function w(e,t){return t?"[Function "+(e.name||"anonymous")+"]":"[Function]"}function k(e){return String(e).replace(x,"Symbol($1)")}function T(e){return"["+v.call(e)+"]"}function A(e,t,r,n){if(!0===e||!1===e)return""+e;if(void 0===e)return"undefined";if(null===e)return"null";const i=typeof e;if("number"===i)return function(e){return Object.is(e,-0)?"-0":String(e)}(e);if("bigint"===i)return function(e){return String("".concat(e,"n"))}(e);if("string"===i)return n?'"'+e.replace(/"|\\/g,"\\$&")+'"':'"'+e+'"';if("function"===i)return w(e,t);if("symbol"===i)return k(e);const a=h.call(e);return"[object WeakMap]"===a?"WeakMap {}":"[object WeakSet]"===a?"WeakSet {}":"[object Function]"===a||"[object GeneratorFunction]"===a?w(e,t):"[object Symbol]"===a?k(e):"[object Date]"===a?isNaN(+e)?"Date { NaN }":p.call(e):"[object Error]"===a?T(e):"[object RegExp]"===a?r?m.call(e).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&"):m.call(e):e instanceof Error?T(e):null}function M(e,t,r,n,a,o){if(-1!==a.indexOf(e))return"[Circular]";(a=a.slice()).push(e);const s=++n>t.maxDepth,l=t.min;if(t.callToJSON&&!s&&e.toJSON&&"function"===typeof e.toJSON&&!o)return C(e.toJSON(),t,r,n,a,!0);const u=h.call(e);return"[object Arguments]"===u?s?"[Arguments]":(l?"":"Arguments ")+"["+(0,i.printListItems)(e,t,r,n,a,C)+"]":function(e){return"[object Array]"===e||"[object ArrayBuffer]"===e||"[object DataView]"===e||"[object Float32Array]"===e||"[object Float64Array]"===e||"[object Int8Array]"===e||"[object Int16Array]"===e||"[object Int32Array]"===e||"[object Uint8Array]"===e||"[object Uint8ClampedArray]"===e||"[object Uint16Array]"===e||"[object Uint32Array]"===e}(u)?s?"["+e.constructor.name+"]":(l?"":t.printBasicPrototype||"Array"!==e.constructor.name?e.constructor.name+" ":"")+"["+(0,i.printListItems)(e,t,r,n,a,C)+"]":"[object Map]"===u?s?"[Map]":"Map {"+(0,i.printIteratorEntries)(e.entries(),t,r,n,a,C," => ")+"}":"[object Set]"===u?s?"[Set]":"Set {"+(0,i.printIteratorValues)(e.values(),t,r,n,a,C)+"}":s||y(e)?"["+g(e)+"]":(l?"":t.printBasicPrototype||"Object"!==g(e)?g(e)+" ":"")+"{"+(0,i.printObjectProperties)(e,t,r,n,a,C)+"}"}function S(e,t,r,n,i,a){let o;try{o=function(e){return null!=e.serialize}(e)?e.serialize(t,r,n,i,a,C):e.print(t,(e=>C(e,r,n,i,a)),(e=>{const t=n+r.indent;return t+e.replace(b,"\n"+t)}),{edgeSpacing:r.spacingOuter,min:r.min,spacing:r.spacingInner},r.colors)}catch(s){throw new _(s.message,s.stack)}if("string"!==typeof o)throw new Error('pretty-format: Plugin must return type "string" but instead returned "'.concat(typeof o,'".'));return o}function E(e,t){for(let n=0;nP.reduce(((t,r)=>{const i=e.theme&&void 0!==e.theme[r]?e.theme[r]:L[r],a=i&&n.default[i];if(!a||"string"!==typeof a.close||"string"!==typeof a.open)throw new Error('pretty-format: Option "theme" has a key "'.concat(r,'" whose value "').concat(i,'" is undefined in ansi-styles.'));return t[r]=a,t}),Object.create(null)),R=e=>e&&void 0!==e.printFunctionName?e.printFunctionName:O.printFunctionName,D=e=>e&&void 0!==e.escapeRegex?e.escapeRegex:O.escapeRegex,z=e=>e&&void 0!==e.escapeString?e.escapeString:O.escapeString,F=e=>{var t,r;return{callToJSON:e&&void 0!==e.callToJSON?e.callToJSON:O.callToJSON,colors:e&&e.highlight?I(e):P.reduce(((e,t)=>(e[t]={close:"",open:""},e)),Object.create(null)),compareKeys:e&&"function"===typeof e.compareKeys?e.compareKeys:O.compareKeys,escapeRegex:D(e),escapeString:z(e),indent:e&&e.min?"":(r=e&&void 0!==e.indent?e.indent:O.indent,new Array(r+1).join(" ")),maxDepth:e&&void 0!==e.maxDepth?e.maxDepth:O.maxDepth,min:e&&void 0!==e.min?e.min:O.min,plugins:e&&void 0!==e.plugins?e.plugins:O.plugins,printBasicPrototype:null===(t=null===e||void 0===e?void 0:e.printBasicPrototype)||void 0===t||t,printFunctionName:R(e),spacingInner:e&&e.min?" ":"\n",spacingOuter:e&&e.min?"":"\n"}};function N(e,t){if(t&&(function(e){if(Object.keys(e).forEach((e=>{if(!O.hasOwnProperty(e))throw new Error('pretty-format: Unknown option "'.concat(e,'".'))})),e.min&&void 0!==e.indent&&0!==e.indent)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');if(void 0!==e.theme){if(null===e.theme)throw new Error('pretty-format: Option "theme" must not be null.');if("object"!==typeof e.theme)throw new Error('pretty-format: Option "theme" must be of type "object" but instead received "'.concat(typeof e.theme,'".'))}}(t),t.plugins)){const r=E(t.plugins,e);if(null!==r)return S(r,e,F(t),"",0,[])}const r=A(e,R(t),D(t),z(t));return null!==r?r:M(e,F(t),"",0,[])}const B={AsymmetricMatcher:a.default,ConvertAnsi:o.default,DOMCollection:s.default,DOMElement:l.default,Immutable:u.default,ReactElement:c.default,ReactTestComponent:f.default};t.plugins=B;var j=N;t.default=j},55160:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var n=r(87938),i="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof i?i:"undefined"!==typeof self?self:"undefined"!==typeof window?window:Function("return this")(),a=i["jest-symbol-do-not-touch"]||i.Symbol;const o="function"===typeof a&&a.for?a.for("jest.asymmetricMatcher"):1267621,s=" ",l=(e,t,r,i,a,o)=>{const l=e.toString();return"ArrayContaining"===l||"ArrayNotContaining"===l?++i>t.maxDepth?"["+l+"]":l+s+"["+(0,n.printListItems)(e.sample,t,r,i,a,o)+"]":"ObjectContaining"===l||"ObjectNotContaining"===l?++i>t.maxDepth?"["+l+"]":l+s+"{"+(0,n.printObjectProperties)(e.sample,t,r,i,a,o)+"}":"StringMatching"===l||"StringNotMatching"===l||"StringContaining"===l||"StringNotContaining"===l?l+s+o(e.sample,t,r,i,a):e.toAsymmetricMatcher()};t.serialize=l;const u=e=>e&&e.$$typeof===o;t.test=u;var c={serialize:l,test:u};t.default=c},47856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var n=a(r(76649)),i=a(r(40124));function a(e){return e&&e.__esModule?e:{default:e}}const o=e=>"string"===typeof e&&!!e.match((0,n.default)());t.test=o;const s=(e,t,r,a,o,s)=>s(e.replace((0,n.default)(),(e=>{switch(e){case i.default.red.close:case i.default.green.close:case i.default.cyan.close:case i.default.gray.close:case i.default.white.close:case i.default.yellow.close:case i.default.bgRed.close:case i.default.bgGreen.close:case i.default.bgYellow.close:case i.default.inverse.close:case i.default.dim.close:case i.default.bold.close:case i.default.reset.open:case i.default.reset.close:return"";case i.default.red.open:return"";case i.default.green.open:return"";case i.default.cyan.open:return"";case i.default.gray.open:return"";case i.default.white.open:return"";case i.default.yellow.open:return"";case i.default.bgRed.open:return"";case i.default.bgGreen.open:return"";case i.default.bgYellow.open:return"";case i.default.inverse.open:return"";case i.default.dim.open:return"";case i.default.bold.open:return"";default:return""}})),t,r,a,o);t.serialize=s;var l={serialize:s,test:o};t.default=l},56244:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var n=r(87938);const i=["DOMStringMap","NamedNodeMap"],a=/^(HTML\w*Collection|NodeList)$/,o=e=>e&&e.constructor&&!!e.constructor.name&&(e=>-1!==i.indexOf(e)||a.test(e))(e.constructor.name);t.test=o;const s=(e,t,r,a,o,s)=>{const l=e.constructor.name;return++a>t.maxDepth?"["+l+"]":(t.min?"":l+" ")+(-1!==i.indexOf(l)?"{"+(0,n.printObjectProperties)((e=>"NamedNodeMap"===e.constructor.name)(e)?Array.from(e).reduce(((e,t)=>(e[t.name]=t.value,e)),{}):{...e},t,r,a,o,s)+"}":"["+(0,n.printListItems)(Array.from(e),t,r,a,o,s)+"]")};t.serialize=s;var l={serialize:s,test:o};t.default=l},25914:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var n=r(75638);const i=/^((HTML|SVG)\w*)?Element$/,a=e=>{var t;return(null===e||void 0===e||null===(t=e.constructor)||void 0===t?void 0:t.name)&&(e=>{const t=e.constructor.name,{nodeType:r,tagName:n}=e,a="string"===typeof n&&n.includes("-")||(e=>{try{return"function"===typeof e.hasAttribute&&e.hasAttribute("is")}catch{return!1}})(e);return 1===r&&(i.test(t)||a)||3===r&&"Text"===t||8===r&&"Comment"===t||11===r&&"DocumentFragment"===t})(e)};function o(e){return 11===e.nodeType}t.test=a;const s=(e,t,r,i,a,s)=>{if(function(e){return 3===e.nodeType}(e))return(0,n.printText)(e.data,t);if(function(e){return 8===e.nodeType}(e))return(0,n.printComment)(e.data,t);const l=o(e)?"DocumentFragment":e.tagName.toLowerCase();return++i>t.maxDepth?(0,n.printElementAsLeaf)(l,t):(0,n.printElement)(l,(0,n.printProps)(o(e)?[]:Array.from(e.attributes).map((e=>e.name)).sort(),o(e)?{}:Array.from(e.attributes).reduce(((e,t)=>(e[t.name]=t.value,e)),{}),t,r+t.indent,i,a,s),(0,n.printChildren)(Array.prototype.slice.call(e.childNodes||e.children),t,r+t.indent,i,a,s),t,r)};t.serialize=s;var l={serialize:s,test:a};t.default=l},8232:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var n=r(87938);const i="@@__IMMUTABLE_ORDERED__@@",a=e=>"Immutable."+e,o=e=>"["+e+"]",s=" ";const l=(e,t,r,i,l,u,c)=>++i>t.maxDepth?o(a(c)):a(c)+s+"["+(0,n.printIteratorValues)(e.values(),t,r,i,l,u)+"]",u=(e,t,r,u,c,f)=>e["@@__IMMUTABLE_MAP__@@"]?((e,t,r,i,l,u,c)=>++i>t.maxDepth?o(a(c)):a(c)+s+"{"+(0,n.printIteratorEntries)(e.entries(),t,r,i,l,u)+"}")(e,t,r,u,c,f,e[i]?"OrderedMap":"Map"):e["@@__IMMUTABLE_LIST__@@"]?l(e,t,r,u,c,f,"List"):e["@@__IMMUTABLE_SET__@@"]?l(e,t,r,u,c,f,e[i]?"OrderedSet":"Set"):e["@@__IMMUTABLE_STACK__@@"]?l(e,t,r,u,c,f,"Stack"):e["@@__IMMUTABLE_SEQ__@@"]?((e,t,r,i,l,u)=>{const c=a("Seq");return++i>t.maxDepth?o(c):e["@@__IMMUTABLE_KEYED__@@"]?c+s+"{"+(e._iter||e._object?(0,n.printIteratorEntries)(e.entries(),t,r,i,l,u):"\u2026")+"}":c+s+"["+(e._iter||e._array||e._collection||e._iterable?(0,n.printIteratorValues)(e.values(),t,r,i,l,u):"\u2026")+"]"})(e,t,r,u,c,f):((e,t,r,i,l,u)=>{const c=a(e._name||"Record");return++i>t.maxDepth?o(c):c+s+"{"+(0,n.printIteratorEntries)(function(e){let t=0;return{next(){if(te&&(!0===e["@@__IMMUTABLE_ITERABLE__@@"]||!0===e["@@__IMMUTABLE_RECORD__@@"]);t.test=c;var f={serialize:u,test:c};t.default=f},2007:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(2086)),i=r(75638);function a(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Array.isArray(e)?e.forEach((e=>{o(e,t)})):null!=e&&!1!==e&&t.push(e),t},s=e=>{const t=e.type;if("string"===typeof t)return t;if("function"===typeof t)return t.displayName||t.name||"Unknown";if(n.isFragment(e))return"React.Fragment";if(n.isSuspense(e))return"React.Suspense";if("object"===typeof t&&null!==t){if(n.isContextProvider(e))return"Context.Provider";if(n.isContextConsumer(e))return"Context.Consumer";if(n.isForwardRef(e)){if(t.displayName)return t.displayName;const e=t.render.displayName||t.render.name||"";return""!==e?"ForwardRef("+e+")":"ForwardRef"}if(n.isMemo(e)){const e=t.displayName||t.type.displayName||t.type.name||"";return""!==e?"Memo("+e+")":"Memo"}}return"UNDEFINED"},l=(e,t,r,n,a,l)=>++n>t.maxDepth?(0,i.printElementAsLeaf)(s(e),t):(0,i.printElement)(s(e),(0,i.printProps)((e=>{const{props:t}=e;return Object.keys(t).filter((e=>"children"!==e&&void 0!==t[e])).sort()})(e),e.props,t,r+t.indent,n,a,l),(0,i.printChildren)(o(e.props.children),t,r+t.indent,n,a,l),t,r);t.serialize=l;const u=e=>null!=e&&n.isElement(e);t.test=u;var c={serialize:l,test:u};t.default=c},53136:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var n=r(75638),i="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof i?i:"undefined"!==typeof self?self:"undefined"!==typeof window?window:Function("return this")(),a=i["jest-symbol-do-not-touch"]||i.Symbol;const o="function"===typeof a&&a.for?a.for("react.test.json"):245830487,s=(e,t,r,i,a,o)=>++i>t.maxDepth?(0,n.printElementAsLeaf)(e.type,t):(0,n.printElement)(e.type,e.props?(0,n.printProps)((e=>{const{props:t}=e;return t?Object.keys(t).filter((e=>void 0!==t[e])).sort():[]})(e),e.props,t,r+t.indent,i,a,o):"",e.children?(0,n.printChildren)(e.children,t,r+t.indent,i,a,o):"",t,r);t.serialize=s;const l=e=>e&&e.$$typeof===o;t.test=l;var u={serialize:s,test:l};t.default=u},2672:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(//g,">")}},75638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printText=t.printProps=t.printElementAsLeaf=t.printElement=t.printComment=t.printChildren=void 0;var n,i=(n=r(2672))&&n.__esModule?n:{default:n};t.printProps=(e,t,r,n,i,a,o)=>{const s=n+r.indent,l=r.colors;return e.map((e=>{const u=t[e];let c=o(u,r,s,i,a);return"string"!==typeof u&&(-1!==c.indexOf("\n")&&(c=r.spacingOuter+s+c+r.spacingOuter+n),c="{"+c+"}"),r.spacingInner+n+l.prop.open+e+l.prop.close+"="+l.value.open+c+l.value.close})).join("")};t.printChildren=(e,t,r,n,i,o)=>e.map((e=>t.spacingOuter+r+("string"===typeof e?a(e,t):o(e,t,r,n,i)))).join("");const a=(e,t)=>{const r=t.colors.content;return r.open+(0,i.default)(e)+r.close};t.printText=a;t.printComment=(e,t)=>{const r=t.colors.comment;return r.open+"\x3c!--"+(0,i.default)(e)+"--\x3e"+r.close};t.printElement=(e,t,r,n,i)=>{const a=n.colors.tag;return a.open+"<"+e+(t&&a.close+t+n.spacingOuter+i+a.open)+(r?">"+a.close+r+n.spacingOuter+i+a.open+""+a.close};t.printElementAsLeaf=(e,t)=>{const r=t.colors.tag;return r.open+"<"+e+r.close+" \u2026"+r.open+" />"+r.close}},40124:(e,t,r)=>{"use strict";e=r.nmd(e);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t=>"\x1b[".concat(38+e,";5;").concat(t,"m")},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(t,r,n)=>"\x1b[".concat(38+e,";2;").concat(t,";").concat(r,";").concat(n,"m")};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,n]of Object.entries(t)){for(const[r,i]of Object.entries(n))t[r]={open:"\x1b[".concat(i[0],"m"),close:"\x1b[".concat(i[1],"m")},n[r]=t[r],e.set(i[0],i[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1b[39m",t.bgColor.close="\x1b[49m",t.color.ansi256=n(),t.color.ansi16m=i(),t.bgColor.ansi256=n(10),t.bgColor.ansi16m=i(10),Object.defineProperties(t,{rgbToAnsi256:{value:(e,t,r)=>e===t&&t===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:e=>{const t=/(?[a-f\d]{6}|[a-f\d]{3})/i.exec(e.toString(16));if(!t)return[0,0,0];let{colorString:r}=t.groups;3===r.length&&(r=r.split("").map((e=>e+e)).join(""));const n=Number.parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},enumerable:!1},hexToAnsi256:{value:e=>t.rgbToAnsi256(...t.hexToRgb(e)),enumerable:!1}}),t}})},41497:(e,t,r)=>{"use strict";var n=r(13218);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return r.PropTypes=r,r}},65173:(e,t,r)=>{e.exports=r(41497)()},13218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},82730:(e,t,r)=>{"use strict";var n=r(65043),i=r(78853);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r