From c4fc59dc1e0130ea75fed8ea2f737226bfc4f0fc Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Mon, 21 Jul 2025 12:56:49 -0500 Subject: [PATCH] Add pre-bundled vendor assets for Docker build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Force add vendor.js and vendor.css files that were gitignored These files are needed during Docker build since npm isn't available 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- priv/static/assets/vendor.css | 1 + priv/static/assets/vendor.js | 51 +++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 priv/static/assets/vendor.css create mode 100644 priv/static/assets/vendor.js diff --git a/priv/static/assets/vendor.css b/priv/static/assets/vendor.css new file mode 100644 index 0000000..9d377c8 --- /dev/null +++ b/priv/static/assets/vendor.css @@ -0,0 +1 @@ +.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url("./layers-55W3Q4RM.png");width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url("./layers-2x-TBM42ERR.png");background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url("./marker-icon-2V3QKKVC.png")}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{-webkit-transition:-webkit-transform .3s ease-out,opacity .3s ease-in;-moz-transition:-moz-transform .3s ease-out,opacity .3s ease-in;-o-transition:-o-transform .3s ease-out,opacity .3s ease-in;transition:transform .3s ease-out,opacity .3s ease-in}.leaflet-cluster-spider-leg{-webkit-transition:-webkit-stroke-dashoffset .3s ease-out,-webkit-stroke-opacity .3s ease-in;-moz-transition:-moz-stroke-dashoffset .3s ease-out,-moz-stroke-opacity .3s ease-in;-o-transition:-o-stroke-dashoffset .3s ease-out,-o-stroke-opacity .3s ease-in;transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in}.marker-cluster-small{background-color:#b5e28c99}.marker-cluster-small div{background-color:#6ecc3999}.marker-cluster-medium{background-color:#f1d35799}.marker-cluster-medium div{background-color:#f0c20c99}.marker-cluster-large{background-color:#fd9c7399}.marker-cluster-large div{background-color:#f1801799}.leaflet-oldie .marker-cluster-small{background-color:#b5e28c}.leaflet-oldie .marker-cluster-small div{background-color:#6ecc39}.leaflet-oldie .marker-cluster-medium{background-color:#f1d357}.leaflet-oldie .marker-cluster-medium div{background-color:#f0c20c}.leaflet-oldie .marker-cluster-large{background-color:#fd9c73}.leaflet-oldie .marker-cluster-large div{background-color:#f18017}.marker-cluster{background-clip:padding-box;border-radius:20px}.marker-cluster div{width:30px;height:30px;margin-left:5px;margin-top:5px;text-align:center;border-radius:15px;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.marker-cluster span{line-height:30px} diff --git a/priv/static/assets/vendor.js b/priv/static/assets/vendor.js new file mode 100644 index 0000000..23df58b --- /dev/null +++ b/priv/static/assets/vendor.js @@ -0,0 +1,51 @@ +"use strict";(()=>{var Qf=Object.create;var Er=Object.defineProperty,Jf=Object.defineProperties,tp=Object.getOwnPropertyDescriptor,ep=Object.getOwnPropertyDescriptors,ip=Object.getOwnPropertyNames,sh=Object.getOwnPropertySymbols,np=Object.getPrototypeOf,oh=Object.prototype.hasOwnProperty,sp=Object.prototype.propertyIsEnumerable;var Ar=(n,t,e)=>t in n?Er(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Mi=(n,t)=>{for(var e in t||(t={}))oh.call(t,e)&&Ar(n,e,t[e]);if(sh)for(var e of sh(t))sp.call(t,e)&&Ar(n,e,t[e]);return n},Li=(n,t)=>Jf(n,ep(t));var zr=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var op=(n,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ip(t))!oh.call(n,s)&&s!==e&&Er(n,s,{get:()=>t[s],enumerable:!(i=tp(t,s))||i.enumerable});return n};var Rr=(n,t,e)=>(e=n!=null?Qf(np(n)):{},op(t||!n||!n.__esModule?Er(e,"default",{value:n,enumerable:!0}):e,n));var k=(n,t,e)=>Ar(n,typeof t!="symbol"?t+"":t,e);var ah=zr((fs,rh)=>{(function(n,t){typeof fs=="object"&&typeof rh!="undefined"?t(fs):typeof define=="function"&&define.amd?define(["exports"],t):(n=typeof globalThis!="undefined"?globalThis:n||self,t(n.leaflet={}))})(fs,function(n){"use strict";var t="1.9.4";function e(o){var l,u,p,g;for(u=1,p=arguments.length;u0?Math.floor(o):Math.ceil(o)};W.prototype={clone:function(){return new W(this.x,this.y)},add:function(o){return this.clone()._add(E(o))},_add:function(o){return this.x+=o.x,this.y+=o.y,this},subtract:function(o){return this.clone()._subtract(E(o))},_subtract:function(o){return this.x-=o.x,this.y-=o.y,this},divideBy:function(o){return this.clone()._divideBy(o)},_divideBy:function(o){return this.x/=o,this.y/=o,this},multiplyBy:function(o){return this.clone()._multiplyBy(o)},_multiplyBy:function(o){return this.x*=o,this.y*=o,this},scaleBy:function(o){return new W(this.x*o.x,this.y*o.y)},unscaleBy:function(o){return new W(this.x/o.x,this.y/o.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=yt(this.x),this.y=yt(this.y),this},distanceTo:function(o){o=E(o);var l=o.x-this.x,u=o.y-this.y;return Math.sqrt(l*l+u*u)},equals:function(o){return o=E(o),o.x===this.x&&o.y===this.y},contains:function(o){return o=E(o),Math.abs(o.x)<=Math.abs(this.x)&&Math.abs(o.y)<=Math.abs(this.y)},toString:function(){return"Point("+f(this.x)+", "+f(this.y)+")"}};function E(o,l,u){return o instanceof W?o:P(o)?new W(o[0],o[1]):o==null?o:typeof o=="object"&&"x"in o&&"y"in o?new W(o.x,o.y):new W(o,l,u)}function V(o,l){if(o)for(var u=l?[o,l]:o,p=0,g=u.length;p=this.min.x&&u.x<=this.max.x&&l.y>=this.min.y&&u.y<=this.max.y},intersects:function(o){o=dt(o);var l=this.min,u=this.max,p=o.min,g=o.max,v=g.x>=l.x&&p.x<=u.x,M=g.y>=l.y&&p.y<=u.y;return v&&M},overlaps:function(o){o=dt(o);var l=this.min,u=this.max,p=o.min,g=o.max,v=g.x>l.x&&p.xl.y&&p.y=l.lat&&g.lat<=u.lat&&p.lng>=l.lng&&g.lng<=u.lng},intersects:function(o){o=pt(o);var l=this._southWest,u=this._northEast,p=o.getSouthWest(),g=o.getNorthEast(),v=g.lat>=l.lat&&p.lat<=u.lat,M=g.lng>=l.lng&&p.lng<=u.lng;return v&&M},overlaps:function(o){o=pt(o);var l=this._southWest,u=this._northEast,p=o.getSouthWest(),g=o.getNorthEast(),v=g.lat>l.lat&&p.latl.lng&&p.lng1,Wd=function(){var o=!1;try{var l=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("testPassiveEventSupport",d,l),window.removeEventListener("testPassiveEventSupport",d,l)}catch(u){}return o}(),Hd=function(){return!!document.createElement("canvas").getContext}(),rr=!!(document.createElementNS&&Xa("svg").createSVGRect),Zd=!!rr&&function(){var o=document.createElement("div");return o.innerHTML="",(o.firstChild&&o.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Vd=!rr&&function(){try{var o=document.createElement("div");o.innerHTML='';var l=o.firstChild;return l.style.behavior="url(#default#VML)",l&&typeof l.adj=="object"}catch(u){return!1}}(),Yd=navigator.platform.indexOf("Mac")===0,jd=navigator.platform.indexOf("Linux")===0;function he(o){return navigator.userAgent.toLowerCase().indexOf(o)>=0}var U={ie:qn,ielt9:Cd,edge:Ka,webkit:nr,android:Qa,android23:Ja,androidStock:Od,opera:sr,chrome:tl,gecko:el,safari:Dd,phantom:il,opera12:nl,win:Id,ie3d:sl,webkit3d:or,gecko3d:ol,any3d:Ad,mobile:sn,mobileWebkit:Ed,mobileWebkit3d:zd,msPointer:rl,pointer:al,touch:Rd,touchNative:ll,mobileOpera:Bd,mobileGecko:Fd,retina:Nd,passiveEvents:Wd,canvas:Hd,svg:rr,vml:Vd,inlineSvg:Zd,mac:Yd,linux:jd},hl=U.msPointer?"MSPointerDown":"pointerdown",cl=U.msPointer?"MSPointerMove":"pointermove",ul=U.msPointer?"MSPointerUp":"pointerup",dl=U.msPointer?"MSPointerCancel":"pointercancel",ar={touchstart:hl,touchmove:cl,touchend:ul,touchcancel:dl},fl={touchstart:Kd,touchmove:Xn,touchend:Xn,touchcancel:Xn},pi={},pl=!1;function Ud(o,l,u){return l==="touchstart"&&$d(),fl[l]?(u=fl[l].bind(this,u),o.addEventListener(ar[l],u,!1),u):(console.warn("wrong event specified:",l),d)}function Gd(o,l,u){if(!ar[l]){console.warn("wrong event specified:",l);return}o.removeEventListener(ar[l],u,!1)}function qd(o){pi[o.pointerId]=o}function Xd(o){pi[o.pointerId]&&(pi[o.pointerId]=o)}function ml(o){delete pi[o.pointerId]}function $d(){pl||(document.addEventListener(hl,qd,!0),document.addEventListener(cl,Xd,!0),document.addEventListener(ul,ml,!0),document.addEventListener(dl,ml,!0),pl=!0)}function Xn(o,l){if(l.pointerType!==(l.MSPOINTER_TYPE_MOUSE||"mouse")){l.touches=[];for(var u in pi)l.touches.push(pi[u]);l.changedTouches=[l],o(l)}}function Kd(o,l){l.MSPOINTER_TYPE_TOUCH&&l.pointerType===l.MSPOINTER_TYPE_TOUCH&&Et(l),Xn(o,l)}function Qd(o){var l={},u,p;for(p in o)u=o[p],l[p]=u&&u.bind?u.bind(o):u;return o=l,l.type="dblclick",l.detail=2,l.isTrusted=!1,l._simulated=!0,l}var Jd=200;function tf(o,l){o.addEventListener("dblclick",l);var u=0,p;function g(v){if(v.detail!==1){p=v.detail;return}if(!(v.pointerType==="mouse"||v.sourceCapabilities&&!v.sourceCapabilities.firesTouchEvents)){var M=xl(v);if(!(M.some(function(S){return S instanceof HTMLLabelElement&&S.attributes.for})&&!M.some(function(S){return S instanceof HTMLInputElement||S instanceof HTMLSelectElement}))){var T=Date.now();T-u<=Jd?(p++,p===2&&l(Qd(v))):p=1,u=T}}}return o.addEventListener("click",g),{dblclick:l,simDblclick:g}}function ef(o,l){o.removeEventListener("dblclick",l.dblclick),o.removeEventListener("click",l.simDblclick)}var lr=Qn(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),on=Qn(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),gl=on==="webkitTransition"||on==="OTransition"?on+"End":"transitionend";function _l(o){return typeof o=="string"?document.getElementById(o):o}function rn(o,l){var u=o.style[l]||o.currentStyle&&o.currentStyle[l];if((!u||u==="auto")&&document.defaultView){var p=document.defaultView.getComputedStyle(o,null);u=p?p[l]:null}return u==="auto"?null:u}function ft(o,l,u){var p=document.createElement(o);return p.className=l||"",u&&u.appendChild(p),p}function Lt(o){var l=o.parentNode;l&&l.removeChild(o)}function $n(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function mi(o){var l=o.parentNode;l&&l.lastChild!==o&&l.appendChild(o)}function gi(o){var l=o.parentNode;l&&l.firstChild!==o&&l.insertBefore(o,l.firstChild)}function hr(o,l){if(o.classList!==void 0)return o.classList.contains(l);var u=Kn(o);return u.length>0&&new RegExp("(^|\\s)"+l+"(\\s|$)").test(u)}function J(o,l){if(o.classList!==void 0)for(var u=_(l),p=0,g=u.length;p0?2*window.devicePixelRatio:1;function wl(o){return U.edge?o.wheelDeltaY/2:o.deltaY&&o.deltaMode===0?-o.deltaY/of:o.deltaY&&o.deltaMode===1?-o.deltaY*20:o.deltaY&&o.deltaMode===2?-o.deltaY*60:o.deltaX||o.deltaZ?0:o.wheelDelta?(o.wheelDeltaY||o.wheelDelta)/2:o.detail&&Math.abs(o.detail)<32765?-o.detail*20:o.detail?o.detail/-32765*60:0}function br(o,l){var u=l.relatedTarget;if(!u)return!0;try{for(;u&&u!==o;)u=u.parentNode}catch(p){return!1}return u!==o}var rf={__proto__:null,on:K,off:xt,stopPropagation:$e,disableScrollPropagation:xr,disableClickPropagation:cn,preventDefault:Et,stop:Ke,getPropagationPath:xl,getMousePosition:bl,getWheelDelta:wl,isExternalTarget:br,addListener:K,removeListener:xt},Ml=st.extend({run:function(o,l,u,p){this.stop(),this._el=o,this._inProgress=!0,this._duration=u||.25,this._easeOutPower=1/Math.max(p||.5,.2),this._startPos=Xe(o),this._offset=l.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=N(this._animate,this),this._step()},_step:function(o){var l=+new Date-this._startTime,u=this._duration*1e3;lthis.options.maxZoom)?this.setZoom(o):this},panInsideBounds:function(o,l){this._enforcingBounds=!0;var u=this.getCenter(),p=this._limitCenter(u,this._zoom,pt(o));return u.equals(p)||this.panTo(p,l),this._enforcingBounds=!1,this},panInside:function(o,l){l=l||{};var u=E(l.paddingTopLeft||l.padding||[0,0]),p=E(l.paddingBottomRight||l.padding||[0,0]),g=this.project(this.getCenter()),v=this.project(o),M=this.getPixelBounds(),T=dt([M.min.add(u),M.max.subtract(p)]),S=T.getSize();if(!T.contains(v)){this._enforcingBounds=!0;var A=v.subtract(T.getCenter()),H=T.extend(v).getSize().subtract(S);g.x+=A.x<0?-H.x:H.x,g.y+=A.y<0?-H.y:H.y,this.panTo(this.unproject(g),l),this._enforcingBounds=!1}return this},invalidateSize:function(o){if(!this._loaded)return this;o=e({animate:!1,pan:!0},o===!0?{animate:!0}:o);var l=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var u=this.getSize(),p=l.divideBy(2).round(),g=u.divideBy(2).round(),v=p.subtract(g);return!v.x&&!v.y?this:(o.animate&&o.pan?this.panBy(v):(o.pan&&this._rawPanBy(v),this.fire("move"),o.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:l,newSize:u}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(o){if(o=this._locateOptions=e({timeout:1e4,watch:!1},o),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var l=s(this._handleGeolocationResponse,this),u=s(this._handleGeolocationError,this);return o.watch?this._locationWatchId=navigator.geolocation.watchPosition(l,u,o):navigator.geolocation.getCurrentPosition(l,u,o),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(o){if(this._container._leaflet_id){var l=o.code,u=o.message||(l===1?"permission denied":l===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:l,message:"Geolocation error: "+u+"."})}},_handleGeolocationResponse:function(o){if(this._container._leaflet_id){var l=o.coords.latitude,u=o.coords.longitude,p=new ot(l,u),g=p.toBounds(o.coords.accuracy*2),v=this._locateOptions;if(v.setView){var M=this.getBoundsZoom(g);this.setView(p,v.maxZoom?Math.min(M,v.maxZoom):M)}var T={latlng:p,bounds:g,timestamp:o.timestamp};for(var S in o.coords)typeof o.coords[S]=="number"&&(T[S]=o.coords[S]);this.fire("locationfound",T)}},addHandler:function(o,l){if(!l)return this;var u=this[o]=new l(this);return this._handlers.push(u),this.options[o]&&u.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(l){this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Lt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(j(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var o;for(o in this._layers)this._layers[o].remove();for(o in this._panes)Lt(this._panes[o]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(o,l){var u="leaflet-pane"+(o?" leaflet-"+o.replace("Pane","")+"-pane":""),p=ft("div",u,l||this._mapPane);return o&&(this._panes[o]=p),p},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var o=this.getPixelBounds(),l=this.unproject(o.getBottomLeft()),u=this.unproject(o.getTopRight());return new kt(l,u)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(o,l,u){o=pt(o),u=E(u||[0,0]);var p=this.getZoom()||0,g=this.getMinZoom(),v=this.getMaxZoom(),M=o.getNorthWest(),T=o.getSouthEast(),S=this.getSize().subtract(u),A=dt(this.project(T,p),this.project(M,p)).getSize(),H=U.any3d?this.options.zoomSnap:1,G=S.x/A.x,et=S.y/A.y,Zt=l?Math.max(G,et):Math.min(G,et);return p=this.getScaleZoom(Zt,p),H&&(p=Math.round(p/(H/100))*(H/100),p=l?Math.ceil(p/H)*H:Math.floor(p/H)*H),Math.max(g,Math.min(v,p))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new W(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(o,l){var u=this._getTopLeftPoint(o,l);return new V(u,u.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(o){return this.options.crs.getProjectedBounds(o===void 0?this.getZoom():o)},getPane:function(o){return typeof o=="string"?this._panes[o]:o},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(o,l){var u=this.options.crs;return l=l===void 0?this._zoom:l,u.scale(o)/u.scale(l)},getScaleZoom:function(o,l){var u=this.options.crs;l=l===void 0?this._zoom:l;var p=u.zoom(o*u.scale(l));return isNaN(p)?1/0:p},project:function(o,l){return l=l===void 0?this._zoom:l,this.options.crs.latLngToPoint(X(o),l)},unproject:function(o,l){return l=l===void 0?this._zoom:l,this.options.crs.pointToLatLng(E(o),l)},layerPointToLatLng:function(o){var l=E(o).add(this.getPixelOrigin());return this.unproject(l)},latLngToLayerPoint:function(o){var l=this.project(X(o))._round();return l._subtract(this.getPixelOrigin())},wrapLatLng:function(o){return this.options.crs.wrapLatLng(X(o))},wrapLatLngBounds:function(o){return this.options.crs.wrapLatLngBounds(pt(o))},distance:function(o,l){return this.options.crs.distance(X(o),X(l))},containerPointToLayerPoint:function(o){return E(o).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(o){return E(o).add(this._getMapPanePos())},containerPointToLatLng:function(o){var l=this.containerPointToLayerPoint(E(o));return this.layerPointToLatLng(l)},latLngToContainerPoint:function(o){return this.layerPointToContainerPoint(this.latLngToLayerPoint(X(o)))},mouseEventToContainerPoint:function(o){return bl(o,this._container)},mouseEventToLayerPoint:function(o){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(o))},mouseEventToLatLng:function(o){return this.layerPointToLatLng(this.mouseEventToLayerPoint(o))},_initContainer:function(o){var l=this._container=_l(o);if(l){if(l._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");K(l,"scroll",this._onScroll,this),this._containerId=a(l)},_initLayout:function(){var o=this._container;this._fadeAnimated=this.options.fadeAnimation&&U.any3d,J(o,"leaflet-container"+(U.touch?" leaflet-touch":"")+(U.retina?" leaflet-retina":"")+(U.ielt9?" leaflet-oldie":"")+(U.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var l=rn(o,"position");l!=="absolute"&&l!=="relative"&&l!=="fixed"&&l!=="sticky"&&(o.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var o=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),St(this._mapPane,new W(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(J(o.markerPane,"leaflet-zoom-hide"),J(o.shadowPane,"leaflet-zoom-hide"))},_resetView:function(o,l,u){St(this._mapPane,new W(0,0));var p=!this._loaded;this._loaded=!0,l=this._limitZoom(l),this.fire("viewprereset");var g=this._zoom!==l;this._moveStart(g,u)._move(o,l)._moveEnd(g),this.fire("viewreset"),p&&this.fire("load")},_moveStart:function(o,l){return o&&this.fire("zoomstart"),l||this.fire("movestart"),this},_move:function(o,l,u,p){l===void 0&&(l=this._zoom);var g=this._zoom!==l;return this._zoom=l,this._lastCenter=o,this._pixelOrigin=this._getNewPixelOrigin(o),p?u&&u.pinch&&this.fire("zoom",u):((g||u&&u.pinch)&&this.fire("zoom",u),this.fire("move",u)),this},_moveEnd:function(o){return o&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return j(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(o){St(this._mapPane,this._getMapPanePos().subtract(o))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(o){this._targets={},this._targets[a(this._container)]=this;var l=o?xt:K;l(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&l(window,"resize",this._onResize,this),U.any3d&&this.options.transform3DLimit&&(o?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){j(this._resizeRequest),this._resizeRequest=N(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var o=this._getMapPanePos();Math.max(Math.abs(o.x),Math.abs(o.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(o,l){for(var u=[],p,g=l==="mouseout"||l==="mouseover",v=o.target||o.srcElement,M=!1;v;){if(p=this._targets[a(v)],p&&(l==="click"||l==="preclick")&&this._draggableMoved(p)){M=!0;break}if(p&&p.listens(l,!0)&&(g&&!br(v,o)||(u.push(p),g))||v===this._container)break;v=v.parentNode}return!u.length&&!M&&!g&&this.listens(l,!0)&&(u=[this]),u},_isClickDisabled:function(o){for(;o&&o!==this._container;){if(o._leaflet_disable_click)return!0;o=o.parentNode}},_handleDOMEvent:function(o){var l=o.target||o.srcElement;if(!(!this._loaded||l._leaflet_disable_events||o.type==="click"&&this._isClickDisabled(l))){var u=o.type;u==="mousedown"&&mr(l),this._fireDOMEvent(o,u)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(o,l,u){if(o.type==="click"){var p=e({},o);p.type="preclick",this._fireDOMEvent(p,p.type,u)}var g=this._findEventTargets(o,l);if(u){for(var v=[],M=0;M0?Math.round(o-l)/2:Math.max(0,Math.ceil(o))-Math.max(0,Math.floor(l))},_limitZoom:function(o){var l=this.getMinZoom(),u=this.getMaxZoom(),p=U.any3d?this.options.zoomSnap:1;return p&&(o=Math.round(o/p)*p),Math.max(l,Math.min(u,o))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ct(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(o,l){var u=this._getCenterOffset(o)._trunc();return(l&&l.animate)!==!0&&!this.getSize().contains(u)?!1:(this.panBy(u,l),!0)},_createAnimProxy:function(){var o=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(o),this.on("zoomanim",function(l){var u=lr,p=this._proxy.style[u];qe(this._proxy,this.project(l.center,l.zoom),this.getZoomScale(l.zoom,1)),p===this._proxy.style[u]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Lt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var o=this.getCenter(),l=this.getZoom();qe(this._proxy,this.project(o,l),this.getZoomScale(l,1))},_catchTransitionEnd:function(o){this._animatingZoom&&o.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(o,l,u){if(this._animatingZoom)return!0;if(u=u||{},!this._zoomAnimated||u.animate===!1||this._nothingToAnimate()||Math.abs(l-this._zoom)>this.options.zoomAnimationThreshold)return!1;var p=this.getZoomScale(l),g=this._getCenterOffset(o)._divideBy(1-1/p);return u.animate!==!0&&!this.getSize().contains(g)?!1:(N(function(){this._moveStart(!0,u.noMoveStart||!1)._animateZoom(o,l,!0)},this),!0)},_animateZoom:function(o,l,u,p){this._mapPane&&(u&&(this._animatingZoom=!0,this._animateToCenter=o,this._animateToZoom=l,J(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:o,zoom:l,noUpdate:p}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ct(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function af(o,l){return new ht(o,l)}var oe=Y.extend({options:{position:"topright"},initialize:function(o){y(this,o)},getPosition:function(){return this.options.position},setPosition:function(o){var l=this._map;return l&&l.removeControl(this),this.options.position=o,l&&l.addControl(this),this},getContainer:function(){return this._container},addTo:function(o){this.remove(),this._map=o;var l=this._container=this.onAdd(o),u=this.getPosition(),p=o._controlCorners[u];return J(l,"leaflet-control"),u.indexOf("bottom")!==-1?p.insertBefore(l,p.firstChild):p.appendChild(l),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Lt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(o){this._map&&o&&o.screenX>0&&o.screenY>0&&this._map.getContainer().focus()}}),un=function(o){return new oe(o)};ht.include({addControl:function(o){return o.addTo(this),this},removeControl:function(o){return o.remove(),this},_initControlPos:function(){var o=this._controlCorners={},l="leaflet-",u=this._controlContainer=ft("div",l+"control-container",this._container);function p(g,v){var M=l+g+" "+l+v;o[g+v]=ft("div",M,u)}p("top","left"),p("top","right"),p("bottom","left"),p("bottom","right")},_clearControlPos:function(){for(var o in this._controlCorners)Lt(this._controlCorners[o]);Lt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ll=oe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(o,l,u,p){return u1,this._baseLayersList.style.display=o?"":"none"),this._separator.style.display=l&&o?"":"none",this},_onLayerChange:function(o){this._handlingClick||this._update();var l=this._getLayer(a(o.target)),u=l.overlay?o.type==="add"?"overlayadd":"overlayremove":o.type==="add"?"baselayerchange":null;u&&this._map.fire(u,l)},_createRadioElement:function(o,l){var u='",p=document.createElement("div");return p.innerHTML=u,p.firstChild},_addItem:function(o){var l=document.createElement("label"),u=this._map.hasLayer(o.layer),p;o.overlay?(p=document.createElement("input"),p.type="checkbox",p.className="leaflet-control-layers-selector",p.defaultChecked=u):p=this._createRadioElement("leaflet-base-layers_"+a(this),u),this._layerControlInputs.push(p),p.layerId=a(o.layer),K(p,"click",this._onInputClick,this);var g=document.createElement("span");g.innerHTML=" "+o.name;var v=document.createElement("span");l.appendChild(v),v.appendChild(p),v.appendChild(g);var M=o.overlay?this._overlaysList:this._baseLayersList;return M.appendChild(l),this._checkDisabledLayers(),l},_onInputClick:function(){if(!this._preventClick){var o=this._layerControlInputs,l,u,p=[],g=[];this._handlingClick=!0;for(var v=o.length-1;v>=0;v--)l=o[v],u=this._getLayer(l.layerId).layer,l.checked?p.push(u):l.checked||g.push(u);for(v=0;v=0;g--)l=o[g],u=this._getLayer(l.layerId).layer,l.disabled=u.options.minZoom!==void 0&&pu.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var o=this._section;this._preventClick=!0,K(o,"click",Et),this.expand();var l=this;setTimeout(function(){xt(o,"click",Et),l._preventClick=!1})}}),lf=function(o,l,u){return new Ll(o,l,u)},wr=oe.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(o){var l="leaflet-control-zoom",u=ft("div",l+" leaflet-bar"),p=this.options;return this._zoomInButton=this._createButton(p.zoomInText,p.zoomInTitle,l+"-in",u,this._zoomIn),this._zoomOutButton=this._createButton(p.zoomOutText,p.zoomOutTitle,l+"-out",u,this._zoomOut),this._updateDisabled(),o.on("zoomend zoomlevelschange",this._updateDisabled,this),u},onRemove:function(o){o.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(o){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(o.shiftKey?3:1))},_createButton:function(o,l,u,p,g){var v=ft("a",u,p);return v.innerHTML=o,v.href="#",v.title=l,v.setAttribute("role","button"),v.setAttribute("aria-label",l),cn(v),K(v,"click",Ke),K(v,"click",g,this),K(v,"click",this._refocusOnMap,this),v},_updateDisabled:function(){var o=this._map,l="leaflet-disabled";Ct(this._zoomInButton,l),Ct(this._zoomOutButton,l),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||o._zoom===o.getMinZoom())&&(J(this._zoomOutButton,l),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||o._zoom===o.getMaxZoom())&&(J(this._zoomInButton,l),this._zoomInButton.setAttribute("aria-disabled","true"))}});ht.mergeOptions({zoomControl:!0}),ht.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new wr,this.addControl(this.zoomControl))});var hf=function(o){return new wr(o)},Pl=oe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(o){var l="leaflet-control-scale",u=ft("div",l),p=this.options;return this._addScales(p,l+"-line",u),o.on(p.updateWhenIdle?"moveend":"move",this._update,this),o.whenReady(this._update,this),u},onRemove:function(o){o.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(o,l,u){o.metric&&(this._mScale=ft("div",l,u)),o.imperial&&(this._iScale=ft("div",l,u))},_update:function(){var o=this._map,l=o.getSize().y/2,u=o.distance(o.containerPointToLatLng([0,l]),o.containerPointToLatLng([this.options.maxWidth,l]));this._updateScales(u)},_updateScales:function(o){this.options.metric&&o&&this._updateMetric(o),this.options.imperial&&o&&this._updateImperial(o)},_updateMetric:function(o){var l=this._getRoundNum(o),u=l<1e3?l+" m":l/1e3+" km";this._updateScale(this._mScale,u,l/o)},_updateImperial:function(o){var l=o*3.2808399,u,p,g;l>5280?(u=l/5280,p=this._getRoundNum(u),this._updateScale(this._iScale,p+" mi",p/u)):(g=this._getRoundNum(l),this._updateScale(this._iScale,g+" ft",g/l))},_updateScale:function(o,l,u){o.style.width=Math.round(this.options.maxWidth*u)+"px",o.innerHTML=l},_getRoundNum:function(o){var l=Math.pow(10,(Math.floor(o)+"").length-1),u=o/l;return u=u>=10?10:u>=5?5:u>=3?3:u>=2?2:1,l*u}}),cf=function(o){return new Pl(o)},uf='',Mr=oe.extend({options:{position:"bottomright",prefix:''+(U.inlineSvg?uf+" ":"")+"Leaflet"},initialize:function(o){y(this,o),this._attributions={}},onAdd:function(o){o.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),cn(this._container);for(var l in o._layers)o._layers[l].getAttribution&&this.addAttribution(o._layers[l].getAttribution());return this._update(),o.on("layeradd",this._addAttribution,this),this._container},onRemove:function(o){o.off("layeradd",this._addAttribution,this)},_addAttribution:function(o){o.layer.getAttribution&&(this.addAttribution(o.layer.getAttribution()),o.layer.once("remove",function(){this.removeAttribution(o.layer.getAttribution())},this))},setPrefix:function(o){return this.options.prefix=o,this._update(),this},addAttribution:function(o){return o?(this._attributions[o]||(this._attributions[o]=0),this._attributions[o]++,this._update(),this):this},removeAttribution:function(o){return o?(this._attributions[o]&&(this._attributions[o]--,this._update()),this):this},_update:function(){if(this._map){var o=[];for(var l in this._attributions)this._attributions[l]&&o.push(l);var u=[];this.options.prefix&&u.push(this.options.prefix),o.length&&u.push(o.join(", ")),this._container.innerHTML=u.join(' ')}}});ht.mergeOptions({attributionControl:!0}),ht.addInitHook(function(){this.options.attributionControl&&new Mr().addTo(this)});var df=function(o){return new Mr(o)};oe.Layers=Ll,oe.Zoom=wr,oe.Scale=Pl,oe.Attribution=Mr,un.layers=lf,un.zoom=hf,un.scale=cf,un.attribution=df;var ue=Y.extend({initialize:function(o){this._map=o},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ue.addTo=function(o,l){return o.addHandler(l,this),this};var ff={Events:lt},kl=U.touch?"touchstart mousedown":"mousedown",Re=st.extend({options:{clickTolerance:3},initialize:function(o,l,u,p){y(this,p),this._element=o,this._dragStartTarget=l||o,this._preventOutline=u},enable:function(){this._enabled||(K(this._dragStartTarget,kl,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Re._dragging===this&&this.finishDrag(!0),xt(this._dragStartTarget,kl,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(o){if(this._enabled&&(this._moved=!1,!hr(this._element,"leaflet-zoom-anim"))){if(o.touches&&o.touches.length!==1){Re._dragging===this&&this.finishDrag();return}if(!(Re._dragging||o.shiftKey||o.which!==1&&o.button!==1&&!o.touches)&&(Re._dragging=this,this._preventOutline&&mr(this._element),dr(),an(),!this._moving)){this.fire("down");var l=o.touches?o.touches[0]:o,u=yl(this._element);this._startPoint=new W(l.clientX,l.clientY),this._startPos=Xe(this._element),this._parentScale=gr(u);var p=o.type==="mousedown";K(document,p?"mousemove":"touchmove",this._onMove,this),K(document,p?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(o){if(this._enabled){if(o.touches&&o.touches.length>1){this._moved=!0;return}var l=o.touches&&o.touches.length===1?o.touches[0]:o,u=new W(l.clientX,l.clientY)._subtract(this._startPoint);!u.x&&!u.y||Math.abs(u.x)+Math.abs(u.y)v&&(M=T,v=S);v>u&&(l[M]=1,Pr(o,l,u,p,M),Pr(o,l,u,M,g))}function _f(o,l){for(var u=[o[0]],p=1,g=0,v=o.length;pl&&(u.push(o[p]),g=p);return gl.max.x&&(u|=2),o.yl.max.y&&(u|=8),u}function yf(o,l){var u=l.x-o.x,p=l.y-o.y;return u*u+p*p}function dn(o,l,u,p){var g=l.x,v=l.y,M=u.x-g,T=u.y-v,S=M*M+T*T,A;return S>0&&(A=((o.x-g)*M+(o.y-v)*T)/S,A>1?(g=u.x,v=u.y):A>0&&(g+=M*A,v+=T*A)),M=o.x-g,T=o.y-v,p?M*M+T*T:new W(g,v)}function Qt(o){return!P(o[0])||typeof o[0][0]!="object"&&typeof o[0][0]!="undefined"}function Al(o){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Qt(o)}function El(o,l){var u,p,g,v,M,T,S,A;if(!o||o.length===0)throw new Error("latlngs not passed");Qt(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var H=X([0,0]),G=pt(o),et=G.getNorthWest().distanceTo(G.getSouthWest())*G.getNorthEast().distanceTo(G.getNorthWest());et<1700&&(H=Lr(o));var Zt=o.length,At=[];for(u=0;up){S=(v-p)/g,A=[T.x-S*(T.x-M.x),T.y-S*(T.y-M.y)];break}var Vt=l.unproject(E(A));return X([Vt.lat+H.lat,Vt.lng+H.lng])}var vf={__proto__:null,simplify:Sl,pointToSegmentDistance:Ol,closestPointOnSegment:mf,clipSegment:Il,_getEdgeIntersection:es,_getBitCode:Qe,_sqClosestPointOnSegment:dn,isFlat:Qt,_flat:Al,polylineCenter:El},kr={project:function(o){return new W(o.lng,o.lat)},unproject:function(o){return new ot(o.y,o.x)},bounds:new V([-180,-90],[180,90])},Tr={R:6378137,R_MINOR:6356752314245179e-9,bounds:new V([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(o){var l=Math.PI/180,u=this.R,p=o.lat*l,g=this.R_MINOR/u,v=Math.sqrt(1-g*g),M=v*Math.sin(p),T=Math.tan(Math.PI/4-p/2)/Math.pow((1-M)/(1+M),v/2);return p=-u*Math.log(Math.max(T,1e-10)),new W(o.lng*l*u,p)},unproject:function(o){for(var l=180/Math.PI,u=this.R,p=this.R_MINOR/u,g=Math.sqrt(1-p*p),v=Math.exp(-o.y/u),M=Math.PI/2-2*Math.atan(v),T=0,S=.1,A;T<15&&Math.abs(S)>1e-7;T++)A=g*Math.sin(M),A=Math.pow((1-A)/(1+A),g/2),S=Math.PI/2-2*Math.atan(v*A)-M,M+=S;return new ot(M*l,o.x*l/u)}},xf={__proto__:null,LonLat:kr,Mercator:Tr,SphericalMercator:Jo},bf=e({},Nt,{code:"EPSG:3395",projection:Tr,transformation:function(){var o=.5/(Math.PI*Tr.R);return nn(o,.5,-o,.5)}()}),zl=e({},Nt,{code:"EPSG:4326",projection:kr,transformation:nn(1/180,1,-1/180,.5)}),wf=e({},Ht,{projection:kr,transformation:nn(1,0,-1,0),scale:function(o){return Math.pow(2,o)},zoom:function(o){return Math.log(o)/Math.LN2},distance:function(o,l){var u=l.lng-o.lng,p=l.lat-o.lat;return Math.sqrt(u*u+p*p)},infinite:!0});Ht.Earth=Nt,Ht.EPSG3395=bf,Ht.EPSG3857=er,Ht.EPSG900913=Td,Ht.EPSG4326=zl,Ht.Simple=wf;var re=st.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(o){return o.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(o){return o&&o.removeLayer(this),this},getPane:function(o){return this._map.getPane(o?this.options[o]||o:this.options.pane)},addInteractiveTarget:function(o){return this._map._targets[a(o)]=this,this},removeInteractiveTarget:function(o){return delete this._map._targets[a(o)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(o){var l=o.target;if(l.hasLayer(this)){if(this._map=l,this._zoomAnimated=l._zoomAnimated,this.getEvents){var u=this.getEvents();l.on(u,this),this.once("remove",function(){l.off(u,this)},this)}this.onAdd(l),this.fire("add"),l.fire("layeradd",{layer:this})}}});ht.include({addLayer:function(o){if(!o._layerAdd)throw new Error("The provided object is not a Layer.");var l=a(o);return this._layers[l]?this:(this._layers[l]=o,o._mapToAdd=this,o.beforeAdd&&o.beforeAdd(this),this.whenReady(o._layerAdd,o),this)},removeLayer:function(o){var l=a(o);return this._layers[l]?(this._loaded&&o.onRemove(this),delete this._layers[l],this._loaded&&(this.fire("layerremove",{layer:o}),o.fire("remove")),o._map=o._mapToAdd=null,this):this},hasLayer:function(o){return a(o)in this._layers},eachLayer:function(o,l){for(var u in this._layers)o.call(l,this._layers[u]);return this},_addLayers:function(o){o=o?P(o)?o:[o]:[];for(var l=0,u=o.length;lthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&l[0]instanceof ot&&l[0].equals(l[u-1])&&l.pop(),l},_setLatLngs:function(o){we.prototype._setLatLngs.call(this,o),Qt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Qt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var o=this._renderer._bounds,l=this.options.weight,u=new W(l,l);if(o=new V(o.min.subtract(u),o.max.add(u)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}for(var p=0,g=this._rings.length,v;po.y!=g.y>o.y&&o.x<(g.x-p.x)*(o.y-p.y)/(g.y-p.y)+p.x&&(l=!l);return l||we.prototype._containsPoint.call(this,o,!0)}});function Of(o,l){return new vi(o,l)}var Me=be.extend({initialize:function(o,l){y(this,l),this._layers={},o&&this.addData(o)},addData:function(o){var l=P(o)?o:o.features,u,p,g;if(l){for(u=0,p=l.length;u0&&g.push(g[0].slice()),g}function xi(o,l){return o.feature?e({},o.feature,{geometry:l}):as(l)}function as(o){return o.type==="Feature"||o.type==="FeatureCollection"?o:{type:"Feature",properties:{},geometry:o}}var Dr={toGeoJSON:function(o){return xi(this,{type:"Point",coordinates:Or(this.getLatLng(),o)})}};is.include(Dr),Cr.include(Dr),ns.include(Dr),we.include({toGeoJSON:function(o){var l=!Qt(this._latlngs),u=rs(this._latlngs,l?1:0,!1,o);return xi(this,{type:(l?"Multi":"")+"LineString",coordinates:u})}}),vi.include({toGeoJSON:function(o){var l=!Qt(this._latlngs),u=l&&!Qt(this._latlngs[0]),p=rs(this._latlngs,u?2:l?1:0,!0,o);return l||(p=[p]),xi(this,{type:(u?"Multi":"")+"Polygon",coordinates:p})}}),_i.include({toMultiPoint:function(o){var l=[];return this.eachLayer(function(u){l.push(u.toGeoJSON(o).geometry.coordinates)}),xi(this,{type:"MultiPoint",coordinates:l})},toGeoJSON:function(o){var l=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(l==="MultiPoint")return this.toMultiPoint(o);var u=l==="GeometryCollection",p=[];return this.eachLayer(function(g){if(g.toGeoJSON){var v=g.toGeoJSON(o);if(u)p.push(v.geometry);else{var M=as(v);M.type==="FeatureCollection"?p.push.apply(p,M.features):p.push(M)}}}),u?xi(this,{geometries:p,type:"GeometryCollection"}):{type:"FeatureCollection",features:p}}});function Fl(o,l){return new Me(o,l)}var Df=Fl,ls=re.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(o,l,u){this._url=o,this._bounds=pt(l),y(this,u)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(J(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Lt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(o){return this.options.opacity=o,this._image&&this._updateOpacity(),this},setStyle:function(o){return o.opacity&&this.setOpacity(o.opacity),this},bringToFront:function(){return this._map&&mi(this._image),this},bringToBack:function(){return this._map&&gi(this._image),this},setUrl:function(o){return this._url=o,this._image&&(this._image.src=o),this},setBounds:function(o){return this._bounds=pt(o),this._map&&this._reset(),this},getEvents:function(){var o={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},setZIndex:function(o){return this.options.zIndex=o,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var o=this._url.tagName==="IMG",l=this._image=o?this._url:ft("img");if(J(l,"leaflet-image-layer"),this._zoomAnimated&&J(l,"leaflet-zoom-animated"),this.options.className&&J(l,this.options.className),l.onselectstart=d,l.onmousemove=d,l.onload=s(this.fire,this,"load"),l.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),o){this._url=l.src;return}l.src=this._url,l.alt=this.options.alt},_animateZoom:function(o){var l=this._map.getZoomScale(o.zoom),u=this._map._latLngBoundsToNewLayerBounds(this._bounds,o.zoom,o.center).min;qe(this._image,u,l)},_reset:function(){var o=this._image,l=new V(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),u=l.getSize();St(o,l.min),o.style.width=u.x+"px",o.style.height=u.y+"px"},_updateOpacity:function(){Kt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var o=this.options.errorOverlayUrl;o&&this._url!==o&&(this._url=o,this._image.src=o)},getCenter:function(){return this._bounds.getCenter()}}),If=function(o,l,u){return new ls(o,l,u)},Nl=ls.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var o=this._url.tagName==="VIDEO",l=this._image=o?this._url:ft("video");if(J(l,"leaflet-image-layer"),this._zoomAnimated&&J(l,"leaflet-zoom-animated"),this.options.className&&J(l,this.options.className),l.onselectstart=d,l.onmousemove=d,l.onloadeddata=s(this.fire,this,"load"),o){for(var u=l.getElementsByTagName("source"),p=[],g=0;g0?p:[l.src];return}P(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(l.style,"objectFit")&&(l.style.objectFit="fill"),l.autoplay=!!this.options.autoplay,l.loop=!!this.options.loop,l.muted=!!this.options.muted,l.playsInline=!!this.options.playsInline;for(var v=0;vg?(l.height=g+"px",J(o,v)):Ct(o,v),this._containerWidth=this._container.offsetWidth},_animateZoom:function(o){var l=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center),u=this._getAnchor();St(this._container,l.add(u))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var o=this._map,l=parseInt(rn(this._container,"marginBottom"),10)||0,u=this._container.offsetHeight+l,p=this._containerWidth,g=new W(this._containerLeft,-u-this._containerBottom);g._add(Xe(this._container));var v=o.layerPointToContainerPoint(g),M=E(this.options.autoPanPadding),T=E(this.options.autoPanPaddingTopLeft||M),S=E(this.options.autoPanPaddingBottomRight||M),A=o.getSize(),H=0,G=0;v.x+p+S.x>A.x&&(H=v.x+p-A.x+S.x),v.x-H-T.x<0&&(H=v.x-T.x),v.y+u+S.y>A.y&&(G=v.y+u-A.y+S.y),v.y-G-T.y<0&&(G=v.y-T.y),(H||G)&&(this.options.keepInView&&(this._autopanning=!0),o.fire("autopanstart").panBy([H,G]))}},_getAnchor:function(){return E(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),zf=function(o,l){return new hs(o,l)};ht.mergeOptions({closePopupOnClick:!0}),ht.include({openPopup:function(o,l,u){return this._initOverlay(hs,o,l,u).openOn(this),this},closePopup:function(o){return o=arguments.length?o:this._popup,o&&o.close(),this}}),re.include({bindPopup:function(o,l){return this._popup=this._initOverlay(hs,this._popup,o,l),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(o){return this._popup&&(this instanceof be||(this._popup._source=this),this._popup._prepareOpen(o||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(o){return this._popup&&this._popup.setContent(o),this},getPopup:function(){return this._popup},_openPopup:function(o){if(!(!this._popup||!this._map)){Ke(o);var l=o.layer||o.target;if(this._popup._source===l&&!(l instanceof Be)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(o.latlng);return}this._popup._source=l,this.openPopup(o.latlng)}},_movePopup:function(o){this._popup.setLatLng(o.latlng)},_onKeyPress:function(o){o.originalEvent.keyCode===13&&this._openPopup(o)}});var cs=de.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(o){de.prototype.onAdd.call(this,o),this.setOpacity(this.options.opacity),o.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(o){de.prototype.onRemove.call(this,o),o.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var o=de.prototype.getEvents.call(this);return this.options.permanent||(o.preclick=this.close),o},_initLayout:function(){var o="leaflet-tooltip",l=o+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",l),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(o){var l,u,p=this._map,g=this._container,v=p.latLngToContainerPoint(p.getCenter()),M=p.layerPointToContainerPoint(o),T=this.options.direction,S=g.offsetWidth,A=g.offsetHeight,H=E(this.options.offset),G=this._getAnchor();T==="top"?(l=S/2,u=A):T==="bottom"?(l=S/2,u=0):T==="center"?(l=S/2,u=A/2):T==="right"?(l=0,u=A/2):T==="left"?(l=S,u=A/2):M.xthis.options.maxZoom||up?this._retainParent(g,v,M,p):!1)},_retainChildren:function(o,l,u,p){for(var g=2*o;g<2*o+2;g++)for(var v=2*l;v<2*l+2;v++){var M=new W(g,v);M.z=u+1;var T=this._tileCoordsToKey(M),S=this._tiles[T];if(S&&S.active){S.retain=!0;continue}else S&&S.loaded&&(S.retain=!0);u+1this.options.maxZoom||this.options.minZoom!==void 0&&g1){this._setView(o,u);return}for(var G=g.min.y;G<=g.max.y;G++)for(var et=g.min.x;et<=g.max.x;et++){var Zt=new W(et,G);if(Zt.z=this._tileZoom,!!this._isValidTile(Zt)){var At=this._tiles[this._tileCoordsToKey(Zt)];At?At.current=!0:M.push(Zt)}}if(M.sort(function(Vt,wi){return Vt.distanceTo(v)-wi.distanceTo(v)}),M.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Jt=document.createDocumentFragment();for(et=0;etu.max.x)||!l.wrapLat&&(o.yu.max.y))return!1}if(!this.options.bounds)return!0;var p=this._tileCoordsToBounds(o);return pt(this.options.bounds).overlaps(p)},_keyToBounds:function(o){return this._tileCoordsToBounds(this._keyToTileCoords(o))},_tileCoordsToNwSe:function(o){var l=this._map,u=this.getTileSize(),p=o.scaleBy(u),g=p.add(u),v=l.unproject(p,o.z),M=l.unproject(g,o.z);return[v,M]},_tileCoordsToBounds:function(o){var l=this._tileCoordsToNwSe(o),u=new kt(l[0],l[1]);return this.options.noWrap||(u=this._map.wrapLatLngBounds(u)),u},_tileCoordsToKey:function(o){return o.x+":"+o.y+":"+o.z},_keyToTileCoords:function(o){var l=o.split(":"),u=new W(+l[0],+l[1]);return u.z=+l[2],u},_removeTile:function(o){var l=this._tiles[o];l&&(Lt(l.el),delete this._tiles[o],this.fire("tileunload",{tile:l.el,coords:this._keyToTileCoords(o)}))},_initTile:function(o){J(o,"leaflet-tile");var l=this.getTileSize();o.style.width=l.x+"px",o.style.height=l.y+"px",o.onselectstart=d,o.onmousemove=d,U.ielt9&&this.options.opacity<1&&Kt(o,this.options.opacity)},_addTile:function(o,l){var u=this._getTilePos(o),p=this._tileCoordsToKey(o),g=this.createTile(this._wrapCoords(o),s(this._tileReady,this,o));this._initTile(g),this.createTile.length<2&&N(s(this._tileReady,this,o,null,g)),St(g,u),this._tiles[p]={el:g,coords:o,current:!0},l.appendChild(g),this.fire("tileloadstart",{tile:g,coords:o})},_tileReady:function(o,l,u){l&&this.fire("tileerror",{error:l,tile:u,coords:o});var p=this._tileCoordsToKey(o);u=this._tiles[p],u&&(u.loaded=+new Date,this._map._fadeAnimated?(Kt(u.el,0),j(this._fadeFrame),this._fadeFrame=N(this._updateOpacity,this)):(u.active=!0,this._pruneTiles()),l||(J(u.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:u.el,coords:o})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),U.ielt9||!this._map._fadeAnimated?N(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(o){return o.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(o){var l=new W(this._wrapX?c(o.x,this._wrapX):o.x,this._wrapY?c(o.y,this._wrapY):o.y);return l.z=o.z,l},_pxBoundsToTileRange:function(o){var l=this.getTileSize();return new V(o.min.unscaleBy(l).floor(),o.max.unscaleBy(l).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var o in this._tiles)if(!this._tiles[o].loaded)return!1;return!0}});function Ff(o){return new pn(o)}var bi=pn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(o,l){this._url=o,l=y(this,l),l.detectRetina&&U.retina&&l.maxZoom>0?(l.tileSize=Math.floor(l.tileSize/2),l.zoomReverse?(l.zoomOffset--,l.minZoom=Math.min(l.maxZoom,l.minZoom+1)):(l.zoomOffset++,l.maxZoom=Math.max(l.minZoom,l.maxZoom-1)),l.minZoom=Math.max(0,l.minZoom)):l.zoomReverse?l.minZoom=Math.min(l.maxZoom,l.minZoom):l.maxZoom=Math.max(l.minZoom,l.maxZoom),typeof l.subdomains=="string"&&(l.subdomains=l.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(o,l){return this._url===o&&l===void 0&&(l=!0),this._url=o,l||this.redraw(),this},createTile:function(o,l){var u=document.createElement("img");return K(u,"load",s(this._tileOnLoad,this,l,u)),K(u,"error",s(this._tileOnError,this,l,u)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(u.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(u.referrerPolicy=this.options.referrerPolicy),u.alt="",u.src=this.getTileUrl(o),u},getTileUrl:function(o){var l={r:U.retina?"@2x":"",s:this._getSubdomain(o),x:o.x,y:o.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var u=this._globalTileRange.max.y-o.y;this.options.tms&&(l.y=u),l["-y"]=u}return w(this._url,e(l,this.options))},_tileOnLoad:function(o,l){U.ielt9?setTimeout(s(o,this,null,l),0):o(null,l)},_tileOnError:function(o,l,u){var p=this.options.errorTileUrl;p&&l.getAttribute("src")!==p&&(l.src=p),o(u,l)},_onTileRemove:function(o){o.tile.onload=null},_getZoomForUrl:function(){var o=this._tileZoom,l=this.options.maxZoom,u=this.options.zoomReverse,p=this.options.zoomOffset;return u&&(o=l-o),o+p},_getSubdomain:function(o){var l=Math.abs(o.x+o.y)%this.options.subdomains.length;return this.options.subdomains[l]},_abortLoading:function(){var o,l;for(o in this._tiles)if(this._tiles[o].coords.z!==this._tileZoom&&(l=this._tiles[o].el,l.onload=d,l.onerror=d,!l.complete)){l.src=O;var u=this._tiles[o].coords;Lt(l),delete this._tiles[o],this.fire("tileabort",{tile:l,coords:u})}},_removeTile:function(o){var l=this._tiles[o];if(l)return l.el.setAttribute("src",O),pn.prototype._removeTile.call(this,o)},_tileReady:function(o,l,u){if(!(!this._map||u&&u.getAttribute("src")===O))return pn.prototype._tileReady.call(this,o,l,u)}});function Zl(o,l){return new bi(o,l)}var Vl=bi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(o,l){this._url=o;var u=e({},this.defaultWmsParams);for(var p in l)p in this.options||(u[p]=l[p]);l=y(this,l);var g=l.detectRetina&&U.retina?2:1,v=this.getTileSize();u.width=v.x*g,u.height=v.y*g,this.wmsParams=u},onAdd:function(o){this._crs=this.options.crs||o.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var l=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[l]=this._crs.code,bi.prototype.onAdd.call(this,o)},getTileUrl:function(o){var l=this._tileCoordsToNwSe(o),u=this._crs,p=dt(u.project(l[0]),u.project(l[1])),g=p.min,v=p.max,M=(this._wmsVersion>=1.3&&this._crs===zl?[g.y,g.x,v.y,v.x]:[g.x,g.y,v.x,v.y]).join(","),T=bi.prototype.getTileUrl.call(this,o);return T+x(this.wmsParams,T,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+M},setParams:function(o,l){return e(this.wmsParams,o),l||this.redraw(),this}});function Nf(o,l){return new Vl(o,l)}bi.WMS=Vl,Zl.wms=Nf;var Le=re.extend({options:{padding:.1},initialize:function(o){y(this,o),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),J(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var o={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(o.zoomanim=this._onAnimZoom),o},_onAnimZoom:function(o){this._updateTransform(o.center,o.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(o,l){var u=this._map.getZoomScale(l,this._zoom),p=this._map.getSize().multiplyBy(.5+this.options.padding),g=this._map.project(this._center,l),v=p.multiplyBy(-u).add(g).subtract(this._map._getNewPixelOrigin(o,l));U.any3d?qe(this._container,v,u):St(this._container,v)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var o in this._layers)this._layers[o]._reset()},_onZoomEnd:function(){for(var o in this._layers)this._layers[o]._project()},_updatePaths:function(){for(var o in this._layers)this._layers[o]._update()},_update:function(){var o=this.options.padding,l=this._map.getSize(),u=this._map.containerPointToLayerPoint(l.multiplyBy(-o)).round();this._bounds=new V(u,u.add(l.multiplyBy(1+o*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Yl=Le.extend({options:{tolerance:0},getEvents:function(){var o=Le.prototype.getEvents.call(this);return o.viewprereset=this._onViewPreReset,o},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Le.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var o=this._container=document.createElement("canvas");K(o,"mousemove",this._onMouseMove,this),K(o,"click dblclick mousedown mouseup contextmenu",this._onClick,this),K(o,"mouseout",this._handleMouseOut,this),o._leaflet_disable_events=!0,this._ctx=o.getContext("2d")},_destroyContainer:function(){j(this._redrawRequest),delete this._ctx,Lt(this._container),xt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var o;this._redrawBounds=null;for(var l in this._layers)o=this._layers[l],o._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Le.prototype._update.call(this);var o=this._bounds,l=this._container,u=o.getSize(),p=U.retina?2:1;St(l,o.min),l.width=p*u.x,l.height=p*u.y,l.style.width=u.x+"px",l.style.height=u.y+"px",U.retina&&this._ctx.scale(2,2),this._ctx.translate(-o.min.x,-o.min.y),this.fire("update")}},_reset:function(){Le.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(o){this._updateDashArray(o),this._layers[a(o)]=o;var l=o._order={layer:o,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=l),this._drawLast=l,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(o){this._requestRedraw(o)},_removePath:function(o){var l=o._order,u=l.next,p=l.prev;u?u.prev=p:this._drawLast=p,p?p.next=u:this._drawFirst=u,delete o._order,delete this._layers[a(o)],this._requestRedraw(o)},_updatePath:function(o){this._extendRedrawBounds(o),o._project(),o._update(),this._requestRedraw(o)},_updateStyle:function(o){this._updateDashArray(o),this._requestRedraw(o)},_updateDashArray:function(o){if(typeof o.options.dashArray=="string"){var l=o.options.dashArray.split(/[, ]+/),u=[],p,g;for(g=0;g')}}catch(o){}return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Wf={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Le.prototype._update.call(this),this.fire("update"))},_initPath:function(o){var l=o._container=mn("shape");J(l,"leaflet-vml-shape "+(this.options.className||"")),l.coordsize="1 1",o._path=mn("path"),l.appendChild(o._path),this._updateStyle(o),this._layers[a(o)]=o},_addPath:function(o){var l=o._container;this._container.appendChild(l),o.options.interactive&&o.addInteractiveTarget(l)},_removePath:function(o){var l=o._container;Lt(l),o.removeInteractiveTarget(l),delete this._layers[a(o)]},_updateStyle:function(o){var l=o._stroke,u=o._fill,p=o.options,g=o._container;g.stroked=!!p.stroke,g.filled=!!p.fill,p.stroke?(l||(l=o._stroke=mn("stroke")),g.appendChild(l),l.weight=p.weight+"px",l.color=p.color,l.opacity=p.opacity,p.dashArray?l.dashStyle=P(p.dashArray)?p.dashArray.join(" "):p.dashArray.replace(/( *, *)/g," "):l.dashStyle="",l.endcap=p.lineCap.replace("butt","flat"),l.joinstyle=p.lineJoin):l&&(g.removeChild(l),o._stroke=null),p.fill?(u||(u=o._fill=mn("fill")),g.appendChild(u),u.color=p.fillColor||p.color,u.opacity=p.fillOpacity):u&&(g.removeChild(u),o._fill=null)},_updateCircle:function(o){var l=o._point.round(),u=Math.round(o._radius),p=Math.round(o._radiusY||u);this._setPath(o,o._empty()?"M0 0":"AL "+l.x+","+l.y+" "+u+","+p+" 0,"+65535*360)},_setPath:function(o,l){o._path.v=l},_bringToFront:function(o){mi(o._container)},_bringToBack:function(o){gi(o._container)}},us=U.vml?mn:Xa,gn=Le.extend({_initContainer:function(){this._container=us("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=us("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Lt(this._container),xt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Le.prototype._update.call(this);var o=this._bounds,l=o.getSize(),u=this._container;(!this._svgSize||!this._svgSize.equals(l))&&(this._svgSize=l,u.setAttribute("width",l.x),u.setAttribute("height",l.y)),St(u,o.min),u.setAttribute("viewBox",[o.min.x,o.min.y,l.x,l.y].join(" ")),this.fire("update")}},_initPath:function(o){var l=o._path=us("path");o.options.className&&J(l,o.options.className),o.options.interactive&&J(l,"leaflet-interactive"),this._updateStyle(o),this._layers[a(o)]=o},_addPath:function(o){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(o._path),o.addInteractiveTarget(o._path)},_removePath:function(o){Lt(o._path),o.removeInteractiveTarget(o._path),delete this._layers[a(o)]},_updatePath:function(o){o._project(),o._update()},_updateStyle:function(o){var l=o._path,u=o.options;l&&(u.stroke?(l.setAttribute("stroke",u.color),l.setAttribute("stroke-opacity",u.opacity),l.setAttribute("stroke-width",u.weight),l.setAttribute("stroke-linecap",u.lineCap),l.setAttribute("stroke-linejoin",u.lineJoin),u.dashArray?l.setAttribute("stroke-dasharray",u.dashArray):l.removeAttribute("stroke-dasharray"),u.dashOffset?l.setAttribute("stroke-dashoffset",u.dashOffset):l.removeAttribute("stroke-dashoffset")):l.setAttribute("stroke","none"),u.fill?(l.setAttribute("fill",u.fillColor||u.color),l.setAttribute("fill-opacity",u.fillOpacity),l.setAttribute("fill-rule",u.fillRule||"evenodd")):l.setAttribute("fill","none"))},_updatePoly:function(o,l){this._setPath(o,$a(o._parts,l))},_updateCircle:function(o){var l=o._point,u=Math.max(Math.round(o._radius),1),p=Math.max(Math.round(o._radiusY),1)||u,g="a"+u+","+p+" 0 1,0 ",v=o._empty()?"M0 0":"M"+(l.x-u)+","+l.y+g+u*2+",0 "+g+-u*2+",0 ";this._setPath(o,v)},_setPath:function(o,l){o._path.setAttribute("d",l)},_bringToFront:function(o){mi(o._path)},_bringToBack:function(o){gi(o._path)}});U.vml&&gn.include(Wf);function Ul(o){return U.svg||U.vml?new gn(o):null}ht.include({getRenderer:function(o){var l=o.options.renderer||this._getPaneRenderer(o.options.pane)||this.options.renderer||this._renderer;return l||(l=this._renderer=this._createRenderer()),this.hasLayer(l)||this.addLayer(l),l},_getPaneRenderer:function(o){if(o==="overlayPane"||o===void 0)return!1;var l=this._paneRenderers[o];return l===void 0&&(l=this._createRenderer({pane:o}),this._paneRenderers[o]=l),l},_createRenderer:function(o){return this.options.preferCanvas&&jl(o)||Ul(o)}});var Gl=vi.extend({initialize:function(o,l){vi.prototype.initialize.call(this,this._boundsToLatLngs(o),l)},setBounds:function(o){return this.setLatLngs(this._boundsToLatLngs(o))},_boundsToLatLngs:function(o){return o=pt(o),[o.getSouthWest(),o.getNorthWest(),o.getNorthEast(),o.getSouthEast()]}});function Hf(o,l){return new Gl(o,l)}gn.create=us,gn.pointsToPath=$a,Me.geometryToLayer=ss,Me.coordsToLatLng=Sr,Me.coordsToLatLngs=os,Me.latLngToCoords=Or,Me.latLngsToCoords=rs,Me.getFeature=xi,Me.asFeature=as,ht.mergeOptions({boxZoom:!0});var ql=ue.extend({initialize:function(o){this._map=o,this._container=o._container,this._pane=o._panes.overlayPane,this._resetStateTimeout=0,o.on("unload",this._destroy,this)},addHooks:function(){K(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){xt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Lt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(o){if(!o.shiftKey||o.which!==1&&o.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),an(),dr(),this._startPoint=this._map.mouseEventToContainerPoint(o),K(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(o){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),J(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(o);var l=new V(this._point,this._startPoint),u=l.getSize();St(this._box,l.min),this._box.style.width=u.x+"px",this._box.style.height=u.y+"px"},_finish:function(){this._moved&&(Lt(this._box),Ct(this._container,"leaflet-crosshair")),ln(),fr(),xt(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(o){if(!(o.which!==1&&o.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var l=new kt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(l).fire("boxzoomend",{boxZoomBounds:l})}},_onKeyDown:function(o){o.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ht.addInitHook("addHandler","boxZoom",ql),ht.mergeOptions({doubleClickZoom:!0});var Xl=ue.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(o){var l=this._map,u=l.getZoom(),p=l.options.zoomDelta,g=o.originalEvent.shiftKey?u-p:u+p;l.options.doubleClickZoom==="center"?l.setZoom(g):l.setZoomAround(o.containerPoint,g)}});ht.addInitHook("addHandler","doubleClickZoom",Xl),ht.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var $l=ue.extend({addHooks:function(){if(!this._draggable){var o=this._map;this._draggable=new Re(o._mapPane,o._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),o.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),o.on("zoomend",this._onZoomEnd,this),o.whenReady(this._onZoomEnd,this))}J(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ct(this._map._container,"leaflet-grab"),Ct(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var o=this._map;if(o._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var l=pt(this._map.options.maxBounds);this._offsetLimit=dt(this._map.latLngToContainerPoint(l.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(l.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;o.fire("movestart").fire("dragstart"),o.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(o){if(this._map.options.inertia){var l=this._lastTime=+new Date,u=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(u),this._times.push(l),this._prunePositions(l)}this._map.fire("move",o).fire("drag",o)},_prunePositions:function(o){for(;this._positions.length>1&&o-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var o=this._map.getSize().divideBy(2),l=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=l.subtract(o).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(o,l){return o-(o-l)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var o=this._draggable._newPos.subtract(this._draggable._startPos),l=this._offsetLimit;o.xl.max.x&&(o.x=this._viscousLimit(o.x,l.max.x)),o.y>l.max.y&&(o.y=this._viscousLimit(o.y,l.max.y)),this._draggable._newPos=this._draggable._startPos.add(o)}},_onPreDragWrap:function(){var o=this._worldWidth,l=Math.round(o/2),u=this._initialWorldOffset,p=this._draggable._newPos.x,g=(p-l+u)%o+l-u,v=(p+l+u)%o-l-u,M=Math.abs(g+u)0?v:-v))-l;this._delta=0,this._startTime=null,M&&(o.options.scrollWheelZoom==="center"?o.setZoom(l+M):o.setZoomAround(this._lastMousePos,l+M))}});ht.addInitHook("addHandler","scrollWheelZoom",Ql);var Zf=600;ht.mergeOptions({tapHold:U.touchNative&&U.safari&&U.mobile,tapTolerance:15});var Jl=ue.extend({addHooks:function(){K(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){xt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(o){if(clearTimeout(this._holdTimeout),o.touches.length===1){var l=o.touches[0];this._startPos=this._newPos=new W(l.clientX,l.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(K(document,"touchend",Et),K(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",l))},this),Zf),K(document,"touchend touchcancel contextmenu",this._cancel,this),K(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function o(){xt(document,"touchend",Et),xt(document,"touchend touchcancel",o)},_cancel:function(){clearTimeout(this._holdTimeout),xt(document,"touchend touchcancel contextmenu",this._cancel,this),xt(document,"touchmove",this._onMove,this)},_onMove:function(o){var l=o.touches[0];this._newPos=new W(l.clientX,l.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(o,l){var u=new MouseEvent(o,{bubbles:!0,cancelable:!0,view:window,screenX:l.screenX,screenY:l.screenY,clientX:l.clientX,clientY:l.clientY});u._simulated=!0,l.target.dispatchEvent(u)}});ht.addInitHook("addHandler","tapHold",Jl),ht.mergeOptions({touchZoom:U.touch,bounceAtZoomLimits:!0});var th=ue.extend({addHooks:function(){J(this._map._container,"leaflet-touch-zoom"),K(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ct(this._map._container,"leaflet-touch-zoom"),xt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(o){var l=this._map;if(!(!o.touches||o.touches.length!==2||l._animatingZoom||this._zooming)){var u=l.mouseEventToContainerPoint(o.touches[0]),p=l.mouseEventToContainerPoint(o.touches[1]);this._centerPoint=l.getSize()._divideBy(2),this._startLatLng=l.containerPointToLatLng(this._centerPoint),l.options.touchZoom!=="center"&&(this._pinchStartLatLng=l.containerPointToLatLng(u.add(p)._divideBy(2))),this._startDist=u.distanceTo(p),this._startZoom=l.getZoom(),this._moved=!1,this._zooming=!0,l._stop(),K(document,"touchmove",this._onTouchMove,this),K(document,"touchend touchcancel",this._onTouchEnd,this),Et(o)}},_onTouchMove:function(o){if(!(!o.touches||o.touches.length!==2||!this._zooming)){var l=this._map,u=l.mouseEventToContainerPoint(o.touches[0]),p=l.mouseEventToContainerPoint(o.touches[1]),g=u.distanceTo(p)/this._startDist;if(this._zoom=l.getScaleZoom(g,this._startZoom),!l.options.bounceAtZoomLimits&&(this._zooml.getMaxZoom()&&g>1)&&(this._zoom=l._limitZoom(this._zoom)),l.options.touchZoom==="center"){if(this._center=this._startLatLng,g===1)return}else{var v=u._add(p)._divideBy(2)._subtract(this._centerPoint);if(g===1&&v.x===0&&v.y===0)return;this._center=l.unproject(l.project(this._pinchStartLatLng,this._zoom).subtract(v),this._zoom)}this._moved||(l._moveStart(!0,!1),this._moved=!0),j(this._animRequest);var M=s(l._move,l,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=N(M,this,!0),Et(o)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,j(this._animRequest),xt(document,"touchmove",this._onTouchMove,this),xt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ht.addInitHook("addHandler","touchZoom",th),ht.BoxZoom=ql,ht.DoubleClickZoom=Xl,ht.Drag=$l,ht.Keyboard=Kl,ht.ScrollWheelZoom=Ql,ht.TapHold=Jl,ht.TouchZoom=th,n.Bounds=V,n.Browser=U,n.CRS=Ht,n.Canvas=Yl,n.Circle=Cr,n.CircleMarker=ns,n.Class=Y,n.Control=oe,n.DivIcon=Hl,n.DivOverlay=de,n.DomEvent=rf,n.DomUtil=sf,n.Draggable=Re,n.Evented=st,n.FeatureGroup=be,n.GeoJSON=Me,n.GridLayer=pn,n.Handler=ue,n.Icon=yi,n.ImageOverlay=ls,n.LatLng=ot,n.LatLngBounds=kt,n.Layer=re,n.LayerGroup=_i,n.LineUtil=vf,n.Map=ht,n.Marker=is,n.Mixin=ff,n.Path=Be,n.Point=W,n.PolyUtil=pf,n.Polygon=vi,n.Polyline=we,n.Popup=hs,n.PosAnimation=Ml,n.Projection=xf,n.Rectangle=Gl,n.Renderer=Le,n.SVG=gn,n.SVGOverlay=Wl,n.TileLayer=bi,n.Tooltip=cs,n.Transformation=tr,n.Util=q,n.VideoOverlay=Nl,n.bind=s,n.bounds=dt,n.canvas=jl,n.circle=Cf,n.circleMarker=Tf,n.control=un,n.divIcon=Bf,n.extend=e,n.featureGroup=Lf,n.geoJSON=Fl,n.geoJson=Df,n.gridLayer=Ff,n.icon=Pf,n.imageOverlay=If,n.latLng=X,n.latLngBounds=pt,n.layerGroup=Mf,n.map=af,n.marker=kf,n.point=E,n.polygon=Of,n.polyline=Sf,n.popup=zf,n.rectangle=Hf,n.setOptions=y,n.stamp=a,n.svg=Ul,n.svgOverlay=Ef,n.tileLayer=Zl,n.tooltip=Rf,n.transformation=nn,n.version=t,n.videoOverlay=Af;var Vf=window.L;n.noConflict=function(){return window.L=Vf,this},window.L=n})});var hh=zr((ps,lh)=>{(function(n,t){typeof ps=="object"&&typeof lh!="undefined"?t(ps):typeof define=="function"&&define.amd?define(["exports"],t):(n=n||self,t((n.Leaflet=n.Leaflet||{},n.Leaflet.markercluster={})))})(ps,function(n){"use strict";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(i){L.Util.setOptions(this,i),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var s=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,s?this._withAnimation:this._noAnimation),this._markerCluster=s?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(i){if(i instanceof L.LayerGroup)return this.addLayers([i]);if(!i.getLatLng)return this._nonPointGroup.addLayer(i),this.fire("layeradd",{layer:i}),this;if(!this._map)return this._needsClustering.push(i),this.fire("layeradd",{layer:i}),this;if(this.hasLayer(i))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(i,this._maxZoom),this.fire("layeradd",{layer:i}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var s=i,r=this._zoom;if(i.__parent)for(;s.__parent._zoom>=r;)s=s.__parent;return this._currentShownBounds.contains(s.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(i,s):this._animationAddLayerNonAnimated(i,s)),this},removeLayer:function(i){return i instanceof L.LayerGroup?this.removeLayers([i]):i.getLatLng?this._map?i.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(i)),this._removeLayer(i,!0),this.fire("layerremove",{layer:i}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),i.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(i)&&(this._featureGroup.removeLayer(i),i.clusterShow&&i.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,i)&&this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}),this):(this._nonPointGroup.removeLayer(i),this.fire("layerremove",{layer:i}),this)},addLayers:function(i,s){if(!L.Util.isArray(i))return this.addLayer(i);var r=this._featureGroup,a=this._nonPointGroup,h=this.options.chunkedLoading,c=this.options.chunkInterval,d=this.options.chunkProgress,f=i.length,m=0,_=!0,y;if(this._map){var x=new Date().getTime(),b=L.bind(function(){var P=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();mc)break}if(y=i[m],y instanceof L.LayerGroup){_&&(i=i.slice(),_=!1),this._extractNonGroupLayers(y,i),f=i.length;continue}if(!y.getLatLng){a.addLayer(y),s||this.fire("layeradd",{layer:y});continue}if(!this.hasLayer(y)&&(this._addLayer(y,this._maxZoom),s||this.fire("layeradd",{layer:y}),y.__parent&&y.__parent.getChildCount()===2)){var O=y.__parent.getAllChildMarkers(),I=O[0]===y?O[1]:O[0];r.removeLayer(I)}}d&&d(m,f,new Date().getTime()-x),m===f?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(b,this.options.chunkDelay)},this);b()}else for(var w=this._needsClustering;m=0;s--)i.extend(this._needsClustering[s].getLatLng());return i.extend(this._nonPointGroup.getBounds()),i},eachLayer:function(i,s){var r=this._needsClustering.slice(),a=this._needsRemoving,h,c,d;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),c=r.length-1;c>=0;c--){for(h=!0,d=a.length-1;d>=0;d--)if(a[d].layer===r[c]){h=!1;break}h&&i.call(s,r[c])}this._nonPointGroup.eachLayer(i,s)},getLayers:function(){var i=[];return this.eachLayer(function(s){i.push(s)}),i},getLayer:function(i){var s=null;return i=parseInt(i,10),this.eachLayer(function(r){L.stamp(r)===i&&(s=r)}),s},hasLayer:function(i){if(!i)return!1;var s,r=this._needsClustering;for(s=r.length-1;s>=0;s--)if(r[s]===i)return!0;for(r=this._needsRemoving,s=r.length-1;s>=0;s--)if(r[s].layer===i)return!1;return!!(i.__parent&&i.__parent._group===this)||this._nonPointGroup.hasLayer(i)},zoomToShowLayer:function(i,s){var r=this._map;typeof s!="function"&&(s=function(){});var a=function(){(r.hasLayer(i)||r.hasLayer(i.__parent))&&!this._inZoomAnimation&&(this._map.off("moveend",a,this),this.off("animationend",a,this),r.hasLayer(i)?s():i.__parent._icon&&(this.once("spiderfied",s,this),i.__parent.spiderfy()))};i._icon&&this._map.getBounds().contains(i.getLatLng())?s():i.__parent._zoom=0;r--)if(i[r]===s)return i.splice(r,1),!0},_removeFromGridUnclustered:function(i,s){for(var r=this._map,a=this._gridUnclustered,h=Math.floor(this._map.getMinZoom());s>=h&&a[s].removeObject(i,r.project(i.getLatLng(),s));s--);},_childMarkerDragStart:function(i){i.target.__dragStart=i.target._latlng},_childMarkerMoved:function(i){if(!this._ignoreMove&&!i.target.__dragStart){var s=i.target._popup&&i.target._popup.isOpen();this._moveChild(i.target,i.oldLatLng,i.latlng),s&&i.target.openPopup()}},_moveChild:function(i,s,r){i._latlng=s,this.removeLayer(i),i._latlng=r,this.addLayer(i)},_childMarkerDragEnd:function(i){var s=i.target.__dragStart;delete i.target.__dragStart,s&&this._moveChild(i.target,s,i.target._latlng)},_removeLayer:function(i,s,r){var a=this._gridClusters,h=this._gridUnclustered,c=this._featureGroup,d=this._map,f=Math.floor(this._map.getMinZoom());s&&this._removeFromGridUnclustered(i,this._maxZoom);var m=i.__parent,_=m._markers,y;for(this._arraySplice(_,i);m&&(m._childCount--,m._boundsNeedUpdate=!0,!(m._zoom"+s+"",className:"marker-cluster"+r,iconSize:new L.Point(40,40)})},_bindEvents:function(){var i=this._map,s=this.options.spiderfyOnMaxZoom,r=this.options.showCoverageOnHover,a=this.options.zoomToBoundsOnClick,h=this.options.spiderfyOnEveryZoom;(s||a||h)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),r&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),i.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(i){var s=i.layer,r=s;if(!(i.type==="clusterkeypress"&&i.originalEvent&&i.originalEvent.keyCode!==13)){for(;r._childClusters.length===1;)r=r._childClusters[0];r._zoom===this._maxZoom&&r._childCount===s._childCount&&this.options.spiderfyOnMaxZoom?s.spiderfy():this.options.zoomToBoundsOnClick&&s.zoomToBounds(),this.options.spiderfyOnEveryZoom&&s.spiderfy(),i.originalEvent&&i.originalEvent.keyCode===13&&this._map._container.focus()}},_showCoverage:function(i){var s=this._map;this._inZoomAnimation||(this._shownPolygon&&s.removeLayer(this._shownPolygon),i.layer.getChildCount()>2&&i.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(i.layer.getConvexHull(),this.options.polygonOptions),s.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var i=this.options.spiderfyOnMaxZoom,s=this.options.showCoverageOnHover,r=this.options.zoomToBoundsOnClick,a=this.options.spiderfyOnEveryZoom,h=this._map;(i||r||a)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),s&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),h.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var i=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,i),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),i),this._currentShownBounds=i}},_generateInitialClusters:function(){var i=Math.ceil(this._map.getMaxZoom()),s=Math.floor(this._map.getMinZoom()),r=this.options.maxClusterRadius,a=r;typeof r!="function"&&(a=function(){return r}),this.options.disableClusteringAtZoom!==null&&(i=this.options.disableClusteringAtZoom-1),this._maxZoom=i,this._gridClusters={},this._gridUnclustered={};for(var h=i;h>=s;h--)this._gridClusters[h]=new L.DistanceGrid(a(h)),this._gridUnclustered[h]=new L.DistanceGrid(a(h));this._topClusterLevel=new this._markerCluster(this,s-1)},_addLayer:function(i,s){var r=this._gridClusters,a=this._gridUnclustered,h=Math.floor(this._map.getMinZoom()),c,d;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(i),i.on(this._childMarkerEventHandlers,this);s>=h;s--){c=this._map.project(i.getLatLng(),s);var f=r[s].getNearObject(c);if(f){f._addChild(i),i.__parent=f;return}if(f=a[s].getNearObject(c),f){var m=f.__parent;m&&this._removeLayer(f,!1);var _=new this._markerCluster(this,s,f,i);r[s].addObject(_,this._map.project(_._cLatLng,s)),f.__parent=_,i.__parent=_;var y=_;for(d=s-1;d>m._zoom;d--)y=new this._markerCluster(this,d,y),r[d].addObject(y,this._map.project(f.getLatLng(),d));m._addChild(y),this._removeFromGridUnclustered(f,s);return}a[s].addObject(i,c)}this._topClusterLevel._addChild(i),i.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(i){i instanceof L.MarkerCluster&&i._iconNeedsUpdate&&i._updateIcon()})},_enqueue:function(i){this._queue.push(i),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var i=0;ii?(this._animationStart(),this._animationZoomOut(this._zoom,i)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(L.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(i){var s=this._maxLat;return s!==void 0&&(i.getNorth()>=s&&(i._northEast.lat=1/0),i.getSouth()<=-s&&(i._southWest.lat=-1/0)),i},_animationAddLayerNonAnimated:function(i,s){if(s===i)this._featureGroup.addLayer(i);else if(s._childCount===2){s._addToMap();var r=s.getAllChildMarkers();this._featureGroup.removeLayer(r[0]),this._featureGroup.removeLayer(r[1])}else s._updateIcon()},_extractNonGroupLayers:function(i,s){var r=i.getLayers(),a=0,h;for(s=s||[];a=0;c--)_=m[c],r.contains(_._latlng)||a.removeLayer(_)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(r,s),a.eachLayer(function(d){!(d instanceof L.MarkerCluster)&&d._icon&&d.clusterShow()}),this._topClusterLevel._recursively(r,i,s,function(d){d._recursivelyRestoreChildPositions(s)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(r,i,h,function(d){a.removeLayer(d),d.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(i,s){this._animationZoomOutSingle(this._topClusterLevel,i-1,s),this._topClusterLevel._recursivelyAddChildrenToMap(null,s,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),i,this._getExpandedVisibleBounds())},_animationAddLayer:function(i,s){var r=this,a=this._featureGroup;a.addLayer(i),s!==i&&(s._childCount>2?(s._updateIcon(),this._forceLayout(),this._animationStart(),i._setPos(this._map.latLngToLayerPoint(s.getLatLng())),i.clusterHide(),this._enqueue(function(){a.removeLayer(i),i.clusterShow(),r._animationEnd()})):(this._forceLayout(),r._animationStart(),r._animationZoomOutSingle(s,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(i,s,r){var a=this._getExpandedVisibleBounds(),h=Math.floor(this._map.getMinZoom());i._recursivelyAnimateChildrenInAndAddSelfToMap(a,h,s+1,r);var c=this;this._forceLayout(),i._recursivelyBecomeVisible(a,r),this._enqueue(function(){if(i._childCount===1){var d=i._markers[0];this._ignoreMove=!0,d.setLatLng(d.getLatLng()),this._ignoreMove=!1,d.clusterShow&&d.clusterShow()}else i._recursively(a,r,h,function(f){f._recursivelyRemoveChildrenFromMap(a,h,s+1)});c._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(i){return new L.MarkerClusterGroup(i)};var e=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(i,s,r,a){L.Marker.prototype.initialize.call(this,r?r._cLatLng||r.getLatLng():new L.LatLng(0,0),{icon:this,pane:i.options.clusterPane}),this._group=i,this._zoom=s,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,r&&this._addChild(r),a&&this._addChild(a)},getAllChildMarkers:function(i,s){i=i||[];for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r].getAllChildMarkers(i,s);for(var a=this._markers.length-1;a>=0;a--)s&&this._markers[a].__dragStart||i.push(this._markers[a]);return i},getChildCount:function(){return this._childCount},zoomToBounds:function(i){for(var s=this._childClusters.slice(),r=this._group._map,a=r.getBoundsZoom(this._bounds),h=this._zoom+1,c=r.getZoom(),d;s.length>0&&a>h;){h++;var f=[];for(d=0;dh?this._group._map.setView(this._latlng,h):a<=c?this._group._map.setView(this._latlng,c+1):this._group._map.fitBounds(this._bounds,i)},getBounds:function(){var i=new L.LatLngBounds;return i.extend(this._bounds),i},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(i,s){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(i),i instanceof L.MarkerCluster?(s||(this._childClusters.push(i),i.__parent=this),this._childCount+=i._childCount):(s||this._markers.push(i),this._childCount++),this.__parent&&this.__parent._addChild(i,!0)},_setClusterCenter:function(i){this._cLatLng||(this._cLatLng=i._cLatLng||i._latlng)},_resetBounds:function(){var i=this._bounds;i._southWest&&(i._southWest.lat=1/0,i._southWest.lng=1/0),i._northEast&&(i._northEast.lat=-1/0,i._northEast.lng=-1/0)},_recalculateBounds:function(){var i=this._markers,s=this._childClusters,r=0,a=0,h=this._childCount,c,d,f,m;if(h!==0){for(this._resetBounds(),c=0;c=0;c--)d=h[c],d._icon&&(d._setPos(s),d.clusterHide())},function(a){var h=a._childClusters,c,d;for(c=h.length-1;c>=0;c--)d=h[c],d._icon&&(d._setPos(s),d.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(i,s,r,a){this._recursively(i,a,s,function(h){h._recursivelyAnimateChildrenIn(i,h._group._map.latLngToLayerPoint(h.getLatLng()).round(),r),h._isSingleParent()&&r-1===a?(h.clusterShow(),h._recursivelyRemoveChildrenFromMap(i,s,r)):h.clusterHide(),h._addToMap()})},_recursivelyBecomeVisible:function(i,s){this._recursively(i,this._group._map.getMinZoom(),s,null,function(r){r.clusterShow()})},_recursivelyAddChildrenToMap:function(i,s,r){this._recursively(r,this._group._map.getMinZoom()-1,s,function(a){if(s!==a._zoom)for(var h=a._markers.length-1;h>=0;h--){var c=a._markers[h];r.contains(c._latlng)&&(i&&(c._backupLatlng=c.getLatLng(),c.setLatLng(i),c.clusterHide&&c.clusterHide()),a._group._featureGroup.addLayer(c))}},function(a){a._addToMap(i)})},_recursivelyRestoreChildPositions:function(i){for(var s=this._markers.length-1;s>=0;s--){var r=this._markers[s];r._backupLatlng&&(r.setLatLng(r._backupLatlng),delete r._backupLatlng)}if(i-1===this._zoom)for(var a=this._childClusters.length-1;a>=0;a--)this._childClusters[a]._restorePosition();else for(var h=this._childClusters.length-1;h>=0;h--)this._childClusters[h]._recursivelyRestoreChildPositions(i)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(i,s,r,a){var h,c;this._recursively(i,s-1,r-1,function(d){for(c=d._markers.length-1;c>=0;c--)h=d._markers[c],(!a||!a.contains(h._latlng))&&(d._group._featureGroup.removeLayer(h),h.clusterShow&&h.clusterShow())},function(d){for(c=d._childClusters.length-1;c>=0;c--)h=d._childClusters[c],(!a||!a.contains(h._latlng))&&(d._group._featureGroup.removeLayer(h),h.clusterShow&&h.clusterShow())})},_recursively:function(i,s,r,a,h){var c=this._childClusters,d=this._zoom,f,m;if(s<=d&&(a&&a(this),h&&d===r&&h(this)),d=0;f--)m=c[f],m._boundsNeedUpdate&&m._recalculateBounds(),i.intersects(m._bounds)&&m._recursively(i,s,r,a,h)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var i=this.options.opacity;return this.setOpacity(0),this.options.opacity=i,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(i){this._cellSize=i,this._sqCellSize=i*i,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(i,s){var r=this._getCoord(s.x),a=this._getCoord(s.y),h=this._grid,c=h[a]=h[a]||{},d=c[r]=c[r]||[],f=L.Util.stamp(i);this._objectPoint[f]=s,d.push(i)},updateObject:function(i,s){this.removeObject(i),this.addObject(i,s)},removeObject:function(i,s){var r=this._getCoord(s.x),a=this._getCoord(s.y),h=this._grid,c=h[a]=h[a]||{},d=c[r]=c[r]||[],f,m;for(delete this._objectPoint[L.Util.stamp(i)],f=0,m=d.length;f=0;c--){if(d=s[c],f=this.getDistant(d,i),f>0)h.push(d);else continue;f>r&&(r=f,a=d)}return{maxPoint:a,newPoints:h}},buildConvexHull:function(i,s){var r=[],a=this.findMostDistantPointFromBaseLine(i,s);return a.maxPoint?(r=r.concat(this.buildConvexHull([i[0],a.maxPoint],a.newPoints)),r=r.concat(this.buildConvexHull([a.maxPoint,i[1]],a.newPoints)),r):[i[0]]},getConvexHull:function(i){var s=!1,r=!1,a=!1,h=!1,c=null,d=null,f=null,m=null,_=null,y=null,x;for(x=i.length-1;x>=0;x--){var b=i[x];(s===!1||b.lat>s)&&(c=b,s=b.lat),(r===!1||b.lata)&&(f=b,a=b.lng),(h===!1||b.lng=0;a--)r=i[a].getLatLng(),s.push(r);return L.QuickHull.getConvexHull(s)}}),L.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var i=this.getAllChildMarkers(null,!0),s=this._group,r=s._map,a=r.latLngToLayerPoint(this._latlng),h;this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?h=this._group.options.spiderfyShapePositions(i.length,a):i.length>=this._circleSpiralSwitchover?h=this._generatePointsSpiral(i.length,a):(a.y+=10,h=this._generatePointsCircle(i.length,a)),this._animationSpiderfy(i,h)}},unspiderfy:function(i){this._group._inZoomAnimation||(this._animationUnspiderfy(i),this._group._spiderfied=null)},_generatePointsCircle:function(i,s){var r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+i),a=r/this._2PI,h=this._2PI/i,c=[],d,f;for(a=Math.max(a,35),c.length=i,d=0;d=0;m--)m=0;c--)h=a[c],r.removeLayer(h),h._preSpiderfyLatlng&&(h.setLatLng(h._preSpiderfyLatlng),delete h._preSpiderfyLatlng),h.setZIndexOffset&&h.setZIndexOffset(0),h._spiderLeg&&(s.removeLayer(h._spiderLeg),delete h._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:a}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(i,s){var r=this._group,a=r._map,h=r._featureGroup,c=this._group.options.spiderLegPolylineOptions,d,f,m,_;for(r._ignoreMove=!0,d=0;d=0;x--)O=h.layerPointToLatLng(s[x]),b=i[x],b._preSpiderfyLatlng=b._latlng,b.setLatLng(O),b.clusterShow&&b.clusterShow(),m&&(w=b._spiderLeg,P=w._path,P.style.strokeDashoffset=0,w.setStyle({opacity:y}));this.setOpacity(.3),a._ignoreMove=!1,setTimeout(function(){a._animationEnd(),a.fire("spiderfied",{cluster:r,markers:i})},200)},_animationUnspiderfy:function(i){var s=this,r=this._group,a=r._map,h=r._featureGroup,c=i?a._latLngToNewLayerPoint(this._latlng,i.zoom,i.center):a.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),f=L.Path.SVG,m,_,y,x,b,w;for(r._ignoreMove=!0,r._animationStart(),this.setOpacity(1),_=d.length-1;_>=0;_--)m=d[_],m._preSpiderfyLatlng&&(m.closePopup(),m.setLatLng(m._preSpiderfyLatlng),delete m._preSpiderfyLatlng,w=!0,m._setPos&&(m._setPos(c),w=!1),m.clusterHide&&(m.clusterHide(),w=!1),w&&h.removeLayer(m),f&&(y=m._spiderLeg,x=y._path,b=x.getTotalLength()+.1,x.style.strokeDashoffset=b,y.setStyle({opacity:0})));r._ignoreMove=!1,setTimeout(function(){var P=0;for(_=d.length-1;_>=0;_--)m=d[_],m._spiderLeg&&P++;for(_=d.length-1;_>=0;_--)m=d[_],m._spiderLeg&&(m.clusterShow&&m.clusterShow(),m.setZIndexOffset&&m.setZIndexOffset(0),P>1&&h.removeLayer(m),a.removeLayer(m._spiderLeg),delete m._spiderLeg);r._animationEnd(),r.fire("unspiderfied",{cluster:s,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(i){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(i))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(i){this._spiderfied&&this._spiderfied.unspiderfy(i)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(i){i._spiderLeg&&(this._featureGroup.removeLayer(i),i.clusterShow&&i.clusterShow(),i.setZIndexOffset&&i.setZIndexOffset(0),this._map.removeLayer(i._spiderLeg),delete i._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(i){return i?i instanceof L.MarkerClusterGroup?i=i._topClusterLevel.getAllChildMarkers():i instanceof L.LayerGroup?i=i._layers:i instanceof L.MarkerCluster?i=i.getAllChildMarkers():i instanceof L.Marker&&(i=[i]):i=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(i),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(i),this},_flagParentsIconsNeedUpdate:function(i){var s,r;for(s in i)for(r=i[s].__parent;r;)r._iconNeedsUpdate=!0,r=r.__parent},_refreshSingleMarkerModeMarkers:function(i){var s,r;for(s in i)r=i[s],this.hasLayer(r)&&r.setIcon(this._overrideMarkerIcon(r))}}),L.Marker.include({refreshIconOptions:function(i,s){var r=this.options.icon;return L.setOptions(r,i),this.setIcon(r),s&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),n.MarkerClusterGroup=t,n.MarkerCluster=e,Object.defineProperty(n,"__esModule",{value:!0})})});var Pd=zr((Ld,Qo)=>{(function(n,t){"use strict";function e(){i.width=n.innerWidth,i.height=5*d.barThickness;var m=i.getContext("2d");m.shadowBlur=d.shadowBlur,m.shadowColor=d.shadowColor;var _,y=m.createLinearGradient(0,0,i.width,0);for(_ in d.barColors)y.addColorStop(_,d.barColors[_]);m.lineWidth=d.barThickness,m.beginPath(),m.moveTo(0,d.barThickness/2),m.lineTo(Math.ceil(s*i.width),d.barThickness/2),m.strokeStyle=y,m.stroke()}var i,s,r,a=null,h=null,c=null,d={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},f={config:function(m){for(var _ in m)d.hasOwnProperty(_)&&(d[_]=m[_])},show:function(m){var _,y;r||(m?c=c||setTimeout(()=>f.show(),m):(r=!0,h!==null&&n.cancelAnimationFrame(h),i||((y=(i=t.createElement("canvas")).style).position="fixed",y.top=y.left=y.right=y.margin=y.padding=0,y.zIndex=100001,y.display="none",d.className&&i.classList.add(d.className),_="resize",m=e,(y=n).addEventListener?y.addEventListener(_,m,!1):y.attachEvent?y.attachEvent("on"+_,m):y["on"+_]=m),i.parentElement||t.body.appendChild(i),i.style.opacity=1,i.style.display="block",f.progress(0),d.autoRun&&function x(){a=n.requestAnimationFrame(x),f.progress("+"+.05*Math.pow(1-Math.sqrt(s),2))}()))},progress:function(m){return m===void 0||(typeof m=="string"&&(m=(0<=m.indexOf("+")||0<=m.indexOf("-")?s:0)+parseFloat(m)),s=1s;s++)i=this._data[s],e.globalAlpha=Math.max(i[2]/this._max,t||.05),e.drawImage(this._circle,i[0]-this._r,i[1]-this._r);var a=e.getImageData(0,0,this._width,this._height);return this._colorize(a.data,this._grad),e.putImageData(a,0,0),this},_colorize:function(t,e){for(var i,s=3,r=t.length;r>s;s+=4)i=4*t[s],i&&(t[s-3]=e[i],t[s-2]=e[i+1],t[s-1]=e[i+2])}},window.simpleheat=n})(),L.HeatLayer=(L.Layer?L.Layer:L.Class).extend({initialize:function(n,t){this._latlngs=n,L.setOptions(this,t)},setLatLngs:function(n){return this._latlngs=n,this.redraw()},addLatLng:function(n){return this._latlngs.push(n),this.redraw()},setOptions:function(n){return L.setOptions(this,n),this._heat&&this._updateOptions(),this.redraw()},redraw:function(){return!this._heat||this._frame||this._map._animating||(this._frame=L.Util.requestAnimFrame(this._redraw,this)),this},onAdd:function(n){this._map=n,this._canvas||this._initCanvas(),n._panes.overlayPane.appendChild(this._canvas),n.on("moveend",this._reset,this),n.options.zoomAnimation&&L.Browser.any3d&&n.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(n){n.getPanes().overlayPane.removeChild(this._canvas),n.off("moveend",this._reset,this),n.options.zoomAnimation&&n.off("zoomanim",this._animateZoom,this)},addTo:function(n){return n.addLayer(this),this},_initCanvas:function(){var n=this._canvas=L.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),t=L.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);n.style[t]="50% 50%";var e=this._map.getSize();n.width=e.x,n.height=e.y;var i=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(n,"leaflet-zoom-"+(i?"animated":"hide")),this._heat=simpleheat(n),this._updateOptions()},_updateOptions:function(){this._heat.radius(this.options.radius||this._heat.defaultRadius,this.options.blur),this.options.gradient&&this._heat.gradient(this.options.gradient),this.options.max&&this._heat.max(this.options.max)},_reset:function(){var n=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,n);var t=this._map.getSize();this._heat._width!==t.x&&(this._canvas.width=this._heat._width=t.x),this._heat._height!==t.y&&(this._canvas.height=this._heat._height=t.y),this._redraw()},_redraw:function(){var n,t,e,i,s,r,a,h,c,d=[],f=this._heat._r,m=this._map.getSize(),_=new L.Bounds(L.point([-f,-f]),m.add([f,f])),y=this.options.max===void 0?1:this.options.max,x=this.options.maxZoom===void 0?this._map.getMaxZoom():this.options.maxZoom,b=1/Math.pow(2,Math.max(0,Math.min(x-this._map.getZoom(),12))),w=f/2,P=[],C=this._map._getMapPanePos(),O=C.x%w,I=C.y%w;for(n=0,t=this._latlngs.length;t>n;n++)if(e=this._map.latLngToContainerPoint(this._latlngs[n]),_.contains(e)){s=Math.floor((e.x-O)/w)+2,r=Math.floor((e.y-I)/w)+2;var D=this._latlngs[n].alt!==void 0?this._latlngs[n].alt:this._latlngs[n][2]!==void 0?+this._latlngs[n][2]:1;c=D*b,P[r]=P[r]||[],i=P[r][s],i?(i[0]=(i[0]*i[2]+e.x*c)/(i[2]+c),i[1]=(i[1]*i[2]+e.y*c)/(i[2]+c),i[2]+=c):P[r][s]=[e.x,e.y,c]}for(n=0,t=P.length;t>n;n++)if(P[n])for(a=0,h=P[n].length;h>a;a++)i=P[n][a],i&&d.push([Math.round(i[0]),Math.round(i[1]),Math.min(i[2],y)]);this._heat.data(d).draw(this.options.minOpacity),this._frame=null},_animateZoom:function(n){var t=this._map.getZoomScale(n.zoom),e=this._map._getCenterOffset(n.center)._multiplyBy(-t).subtract(this._map._getMapPanePos());L.DomUtil.setTransform?L.DomUtil.setTransform(this._canvas,e,t):this._canvas.style[L.DomUtil.TRANSFORM]=L.DomUtil.getTranslateString(e)+" scale("+t+")"}}),L.heatLayer=function(n,t){return new L.HeatLayer(n,t)};var g1=Rr(hh());(function(){"use strict";var n={}.hasOwnProperty,t=[].slice;(function(){var e,i;if(this.L!=null)return this.OverlappingMarkerSpiderfier=((e=s.prototype).VERSION="0.2.6",i=2*Math.PI,e.keepSpiderfied=!1,e.nearbyDistance=20,e.circleSpiralSwitchover=9,e.circleFootSeparation=25,e.circleStartAngle=i/12,e.spiralFootSeparation=28,e.spiralLengthStart=11,e.spiralLengthFactor=5,e.legWeight=1.5,e.legColors={usual:"#222",highlighted:"#f00"},e.initMarkerArrays=function(){return this.markers=[],this.markerListeners=[]},e.addMarker=function(r){var a,h;return r._oms!=null||(r._oms=!0,h=this,a=function(){return h.spiderListener(r)},r.addEventListener("click",a),this.markerListeners.push(a),this.markers.push(r)),this},e.getMarkers=function(){return this.markers.slice(0)},e.removeMarker=function(r){var a,h;return r._omsData!=null&&this.unspiderfy(),(a=this.arrIndexOf(this.markers,r))<0||(h=this.markerListeners.splice(a,1)[0],r.removeEventListener("click",h),delete r._oms,this.markers.splice(a,1)),this},e.clearMarkers=function(){var r,a,h,c,d,f;for(this.unspiderfy(),r=a=0,h=(f=this.markers).length;a=this.circleSpiralSwitchover?this.generatePtsSpiral(w,h).reverse():this.generatePtsCircle(w,h),P=function(){var C,O,I;for(I=[],C=0,O=f.length;CMath.max(Math.min(n,e),t);function _n(n){return Fe(vn(n*2.55),0,255)}function Ne(n){return Fe(vn(n*255),0,255)}function Pe(n){return Fe(vn(n/2.55)/100,0,1)}function ch(n){return Fe(vn(n*100),0,100)}var te={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Fr=[..."0123456789ABCDEF"],rp=n=>Fr[n&15],ap=n=>Fr[(n&240)>>4]+Fr[n&15],ms=n=>(n&240)>>4===(n&15),lp=n=>ms(n.r)&&ms(n.g)&&ms(n.b)&&ms(n.a);function hp(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&te[n[1]]*17,g:255&te[n[2]]*17,b:255&te[n[3]]*17,a:t===5?te[n[4]]*17:255}:(t===7||t===9)&&(e={r:te[n[1]]<<4|te[n[2]],g:te[n[3]]<<4|te[n[4]],b:te[n[5]]<<4|te[n[6]],a:t===9?te[n[7]]<<4|te[n[8]]:255})),e}var cp=(n,t)=>n<255?t(n):"";function up(n){var t=lp(n)?rp:ap;return n?"#"+t(n.r)+t(n.g)+t(n.b)+cp(n.a,t):void 0}var dp=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ph(n,t,e){let i=t*Math.min(e,1-e),s=(r,a=(r+n/30)%12)=>e-i*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)]}function fp(n,t,e){let i=(s,r=(s+n/60)%6)=>e-e*t*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function pp(n,t,e){let i=ph(n,1,.5),s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)i[s]*=1-t-e,i[s]+=t;return i}function mp(n,t,e,i,s){return n===s?(t-e)/i+(t.5?f/(2-r-a):f/(r+a),c=mp(e,i,s,f,r),c=c*60+.5),[c|0,d||0,h]}function Wr(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(Ne)}function Hr(n,t,e){return Wr(ph,n,t,e)}function gp(n,t,e){return Wr(pp,n,t,e)}function _p(n,t,e){return Wr(fp,n,t,e)}function mh(n){return(n%360+360)%360}function yp(n){let t=dp.exec(n),e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?_n(+t[5]):Ne(+t[5]));let s=mh(+t[2]),r=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?i=gp(s,r,a):t[1]==="hsv"?i=_p(s,r,a):i=Hr(s,r,a),{r:i[0],g:i[1],b:i[2],a:e}}function vp(n,t){var e=Nr(n);e[0]=mh(e[0]+t),e=Hr(e),n.r=e[0],n.g=e[1],n.b=e[2]}function xp(n){if(!n)return;let t=Nr(n),e=t[0],i=ch(t[1]),s=ch(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${s}%, ${Pe(n.a)})`:`hsl(${e}, ${i}%, ${s}%)`}var uh={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},dh={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function bp(){let n={},t=Object.keys(dh),e=Object.keys(uh),i,s,r,a,h;for(i=0;i>16&255,r>>8&255,r&255]}return n}var gs;function wp(n){gs||(gs=bp(),gs.transparent=[0,0,0,0]);let t=gs[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var Mp=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Lp(n){let t=Mp.exec(n),e=255,i,s,r;if(t){if(t[7]!==i){let a=+t[7];e=t[8]?_n(a):Fe(a*255,0,255)}return i=+t[1],s=+t[3],r=+t[5],i=255&(t[2]?_n(i):Fe(i,0,255)),s=255&(t[4]?_n(s):Fe(s,0,255)),r=255&(t[6]?_n(r):Fe(r,0,255)),{r:i,g:s,b:r,a:e}}}function Pp(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${Pe(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}var Br=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Pi=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function kp(n,t,e){let i=Pi(Pe(n.r)),s=Pi(Pe(n.g)),r=Pi(Pe(n.b));return{r:Ne(Br(i+e*(Pi(Pe(t.r))-i))),g:Ne(Br(s+e*(Pi(Pe(t.g))-s))),b:Ne(Br(r+e*(Pi(Pe(t.b))-r))),a:n.a+e*(t.a-n.a)}}function _s(n,t,e){if(n){let i=Nr(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=Hr(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function gh(n,t){return n&&Object.assign(t||{},n)}function fh(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=Ne(n[3]))):(t=gh(n,{r:0,g:0,b:0,a:1}),t.a=Ne(t.a)),t}function Tp(n){return n.charAt(0)==="r"?Lp(n):yp(n)}var yn=class n{constructor(t){if(t instanceof n)return t;let e=typeof t,i;e==="object"?i=fh(t):e==="string"&&(i=hp(t)||wp(t)||Tp(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=gh(this._rgb);return t&&(t.a=Pe(t.a)),t}set rgb(t){this._rgb=fh(t)}rgbString(){return this._valid?Pp(this._rgb):void 0}hexString(){return this._valid?up(this._rgb):void 0}hslString(){return this._valid?xp(this._rgb):void 0}mix(t,e){if(t){let i=this.rgb,s=t.rgb,r,a=e===r?.5:e,h=2*a-1,c=i.a-s.a,d=((h*c===-1?h:(h+c)/(1+h*c))+1)/2;r=1-d,i.r=255&d*i.r+r*s.r+.5,i.g=255&d*i.g+r*s.g+.5,i.b=255&d*i.b+r*s.b+.5,i.a=a*i.a+(1-a)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=kp(this._rgb,t._rgb,e)),this}clone(){return new n(this.rgb)}alpha(t){return this._rgb.a=Ne(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=vn(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return _s(this._rgb,2,t),this}darken(t){return _s(this._rgb,2,-t),this}saturate(t){return _s(this._rgb,1,t),this}desaturate(t){return _s(this._rgb,1,-t),this}rotate(t){return vp(this._rgb,t),this}};function me(){}var Th=(()=>{let n=0;return()=>n++})();function it(n){return n==null}function bt(n){if(Array.isArray&&Array.isArray(n))return!0;let t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function rt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function Pt(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function Yt(n,t){return Pt(n)?n:t}function $(n,t){return typeof n=="undefined"?t:n}var Ch=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,jr=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function vt(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function gt(n,t,e,i){let s,r,a;if(bt(n))if(r=n.length,i)for(s=r-1;s>=0;s--)t.call(e,n[s],s);else for(s=0;sn,x:n=>n.x,y:n=>n.y};function Op(n){let t=n.split("."),e=[],i="";for(let s of t)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Dp(n){let t=Op(n);return e=>{for(let i of t){if(i==="")break;e=e&&e[i]}return e}}function Ce(n,t){return(_h[t]||(_h[t]=Dp(t)))(n)}function ks(n){return n.charAt(0).toUpperCase()+n.slice(1)}var Oi=n=>typeof n!="undefined",ke=n=>typeof n=="function",Ur=(n,t)=>{if(n.size!==t.size)return!1;for(let e of n)if(!t.has(e))return!1;return!0};function Oh(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}var ut=Math.PI,wt=2*ut,Ip=wt+ut,Ms=Number.POSITIVE_INFINITY,Ap=ut/180,Tt=ut/2,Je=ut/4,yh=ut*2/3,Te=Math.log10,ae=Math.sign;function Di(n,t,e){return Math.abs(n-t)s-r).pop(),t}function Ep(n){return typeof n=="symbol"||typeof n=="object"&&n!==null&&!(Symbol.toPrimitive in n||"toString"in n||"valueOf"in n)}function ii(n){return!Ep(n)&&!isNaN(parseFloat(n))&&isFinite(n)}function Ih(n,t){let e=Math.round(n);return e-t<=n&&e+t>=n}function qr(n,t,e){let i,s,r;for(i=0,s=n.length;ic&&d=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function Cs(n,t,e){e=e||(a=>n[a]1;)r=s+i>>1,e(r)?s=r:i=r;return{lo:s,hi:i}}var fe=(n,t,e,i)=>Cs(n,e,i?s=>{let r=n[s][t];return rn[s][t]Cs(n,e,i=>n[i][t]>=e);function zh(n,t,e){let i=0,s=n.length;for(;ii&&n[s-1]>e;)s--;return i>0||s{let i="_onData"+ks(e),s=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...r){let a=s.apply(this,r);return n._chartjs.listeners.forEach(h=>{typeof h[i]=="function"&&h[i](...r)}),a}})})}function Kr(n,t){let e=n._chartjs;if(!e)return;let i=e.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(Rh.forEach(r=>{delete n[r]}),delete n._chartjs)}function Qr(n){let t=new Set(n);return t.size===n.length?n:Array.from(t)}var Jr=function(){return typeof window=="undefined"?function(n){return n()}:window.requestAnimationFrame}();function ta(n,t){let e=[],i=!1;return function(...s){e=s,i||(i=!0,Jr.call(window,()=>{i=!1,n.apply(t,e)}))}}function Fh(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}var Ss=n=>n==="start"?"left":n==="end"?"right":"center",Rt=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,Nh=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function ea(n,t,e){let i=t.length,s=0,r=i;if(n._sorted){let{iScale:a,vScale:h,_parsed:c}=n,d=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null,f=a.axis,{min:m,max:_,minDefined:y,maxDefined:x}=a.getUserBounds();if(y){if(s=Math.min(fe(c,f,m).lo,e?i:fe(t,f,a.getPixelForValue(m)).lo),d){let b=c.slice(0,s+1).reverse().findIndex(w=>!it(w[h.axis]));s-=Math.max(0,b)}s=It(s,0,i-1)}if(x){let b=Math.max(fe(c,a.axis,_,!0).hi+1,e?0:fe(t,f,a.getPixelForValue(_),!0).hi+1);if(d){let w=c.slice(b-1).findIndex(P=>!it(P[h.axis]));b+=Math.max(0,w)}r=It(b,s,i)-s}else r=i-s}return{start:s,count:r}}function ia(n){let{xScale:t,yScale:e,_scaleRanges:i}=n,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=s,!0;let r=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,s),r}var ys=n=>n===0||n===1,vh=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*wt/e)),xh=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*wt/e)+1,ki={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Tt)+1,easeOutSine:n=>Math.sin(n*Tt),easeInOutSine:n=>-.5*(Math.cos(ut*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>ys(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>ys(n)?n:vh(n,.075,.3),easeOutElastic:n=>ys(n)?n:xh(n,.075,.3),easeInOutElastic(n){return ys(n)?n:n<.5?.5*vh(n*2,.1125,.45):.5+.5*xh(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-ki.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?ki.easeInBounce(n*2)*.5:ki.easeOutBounce(n*2-1)*.5+.5};function na(n){if(n&&typeof n=="object"){let t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function sa(n){return na(n)?n:new yn(n)}function Zr(n){return na(n)?n:new yn(n).saturate(.5).darken(.1).hexString()}var Rp=["x","y","borderWidth","radius","tension"],Bp=["color","borderColor","backgroundColor"];function Fp(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:Bp},numbers:{type:"number",properties:Rp}}),n.describe("animations",{_fallback:"animation"}),n.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Np(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var bh=new Map;function Wp(n,t){t=t||{};let e=n+JSON.stringify(t),i=bh.get(e);return i||(i=new Intl.NumberFormat(n,t),bh.set(e,i)),i}function Ai(n,t,e){return Wp(t,e).format(n)}var Wh={values(n){return bt(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";let i=this.chart.options.locale,s,r=n;if(e.length>1){let d=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(d<1e-4||d>1e15)&&(s="scientific"),r=Hp(n,e)}let a=Te(Math.abs(r)),h=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),c={notation:s,minimumFractionDigits:h,maximumFractionDigits:h};return Object.assign(c,this.options.ticks.format),Ai(n,i,c)},logarithmic(n,t,e){if(n===0)return"0";let i=e[t].significand||n/Math.pow(10,Math.floor(Te(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Wh.numeric.call(this,n,t,e):""}};function Hp(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var Mn={formatters:Wh};function Zp(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Mn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}var He=Object.create(null),Os=Object.create(null);function xn(n,t){if(!t)return n;let e=t.split(".");for(let i=0,s=e.length;ii.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,s)=>Zr(s.backgroundColor),this.hoverBorderColor=(i,s)=>Zr(s.borderColor),this.hoverColor=(i,s)=>Zr(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Vr(this,t,e)}get(t){return xn(this,t)}describe(t,e){return Vr(Os,t,e)}override(t,e){return Vr(He,t,e)}route(t,e,i,s){let r=xn(this,t),a=xn(this,i),h="_"+e;Object.defineProperties(r,{[h]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){let c=this[h],d=a[s];return rt(c)?Object.assign({},d,c):$(c,d)},set(c){this[h]=c}}})}apply(t){t.forEach(e=>e(this))}},Mt=new Yr({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Fp,Np,Zp]);function Vp(n){return!n||it(n.size)||it(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function bn(n,t,e,i,s){let r=t[s];return r||(r=t[s]=n.measureText(s).width,e.push(s)),r>i&&(i=r),i}function Hh(n,t,e,i){i=i||{};let s=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(s=i.data={},r=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let a=0,h=e.length,c,d,f,m,_;for(c=0;ce.length){for(c=0;c0&&n.stroke()}}function pe(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.xt.top-e&&n.y0&&r.strokeColor!=="",c,d;for(n.save(),n.font=s.string,Yp(n,r),c=0;c+n||0;function Is(n,t){let e={},i=rt(t),s=i?Object.keys(t):t,r=rt(n)?i?a=>$(n[a],n[t[a]]):a=>n[a]:()=>n;for(let a of s)e[a]=$p(r(a));return e}function aa(n){return Is(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Ye(n){return Is(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Bt(n){let t=aa(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Dt(n,t){n=n||{},t=t||Mt.font;let e=$(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=$(n.style,t.style);i&&!(""+i).match(qp)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);let s={family:$(n.family,t.family),lineHeight:Xp($(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:$(n.weight,t.weight),string:""};return s.string=Vp(s),s}function zi(n,t,e,i){let s=!0,r,a,h;for(r=0,a=n.length;re&&h===0?0:h+c;return{min:a(i,-Math.abs(r)),max:a(s,r)}}function Se(n,t){return Object.assign(Object.create(n),t)}function As(n,t=[""],e,i,s=()=>n[0]){let r=e||n;typeof i=="undefined"&&(i=Gh("_fallback",n));let a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:r,_fallback:i,_getTarget:s,override:h=>As([h,...n],t,r,i)};return new Proxy(a,{deleteProperty(h,c){return delete h[c],delete h._keys,delete n[0][c],!0},get(h,c){return jh(h,c,()=>sm(c,t,n,h))},getOwnPropertyDescriptor(h,c){return Reflect.getOwnPropertyDescriptor(h._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(h,c){return Mh(h).includes(c)},ownKeys(h){return Mh(h)},set(h,c,d){let f=h._storage||(h._storage=s());return h[c]=f[c]=d,delete h._keys,!0}})}function ei(n,t,e,i){let s={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:la(n,i),setContext:r=>ei(n,r,e,i),override:r=>ei(n.override(r),t,e,i)};return new Proxy(s,{deleteProperty(r,a){return delete r[a],delete n[a],!0},get(r,a,h){return jh(r,a,()=>Qp(r,a,h))},getOwnPropertyDescriptor(r,a){return r._descriptors.allKeys?Reflect.has(n,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,a)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(r,a){return Reflect.has(n,a)},ownKeys(){return Reflect.ownKeys(n)},set(r,a,h){return n[a]=h,delete r[a],!0}})}function la(n,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=n;return{allKeys:s,scriptable:e,indexable:i,isScriptable:ke(e)?e:()=>e,isIndexable:ke(i)?i:()=>i}}var Kp=(n,t)=>n?n+ks(t):t,ha=(n,t)=>rt(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function jh(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t)||t==="constructor")return n[t];let i=e();return n[t]=i,i}function Qp(n,t,e){let{_proxy:i,_context:s,_subProxy:r,_descriptors:a}=n,h=i[t];return ke(h)&&a.isScriptable(t)&&(h=Jp(t,h,n,e)),bt(h)&&h.length&&(h=tm(t,h,n,a.isIndexable)),ha(t,h)&&(h=ei(h,s,r&&r[t],a)),h}function Jp(n,t,e,i){let{_proxy:s,_context:r,_subProxy:a,_stack:h}=e;if(h.has(n))throw new Error("Recursion detected: "+Array.from(h).join("->")+"->"+n);h.add(n);let c=t(r,a||i);return h.delete(n),ha(n,c)&&(c=ca(s._scopes,s,n,c)),c}function tm(n,t,e,i){let{_proxy:s,_context:r,_subProxy:a,_descriptors:h}=e;if(typeof r.index!="undefined"&&i(n))return t[r.index%t.length];if(rt(t[0])){let c=t,d=s._scopes.filter(f=>f!==c);t=[];for(let f of c){let m=ca(d,s,n,f);t.push(ei(m,r,a&&a[n],h))}}return t}function Uh(n,t,e){return ke(n)?n(t,e):n}var em=(n,t)=>n===!0?t:typeof n=="string"?Ce(t,n):void 0;function im(n,t,e,i,s){for(let r of t){let a=em(e,r);if(a){n.add(a);let h=Uh(a._fallback,e,s);if(typeof h!="undefined"&&h!==e&&h!==i)return h}else if(a===!1&&typeof i!="undefined"&&e!==i)return null}return!1}function ca(n,t,e,i){let s=t._rootScopes,r=Uh(t._fallback,e,i),a=[...n,...s],h=new Set;h.add(i);let c=wh(h,a,e,r||e,i);return c===null||typeof r!="undefined"&&r!==e&&(c=wh(h,a,r,c,i),c===null)?!1:As(Array.from(h),[""],s,r,()=>nm(t,e,i))}function wh(n,t,e,i,s){for(;e;)e=im(n,t,e,i,s);return e}function nm(n,t,e){let i=n._getTarget();t in i||(i[t]={});let s=i[t];return bt(s)&&rt(e)?e:s||{}}function sm(n,t,e,i){let s;for(let r of t)if(s=Gh(Kp(r,n),e),typeof s!="undefined")return ha(n,s)?ca(e,i,n,s):s}function Gh(n,t){for(let e of t){if(!e)continue;let i=e[n];if(typeof i!="undefined")return i}}function Mh(n){let t=n._keys;return t||(t=n._keys=om(n._scopes)),t}function om(n){let t=new Set;for(let e of n)for(let i of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}function ua(n,t,e,i){let{iScale:s}=n,{key:r="r"}=this._parsing,a=new Array(i),h,c,d,f;for(h=0,c=i;htn==="x"?"y":"x";function am(n,t,e,i){let s=n.skip?t:n,r=t,a=e.skip?t:e,h=Ls(r,s),c=Ls(a,r),d=h/(h+c),f=c/(h+c);d=isNaN(d)?0:d,f=isNaN(f)?0:f;let m=i*d,_=i*f;return{previous:{x:r.x-m*(a.x-s.x),y:r.y-m*(a.y-s.y)},next:{x:r.x+_*(a.x-s.x),y:r.y+_*(a.y-s.y)}}}function lm(n,t,e){let i=n.length,s,r,a,h,c,d=Ci(n,0);for(let f=0;f!d.skip)),t.cubicInterpolationMode==="monotone")cm(n,s);else{let d=i?n[n.length-1]:n[0];for(r=0,a=n.length;rn.ownerDocument.defaultView.getComputedStyle(n,null);function dm(n,t){return Rs(n).getPropertyValue(t)}var fm=["top","right","bottom","left"];function ti(n,t,e){let i={};e=e?"-"+e:"";for(let s=0;s<4;s++){let r=fm[s];i[r]=parseFloat(n[t+"-"+r+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}var pm=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function mm(n,t){let e=n.touches,i=e&&e.length?e[0]:n,{offsetX:s,offsetY:r}=i,a=!1,h,c;if(pm(s,r,n.target))h=s,c=r;else{let d=t.getBoundingClientRect();h=i.clientX-d.left,c=i.clientY-d.top,a=!0}return{x:h,y:c,box:a}}function je(n,t){if("native"in n)return n;let{canvas:e,currentDevicePixelRatio:i}=t,s=Rs(e),r=s.boxSizing==="border-box",a=ti(s,"padding"),h=ti(s,"border","width"),{x:c,y:d,box:f}=mm(n,e),m=a.left+(f&&h.left),_=a.top+(f&&h.top),{width:y,height:x}=t;return r&&(y-=a.width+h.width,x-=a.height+h.height),{x:Math.round((c-m)/y*e.width/i),y:Math.round((d-_)/x*e.height/i)}}function gm(n,t,e){let i,s;if(t===void 0||e===void 0){let r=n&&zs(n);if(!r)t=n.clientWidth,e=n.clientHeight;else{let a=r.getBoundingClientRect(),h=Rs(r),c=ti(h,"border","width"),d=ti(h,"padding");t=a.width-d.width-c.width,e=a.height-d.height-c.height,i=Ps(h.maxWidth,r,"clientWidth"),s=Ps(h.maxHeight,r,"clientHeight")}}return{width:t,height:e,maxWidth:i||Ms,maxHeight:s||Ms}}var xs=n=>Math.round(n*10)/10;function $h(n,t,e,i){let s=Rs(n),r=ti(s,"margin"),a=Ps(s.maxWidth,n,"clientWidth")||Ms,h=Ps(s.maxHeight,n,"clientHeight")||Ms,c=gm(n,t,e),{width:d,height:f}=c;if(s.boxSizing==="content-box"){let _=ti(s,"border","width"),y=ti(s,"padding");d-=y.width+_.width,f-=y.height+_.height}return d=Math.max(0,d-r.width),f=Math.max(0,i?d/i:f-r.height),d=xs(Math.min(d,a,c.maxWidth)),f=xs(Math.min(f,h,c.maxHeight)),d&&!f&&(f=xs(d/2)),(t!==void 0||e!==void 0)&&i&&c.height&&f>c.height&&(f=c.height,d=xs(Math.floor(f*i))),{width:d,height:f}}function da(n,t,e){let i=t||1,s=Math.floor(n.height*i),r=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);let a=n.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${n.height}px`,a.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||a.height!==s||a.width!==r?(n.currentDevicePixelRatio=i,a.height=s,a.width=r,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}var Kh=function(){let n=!1;try{let t={get passive(){return n=!0,!1}};Es()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return n}();function fa(n,t){let e=dm(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function We(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Qh(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Jh(n,t,e,i){let s={x:n.cp2x,y:n.cp2y},r={x:t.cp1x,y:t.cp1y},a=We(n,s,e),h=We(s,r,e),c=We(r,t,e),d=We(a,h,e),f=We(h,c,e);return We(d,f,e)}var _m=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},ym=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function ni(n,t,e){return n?_m(t,e):ym()}function pa(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function ma(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function tc(n){return n==="angle"?{between:Ii,compare:zp,normalize:zt}:{between:ge,compare:(t,e)=>t-e,normalize:t=>t}}function Lh({start:n,end:t,count:e,loop:i,style:s}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:s}}function vm(n,t,e){let{property:i,start:s,end:r}=e,{between:a,normalize:h}=tc(i),c=t.length,{start:d,end:f,loop:m}=n,_,y;if(m){for(d+=c,f+=c,_=0,y=c;_c(s,O,P)&&h(s,O)!==0,D=()=>h(r,P)===0||c(r,O,P),z=()=>b||I(),R=()=>!b||D();for(let B=f,N=f;B<=m;++B)C=t[B%a],!C.skip&&(P=d(C[i]),P!==O&&(b=c(P,s,r),w===null&&z()&&(w=h(P,s)===0?B:N),w!==null&&R()&&(x.push(Lh({start:w,end:B,loop:_,count:a,style:y})),w=null),N=B,O=P));return w!==null&&x.push(Lh({start:w,end:m,loop:_,count:a,style:y})),x}function _a(n,t){let e=[],i=n.segments;for(let s=0;ss&&n[r%t].skip;)r--;return r%=t,{start:s,end:r}}function bm(n,t,e,i){let s=n.length,r=[],a=t,h=n[t],c;for(c=t+1;c<=e;++c){let d=n[c%s];d.skip||d.stop?h.skip||(i=!1,r.push({start:t%s,end:(c-1)%s,loop:i}),t=a=d.stop?c:null):(a=c,h.skip&&(t=c)),h=d}return a!==null&&r.push({start:t%s,end:a%s,loop:i}),r}function ec(n,t){let e=n.points,i=n.options.spanGaps,s=e.length;if(!s)return[];let r=!!n._loop,{start:a,end:h}=xm(e,s,r,i);if(i===!0)return Ph(n,[{start:a,end:h,loop:r}],e,t);let c=hh({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Jr.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;let r=i.items,a=r.length-1,h=!1,c;for(;a>=0;--a)c=r[a],c._active?(c._total>i.duration&&(i.duration=c._total),c.tick(t),h=!0):(r[a]=r[r.length-1],r.pop());h&&(s.draw(),this._notify(s,i,t,"progress")),r.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=r.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let i=e.items,s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},Oe=new Oa,ic="transparent",Pm={boolean(n,t,e){return e>.5?t:n},color(n,t,e){let i=sa(n||ic),s=i.valid&&sa(t||ic);return s&&s.valid?s.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}},Da=class{constructor(t,e,i,s){let r=e[i];s=zi([t.to,s,r,t.from]);let a=zi([t.from,r,s]);this._active=!0,this._fn=t.fn||Pm[t.type||typeof a],this._easing=ki[t.easing]||ki.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);let s=this._target[this._prop],r=i-this._start,a=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=zi([t.to,e,s,t.from]),this._from=zi([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,i=this._duration,s=this._prop,r=this._from,a=this._loop,h=this._to,c;if(this._active=r!==h&&(a||e1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[s]=this._fn(r,h,c)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){let e=t?"res":"rej",i=this._promises||[];for(let s=0;s{let r=t[s];if(!rt(r))return;let a={};for(let h of e)a[h]=r[h];(bt(r.properties)&&r.properties||[s]).forEach(h=>{(h===s||!i.has(h))&&i.set(h,a)})})}_animateOptions(t,e){let i=e.options,s=Tm(t,i);if(!s)return[];let r=this._createAnimations(s,i);return i.$shared&&km(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,e){let i=this._properties,s=[],r=t.$animations||(t.$animations={}),a=Object.keys(e),h=Date.now(),c;for(c=a.length-1;c>=0;--c){let d=a[c];if(d.charAt(0)==="$")continue;if(d==="options"){s.push(...this._animateOptions(t,e));continue}let f=e[d],m=r[d],_=i.get(d);if(m)if(_&&m.active()){m.update(_,f,h);continue}else m.cancel();if(!_||!_.duration){t[d]=f;continue}r[d]=m=new Da(_,t,d,f),s.push(m)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let i=this._createAnimations(t,e);if(i.length)return Oe.add(this._chart,i),!0}};function km(n,t){let e=[],i=Object.keys(t);for(let s=0;s0||!e&&r<0)return s.index}return null}function rc(n,t){let{chart:e,_cachedMeta:i}=n,s=e._stacks||(e._stacks={}),{iScale:r,vScale:a,index:h}=i,c=r.axis,d=a.axis,f=Dm(r,a,i),m=t.length,_;for(let y=0;ye[i].axis===t).shift()}function Em(n,t){return Se(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function zm(n,t,e){return Se(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function kn(n,t){let e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(let s of t){let r=s._stacks;if(!r||r[i]===void 0||r[i][e]===void 0)return;delete r[i][e],r[i]._visualValues!==void 0&&r[i]._visualValues[e]!==void 0&&delete r[i]._visualValues[e]}}}var ba=n=>n==="reset"||n==="none",ac=(n,t)=>t?n:Object.assign({},n),Rm=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:eu(e,!0),values:null},Xt=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=va(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&kn(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(m,_,y,x)=>m==="x"?_:m==="r"?x:y,r=e.xAxisID=$(i.xAxisID,xa(t,"x")),a=e.yAxisID=$(i.yAxisID,xa(t,"y")),h=e.rAxisID=$(i.rAxisID,xa(t,"r")),c=e.indexAxis,d=e.iAxisID=s(c,r,a,h),f=e.vAxisID=s(c,a,r,h);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(h),e.iScale=this.getScaleForId(d),e.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Kr(this._data,this),t._stacked&&kn(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(rt(e)){let s=this._cachedMeta;this._data=Om(e,s)}else if(i!==e){if(i){Kr(i,this);let s=this._cachedMeta;kn(s),s._parsed=[]}e&&Object.isExtensible(e)&&Bh(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,i=this.getDataset(),s=!1;this._dataCheck();let r=e._stacked;e._stacked=va(e.vScale,e),e.stack!==i.stack&&(s=!0,kn(e),e.stack=i.stack),this._resyncElements(t),(s||r!==e._stacked)&&(rc(this,e._parsed),e._stacked=va(e.vScale,e))}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:a}=i,h=r.axis,c=t===0&&e===s.length?!0:i._sorted,d=t>0&&i._parsed[t-1],f,m,_;if(this._parsing===!1)i._parsed=s,i._sorted=!0,_=s;else{bt(s[t])?_=this.parseArrayData(i,s,t,e):rt(s[t])?_=this.parseObjectData(i,s,t,e):_=this.parsePrimitiveData(i,s,t,e);let y=()=>m[h]===null||d&&m[h]b||m=0;--_)if(!x()){this.updateRangeFromParsed(d,t,y,c);break}}return d}getAllParsedValues(t){let e=this._cachedMeta._parsed,i=[],s,r,a;for(s=0,r=e.length;s=0&&tthis.getContext(i,s,e),b=d.resolveNamedOptions(_,y,x,m);return b.$shared&&(b.$shared=c,r[a]=Object.freeze(ac(b,c))),b}_resolveAnimations(t,e,i){let s=this.chart,r=this._cachedDataOpts,a=`animation-${e}`,h=r[a];if(h)return h;let c;if(s.options.animation!==!1){let f=this.chart.config,m=f.datasetAnimationScopeKeys(this._type,e),_=f.getOptionScopes(this.getDataset(),m);c=f.createResolver(_,this.getContext(t,i,e))}let d=new js(s,c&&c.animations);return c&&c._cacheable&&(r[a]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ba(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,r=this.getSharedOptions(i),a=this.includeOptions(e,r)||r!==s;return this.updateSharedOptions(r,e,i),{sharedOptions:r,includeOptions:a}}updateElement(t,e,i,s){ba(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!ba(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;let r=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,i=this._cachedMeta.data;for(let[h,c,d]of this._syncList)this[h](c,d);this._syncList=[];let s=i.length,r=e.length,a=Math.min(r,s);a&&this.parse(0,a),r>s?this._insertElements(s,r-s,t):r{for(d.length+=e,h=d.length-1;h>=a;h--)d[h]=d[h-e]};for(c(r),h=t;hs-r))}return n._cache.$bar}function Fm(n){let t=n.iScale,e=Bm(t,n.type),i=t._length,s,r,a,h,c=()=>{a===32767||a===-32768||(Oi(h)&&(i=Math.min(i,Math.abs(a-h)||i)),h=a)};for(s=0,r=e.length;s0?s[n-1]:null,h=nMath.abs(h)&&(c=h,d=a),t[e.axis]=d,t._custom={barStart:c,barEnd:d,start:s,end:r,min:a,max:h}}function iu(n,t,e,i){return bt(n)?Hm(n,t,e,i):t[e.axis]=e.parse(n,i),t}function lc(n,t,e,i){let s=n.iScale,r=n.vScale,a=s.getLabels(),h=s===r,c=[],d,f,m,_;for(d=e,f=e+i;d=e?1:-1)}function Vm(n){let t,e,i,s,r;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.basef.controller.options.grouped),r=i.options.stacked,a=[],h=this._cachedMeta.controller.getParsed(e),c=h&&h[i.axis],d=f=>{let m=f._parsed.find(y=>y[i.axis]===c),_=m&&m[f.vScale.axis];if(it(_)||isNaN(_))return!0};for(let f of s)if(!(e!==void 0&&d(f))&&((r===!1||a.indexOf(f.stack)===-1||r===void 0&&f.stack===void 0)&&a.push(f.stack),f.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===e).shift()}_getAxis(){let t={},e=this.getFirstScaleIdForIndexAxis();for(let i of this.chart.data.datasets)t[$(this.chart.options.indexAxis==="x"?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){let s=this._getStacks(t,i),r=e!==void 0?s.indexOf(e):-1;return r===-1?s.length-1:r}_getRuler(){let t=this.options,e=this._cachedMeta,i=e.iScale,s=[],r,a;for(r=0,a=e.data.length;r=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=e,a=this.getParsed(t),h=s.getLabelForValue(a.x),c=r.getLabelForValue(a.y),d=a._custom;return{label:i[t]||"",value:"("+h+", "+c+(d?", "+d:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){let r=s==="reset",{iScale:a,vScale:h}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,s),f=a.axis,m=h.axis;for(let _=e;_Ii(O,h,c,!0)?1:Math.max(I,I*e,D,D*e),x=(O,I,D)=>Ii(O,h,c,!0)?-1:Math.min(I,I*e,D,D*e),b=y(0,d,m),w=y(Tt,f,_),P=x(ut,d,m),C=x(ut+Tt,f,_);i=(b-P)/2,s=(w-C)/2,r=-(b+P)/2,a=-(w+C)/2}return{ratioX:i,ratioY:s,offsetX:r,offsetY:a}}var Ie=class extends Xt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let r=c=>+i[c];if(rt(i[t])){let{key:c="value"}=this._parsing;r=d=>+Ce(i[d],c)}let a,h;for(a=t,h=t+e;a0&&!isNaN(t)?wt*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Ai(e._parsed[t],i.options.locale);return{label:s[t]||"",value:r}}getMaxBorderWidth(t){let e=0,i=this.chart,s,r,a,h,c;if(!t){for(s=0,r=i.data.datasets.length;st!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),k(Ie,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((r,a)=>{let c=t.getDatasetMeta(0).controller.getStyle(a);return{text:r,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});var Ni=class extends Xt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:i,data:s=[],_dataset:r}=e,a=this.chart._animationsDisabled,{start:h,count:c}=ea(e,s,a);this._drawStart=h,this._drawCount=c,ia(e)&&(h=0,c=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=s;let d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:d},t),this.updateElements(s,h,c,t)}updateElements(t,e,i,s){let r=s==="reset",{iScale:a,vScale:h,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:f,includeOptions:m}=this._getSharedOptions(e,s),_=a.axis,y=h.axis,{spanGaps:x,segment:b}=this.options,w=ii(x)?x:Number.POSITIVE_INFINITY,P=this.chart._animationsDisabled||r||s==="none",C=e+i,O=t.length,I=e>0&&this.getParsed(e-1);for(let D=0;D=C){R.skip=!0;continue}let B=this.getParsed(D),N=it(B[y]),j=R[_]=a.getPixelForValue(B[_],D),q=R[y]=r||N?h.getBasePixel():h.getPixelForValue(c?this.applyStack(h,B,c):B[y],D);R.skip=isNaN(j)||isNaN(q)||N,R.stop=D>0&&Math.abs(B[_]-I[_])>w,b&&(R.parsed=B,R.raw=d.data[D]),m&&(R.options=f||this.resolveDataElementOptions(D,z.active?"active":s)),P||this.updateElement(z,D,R,s),I=B}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;let r=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,r,a)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};k(Ni,"id","line"),k(Ni,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),k(Ni,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});var li=class extends Xt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Ai(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:r}}parseObjectData(t,e,i,s){return ua.bind(this)(t,e,i,s)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,s)=>{let r=this.getParsed(s).r;!isNaN(r)&&this.chart.getDataVisibility(s)&&(re.max&&(e.max=r))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(s/2,0),a=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),h=(r-a)/t.getVisibleDatasetCount();this.outerRadius=r-h*this.index,this.innerRadius=this.outerRadius-h}updateElements(t,e,i,s){let r=s==="reset",a=this.chart,c=a.options.animation,d=this._cachedMeta.rScale,f=d.xCenter,m=d.yCenter,_=d.getIndexAngle(0)-.5*ut,y=_,x,b=360/this.countVisibleElements();for(x=0;x{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?ee(this.resolveDataElementOptions(t,e).angle||i):0}};k(li,"id","polarArea"),k(li,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),k(li,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((r,a)=>{let c=t.getDatasetMeta(0).controller.getStyle(a);return{text:r,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});var Dn=class extends Ie{};k(Dn,"id","pie"),k(Dn,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});var Wi=class extends Xt{getLabelAndValue(t){let e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return ua.bind(this)(t,e,i,s)}update(t){let e=this._cachedMeta,i=e.dataset,s=e.data||[],r=e.iScale.getLabels();if(i.points=s,t!=="resize"){let a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);let h={_loop:!0,_fullLoop:r.length===s.length,options:a};this.updateElement(i,void 0,h,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){let r=this._cachedMeta.rScale,a=s==="reset";for(let h=e;h0&&this.getParsed(e-1);for(let I=e;I0&&Math.abs(z[y]-O[y])>P,w&&(R.parsed=z,R.raw=d.data[I]),_&&(R.options=m||this.resolveDataElementOptions(I,D.active?"active":s)),C||this.updateElement(D,I,R,s),O=z}this.updateSharedOptions(m,s,f)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let h=0;for(let c=e.length-1;c>=0;--c)h=Math.max(h,e[c].size(this.resolveDataElementOptions(c))/2);return h>0&&h}let i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;let r=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,r,a)/2}};k(Hi,"id","scatter"),k(Hi,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),k(Hi,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var qm=Object.freeze({__proto__:null,BarController:Bi,BubbleController:Fi,DoughnutController:Ie,LineController:Ni,PieController:Dn,PolarAreaController:li,RadarController:Wi,ScatterController:Hi});function si(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Ia=class n{constructor(t){k(this,"options");this.options=t||{}}static override(t){Object.assign(n.prototype,t)}init(){}formats(){return si()}parse(){return si()}format(){return si()}add(){return si()}diff(){return si()}startOf(){return si()}endOf(){return si()}},Ya={_date:Ia};function Xm(n,t,e,i){let{controller:s,data:r,_sorted:a}=n,h=s._cachedMeta.iScale,c=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null;if(h&&t===h.axis&&t!=="r"&&a&&r.length){let d=h._reversePixels?Eh:fe;if(i){if(s._sharedOptions){let f=r[0],m=typeof f.getRange=="function"&&f.getRange(t);if(m){let _=d(r,t,e-m),y=d(r,t,e+m);return{lo:_.lo,hi:y.hi}}}}else{let f=d(r,t,e);if(c){let{vScale:m}=s._cachedMeta,{_parsed:_}=n,y=_.slice(0,f.lo+1).reverse().findIndex(b=>!it(b[m.axis]));f.lo-=Math.max(0,y);let x=_.slice(f.hi).findIndex(b=>!it(b[m.axis]));f.hi+=Math.max(0,x)}return f}}return{lo:0,hi:r.length-1}}function Zn(n,t,e,i,s){let r=n.getSortedVisibleDatasetMetas(),a=e[t];for(let h=0,c=r.length;h{c[a]&&c[a](t[e],s)&&(r.push({element:c,datasetIndex:d,index:f}),h=h||c.inRange(t.x,t.y,s))}),i&&!h?[]:r}var Jm={evaluateInteractionItems:Zn,modes:{index(n,t,e,i){let s=je(t,n),r=e.axis||"x",a=e.includeInvisible||!1,h=e.intersect?Ma(n,s,r,i,a):La(n,s,r,!1,i,a),c=[];return h.length?(n.getSortedVisibleDatasetMetas().forEach(d=>{let f=h[0].index,m=d.data[f];m&&!m.skip&&c.push({element:m,datasetIndex:d.index,index:f})}),c):[]},dataset(n,t,e,i){let s=je(t,n),r=e.axis||"xy",a=e.includeInvisible||!1,h=e.intersect?Ma(n,s,r,i,a):La(n,s,r,!1,i,a);if(h.length>0){let c=h[0].datasetIndex,d=n.getDatasetMeta(c).data;h=[];for(let f=0;fe.pos===t)}function dc(n,t){return n.filter(e=>nu.indexOf(e.pos)===-1&&e.box.axis===t)}function Cn(n,t){return n.sort((e,i)=>{let s=t?i:e,r=t?e:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function tg(n){let t=[],e,i,s,r,a,h;for(e=0,i=(n||[]).length;ed.box.fullSize),!0),i=Cn(Tn(t,"left"),!0),s=Cn(Tn(t,"right")),r=Cn(Tn(t,"top"),!0),a=Cn(Tn(t,"bottom")),h=dc(t,"x"),c=dc(t,"y");return{fullSize:e,leftAndTop:i.concat(r),rightAndBottom:s.concat(c).concat(a).concat(h),chartArea:Tn(t,"chartArea"),vertical:i.concat(s).concat(c),horizontal:r.concat(a).concat(h)}}function fc(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function su(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function sg(n,t,e,i){let{pos:s,box:r}=e,a=n.maxPadding;if(!rt(s)){e.size&&(n[s]-=e.size);let m=i[e.stack]||{size:0,count:1};m.size=Math.max(m.size,e.horizontal?r.height:r.width),e.size=m.size/m.count,n[s]+=e.size}r.getPadding&&su(a,r.getPadding());let h=Math.max(0,t.outerWidth-fc(a,n,"left","right")),c=Math.max(0,t.outerHeight-fc(a,n,"top","bottom")),d=h!==n.w,f=c!==n.h;return n.w=h,n.h=c,e.horizontal?{same:d,other:f}:{same:f,other:d}}function og(n){let t=n.maxPadding;function e(i){let s=Math.max(t[i]-n[i],0);return n[i]+=s,s}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function rg(n,t){let e=t.maxPadding;function i(s){let r={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{r[a]=Math.max(t[a],e[a])}),r}return i(n?["left","right"]:["top","bottom"])}function In(n,t,e,i){let s=[],r,a,h,c,d,f;for(r=0,a=n.length,d=0;r{typeof b.beforeLayout=="function"&&b.beforeLayout()});let f=c.reduce((b,w)=>w.box.options&&w.box.options.display===!1?b:b+1,0)||1,m=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:r,availableHeight:a,vBoxMaxWidth:r/2/f,hBoxMaxHeight:a/2}),_=Object.assign({},s);su(_,Bt(i));let y=Object.assign({maxPadding:_,w:r,h:a,x:s.left,y:s.top},s),x=ig(c.concat(d),m);In(h.fullSize,y,m,x),In(c,y,m,x),In(d,y,m,x)&&In(c,y,m,x),og(y),pc(h.leftAndTop,y,m,x),y.x+=y.w,y.y+=y.h,pc(h.rightAndBottom,y,m,x),n.chartArea={left:y.left,top:y.top,right:y.left+y.w,bottom:y.top+y.h,height:y.h,width:y.w},gt(h.chartArea,b=>{let w=b.box;Object.assign(w,n.chartArea),w.update(y.w,y.h,{left:0,top:0,right:0,bottom:0})})}},Us=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}},Aa=class extends Us{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},Vs="$chartjs",ag={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},mc=n=>n===null||n==="";function lg(n,t){let e=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[Vs]={initial:{height:i,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",mc(s)){let r=fa(n,"width");r!==void 0&&(n.width=r)}if(mc(i))if(n.style.height==="")n.height=n.width/(t||2);else{let r=fa(n,"height");r!==void 0&&(n.height=r)}return n}var ou=Kh?{passive:!0}:!1;function hg(n,t,e){n&&n.addEventListener(t,e,ou)}function cg(n,t,e){n&&n.canvas&&n.canvas.removeEventListener(t,e,ou)}function ug(n,t){let e=ag[n.type]||n.type,{x:i,y:s}=je(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Gs(n,t){for(let e of n)if(e===t||e.contains(t))return!0}function dg(n,t,e){let i=n.canvas,s=new MutationObserver(r=>{let a=!1;for(let h of r)a=a||Gs(h.addedNodes,i),a=a&&!Gs(h.removedNodes,i);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function fg(n,t,e){let i=n.canvas,s=new MutationObserver(r=>{let a=!1;for(let h of r)a=a||Gs(h.removedNodes,i),a=a&&!Gs(h.addedNodes,i);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}var Nn=new Map,gc=0;function ru(){let n=window.devicePixelRatio;n!==gc&&(gc=n,Nn.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function pg(n,t){Nn.size||window.addEventListener("resize",ru),Nn.set(n,t)}function mg(n){Nn.delete(n),Nn.size||window.removeEventListener("resize",ru)}function gg(n,t,e){let i=n.canvas,s=i&&zs(i);if(!s)return;let r=ta((h,c)=>{let d=s.clientWidth;e(h,c),d{let c=h[0],d=c.contentRect.width,f=c.contentRect.height;d===0&&f===0||r(d,f)});return a.observe(s),pg(n,r),a}function Pa(n,t,e){e&&e.disconnect(),t==="resize"&&mg(n)}function _g(n,t,e){let i=n.canvas,s=ta(r=>{n.ctx!==null&&e(ug(r,n))},n);return hg(i,t,s),s}var Ea=class extends Us{acquireContext(t,e){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(lg(t,e),i):null}releaseContext(t){let e=t.canvas;if(!e[Vs])return!1;let i=e[Vs].initial;["height","width"].forEach(r=>{let a=i[r];it(a)?e.removeAttribute(r):e.setAttribute(r,a)});let s=i.style||{};return Object.keys(s).forEach(r=>{e.style[r]=s[r]}),e.width=e.width,delete e[Vs],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={}),a={attach:dg,detach:fg,resize:gg}[e]||_g;s[e]=a(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Pa,detach:Pa,resize:Pa}[e]||cg)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return $h(t,e,i,s)}isAttached(t){let e=t&&zs(t);return!!(e&&e.isConnected)}};function yg(n){return!Es()||typeof OffscreenCanvas!="undefined"&&n instanceof OffscreenCanvas?Aa:Ea}var $t=class{constructor(){k(this,"x");k(this,"y");k(this,"active",!1);k(this,"options");k(this,"$animations")}tooltipPosition(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return ii(this.x)&&ii(this.y)}getProps(t,e){let i=this.$animations;if(!e||!i)return this;let s={};return t.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}};k($t,"defaults",{}),k($t,"defaultRoutes");function vg(n,t){let e=n.options.ticks,i=xg(n),s=Math.min(e.maxTicksLimit||i,i),r=e.major.enabled?wg(t):[],a=r.length,h=r[0],c=r[a-1],d=[];if(a>s)return Mg(t,d,r,a/s),d;let f=bg(r,t,s);if(a>0){let m,_,y=a>1?Math.round((c-h)/(a-1)):null;for(Fs(t,d,f,it(y)?0:h-y,h),m=0,_=a-1;m<_;m++)Fs(t,d,f,r[m],r[m+1]);return Fs(t,d,f,c,it(y)?t.length:c+y),d}return Fs(t,d,f),d}function xg(n){let t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),s=n._maxLength/e;return Math.floor(Math.min(i,s))}function bg(n,t,e){let i=Lg(n),s=t.length/e;if(!i)return Math.max(s,1);let r=Dh(i);for(let a=0,h=r.length-1;as)return c}return Math.max(s,1)}function wg(n){let t=[],e,i;for(e=0,i=n.length;en==="left"?"right":n==="right"?"left":n,_c=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,yc=(n,t)=>Math.min(t||n,n);function vc(n,t){let e=[],i=n.length/t,s=n.length,r=0;for(;ra+h)))return c}function Tg(n,t){gt(n,e=>{let i=e.gc,s=i.length/2,r;if(s>t){for(r=0;ri?i:e,i=s&&e>i?e:i,{min:Yt(e,Yt(i,e)),max:Yt(i,Yt(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){vt(this.options.beforeUpdate,[this])}update(t,e,i){let{beginAtZero:s,grace:r,ticks:a}=this.options,h=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Yh(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let c=h=r||i<=1||!this.isHorizontal()){this.labelRotation=s;return}let f=this._getLabelSizes(),m=f.widest.width,_=f.highest.height,y=It(this.chart.width-m,0,this.maxWidth);h=t.offset?this.maxWidth/i:y/(i-1),m+6>h&&(h=y/(i-(t.offset?.5:1)),c=this.maxHeight-Sn(t.grid)-e.padding-xc(t.title,this.chart.options.font),d=Math.sqrt(m*m+_*_),a=Ts(Math.min(Math.asin(It((f.highest.height+6)/h,-1,1)),Math.asin(It(c/d,-1,1))-Math.asin(It(_/d,-1,1)))),a=Math.max(s,Math.min(r,a))),this.labelRotation=a}afterCalculateLabelRotation(){vt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){vt(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:r}}=this,a=this._isVisible(),h=this.isHorizontal();if(a){let c=xc(s,e.options.font);if(h?(t.width=this.maxWidth,t.height=Sn(r)+c):(t.height=this.maxHeight,t.width=Sn(r)+c),i.display&&this.ticks.length){let{first:d,last:f,widest:m,highest:_}=this._getLabelSizes(),y=i.padding*2,x=ee(this.labelRotation),b=Math.cos(x),w=Math.sin(x);if(h){let P=i.mirror?0:w*m.width+b*_.height;t.height=Math.min(this.maxHeight,t.height+P+y)}else{let P=i.mirror?0:b*m.width+w*_.height;t.width=Math.min(this.maxWidth,t.width+P+y)}this._calculatePadding(d,f,w,b)}}this._handleMargins(),h?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){let{ticks:{align:r,padding:a},position:h}=this.options,c=this.labelRotation!==0,d=h!=="top"&&this.axis==="x";if(this.isHorizontal()){let f=this.getPixelForTick(0)-this.left,m=this.right-this.getPixelForTick(this.ticks.length-1),_=0,y=0;c?d?(_=s*t.width,y=i*e.height):(_=i*t.height,y=s*e.width):r==="start"?y=e.width:r==="end"?_=t.width:r!=="inner"&&(_=t.width/2,y=e.width/2),this.paddingLeft=Math.max((_-f+a)*this.width/(this.width-f),0),this.paddingRight=Math.max((y-m+a)*this.width/(this.width-m),0)}else{let f=e.height/2,m=t.height/2;r==="start"?(f=0,m=t.height):r==="end"&&(f=e.height,m=0),this.paddingTop=f+a,this.paddingBottom=m+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){vt(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e({width:a[N]||0,height:h[N]||0});return{first:B(0),last:B(e-1),widest:B(z),highest:B(R),widths:a,heights:h}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Ah(this._alignToPixels?Ze(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&th*s?h/i:c/s:c*s0}_computeGridLineItems(t){let e=this.axis,i=this.chart,s=this.options,{grid:r,position:a,border:h}=s,c=r.offset,d=this.isHorizontal(),m=this.ticks.length+(c?1:0),_=Sn(r),y=[],x=h.setContext(this.getContext()),b=x.display?x.width:0,w=b/2,P=function(W){return Ze(i,W,b)},C,O,I,D,z,R,B,N,j,q,Y,nt;if(a==="top")C=P(this.bottom),R=this.bottom-_,N=C-w,q=P(t.top)+w,nt=t.bottom;else if(a==="bottom")C=P(this.top),q=t.top,nt=P(t.bottom)-w,R=C+w,N=this.top+_;else if(a==="left")C=P(this.right),z=this.right-_,B=C-w,j=P(t.left)+w,Y=t.right;else if(a==="right")C=P(this.left),j=t.left,Y=P(t.right)-w,z=C+w,B=this.left+_;else if(e==="x"){if(a==="center")C=P((t.top+t.bottom)/2+.5);else if(rt(a)){let W=Object.keys(a)[0],yt=a[W];C=P(this.chart.scales[W].getPixelForValue(yt))}q=t.top,nt=t.bottom,R=C+w,N=R+_}else if(e==="y"){if(a==="center")C=P((t.left+t.right)/2);else if(rt(a)){let W=Object.keys(a)[0],yt=a[W];C=P(this.chart.scales[W].getPixelForValue(yt))}z=C-w,B=z-_,j=t.left,Y=t.right}let lt=$(s.ticks.maxTicksLimit,m),st=Math.max(1,Math.ceil(m/lt));for(O=0;O0&&(Nt-=X/2);break}kt={left:Nt,top:Ht,width:X+pt.width,height:ot+pt.height,color:st.backdropColor}}w.push({label:I,font:N,textOffset:Y,options:{rotation:b,color:yt,strokeColor:E,strokeWidth:V,textAlign:dt,textBaseline:nt,translation:[D,z],backdrop:kt}})}return w}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-ee(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){let{position:e,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,a=this._getLabelSizes(),h=t+r,c=a.widest.width,d,f;return e==="left"?s?(f=this.right+r,i==="near"?d="left":i==="center"?(d="center",f+=c/2):(d="right",f+=c)):(f=this.right-h,i==="near"?d="right":i==="center"?(d="center",f-=c/2):(d="left",f=this.left)):e==="right"?s?(f=this.left+r,i==="near"?d="right":i==="center"?(d="center",f-=c/2):(d="left",f-=c)):(f=this.left+h,i==="near"?d="left":i==="center"?(d="center",f+=c/2):(d="right",f=this.right)):d="right",{textAlign:d,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){let{ctx:t,options:{backgroundColor:e},left:i,top:s,width:r,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,r,a),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let s=this.ticks.findIndex(r=>r.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){let e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),r,a,h=(c,d,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(c.x,c.y),i.lineTo(d.x,d.y),i.stroke(),i.restore())};if(e.display)for(r=0,a=s.length;r{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[],r,a;for(r=0,a=e.length;r{let i=e.split("."),s=i.pop(),r=[n].concat(i).join("."),a=t[e].split("."),h=a.pop(),c=a.join(".");Mt.route(r,s,c,h)})}function Eg(n){return"id"in n&&"defaults"in n}var za=class{constructor(){this.controllers=new Yi(Xt,"datasets",!0),this.elements=new Yi($t,"elements"),this.plugins=new Yi(Object,"plugins"),this.scales=new Yi(ci,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(s=>{let r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(t,r,s):gt(s,a=>{let h=i||this._getRegistryForType(a);this._exec(t,h,a)})})}_exec(t,e,i){let s=ks(t);vt(i["before"+s],[],i),e[t](i),vt(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;er.filter(h=>!a.some(c=>h.plugin.id===c.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}};function zg(n){let t={},e=[],i=Object.keys(ye.plugins.items);for(let r=0;r1&&bc(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function wc(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function Zg(n,t){if(t.data&&t.data.datasets){let e=t.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(e.length)return wc(n,"x",e[0])||wc(n,"y",e[0])}return{}}function Vg(n,t){let e=He[n.type]||{scales:{}},i=t.scales||{},s=Ba(n.type,t),r=Object.create(null);return Object.keys(i).forEach(a=>{let h=i[a];if(!rt(h))return console.error(`Invalid scale configuration for scale: ${a}`);if(h._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let c=Fa(a,h,Zg(a,n),Mt.scales[h.type]),d=Wg(c,s),f=e.scales||{};r[a]=Si(Object.create(null),[{axis:c},h,f[c],f[d]])}),n.data.datasets.forEach(a=>{let h=a.type||n.type,c=a.indexAxis||Ba(h,t),f=(He[h]||{}).scales||{};Object.keys(f).forEach(m=>{let _=Ng(m,c),y=a[_+"AxisID"]||_;r[y]=r[y]||Object.create(null),Si(r[y],[{axis:_},i[y],f[m]])})}),Object.keys(r).forEach(a=>{let h=r[a];Si(h,[Mt.scales[h.type],Mt.scale])}),r}function au(n){let t=n.options||(n.options={});t.plugins=$(t.plugins,{}),t.scales=Vg(n,t)}function lu(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Yg(n){return n=n||{},n.data=lu(n.data),au(n),n}var Mc=new Map,hu=new Set;function Ns(n,t){let e=Mc.get(n);return e||(e=t(),Mc.set(n,e),hu.add(e)),e}var On=(n,t,e)=>{let i=Ce(t,e);i!==void 0&&n.add(i)},Na=class{constructor(t){this._config=Yg(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=lu(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),au(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ns(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ns(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ns(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return Ns(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let i=this._scopeCache,s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){let{options:s,type:r}=this,a=this._cachedScopes(t,i),h=a.get(e);if(h)return h;let c=new Set;e.forEach(f=>{t&&(c.add(t),f.forEach(m=>On(c,t,m))),f.forEach(m=>On(c,s,m)),f.forEach(m=>On(c,He[r]||{},m)),f.forEach(m=>On(c,Mt,m)),f.forEach(m=>On(c,Os,m))});let d=Array.from(c);return d.length===0&&d.push(Object.create(null)),hu.has(e)&&a.set(e,d),d}chartOptionScopes(){let{options:t,type:e}=this;return[t,He[e]||{},Mt.datasets[e]||{},{type:e},Mt,Os]}resolveNamedOptions(t,e,i,s=[""]){let r={$shared:!0},{resolver:a,subPrefixes:h}=Lc(this._resolverCache,t,s),c=a;if(Ug(a,e)){r.$shared=!1,i=ke(i)?i():i;let d=this.createResolver(t,i,h);c=ei(a,i,d)}for(let d of e)r[d]=c[d];return r}createResolver(t,e,i=[""],s){let{resolver:r}=Lc(this._resolverCache,t,i);return rt(e)?ei(r,e,void 0,s):r}};function Lc(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));let s=e.join(),r=i.get(s);return r||(r={resolver:As(t,e),subPrefixes:e.filter(h=>!h.toLowerCase().includes("hover"))},i.set(s,r)),r}var jg=n=>rt(n)&&Object.getOwnPropertyNames(n).some(t=>ke(n[t]));function Ug(n,t){let{isScriptable:e,isIndexable:i}=la(n);for(let s of t){let r=e(s),a=i(s),h=(a||r)&&n[s];if(r&&(ke(h)||jg(h))||a&&bt(h))return!0}return!1}var Gg="4.5.0",qg=["top","bottom","left","right","chartArea"];function Pc(n,t){return n==="top"||n==="bottom"||qg.indexOf(n)===-1&&t==="x"}function kc(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function Tc(n){let t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),vt(e&&e.onComplete,[n],t)}function Xg(n){let t=n.chart,e=t.options.animation;vt(e&&e.onProgress,[n],t)}function cu(n){return Es()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}var Ys={},Cc=n=>{let t=cu(n);return Object.values(Ys).filter(e=>e.canvas===t).pop()};function $g(n,t,e){let i=Object.keys(n);for(let s of i){let r=+s;if(r>=t){let a=n[s];delete n[s],(e>0||r>t)&&(n[r+e]=a)}}}function Kg(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}var ie=class{static register(...t){ye.add(...t),Sc()}static unregister(...t){ye.remove(...t),Sc()}constructor(t,e){let i=this.config=new Na(e),s=cu(t),r=Cc(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");let a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||yg(s)),this.platform.updateConfig(i);let h=this.platform.acquireContext(s,a.aspectRatio),c=h&&h.canvas,d=c&&c.height,f=c&&c.width;if(this.id=Th(),this.ctx=h,this.canvas=c,this.width=f,this.height=d,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Ra,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Fh(m=>this.update(m),a.resizeDelay||0),this._dataChanges=[],Ys[this.id]=this,!h||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Oe.listen(this,"complete",Tc),Oe.listen(this,"progress",Xg),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:r}=this;return it(t)?e&&r?r:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ye}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():da(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return oa(this.canvas,this.ctx),this}stop(){return Oe.stop(this),this}resize(t,e){Oe.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let i=this.options,s=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,t,e,r),h=i.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,da(this,h,!0)&&(this.notifyPlugins("resize",{size:a}),vt(i.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};gt(e,(i,s)=>{i.id=s})}buildOrUpdateScales(){let t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce((a,h)=>(a[h]=!1,a),{}),r=[];e&&(r=r.concat(Object.keys(e).map(a=>{let h=e[a],c=Fa(a,h),d=c==="r",f=c==="x";return{options:h,dposition:d?"chartArea":f?"bottom":"left",dtype:d?"radialLinear":f?"category":"linear"}}))),gt(r,a=>{let h=a.options,c=h.id,d=Fa(c,h),f=$(h.type,a.dtype);(h.position===void 0||Pc(h.position,d)!==Pc(a.dposition))&&(h.position=a.dposition),s[c]=!0;let m=null;if(c in i&&i[c].type===f)m=i[c];else{let _=ye.getScale(f);m=new _({id:c,type:f,ctx:this.ctx,chart:this}),i[m.id]=m}m.init(h,t)}),gt(s,(a,h)=>{a||delete i[h]}),gt(i,a=>{Wt.configure(this,a,a.options),Wt.addBox(this,a)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((s,r)=>s.index-r.index),i>e){for(let s=e;se.length&&delete this._stacks,t.forEach((i,s)=>{e.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let d=0,f=this.data.datasets.length;d{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(kc("z","_idx"));let{_active:h,_lastEvent:c}=this;c?this._eventHandler(c,!0):h.length&&this._updateHoverStyles(h,h,!0),this.render()}_updateScales(){gt(this.scales,t=>{Wt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Ur(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:i,start:s,count:r}of e){let a=i==="_removeElements"?-r:r;$g(t,s,a)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,i=r=>new Set(t.filter(a=>a[0]===r).map((a,h)=>h+","+a.splice(1).join(","))),s=i(0);for(let r=1;rr.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Wt.update(this,this.width,this.height,t);let e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],gt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,i={meta:t,index:t.index,cancelable:!0},s=ya(this,t);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(s&&Ln(e,s),t.controller.draw(),s&&Pn(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return pe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){let r=Jm.modes[e];return typeof r=="function"?r(this,t,i,s):[]}getDatasetMeta(t){let e=this.data.datasets[t],i=this._metasets,s=i.filter(r=>r&&r._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Se(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){let i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){let s=i?"show":"hide",r=this.getDatasetMeta(t),a=r.controller._resolveAnimations(void 0,s);Oi(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(r,{visible:i}),this.update(h=>h.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Oe.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,r,a),t[r]=a},s=(r,a,h)=>{r.offsetX=a,r.offsetY=h,this._eventHandler(r)};gt(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,i=(c,d)=>{e.addEventListener(this,c,d),t[c]=d},s=(c,d)=>{t[c]&&(e.removeEventListener(this,c,d),delete t[c])},r=(c,d)=>{this.canvas&&this.resize(c,d)},a,h=()=>{s("attach",h),this.attached=!0,this.resize(),i("resize",r),i("detach",a)};a=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),i("attach",h)},e.isAttached(this.canvas)?h():a()}unbindEvents(){gt(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},gt(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){let s=i?"set":"remove",r,a,h,c;for(e==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),h=0,c=t.length;h{let h=this.getDatasetMeta(r);if(!h)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:h.data[a],index:a}});!wn(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){let s=this.options.hover,r=(c,d)=>c.filter(f=>!d.some(m=>f.datasetIndex===m.datasetIndex&&f.index===m.index)),a=r(e,t),h=i?t:r(t,e);a.length&&this.updateHoverStyle(a,s.mode,!1),h.length&&s.mode&&this.updateHoverStyle(h,s.mode,!0)}_eventHandler(t,e){let i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;let r=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(t,e,i){let{_active:s=[],options:r}=this,a=e,h=this._getActiveElements(t,s,i,a),c=Oh(t),d=Kg(t,this._lastEvent,i,c);i&&(this._lastEvent=null,vt(r.onHover,[t,h,this],this),c&&vt(r.onClick,[t,h,this],this));let f=!wn(h,s);return(f||e)&&(this._active=h,this._updateHoverStyles(h,s,e)),this._lastEvent=d,f}_getActiveElements(t,e,i,s){if(t.type==="mouseout")return[];if(!i)return e;let r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,s)}};k(ie,"defaults",Mt),k(ie,"instances",Ys),k(ie,"overrides",He),k(ie,"registry",ye),k(ie,"version",Gg),k(ie,"getChart",Cc);function Sc(){return gt(ie.instances,n=>n._plugins.invalidate())}function Qg(n,t,e){let{startAngle:i,x:s,y:r,outerRadius:a,innerRadius:h,options:c}=t,{borderWidth:d,borderJoinStyle:f}=c,m=Math.min(d/a,zt(i-e));if(n.beginPath(),n.arc(s,r,a-d/2,i+m/2,e-m/2),h>0){let _=Math.min(d/h,zt(i-e));n.arc(s,r,h+d/2,e-_/2,i+_/2,!0)}else{let _=Math.min(d/2,a*zt(i-e));if(f==="round")n.arc(s,r,_,e-ut/2,i+ut/2,!0);else if(f==="bevel"){let y=2*_*_,x=-y*Math.cos(e+ut/2)+s,b=-y*Math.sin(e+ut/2)+r,w=y*Math.cos(i+ut/2)+s,P=y*Math.sin(i+ut/2)+r;n.lineTo(x,b),n.lineTo(w,P)}}n.closePath(),n.moveTo(0,0),n.rect(0,0,n.canvas.width,n.canvas.height),n.clip("evenodd")}function Jg(n,t,e){let{startAngle:i,pixelMargin:s,x:r,y:a,outerRadius:h,innerRadius:c}=t,d=s/h;n.beginPath(),n.arc(r,a,h,i-d,e+d),c>s?(d=s/c,n.arc(r,a,c,e+d,i-d,!0)):n.arc(r,a,s,e+Tt,i-Tt),n.closePath(),n.clip()}function t_(n){return Is(n,["outerStart","outerEnd","innerStart","innerEnd"])}function e_(n,t,e,i){let s=t_(n.options.borderRadius),r=(e-t)/2,a=Math.min(r,i*t/2),h=c=>{let d=(e-Math.min(r,c))*i/2;return It(c,0,Math.min(r,d))};return{outerStart:h(s.outerStart),outerEnd:h(s.outerEnd),innerStart:It(s.innerStart,0,a),innerEnd:It(s.innerEnd,0,a)}}function Ri(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function qs(n,t,e,i,s,r){let{x:a,y:h,startAngle:c,pixelMargin:d,innerRadius:f}=t,m=Math.max(t.outerRadius+i+e-d,0),_=f>0?f+i+e+d:0,y=0,x=s-c;if(i){let st=f>0?f-i:0,W=m>0?m-i:0,yt=(st+W)/2,E=yt!==0?x*yt/(yt+i):x;y=(x-E)/2}let b=Math.max(.001,x*m-e/ut)/m,w=(x-b)/2,P=c+w+y,C=s-w-y,{outerStart:O,outerEnd:I,innerStart:D,innerEnd:z}=e_(t,_,m,C-P),R=m-O,B=m-I,N=P+O/R,j=C-I/B,q=_+D,Y=_+z,nt=P+D/q,lt=C-z/Y;if(n.beginPath(),r){let st=(N+j)/2;if(n.arc(a,h,m,N,st),n.arc(a,h,m,st,j),I>0){let V=Ri(B,j,a,h);n.arc(V.x,V.y,I,j,C+Tt)}let W=Ri(Y,C,a,h);if(n.lineTo(W.x,W.y),z>0){let V=Ri(Y,lt,a,h);n.arc(V.x,V.y,z,C+Tt,lt+Math.PI)}let yt=(C-z/_+(P+D/_))/2;if(n.arc(a,h,_,C-z/_,yt,!0),n.arc(a,h,_,yt,P+D/_,!0),D>0){let V=Ri(q,nt,a,h);n.arc(V.x,V.y,D,nt+Math.PI,P-Tt)}let E=Ri(R,P,a,h);if(n.lineTo(E.x,E.y),O>0){let V=Ri(R,N,a,h);n.arc(V.x,V.y,O,P-Tt,N)}}else{n.moveTo(a,h);let st=Math.cos(N)*m+a,W=Math.sin(N)*m+h;n.lineTo(st,W);let yt=Math.cos(j)*m+a,E=Math.sin(j)*m+h;n.lineTo(yt,E)}n.closePath()}function i_(n,t,e,i,s){let{fullCircles:r,startAngle:a,circumference:h}=t,c=t.endAngle;if(r){qs(n,t,e,i,c,s);for(let d=0;d=ut&&y===0&&f!=="miter"&&Qg(n,t,b),r||(qs(n,t,e,i,b,s),n.stroke())}var ri=class extends $t{constructor(e){super();k(this,"circumference");k(this,"endAngle");k(this,"fullCircles");k(this,"innerRadius");k(this,"outerRadius");k(this,"pixelMargin");k(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,i,s){let r=this.getProps(["x","y"],s),{angle:a,distance:h}=$r(r,{x:e,y:i}),{startAngle:c,endAngle:d,innerRadius:f,outerRadius:m,circumference:_}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),y=(this.options.spacing+this.options.borderWidth)/2,x=$(_,d-c),b=Ii(a,c,d)&&c!==d,w=x>=wt||b,P=ge(h,f+y,m+y);return w&&P}getCenterPoint(e){let{x:i,y:s,startAngle:r,endAngle:a,innerRadius:h,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:d,spacing:f}=this.options,m=(r+a)/2,_=(h+c+f+d)/2;return{x:i+Math.cos(m)*_,y:s+Math.sin(m)*_}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:i,circumference:s}=this,r=(i.offset||0)/4,a=(i.spacing||0)/2,h=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>wt?Math.floor(s/wt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let c=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(c)*r,Math.sin(c)*r);let d=1-Math.sin(Math.min(ut,s||0)),f=r*d;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,i_(e,this,f,a,h),n_(e,this,f,a,h),e.restore()}};k(ri,"id","arc"),k(ri,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),k(ri,"defaultRoutes",{backgroundColor:"backgroundColor"}),k(ri,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function uu(n,t,e=t){n.lineCap=$(e.borderCapStyle,t.borderCapStyle),n.setLineDash($(e.borderDash,t.borderDash)),n.lineDashOffset=$(e.borderDashOffset,t.borderDashOffset),n.lineJoin=$(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=$(e.borderWidth,t.borderWidth),n.strokeStyle=$(e.borderColor,t.borderColor)}function s_(n,t,e){n.lineTo(e.x,e.y)}function o_(n){return n.stepped?Zh:n.tension||n.cubicInterpolationMode==="monotone"?Vh:s_}function du(n,t,e={}){let i=n.length,{start:s=0,end:r=i-1}=e,{start:a,end:h}=t,c=Math.max(s,a),d=Math.min(r,h),f=sh&&r>h;return{count:i,start:c,loop:t.loop,ilen:d(a+(d?h-I:I))%r,O=()=>{b!==w&&(n.lineTo(f,w),n.lineTo(f,b),n.lineTo(f,P))};for(c&&(y=s[C(0)],n.moveTo(y.x,y.y)),_=0;_<=h;++_){if(y=s[C(_)],y.skip)continue;let I=y.x,D=y.y,z=I|0;z===x?(Dw&&(w=D),f=(m*f+I)/++m):(O(),n.lineTo(I,D),x=z,m=0,b=w=D),P=D}O()}function Wa(n){let t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?a_:r_}function l_(n){return n.stepped?Qh:n.tension||n.cubicInterpolationMode==="monotone"?Jh:We}function h_(n,t,e,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,i)&&s.closePath()),uu(n,t.options),n.stroke(s)}function c_(n,t,e,i){let{segments:s,options:r}=t,a=Wa(t);for(let h of s)uu(n,r,h.style),n.beginPath(),a(n,t,h,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}var u_=typeof Path2D=="function";function d_(n,t,e,i){u_&&!t.options.segment?h_(n,t,e,i):c_(n,t,e,i)}var ve=class extends $t{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){let s=i.spanGaps?this._loop:this._fullLoop;Xh(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=ec(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){let i=this.options,s=t[e],r=this.points,a=_a(this,{property:e,start:s,end:s});if(!a.length)return;let h=[],c=l_(i),d,f;for(d=0,f=a.length;dt!=="borderDash"&&t!=="fill"});function Oc(n,t,e,i){let s=n.options,{[e]:r}=n.getProps([e],i);return Math.abs(t-r)n.replace("rgb(","rgba(").replace(")",", 0.5)"));function pu(n){return Ha[n%Ha.length]}function mu(n){return Dc[n%Dc.length]}function v_(n,t){return n.borderColor=pu(t),n.backgroundColor=mu(t),++t}function x_(n,t){return n.backgroundColor=n.data.map(()=>pu(t++)),t}function b_(n,t){return n.backgroundColor=n.data.map(()=>mu(t++)),t}function w_(n){let t=0;return(e,i)=>{let s=n.getDatasetMeta(i).controller;s instanceof Ie?t=x_(e,t):s instanceof li?t=b_(e,t):s&&(t=v_(e,t))}}function Ic(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function M_(n){return n&&(n.borderColor||n.backgroundColor)}function L_(){return Mt.borderColor!=="rgba(0,0,0,0.1)"||Mt.backgroundColor!=="rgba(0,0,0,0.1)"}var P_={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;let{data:{datasets:i},options:s}=n.config,{elements:r}=s,a=Ic(i)||M_(s)||r&&Ic(r)||L_();if(!e.forceOverride&&a)return;let h=w_(n);i.forEach(h)}};function k_(n,t,e,i,s){let r=s.samples||i;if(r>=e)return n.slice(t,t+e);let a=[],h=(e-2)/(r-2),c=0,d=t+e-1,f=t,m,_,y,x,b;for(a[c++]=n[f],m=0;my&&(y=x,_=n[C],b=C);a[c++]=_,f=b}return a[c++]=n[d],a}function T_(n,t,e,i){let s=0,r=0,a,h,c,d,f,m,_,y,x,b,w=[],P=t+e-1,C=n[t].x,I=n[P].x-C;for(a=t;ab&&(b=d,_=a),s=(r*s+h.x)/++r;else{let z=a-1;if(!it(m)&&!it(_)){let R=Math.min(m,_),B=Math.max(m,_);R!==y&&R!==z&&w.push(Li(Mi({},n[R]),{x:s})),B!==y&&B!==z&&w.push(Li(Mi({},n[B]),{x:s}))}a>0&&z!==y&&w.push(n[z]),w.push(h),f=D,r=0,x=b=d,m=_=y=a}}return w}function gu(n){if(n._decimated){let t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Ac(n){n.data.datasets.forEach(t=>{gu(t)})}function C_(n,t){let e=t.length,i=0,s,{iScale:r}=n,{min:a,max:h,minDefined:c,maxDefined:d}=r.getUserBounds();return c&&(i=It(fe(t,r.axis,a).lo,0,e-1)),d?s=It(fe(t,r.axis,h).hi+1,i,e)-i:s=e-i,{start:i,count:s}}var S_={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Ac(n);return}let i=n.width;n.data.datasets.forEach((s,r)=>{let{_data:a,indexAxis:h}=s,c=n.getDatasetMeta(r),d=a||s.data;if(zi([h,n.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;let f=n.scales[c.xAxisID];if(f.type!=="linear"&&f.type!=="time"||n.options.parsing)return;let{start:m,count:_}=C_(c,d),y=e.threshold||4*i;if(_<=y){gu(s);return}it(a)&&(s._data=d,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(b){this._data=b}}));let x;switch(e.algorithm){case"lttb":x=k_(d,m,_,i,e);break;case"min-max":x=T_(d,m,_,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=x})},destroy(n){Ac(n)}};function O_(n,t,e){let i=n.segments,s=n.points,r=t.points,a=[];for(let h of i){let{start:c,end:d}=h;d=Ks(c,d,s);let f=Za(e,s[c],s[d],h.loop);if(!t.segments){a.push({source:h,target:f,start:s[c],end:s[d]});continue}let m=_a(t,f);for(let _ of m){let y=Za(e,r[_.start],r[_.end],_.loop),x=ga(h,s,y);for(let b of x)a.push({source:b,target:_,start:{[e]:Ec(f,y,"start",Math.max)},end:{[e]:Ec(f,y,"end",Math.min)}})}}return a}function Za(n,t,e,i){if(i)return;let s=t[n],r=e[n];return n==="angle"&&(s=zt(s),r=zt(r)),{property:n,start:s,end:r}}function D_(n,t){let{x:e=null,y:i=null}=n||{},s=t.points,r=[];return t.segments.forEach(({start:a,end:h})=>{h=Ks(a,h,s);let c=s[a],d=s[h];i!==null?(r.push({x:c.x,y:i}),r.push({x:d.x,y:i})):e!==null&&(r.push({x:e,y:c.y}),r.push({x:e,y:d.y}))}),r}function Ks(n,t,e){for(;t>n;t--){let i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Ec(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function _u(n,t){let e=[],i=!1;return bt(n)?(i=!0,e=n):e=D_(n,t),e.length?new ve({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function zc(n){return n&&n.fill!==!1}function I_(n,t,e){let s=n[t].fill,r=[t],a;if(!e)return s;for(;s!==!1&&r.indexOf(s)===-1;){if(!Pt(s))return s;if(a=n[s],!a)return!1;if(a.visible)return s;r.push(s),s=a.fill}return!1}function A_(n,t,e){let i=B_(n);if(rt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Pt(s)&&Math.floor(s)===s?E_(i[0],t,s,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function E_(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function z_(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:rt(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function R_(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:rt(n)?i=n.value:i=t.getBaseValue(),i}function B_(n){let t=n.options,e=t.fill,i=$(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function F_(n){let{scale:t,index:e,line:i}=n,s=[],r=i.segments,a=i.points,h=N_(t,e);h.push(_u({x:null,y:t.bottom},i));for(let c=0;c=0;--a){let h=s[a].$filler;h&&(h.line.updateControlPoints(r,h.axis),i&&h.fill&&Ca(n.ctx,h,r))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){let r=i[s].$filler;zc(r)&&Ca(n.ctx,r,n.chartArea)}},beforeDatasetDraw(n,t,e){let i=t.meta.$filler;!zc(i)||e.drawTime!=="beforeDatasetDraw"||Ca(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Nc=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},$_=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index,$s=class extends $t{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=vt(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let i=t.labels,s=Dt(i.font),r=s.size,a=this._computeTitleHeight(),{boxWidth:h,itemHeight:c}=Nc(i,r),d,f;e.font=s.string,this.isHorizontal()?(d=this.maxWidth,f=this._fitRows(a,r,h,c)+10):(f=this.maxHeight,d=this._fitCols(a,s,h,c)+10),this.width=Math.min(d,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){let{ctx:r,maxWidth:a,options:{labels:{padding:h}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],f=s+h,m=t;r.textAlign="left",r.textBaseline="middle";let _=-1,y=-f;return this.legendItems.forEach((x,b)=>{let w=i+e/2+r.measureText(x.text).width;(b===0||d[d.length-1]+w+2*h>a)&&(m+=f,d[d.length-(b>0?0:1)]=0,y+=f,_++),c[b]={left:0,top:y,row:_,width:w,height:s},d[d.length-1]+=w+h}),m}_fitCols(t,e,i,s){let{ctx:r,maxHeight:a,options:{labels:{padding:h}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],f=a-t,m=h,_=0,y=0,x=0,b=0;return this.legendItems.forEach((w,P)=>{let{itemWidth:C,itemHeight:O}=K_(i,e,r,w,s);P>0&&y+O+2*h>f&&(m+=_+h,d.push({width:_,height:y}),x+=_+h,b++,_=y=0),c[P]={left:x,top:y,col:b,width:C,height:O},_=Math.max(_,C),y+=O+h}),m+=_,d.push({width:_,height:y}),m}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:r}}=this,a=ni(r,this.left,this.width);if(this.isHorizontal()){let h=0,c=Rt(i,this.left+s,this.right-this.lineWidths[h]);for(let d of e)h!==d.row&&(h=d.row,c=Rt(i,this.left+s,this.right-this.lineWidths[h])),d.top+=this.top+t+s,d.left=a.leftForLtr(a.x(c),d.width),c+=d.width+s}else{let h=0,c=Rt(i,this.top+t+s,this.bottom-this.columnSizes[h].height);for(let d of e)d.col!==h&&(h=d.col,c=Rt(i,this.top+t+s,this.bottom-this.columnSizes[h].height)),d.top=c,d.left+=this.left+s,d.left=a.leftForLtr(a.x(d.left),d.width),c+=d.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;Ln(t,this),this._draw(),Pn(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:r,labels:a}=t,h=Mt.color,c=ni(t.rtl,this.left,this.width),d=Dt(a.font),{padding:f}=a,m=d.size,_=m/2,y;this.drawTitle(),s.textAlign=c.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=d.string;let{boxWidth:x,boxHeight:b,itemHeight:w}=Nc(a,m),P=function(z,R,B){if(isNaN(x)||x<=0||isNaN(b)||b<0)return;s.save();let N=$(B.lineWidth,1);if(s.fillStyle=$(B.fillStyle,h),s.lineCap=$(B.lineCap,"butt"),s.lineDashOffset=$(B.lineDashOffset,0),s.lineJoin=$(B.lineJoin,"miter"),s.lineWidth=N,s.strokeStyle=$(B.strokeStyle,h),s.setLineDash($(B.lineDash,[])),a.usePointStyle){let j={radius:b*Math.SQRT2/2,pointStyle:B.pointStyle,rotation:B.rotation,borderWidth:N},q=c.xPlus(z,x/2),Y=R+_;ra(s,j,q,Y,a.pointStyleWidth&&x)}else{let j=R+Math.max((m-b)/2,0),q=c.leftForLtr(z,x),Y=Ye(B.borderRadius);s.beginPath(),Object.values(Y).some(nt=>nt!==0)?Ei(s,{x:q,y:j,w:x,h:b,radius:Y}):s.rect(q,j,x,b),s.fill(),N!==0&&s.stroke()}s.restore()},C=function(z,R,B){Ve(s,B.text,z,R+w/2,d,{strikethrough:B.hidden,textAlign:c.textAlign(B.textAlign)})},O=this.isHorizontal(),I=this._computeTitleHeight();O?y={x:Rt(r,this.left+f,this.right-i[0]),y:this.top+f+I,line:0}:y={x:this.left+f,y:Rt(r,this.top+I+f,this.bottom-e[0].height),line:0},pa(this.ctx,t.textDirection);let D=w+f;this.legendItems.forEach((z,R)=>{s.strokeStyle=z.fontColor,s.fillStyle=z.fontColor;let B=s.measureText(z.text).width,N=c.textAlign(z.textAlign||(z.textAlign=a.textAlign)),j=x+_+B,q=y.x,Y=y.y;c.setWidth(this.width),O?R>0&&q+j+f>this.right&&(Y=y.y+=D,y.line++,q=y.x=Rt(r,this.left+f,this.right-i[y.line])):R>0&&Y+D>this.bottom&&(q=y.x=q+e[y.line].width+f,y.line++,Y=y.y=Rt(r,this.top+I+f,this.bottom-e[y.line].height));let nt=c.x(q);if(P(nt,Y,z),q=Nh(N,q+x+_,O?q+j:this.right,t.rtl),C(c.x(q),Y,z),O)y.x+=j+f;else if(typeof z.text!="string"){let lt=d.lineHeight;y.y+=yu(z,lt)+f}else y.y+=D}),ma(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,i=Dt(e.font),s=Bt(e.padding);if(!e.display)return;let r=ni(t.rtl,this.left,this.width),a=this.ctx,h=e.position,c=i.size/2,d=s.top+c,f,m=this.left,_=this.width;if(this.isHorizontal())_=Math.max(...this.lineWidths),f=this.top+d,m=Rt(t.align,m,this.right-_);else{let x=this.columnSizes.reduce((b,w)=>Math.max(b,w.height),0);f=d+Rt(t.align,this.top,this.bottom-x-t.labels.padding-this._computeTitleHeight())}let y=Rt(h,m,m+_);a.textAlign=r.textAlign(Ss(h)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,Ve(a,e.text,y,f,i)}_computeTitleHeight(){let t=this.options.title,e=Dt(t.font),i=Bt(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,r;if(ge(t,this.left,this.right)&&ge(e,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;ir.length>a.length?r:a)),t+e.size/2+i.measureText(s).width}function J_(n,t,e){let i=n;return typeof t.text!="string"&&(i=yu(t,e)),i}function yu(n,t){let e=n.text?n.text.length:0;return t*e}function ty(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var ey={id:"legend",_element:$s,start(n,t,e){let i=n.legend=new $s({ctx:n.ctx,options:e,chart:n});Wt.configure(n,i,e),Wt.addBox(n,i)},stop(n){Wt.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){let i=n.legend;Wt.configure(n,i,e),i.options=e},afterUpdate(n){let t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){let i=t.datasetIndex,s=e.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){let t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:s,color:r,useBorderRadius:a,borderRadius:h}}=n.legend.options;return n._getSortedDatasetMetas().map(c=>{let d=c.controller.getStyle(e?0:void 0),f=Bt(d.borderWidth);return{text:t[c.index].label,fillStyle:d.backgroundColor,fontColor:r,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:d.borderColor,pointStyle:i||d.pointStyle,rotation:d.rotation,textAlign:s||d.textAlign,borderRadius:a&&(h||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}},Wn=class extends $t{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let s=bt(i.text)?i.text.length:1;this._padding=Bt(i.padding);let r=s*Dt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:i,bottom:s,right:r,options:a}=this,h=a.align,c=0,d,f,m;return this.isHorizontal()?(f=Rt(h,i,r),m=e+t,d=r-i):(a.position==="left"?(f=i+t,m=Rt(h,s,e),c=ut*-.5):(f=r-t,m=Rt(h,e,s),c=ut*.5),d=s-e),{titleX:f,titleY:m,maxWidth:d,rotation:c}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let i=Dt(e.font),r=i.lineHeight/2+this._padding.top,{titleX:a,titleY:h,maxWidth:c,rotation:d}=this._drawArgs(r);Ve(t,e.text,0,0,i,{color:e.color,maxWidth:c,rotation:d,textAlign:Ss(e.align),textBaseline:"middle",translation:[a,h]})}};function iy(n,t){let e=new Wn({ctx:n.ctx,options:t,chart:n});Wt.configure(n,e,t),Wt.addBox(n,e),n.titleBlock=e}var ny={id:"title",_element:Wn,start(n,t,e){iy(n,e)},stop(n){let t=n.titleBlock;Wt.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){let i=n.titleBlock;Wt.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Ws=new WeakMap,sy={id:"subtitle",start(n,t,e){let i=new Wn({ctx:n.ctx,options:e,chart:n});Wt.configure(n,i,e),Wt.addBox(n,i),Ws.set(n,i)},stop(n){Wt.removeBox(n,Ws.get(n)),Ws.delete(n)},beforeUpdate(n,t,e){let i=Ws.get(n);Wt.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},An={average(n){if(!n.length)return!1;let t,e,i=new Set,s=0,r=0;for(t=0,e=n.length;th+c)/i.size,y:s/r}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,s=Number.POSITIVE_INFINITY,r,a,h;for(r=0,a=n.length;r-1?n.split(` +`):n}function oy(n,t){let{element:e,datasetIndex:i,index:s}=t,r=n.getDatasetMeta(i).controller,{label:a,value:h}=r.getLabelAndValue(s);return{chart:n,label:a,parsed:r.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:h,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:e}}function Wc(n,t){let e=n.chart.ctx,{body:i,footer:s,title:r}=n,{boxWidth:a,boxHeight:h}=t,c=Dt(t.bodyFont),d=Dt(t.titleFont),f=Dt(t.footerFont),m=r.length,_=s.length,y=i.length,x=Bt(t.padding),b=x.height,w=0,P=i.reduce((I,D)=>I+D.before.length+D.lines.length+D.after.length,0);if(P+=n.beforeBody.length+n.afterBody.length,m&&(b+=m*d.lineHeight+(m-1)*t.titleSpacing+t.titleMarginBottom),P){let I=t.displayColors?Math.max(h,c.lineHeight):c.lineHeight;b+=y*I+(P-y)*c.lineHeight+(P-1)*t.bodySpacing}_&&(b+=t.footerMarginTop+_*f.lineHeight+(_-1)*t.footerSpacing);let C=0,O=function(I){w=Math.max(w,e.measureText(I).width+C)};return e.save(),e.font=d.string,gt(n.title,O),e.font=c.string,gt(n.beforeBody.concat(n.afterBody),O),C=t.displayColors?a+2+t.boxPadding:0,gt(i,I=>{gt(I.before,O),gt(I.lines,O),gt(I.after,O)}),C=0,e.font=f.string,gt(n.footer,O),e.restore(),w+=x.width,{width:w,height:b}}function ry(n,t){let{y:e,height:i}=t;return en.height-i/2?"bottom":"center"}function ay(n,t,e,i){let{x:s,width:r}=i,a=e.caretSize+e.caretPadding;if(n==="left"&&s+r+a>t.width||n==="right"&&s-r-a<0)return!0}function ly(n,t,e,i){let{x:s,width:r}=e,{width:a,chartArea:{left:h,right:c}}=n,d="center";return i==="center"?d=s<=(h+c)/2?"left":"right":s<=r/2?d="left":s>=a-r/2&&(d="right"),ay(d,n,t,e)&&(d="center"),d}function Hc(n,t,e){let i=e.yAlign||t.yAlign||ry(n,e);return{xAlign:e.xAlign||t.xAlign||ly(n,t,e,i),yAlign:i}}function hy(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function cy(n,t,e){let{y:i,height:s}=n;return t==="top"?i+=e:t==="bottom"?i-=s+e:i-=s/2,i}function Zc(n,t,e,i){let{caretSize:s,caretPadding:r,cornerRadius:a}=n,{xAlign:h,yAlign:c}=e,d=s+r,{topLeft:f,topRight:m,bottomLeft:_,bottomRight:y}=Ye(a),x=hy(t,h),b=cy(t,c,d);return c==="center"?h==="left"?x+=d:h==="right"&&(x-=d):h==="left"?x-=Math.max(f,_)+s:h==="right"&&(x+=Math.max(m,y)+s),{x:It(x,0,i.width-t.width),y:It(b,0,i.height-t.height)}}function Hs(n,t,e){let i=Bt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function Vc(n){return _e([],De(n))}function uy(n,t,e){return Se(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Yc(n,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}var vu={beforeTitle:me,title(n){if(n.length>0){let t=n[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex{let a={before:[],lines:[],after:[]},h=Yc(i,r);_e(a.before,De(jt(h,"beforeLabel",this,r))),_e(a.lines,jt(h,"label",this,r)),_e(a.after,De(jt(h,"afterLabel",this,r))),s.push(a)}),s}getAfterBody(t,e){return Vc(jt(e.callbacks,"afterBody",this,t))}getFooter(t,e){let{callbacks:i}=e,s=jt(i,"beforeFooter",this,t),r=jt(i,"footer",this,t),a=jt(i,"afterFooter",this,t),h=[];return h=_e(h,De(s)),h=_e(h,De(r)),h=_e(h,De(a)),h}_createItems(t){let e=this._active,i=this.chart.data,s=[],r=[],a=[],h=[],c,d;for(c=0,d=e.length;ct.filter(f,m,_,i))),t.itemSort&&(h=h.sort((f,m)=>t.itemSort(f,m,i))),gt(h,f=>{let m=Yc(t.callbacks,f);s.push(jt(m,"labelColor",this,f)),r.push(jt(m,"labelPointStyle",this,f)),a.push(jt(m,"labelTextColor",this,f))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=a,this.dataPoints=h,h}update(t,e){let i=this.options.setContext(this.getContext()),s=this._active,r,a=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{let h=An[i.position].call(this,s,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);let c=this._size=Wc(this,i),d=Object.assign({},h,c),f=Hc(this.chart,i,d),m=Zc(i,d,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,r={opacity:1,x:m.x,y:m.y,width:c.width,height:c.height,caretX:h.x,caretY:h.y}}this._tooltipItems=a,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){let r=this.getCaretPosition(t,i,s);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){let{xAlign:s,yAlign:r}=this,{caretSize:a,cornerRadius:h}=i,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:m}=Ye(h),{x:_,y}=t,{width:x,height:b}=e,w,P,C,O,I,D;return r==="center"?(I=y+b/2,s==="left"?(w=_,P=w-a,O=I+a,D=I-a):(w=_+x,P=w+a,O=I-a,D=I+a),C=w):(s==="left"?P=_+Math.max(c,f)+a:s==="right"?P=_+x-Math.max(d,m)-a:P=this.caretX,r==="top"?(O=y,I=O-a,w=P-a,C=P+a):(O=y+b,I=O+a,w=P+a,C=P-a),D=O),{x1:w,x2:P,x3:C,y1:O,y2:I,y3:D}}drawTitle(t,e,i){let s=this.title,r=s.length,a,h,c;if(r){let d=ni(i.rtl,this.x,this.width);for(t.x=Hs(this,i.titleAlign,i),e.textAlign=d.textAlign(i.titleAlign),e.textBaseline="middle",a=Dt(i.titleFont),h=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,c=0;cC!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Ei(t,{x:b,y:x,w:d,h:c,radius:P}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Ei(t,{x:w,y:x+1,w:d-2,h:c-2,radius:P}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(b,x,d,c),t.strokeRect(b,x,d,c),t.fillStyle=a.backgroundColor,t.fillRect(w,x+1,d-2,c-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){let{body:s}=this,{bodySpacing:r,bodyAlign:a,displayColors:h,boxHeight:c,boxWidth:d,boxPadding:f}=i,m=Dt(i.bodyFont),_=m.lineHeight,y=0,x=ni(i.rtl,this.x,this.width),b=function(B){e.fillText(B,x.x(t.x+y),t.y+_/2),t.y+=_+r},w=x.textAlign(a),P,C,O,I,D,z,R;for(e.textAlign=a,e.textBaseline="middle",e.font=m.string,t.x=Hs(this,w,i),e.fillStyle=i.bodyColor,gt(this.beforeBody,b),y=h&&w!=="right"?a==="center"?d/2+f:d+2+f:0,I=0,z=s.length;I0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){let a=An[t.position].call(this,this._active,this._eventPosition);if(!a)return;let h=this._size=Wc(this,t),c=Object.assign({},a,this._size),d=Hc(e,t,c),f=Zc(t,c,d,e);(s._to!==f.x||r._to!==f.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=h.width,this.height=h.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(e);let s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;let a=Bt(e.padding),h=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&h&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,s,e),pa(t,e.textDirection),r.y+=a.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),ma(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let i=this._active,s=t.map(({datasetIndex:h,index:c})=>{let d=this.chart.getDatasetMeta(h);if(!d)throw new Error("Cannot find a dataset at index "+h);return{datasetIndex:h,element:d.data[c],index:c}}),r=!wn(i,s),a=this._positionChanged(s,e);(r||a)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let s=this.options,r=this._active||[],a=this._getActiveElements(t,r,e,i),h=this._positionChanged(a,t),c=e||!wn(a,r)||h;return c&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),c}_getActiveElements(t,e,i,s){let r=this.options;if(t.type==="mouseout")return[];if(!s)return e.filter(h=>this.chart.data.datasets[h.datasetIndex]&&this.chart.getDatasetMeta(h.datasetIndex).controller.getParsed(h.index)!==void 0);let a=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&a.reverse(),a}_positionChanged(t,e){let{caretX:i,caretY:s,options:r}=this,a=An[r.position].call(this,t,e);return a!==!1&&(i!==a.x||s!==a.y)}};k(Fn,"positioners",An);var dy={id:"tooltip",_element:Fn,positioners:An,afterInit(n,t,e){e&&(n.tooltip=new Fn({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){let t=n.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",Li(Mi({},e),{cancelable:!0}))===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){let e=t.replay;n.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,t)=>t.bodyFont.size,boxWidth:(n,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:vu},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},fy=Object.freeze({__proto__:null,Colors:P_,Decimation:S_,Filler:X_,Legend:ey,SubTitle:sy,Title:ny,Tooltip:dy}),py=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function my(n,t,e,i){let s=n.indexOf(t);if(s===-1)return py(n,t,e,i);let r=n.lastIndexOf(t);return s!==r?e:s}var gy=(n,t)=>n===null?null:It(Math.round(n),0,t);function jc(n){let t=this.getLabels();return n>=0&&ne.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};k(En,"id","category"),k(En,"defaults",{ticks:{callback:jc}});function _y(n,t){let e=[],{bounds:s,step:r,min:a,max:h,precision:c,count:d,maxTicks:f,maxDigits:m,includeBounds:_}=n,y=r||1,x=f-1,{min:b,max:w}=t,P=!it(a),C=!it(h),O=!it(d),I=(w-b)/(m+1),D=Gr((w-b)/x/y)*y,z,R,B,N;if(D<1e-14&&!P&&!C)return[{value:b},{value:w}];N=Math.ceil(w/D)-Math.floor(b/D),N>x&&(D=Gr(N*D/x/y)*y),it(c)||(z=Math.pow(10,c),D=Math.ceil(D*z)/z),s==="ticks"?(R=Math.floor(b/D)*D,B=Math.ceil(w/D)*D):(R=b,B=w),P&&C&&r&&Ih((h-a)/r,D/1e3)?(N=Math.round(Math.min((h-a)/D,f)),D=(h-a)/N,R=a,B=h):O?(R=P?a:R,B=C?h:B,N=d-1,D=(B-R)/N):(N=(B-R)/D,Di(N,Math.round(N),D/1e3)?N=Math.round(N):N=Math.ceil(N));let j=Math.max(Xr(D),Xr(R));z=Math.pow(10,it(c)?j:c),R=Math.round(R*z)/z,B=Math.round(B*z)/z;let q=0;for(P&&(_&&R!==a?(e.push({value:a}),Rh)break;e.push({value:Y})}return C&&_&&B!==h?e.length&&Di(e[e.length-1].value,h,Uc(h,I,n))?e[e.length-1].value=h:e.push({value:h}):(!C||B===h)&&e.push({value:B}),e}function Uc(n,t,{horizontal:e,minRotation:i}){let s=ee(i),r=(e?Math.sin(s):Math.cos(s))||.001,a=.75*t*(""+n).length;return Math.min(t/r,a)}var ji=class extends ci{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return it(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:s,max:r}=this,a=c=>s=e?s:c,h=c=>r=i?r:c;if(t){let c=ae(s),d=ae(r);c<0&&d<0?h(0):c>0&&d>0&&a(0)}if(s===r){let c=r===0?1:Math.abs(r*.05);h(r+c),t||a(s-c)}this.min=s,this.max=r}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,i=this.getTickLimit();i=Math.max(2,i);let s={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},r=this._range||this,a=_y(s,r);return t.bounds==="ticks"&&qr(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let t=this.ticks,e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){let s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Ai(t,this.chart.options.locale,this.options.ticks.format)}},zn=class extends ji{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=Pt(t)?t:0,this.max=Pt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,i=ee(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};k(zn,"id","linear"),k(zn,"defaults",{ticks:{callback:Mn.formatters.numeric}});var Hn=n=>Math.floor(Te(n)),oi=(n,t)=>Math.pow(10,Hn(n)+t);function Gc(n){return n/Math.pow(10,Hn(n))===1}function qc(n,t,e){let i=Math.pow(10,e),s=Math.floor(n/i);return Math.ceil(t/i)-s}function yy(n,t){let e=t-n,i=Hn(e);for(;qc(n,t,i)>10;)i++;for(;qc(n,t,i)<10;)i--;return Math.min(i,Hn(n))}function vy(n,{min:t,max:e}){t=Yt(n.min,t);let i=[],s=Hn(t),r=yy(t,e),a=r<0?Math.pow(10,Math.abs(r)):1,h=Math.pow(10,r),c=s>r?Math.pow(10,s):0,d=Math.round((t-c)*a)/a,f=Math.floor((t-c)/h/10)*h*10,m=Math.floor((d-f)/Math.pow(10,r)),_=Yt(n.min,Math.round((c+f+m*Math.pow(10,r))*a)/a);for(;_=10?m=m<15?15:20:m++,m>=20&&(r++,m=2,a=r>=0?1:a),_=Math.round((c+f+m*Math.pow(10,r))*a)/a;let y=Yt(n.max,_);return i.push({value:y,major:Gc(y),significand:m}),i}var Rn=class extends ci{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){let i=ji.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return Pt(i)&&i>0?i:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=Pt(t)?Math.max(0,t):null,this.max=Pt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Pt(this._userMin)&&(this.min=t===oi(this.min,0)?oi(this.min,-1):oi(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),i=this.min,s=this.max,r=h=>i=t?i:h,a=h=>s=e?s:h;i===s&&(i<=0?(r(1),a(10)):(r(oi(i,-1)),a(oi(s,1)))),i<=0&&r(oi(s,-1)),s<=0&&a(oi(i,1)),this.min=i,this.max=s}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},i=vy(e,this);return t.bounds==="ticks"&&qr(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Ai(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=Te(t),this._valueRange=Te(this.max)-Te(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Te(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};k(Rn,"id","logarithmic"),k(Rn,"defaults",{ticks:{callback:Mn.formatters.logarithmic,major:{enabled:!0}}});function Va(n){let t=n.ticks;if(t.display&&n.display){let e=Bt(t.backdropPadding);return $(t.font&&t.font.size,Mt.font.size)+e.height}return 0}function xy(n,t,e){return e=bt(e)?e:[e],{w:Hh(n,t.string,e),h:e.length*t.lineHeight}}function Xc(n,t,e,i,s){return n===i||n===s?{start:t-e/2,end:t+e/2}:ns?{start:t-e,end:t}:{start:t,end:t+e}}function by(n){let t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],s=[],r=n._pointLabels.length,a=n.options.pointLabels,h=a.centerPointLabels?ut/r:0;for(let c=0;ct.r&&(h=(i.end-t.r)/r,n.r=Math.max(n.r,t.r+h)),s.startt.b&&(c=(s.end-t.b)/a,n.b=Math.max(n.b,t.b+c))}function My(n,t,e){let i=n.drawingArea,{extra:s,additionalAngle:r,padding:a,size:h}=e,c=n.getPointPosition(t,i+s+a,r),d=Math.round(Ts(zt(c.angle+Tt))),f=Cy(c.y,h.h,d),m=ky(d),_=Ty(c.x,h.w,m);return{visible:!0,x:c.x,y:f,textAlign:m,left:_,top:f,right:_+h.w,bottom:f+h.h}}function Ly(n,t){if(!t)return!0;let{left:e,top:i,right:s,bottom:r}=n;return!(pe({x:e,y:i},t)||pe({x:e,y:r},t)||pe({x:s,y:i},t)||pe({x:s,y:r},t))}function Py(n,t,e){let i=[],s=n._pointLabels.length,r=n.options,{centerPointLabels:a,display:h}=r.pointLabels,c={extra:Va(r)/2,additionalAngle:a?ut/s:0},d;for(let f=0;f270||e<90)&&(n-=t),n}function Sy(n,t,e){let{left:i,top:s,right:r,bottom:a}=e,{backdropColor:h}=t;if(!it(h)){let c=Ye(t.borderRadius),d=Bt(t.backdropPadding);n.fillStyle=h;let f=i-d.left,m=s-d.top,_=r-i+d.width,y=a-s+d.height;Object.values(c).some(x=>x!==0)?(n.beginPath(),Ei(n,{x:f,y:m,w:_,h:y,radius:c}),n.fill()):n.fillRect(f,m,_,y)}}function Oy(n,t){let{ctx:e,options:{pointLabels:i}}=n;for(let s=t-1;s>=0;s--){let r=n._pointLabelItems[s];if(!r.visible)continue;let a=i.setContext(n.getPointLabelContext(s));Sy(e,a,r);let h=Dt(a.font),{x:c,y:d,textAlign:f}=r;Ve(e,n._pointLabels[s],c,d+h.lineHeight/2,h,{color:a.color,textAlign:f,textBaseline:"middle"})}}function xu(n,t,e,i){let{ctx:s}=n;if(e)s.arc(n.xCenter,n.yCenter,t,0,wt);else{let r=n.getPointPosition(0,t);s.moveTo(r.x,r.y);for(let a=1;a{let s=vt(this.options.pointLabels.callback,[e,i],this);return s||s===0?s:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){let t=this.options;t.display&&t.pointLabels.display?by(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){let e=wt/(this._pointLabels.length||1),i=this.options.startAngle||0;return zt(t*e+ee(i))}getDistanceFromCenterForValue(t){if(it(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(it(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t{if(m!==0||m===0&&this.min<0){c=this.getDistanceFromCenterForValue(f.value);let _=this.getContext(m),y=s.setContext(_),x=r.setContext(_);Dy(this,y,c,a,x)}}),i.display){for(t.save(),h=a-1;h>=0;h--){let f=i.setContext(this.getPointLabelContext(h)),{color:m,lineWidth:_}=f;!_||!m||(t.lineWidth=_,t.strokeStyle=m,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,c=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),d=this.getPointPosition(h,c),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(d.x,d.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;let s=this.getIndexAngle(0),r,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((h,c)=>{if(c===0&&this.min>=0&&!e.reverse)return;let d=i.setContext(this.getContext(c)),f=Dt(d.font);if(r=this.getDistanceFromCenterForValue(this.ticks[c].value),d.showLabelBackdrop){t.font=f.string,a=t.measureText(h.label).width,t.fillStyle=d.backdropColor;let m=Bt(d.backdropPadding);t.fillRect(-a/2-m.left,-r-f.size/2-m.top,a+m.width,f.size+m.height)}Ve(t,h.label,0,-r,f,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),t.restore()}drawTitle(){}};k(ai,"id","radialLinear"),k(ai,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Mn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),k(ai,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),k(ai,"descriptors",{angleLines:{_fallback:"grid"}});var Qs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ut=Object.keys(Qs);function $c(n,t){return n-t}function Kc(n,t){if(it(t))return null;let e=n._adapter,{parser:i,round:s,isoWeekday:r}=n._parseOpts,a=t;return typeof i=="function"&&(a=i(a)),Pt(a)||(a=typeof i=="string"?e.parse(a,i):e.parse(a)),a===null?null:(s&&(a=s==="week"&&(ii(r)||r===!0)?e.startOf(a,"isoWeek",r):e.startOf(a,s)),+a)}function Qc(n,t,e,i){let s=Ut.length;for(let r=Ut.indexOf(n);r=Ut.indexOf(e);r--){let a=Ut[r];if(Qs[a].common&&n._adapter.diff(s,i,a)>=t-1)return a}return Ut[e?Ut.indexOf(e):0]}function Ey(n){for(let t=Ut.indexOf(n)+1,e=Ut.length;t=t?e[i]:e[s];n[r]=!0}}function zy(n,t,e,i){let s=n._adapter,r=+s.startOf(t[0].value,i),a=t[t.length-1].value,h,c;for(h=r;h<=a;h=+s.add(h,1,i))c=e[h],c>=0&&(t[c].major=!0);return t}function tu(n,t,e){let i=[],s={},r=t.length,a,h;for(a=0;a+t.value))}initOffsets(t=[]){let e=0,i=0,s,r;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?i=r:i=(r-this.getDecimalForValue(t[t.length-2]))/2);let a=t.length<3?.5:.25;e=It(e,0,a),i=It(i,0,a),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){let t=this._adapter,e=this.min,i=this.max,s=this.options,r=s.time,a=r.unit||Qc(r.minUnit,e,i,this._getLabelCapacity(e)),h=$(s.ticks.stepSize,1),c=a==="week"?r.isoWeekday:!1,d=ii(c)||c===!0,f={},m=e,_,y;if(d&&(m=+t.startOf(m,"isoWeek",c)),m=+t.startOf(m,d?"day":a),t.diff(i,e,a)>1e5*h)throw new Error(e+" and "+i+" are too far apart with stepSize of "+h+" "+a);let x=s.ticks.source==="data"&&this.getDataTimestamps();for(_=m,y=0;_+b)}getLabelForValue(t){let e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){let s=this.options.time.displayFormats,r=this._unit,a=e||s[r];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,s){let r=this.options,a=r.ticks.callback;if(a)return vt(a,[t,e,i],this);let h=r.time.displayFormats,c=this._unit,d=this._majorUnit,f=c&&h[c],m=d&&h[d],_=i[e],y=d&&m&&_&&_.major;return this._adapter.format(t,s||(y?m:f))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e0?h:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,i=s.length;e=n[i].pos&&t<=n[s].pos&&({lo:i,hi:s}=fe(n,"pos",t)),{pos:r,time:h}=n[i],{pos:a,time:c}=n[s]):(t>=n[i].time&&t<=n[s].time&&({lo:i,hi:s}=fe(n,"time",t)),{time:r,pos:h}=n[i],{time:a,pos:c}=n[s]);let d=a-r;return d?h+(c-h)*(t-r)/d:h}var Bn=class extends hi{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Zs(e,this.min),this._tableRange=Zs(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:i}=this,s=[],r=[],a,h,c,d,f;for(a=0,h=t.length;a=e&&d<=i&&s.push(d);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,h=s.length;as-r)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Zs(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Zs(this._table,i*this._tableRange+this._minPos,!0)}};k(Bn,"id","timeseries"),k(Bn,"defaults",hi.defaults);var Ry=Object.freeze({__proto__:null,CategoryScale:En,LinearScale:zn,LogarithmicScale:Rn,RadialLinearScale:ai,TimeScale:hi,TimeSeriesScale:Bn}),bu=[qm,y_,fy,Ry];ie.register(...bu);var wu=ie;var By=Math.pow(10,8)*24*60*60*1e3,mx=-By,Js=6048e5,Mu=864e5,Ae=6e4,Ee=36e5,Lu=1e3;var Fy=3600;var Pu=Fy*24,gx=Pu*7,Ny=Pu*365.2425,Wy=Ny/12,_x=Wy*3,ja=Symbol.for("constructDateFrom");function tt(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&ja in n?n[ja](t):n instanceof Date?new n.constructor(t):new Date(t)}function F(n,t){return tt(t||n,n)}function Ge(n,t,e){let i=F(n,e==null?void 0:e.in);return isNaN(t)?tt((e==null?void 0:e.in)||n,NaN):(t&&i.setDate(i.getDate()+t),i)}function Ui(n,t,e){let i=F(n,e==null?void 0:e.in);if(isNaN(t))return tt((e==null?void 0:e.in)||n,NaN);if(!t)return i;let s=i.getDate(),r=tt((e==null?void 0:e.in)||n,i.getTime());r.setMonth(i.getMonth()+t+1,0);let a=r.getDate();return s>=a?r:(i.setFullYear(r.getFullYear(),r.getMonth(),s),i)}function Gi(n,t,e){return tt((e==null?void 0:e.in)||n,+F(n)+t)}function ku(n,t,e){return Gi(n,t*Ee,e)}var Hy={};function Gt(){return Hy}function Ft(n,t){var h,c,d,f,m,_,y,x;let e=Gt(),i=(x=(y=(f=(d=t==null?void 0:t.weekStartsOn)!=null?d:(c=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:c.weekStartsOn)!=null?f:e.weekStartsOn)!=null?y:(_=(m=e.locale)==null?void 0:m.options)==null?void 0:_.weekStartsOn)!=null?x:0,s=F(n,t==null?void 0:t.in),r=s.getDay(),a=(r=r.getTime()?i+1:e.getTime()>=h.getTime()?i:i-1}function ui(n){let t=F(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function qt(n,...t){let e=tt.bind(null,n||t.find(i=>typeof i=="object"));return t.map(e)}function Vn(n,t){let e=F(n,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function eo(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t),r=Vn(i),a=Vn(s),h=+r-ui(r),c=+a-ui(a);return Math.round((h-c)/Mu)}function Tu(n,t){let e=to(n,t),i=tt((t==null?void 0:t.in)||n,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),le(i)}function Cu(n,t,e){let i=F(n,e==null?void 0:e.in);return i.setTime(i.getTime()+t*Ae),i}function Su(n,t,e){return Ui(n,t*3,e)}function Ou(n,t,e){return Gi(n,t*1e3,e)}function Du(n,t,e){return Ge(n,t*7,e)}function Iu(n,t,e){return Ui(n,t*12,e)}function di(n,t){let e=+F(n)-+F(t);return e<0?-1:e>0?1:e}function Au(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function io(n){return!(!Au(n)&&typeof n!="number"||isNaN(+F(n)))}function Eu(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t),r=i.getFullYear()-s.getFullYear(),a=i.getMonth()-s.getMonth();return r*12+a}function zu(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t);return i.getFullYear()-s.getFullYear()}function no(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t),r=Ru(i,s),a=Math.abs(eo(i,s));i.setDate(i.getDate()-r*a);let h=+(Ru(i,s)===-r),c=r*(a-h);return c===0?0:c}function Ru(n,t){let e=n.getFullYear()-t.getFullYear()||n.getMonth()-t.getMonth()||n.getDate()-t.getDate()||n.getHours()-t.getHours()||n.getMinutes()-t.getMinutes()||n.getSeconds()-t.getSeconds()||n.getMilliseconds()-t.getMilliseconds();return e<0?-1:e>0?1:e}function xe(n){return t=>{let i=(n?Math[n]:Math.trunc)(t);return i===0?0:i}}function Bu(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t),r=(+i-+s)/Ee;return xe(e==null?void 0:e.roundingMethod)(r)}function qi(n,t){return+F(n)-+F(t)}function Fu(n,t,e){let i=qi(n,t)/Ae;return xe(e==null?void 0:e.roundingMethod)(i)}function so(n,t){let e=F(n,t==null?void 0:t.in);return e.setHours(23,59,59,999),e}function oo(n,t){let e=F(n,t==null?void 0:t.in),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function Nu(n,t){let e=F(n,t==null?void 0:t.in);return+so(e,t)==+oo(e,t)}function ro(n,t,e){let[i,s,r]=qt(e==null?void 0:e.in,n,n,t),a=di(s,r),h=Math.abs(Eu(s,r));if(h<1)return 0;s.getMonth()===1&&s.getDate()>27&&s.setDate(30),s.setMonth(s.getMonth()-a*h);let c=di(s,r)===-a;Nu(i)&&h===1&&di(i,r)===1&&(c=!1);let d=a*(h-+c);return d===0?0:d}function Wu(n,t,e){let i=ro(n,t,e)/3;return xe(e==null?void 0:e.roundingMethod)(i)}function Hu(n,t,e){let i=qi(n,t)/1e3;return xe(e==null?void 0:e.roundingMethod)(i)}function Zu(n,t,e){let i=no(n,t,e)/7;return xe(e==null?void 0:e.roundingMethod)(i)}function Vu(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t),r=di(i,s),a=Math.abs(zu(i,s));i.setFullYear(1584),s.setFullYear(1584);let h=di(i,s)===-r,c=r*(a-+h);return c===0?0:c}function Yu(n,t){let e=F(n,t==null?void 0:t.in),i=e.getMonth(),s=i-i%3;return e.setMonth(s,1),e.setHours(0,0,0,0),e}function ju(n,t){let e=F(n,t==null?void 0:t.in);return e.setDate(1),e.setHours(0,0,0,0),e}function Uu(n,t){let e=F(n,t==null?void 0:t.in),i=e.getFullYear();return e.setFullYear(i+1,0,0),e.setHours(23,59,59,999),e}function ao(n,t){let e=F(n,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function Gu(n,t){let e=F(n,t==null?void 0:t.in);return e.setMinutes(59,59,999),e}function qu(n,t){var h,c,d,f,m,_,y,x;let e=Gt(),i=(x=(y=(f=(d=t==null?void 0:t.weekStartsOn)!=null?d:(c=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:c.weekStartsOn)!=null?f:e.weekStartsOn)!=null?y:(_=(m=e.locale)==null?void 0:m.options)==null?void 0:_.weekStartsOn)!=null?x:0,s=F(n,t==null?void 0:t.in),r=s.getDay(),a=(r{let i,s=Zy[n];return typeof s=="string"?i=s:t===1?i=s.one:i=s.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function lo(n){return(t={})=>{let e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}var Vy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ju={date:lo({formats:Vy,defaultWidth:"full"}),time:lo({formats:Yy,defaultWidth:"full"}),dateTime:lo({formats:jy,defaultWidth:"full"})};var Uy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},td=(n,t,e,i)=>Uy[n];function Xi(n){return(t,e)=>{let i=e!=null&&e.context?String(e.context):"standalone",s;if(i==="formatting"&&n.formattingValues){let a=n.defaultFormattingWidth||n.defaultWidth,h=e!=null&&e.width?String(e.width):a;s=n.formattingValues[h]||n.formattingValues[a]}else{let a=n.defaultWidth,h=e!=null&&e.width?String(e.width):n.defaultWidth;s=n.values[h]||n.values[a]}let r=n.argumentCallback?n.argumentCallback(t):t;return s[r]}}var Gy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xy={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$y={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ky={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Qy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Jy=(n,t)=>{let e=Number(n),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},ed={ordinalNumber:Jy,era:Xi({values:Gy,defaultWidth:"wide"}),quarter:Xi({values:qy,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Xi({values:Xy,defaultWidth:"wide"}),day:Xi({values:$y,defaultWidth:"wide"}),dayPeriod:Xi({values:Ky,defaultWidth:"wide",formattingValues:Qy,defaultFormattingWidth:"wide"})};function $i(n){return(t,e={})=>{let i=e.width,s=i&&n.matchPatterns[i]||n.matchPatterns[n.defaultMatchWidth],r=t.match(s);if(!r)return null;let a=r[0],h=i&&n.parsePatterns[i]||n.parsePatterns[n.defaultParseWidth],c=Array.isArray(h)?ev(h,m=>m.test(a)):tv(h,m=>m.test(a)),d;d=n.valueCallback?n.valueCallback(c):c,d=e.valueCallback?e.valueCallback(d):d;let f=t.slice(a.length);return{value:d,rest:f}}}function tv(n,t){for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function ev(n,t){for(let e=0;e{let i=t.match(n.matchPattern);if(!i)return null;let s=i[0],r=t.match(n.parsePattern);if(!r)return null;let a=n.valueCallback?n.valueCallback(r[0]):r[0];a=e.valueCallback?e.valueCallback(a):a;let h=t.slice(s.length);return{value:a,rest:h}}}var iv=/^(\d+)(th|st|nd|rd)?/i,nv=/\d+/i,sv={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ov={any:[/^b/i,/^(a|c)/i]},rv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},av={any:[/1/i,/2/i,/3/i,/4/i]},lv={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},hv={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},cv={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},uv={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},dv={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},fv={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nd={ordinalNumber:id({matchPattern:iv,parsePattern:nv,valueCallback:n=>parseInt(n,10)}),era:$i({matchPatterns:sv,defaultMatchWidth:"wide",parsePatterns:ov,defaultParseWidth:"any"}),quarter:$i({matchPatterns:rv,defaultMatchWidth:"wide",parsePatterns:av,defaultParseWidth:"any",valueCallback:n=>n+1}),month:$i({matchPatterns:lv,defaultMatchWidth:"wide",parsePatterns:hv,defaultParseWidth:"any"}),day:$i({matchPatterns:cv,defaultMatchWidth:"wide",parsePatterns:uv,defaultParseWidth:"any"}),dayPeriod:$i({matchPatterns:dv,defaultMatchWidth:"any",parsePatterns:fv,defaultParseWidth:"any"})};var Yn={code:"en-US",formatDistance:Qu,formatLong:Ju,formatRelative:td,localize:ed,match:nd,options:{weekStartsOn:0,firstWeekContainsDate:1}};function sd(n,t){let e=F(n,t==null?void 0:t.in);return eo(e,ao(e))+1}function ho(n,t){let e=F(n,t==null?void 0:t.in),i=+le(e)-+Tu(e);return Math.round(i/Js)+1}function Ki(n,t){var f,m,_,y,x,b,w,P;let e=F(n,t==null?void 0:t.in),i=e.getFullYear(),s=Gt(),r=(P=(w=(y=(_=t==null?void 0:t.firstWeekContainsDate)!=null?_:(m=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)!=null?y:s.firstWeekContainsDate)!=null?w:(b=(x=s.locale)==null?void 0:x.options)==null?void 0:b.firstWeekContainsDate)!=null?P:1,a=tt((t==null?void 0:t.in)||n,0);a.setFullYear(i+1,0,r),a.setHours(0,0,0,0);let h=Ft(a,t),c=tt((t==null?void 0:t.in)||n,0);c.setFullYear(i,0,r),c.setHours(0,0,0,0);let d=Ft(c,t);return+e>=+h?i+1:+e>=+d?i:i-1}function od(n,t){var h,c,d,f,m,_,y,x;let e=Gt(),i=(x=(y=(f=(d=t==null?void 0:t.firstWeekContainsDate)!=null?d:(c=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:c.firstWeekContainsDate)!=null?f:e.firstWeekContainsDate)!=null?y:(_=(m=e.locale)==null?void 0:m.options)==null?void 0:_.firstWeekContainsDate)!=null?x:1,s=Ki(n,t),r=tt((t==null?void 0:t.in)||n,0);return r.setFullYear(s,0,i),r.setHours(0,0,0,0),Ft(r,t)}function co(n,t){let e=F(n,t==null?void 0:t.in),i=+Ft(e,t)-+od(e,t);return Math.round(i/Js)+1}function mt(n,t){let e=n<0?"-":"",i=Math.abs(n).toString().padStart(t,"0");return e+i}var ze={y(n,t){let e=n.getFullYear(),i=e>0?e:1-e;return mt(t==="yy"?i%100:i,t.length)},M(n,t){let e=n.getMonth();return t==="M"?String(e+1):mt(e+1,2)},d(n,t){return mt(n.getDate(),t.length)},a(n,t){let e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return mt(n.getHours()%12||12,t.length)},H(n,t){return mt(n.getHours(),t.length)},m(n,t){return mt(n.getMinutes(),t.length)},s(n,t){return mt(n.getSeconds(),t.length)},S(n,t){let e=t.length,i=n.getMilliseconds(),s=Math.trunc(i*Math.pow(10,e-3));return mt(s,t.length)}};var Qi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ua={G:function(n,t,e){let i=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(i,{width:"abbreviated"});case"GGGGG":return e.era(i,{width:"narrow"});case"GGGG":default:return e.era(i,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){let i=n.getFullYear(),s=i>0?i:1-i;return e.ordinalNumber(s,{unit:"year"})}return ze.y(n,t)},Y:function(n,t,e,i){let s=Ki(n,i),r=s>0?s:1-s;if(t==="YY"){let a=r%100;return mt(a,2)}return t==="Yo"?e.ordinalNumber(r,{unit:"year"}):mt(r,t.length)},R:function(n,t){let e=to(n);return mt(e,t.length)},u:function(n,t){let e=n.getFullYear();return mt(e,t.length)},Q:function(n,t,e){let i=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return mt(i,2);case"Qo":return e.ordinalNumber(i,{unit:"quarter"});case"QQQ":return e.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(i,{width:"wide",context:"formatting"})}},q:function(n,t,e){let i=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return mt(i,2);case"qo":return e.ordinalNumber(i,{unit:"quarter"});case"qqq":return e.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(i,{width:"wide",context:"standalone"})}},M:function(n,t,e){let i=n.getMonth();switch(t){case"M":case"MM":return ze.M(n,t);case"Mo":return e.ordinalNumber(i+1,{unit:"month"});case"MMM":return e.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(i,{width:"wide",context:"formatting"})}},L:function(n,t,e){let i=n.getMonth();switch(t){case"L":return String(i+1);case"LL":return mt(i+1,2);case"Lo":return e.ordinalNumber(i+1,{unit:"month"});case"LLL":return e.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(i,{width:"wide",context:"standalone"})}},w:function(n,t,e,i){let s=co(n,i);return t==="wo"?e.ordinalNumber(s,{unit:"week"}):mt(s,t.length)},I:function(n,t,e){let i=ho(n);return t==="Io"?e.ordinalNumber(i,{unit:"week"}):mt(i,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):ze.d(n,t)},D:function(n,t,e){let i=sd(n);return t==="Do"?e.ordinalNumber(i,{unit:"dayOfYear"}):mt(i,t.length)},E:function(n,t,e){let i=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(i,{width:"short",context:"formatting"});case"EEEE":default:return e.day(i,{width:"wide",context:"formatting"})}},e:function(n,t,e,i){let s=n.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return mt(r,2);case"eo":return e.ordinalNumber(r,{unit:"day"});case"eee":return e.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(s,{width:"short",context:"formatting"});case"eeee":default:return e.day(s,{width:"wide",context:"formatting"})}},c:function(n,t,e,i){let s=n.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return mt(r,t.length);case"co":return e.ordinalNumber(r,{unit:"day"});case"ccc":return e.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(s,{width:"narrow",context:"standalone"});case"cccccc":return e.day(s,{width:"short",context:"standalone"});case"cccc":default:return e.day(s,{width:"wide",context:"standalone"})}},i:function(n,t,e){let i=n.getDay(),s=i===0?7:i;switch(t){case"i":return String(s);case"ii":return mt(s,t.length);case"io":return e.ordinalNumber(s,{unit:"day"});case"iii":return e.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(i,{width:"short",context:"formatting"});case"iiii":default:return e.day(i,{width:"wide",context:"formatting"})}},a:function(n,t,e){let s=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(n,t,e){let i=n.getHours(),s;switch(i===12?s=Qi.noon:i===0?s=Qi.midnight:s=i/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(n,t,e){let i=n.getHours(),s;switch(i>=17?s=Qi.evening:i>=12?s=Qi.afternoon:i>=4?s=Qi.morning:s=Qi.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let i=n.getHours()%12;return i===0&&(i=12),e.ordinalNumber(i,{unit:"hour"})}return ze.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):ze.H(n,t)},K:function(n,t,e){let i=n.getHours()%12;return t==="Ko"?e.ordinalNumber(i,{unit:"hour"}):mt(i,t.length)},k:function(n,t,e){let i=n.getHours();return i===0&&(i=24),t==="ko"?e.ordinalNumber(i,{unit:"hour"}):mt(i,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):ze.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):ze.s(n,t)},S:function(n,t){return ze.S(n,t)},X:function(n,t,e){let i=n.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return ad(i);case"XXXX":case"XX":return fi(i);case"XXXXX":case"XXX":default:return fi(i,":")}},x:function(n,t,e){let i=n.getTimezoneOffset();switch(t){case"x":return ad(i);case"xxxx":case"xx":return fi(i);case"xxxxx":case"xxx":default:return fi(i,":")}},O:function(n,t,e){let i=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+rd(i,":");case"OOOO":default:return"GMT"+fi(i,":")}},z:function(n,t,e){let i=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+rd(i,":");case"zzzz":default:return"GMT"+fi(i,":")}},t:function(n,t,e){let i=Math.trunc(+n/1e3);return mt(i,t.length)},T:function(n,t,e){return mt(+n,t.length)}};function rd(n,t=""){let e=n>0?"-":"+",i=Math.abs(n),s=Math.trunc(i/60),r=i%60;return r===0?e+String(s):e+String(s)+t+mt(r,2)}function ad(n,t){return n%60===0?(n>0?"-":"+")+mt(Math.abs(n)/60,2):fi(n,t)}function fi(n,t=""){let e=n>0?"-":"+",i=Math.abs(n),s=mt(Math.trunc(i/60),2),r=mt(i%60,2);return e+s+t+r}var ld=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},hd=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},pv=(n,t)=>{let e=n.match(/(P+)(p+)?/)||[],i=e[1],s=e[2];if(!s)return ld(n,t);let r;switch(i){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"});break}return r.replace("{{date}}",ld(i,t)).replace("{{time}}",hd(s,t))},jn={p:hd,P:pv};var mv=/^D+$/,gv=/^Y+$/,_v=["D","DD","YY","YYYY"];function uo(n){return mv.test(n)}function fo(n){return gv.test(n)}function Un(n,t,e){let i=yv(n,t,e);if(console.warn(i),_v.includes(n))throw new RangeError(i)}function yv(n,t,e){let i=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${i} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var vv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bv=/^'([^]*?)'?$/,wv=/''/g,Mv=/[a-zA-Z]/;function cd(n,t,e){var f,m,_,y,x,b,w,P,C,O,I,D,z,R,B,N,j,q;let i=Gt(),s=(m=(f=e==null?void 0:e.locale)!=null?f:i.locale)!=null?m:Yn,r=(O=(C=(b=(x=e==null?void 0:e.firstWeekContainsDate)!=null?x:(y=(_=e==null?void 0:e.locale)==null?void 0:_.options)==null?void 0:y.firstWeekContainsDate)!=null?b:i.firstWeekContainsDate)!=null?C:(P=(w=i.locale)==null?void 0:w.options)==null?void 0:P.firstWeekContainsDate)!=null?O:1,a=(q=(j=(R=(z=e==null?void 0:e.weekStartsOn)!=null?z:(D=(I=e==null?void 0:e.locale)==null?void 0:I.options)==null?void 0:D.weekStartsOn)!=null?R:i.weekStartsOn)!=null?j:(N=(B=i.locale)==null?void 0:B.options)==null?void 0:N.weekStartsOn)!=null?q:0,h=F(n,e==null?void 0:e.in);if(!io(h))throw new RangeError("Invalid time value");let c=t.match(xv).map(Y=>{let nt=Y[0];if(nt==="p"||nt==="P"){let lt=jn[nt];return lt(Y,s.formatLong)}return Y}).join("").match(vv).map(Y=>{if(Y==="''")return{isToken:!1,value:"'"};let nt=Y[0];if(nt==="'")return{isToken:!1,value:Lv(Y)};if(Ua[nt])return{isToken:!0,value:Y};if(nt.match(Mv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+nt+"`");return{isToken:!1,value:Y}});s.localize.preprocessor&&(c=s.localize.preprocessor(h,c));let d={firstWeekContainsDate:r,weekStartsOn:a,locale:s};return c.map(Y=>{if(!Y.isToken)return Y.value;let nt=Y.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&fo(nt)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&uo(nt))&&Un(nt,t,String(n));let lt=Ua[nt[0]];return lt(h,nt,s.localize,d)}).join("")}function Lv(n){let t=n.match(bv);return t?t[1].replace(wv,"'"):n}function ud(){return Object.assign({},Gt())}function dd(n,t){let e=F(n,t==null?void 0:t.in).getDay();return e===0?7:e}function fd(n,t){let e=Pv(t)?new t(0):tt(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function Pv(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}var kv=10,po=class{constructor(){k(this,"subPriority",0)}validate(t,e){return!0}},mo=class extends po{constructor(t,e,i,s,r){super(),this.value=t,this.validateValue=e,this.setValue=i,this.priority=s,r&&(this.subPriority=r)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,i){return this.setValue(t,e,this.value,i)}},go=class extends po{constructor(e,i){super();k(this,"priority",kv);k(this,"subPriority",-1);this.context=e||(s=>tt(i,s))}set(e,i){return i.timestampIsSet?e:tt(e,fd(e,this.context))}};var Z=class{run(t,e,i,s){let r=this.parse(t,e,i,s);return r?{setter:new mo(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(t,e,i){return!0}};var _o=class extends Z{constructor(){super(...arguments);k(this,"priority",140);k(this,"incompatibleTokens",["R","u","t","T"])}parse(e,i,s){switch(i){case"G":case"GG":case"GGG":return s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"});case"GGGGG":return s.era(e,{width:"narrow"});case"GGGG":default:return s.era(e,{width:"wide"})||s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"})}}set(e,i,s){return i.era=s,e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}};var ct={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ne={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function _t(n,t){return n&&{value:t(n.value),rest:n.rest}}function at(n,t){let e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function se(n,t){let e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};let i=e[1]==="+"?1:-1,s=e[2]?parseInt(e[2],10):0,r=e[3]?parseInt(e[3],10):0,a=e[5]?parseInt(e[5],10):0;return{value:i*(s*Ee+r*Ae+a*Lu),rest:t.slice(e[0].length)}}function yo(n){return at(ct.anyDigitsSigned,n)}function Q(n,t){switch(n){case 1:return at(ct.singleDigit,t);case 2:return at(ct.twoDigits,t);case 3:return at(ct.threeDigits,t);case 4:return at(ct.fourDigits,t);default:return at(new RegExp("^\\d{1,"+n+"}"),t)}}function Ji(n,t){switch(n){case 1:return at(ct.singleDigitSigned,t);case 2:return at(ct.twoDigitsSigned,t);case 3:return at(ct.threeDigitsSigned,t);case 4:return at(ct.fourDigitsSigned,t);default:return at(new RegExp("^-?\\d{1,"+n+"}"),t)}}function tn(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function vo(n,t){let e=t>0,i=e?t:1-t,s;if(i<=50)s=n||100;else{let r=i+50,a=Math.trunc(r/100)*100,h=n>=r%100;s=n+a-(h?100:0)}return e?s:1-s}function xo(n){return n%400===0||n%4===0&&n%100!==0}var bo=class extends Z{constructor(){super(...arguments);k(this,"priority",130);k(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,i,s){let r=a=>({year:a,isTwoDigitYear:i==="yy"});switch(i){case"y":return _t(Q(4,e),r);case"yo":return _t(s.ordinalNumber(e,{unit:"year"}),r);default:return _t(Q(i.length,e),r)}}validate(e,i){return i.isTwoDigitYear||i.year>0}set(e,i,s){let r=e.getFullYear();if(s.isTwoDigitYear){let h=vo(s.year,r);return e.setFullYear(h,0,1),e.setHours(0,0,0,0),e}let a=!("era"in i)||i.era===1?s.year:1-s.year;return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}};var wo=class extends Z{constructor(){super(...arguments);k(this,"priority",130);k(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,i,s){let r=a=>({year:a,isTwoDigitYear:i==="YY"});switch(i){case"Y":return _t(Q(4,e),r);case"Yo":return _t(s.ordinalNumber(e,{unit:"year"}),r);default:return _t(Q(i.length,e),r)}}validate(e,i){return i.isTwoDigitYear||i.year>0}set(e,i,s,r){let a=Ki(e,r);if(s.isTwoDigitYear){let c=vo(s.year,a);return e.setFullYear(c,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Ft(e,r)}let h=!("era"in i)||i.era===1?s.year:1-s.year;return e.setFullYear(h,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Ft(e,r)}};var Mo=class extends Z{constructor(){super(...arguments);k(this,"priority",130);k(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,i){return i==="R"?Ji(4,e):Ji(i.length,e)}set(e,i,s){let r=tt(e,0);return r.setFullYear(s,0,4),r.setHours(0,0,0,0),le(r)}};var Lo=class extends Z{constructor(){super(...arguments);k(this,"priority",130);k(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,i){return i==="u"?Ji(4,e):Ji(i.length,e)}set(e,i,s){return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}};var Po=class extends Z{constructor(){super(...arguments);k(this,"priority",120);k(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,i,s){switch(i){case"Q":case"QQ":return Q(i.length,e);case"Qo":return s.ordinalNumber(e,{unit:"quarter"});case"QQQ":return s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(e,{width:"wide",context:"formatting"})||s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,i){return i>=1&&i<=4}set(e,i,s){return e.setMonth((s-1)*3,1),e.setHours(0,0,0,0),e}};var ko=class extends Z{constructor(){super(...arguments);k(this,"priority",120);k(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,i,s){switch(i){case"q":case"qq":return Q(i.length,e);case"qo":return s.ordinalNumber(e,{unit:"quarter"});case"qqq":return s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(e,{width:"wide",context:"standalone"})||s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,i){return i>=1&&i<=4}set(e,i,s){return e.setMonth((s-1)*3,1),e.setHours(0,0,0,0),e}};var To=class extends Z{constructor(){super(...arguments);k(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);k(this,"priority",110)}parse(e,i,s){let r=a=>a-1;switch(i){case"M":return _t(at(ct.month,e),r);case"MM":return _t(Q(2,e),r);case"Mo":return _t(s.ordinalNumber(e,{unit:"month"}),r);case"MMM":return s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(e,{width:"wide",context:"formatting"})||s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"})}}validate(e,i){return i>=0&&i<=11}set(e,i,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}};var Co=class extends Z{constructor(){super(...arguments);k(this,"priority",110);k(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,i,s){let r=a=>a-1;switch(i){case"L":return _t(at(ct.month,e),r);case"LL":return _t(Q(2,e),r);case"Lo":return _t(s.ordinalNumber(e,{unit:"month"}),r);case"LLL":return s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(e,{width:"wide",context:"standalone"})||s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"})}}validate(e,i){return i>=0&&i<=11}set(e,i,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}};function pd(n,t,e){let i=F(n,e==null?void 0:e.in),s=co(i,e)-t;return i.setDate(i.getDate()-s*7),F(i,e==null?void 0:e.in)}var So=class extends Z{constructor(){super(...arguments);k(this,"priority",100);k(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,i,s){switch(i){case"w":return at(ct.week,e);case"wo":return s.ordinalNumber(e,{unit:"week"});default:return Q(i.length,e)}}validate(e,i){return i>=1&&i<=53}set(e,i,s,r){return Ft(pd(e,s,r),r)}};function md(n,t,e){let i=F(n,e==null?void 0:e.in),s=ho(i,e)-t;return i.setDate(i.getDate()-s*7),i}var Oo=class extends Z{constructor(){super(...arguments);k(this,"priority",100);k(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,i,s){switch(i){case"I":return at(ct.week,e);case"Io":return s.ordinalNumber(e,{unit:"week"});default:return Q(i.length,e)}}validate(e,i){return i>=1&&i<=53}set(e,i,s){return le(md(e,s))}};var Tv=[31,28,31,30,31,30,31,31,30,31,30,31],Cv=[31,29,31,30,31,30,31,31,30,31,30,31],Do=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"subPriority",1);k(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,i,s){switch(i){case"d":return at(ct.date,e);case"do":return s.ordinalNumber(e,{unit:"date"});default:return Q(i.length,e)}}validate(e,i){let s=e.getFullYear(),r=xo(s),a=e.getMonth();return r?i>=1&&i<=Cv[a]:i>=1&&i<=Tv[a]}set(e,i,s){return e.setDate(s),e.setHours(0,0,0,0),e}};var Io=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"subpriority",1);k(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,i,s){switch(i){case"D":case"DD":return at(ct.dayOfYear,e);case"Do":return s.ordinalNumber(e,{unit:"date"});default:return Q(i.length,e)}}validate(e,i){let s=e.getFullYear();return xo(s)?i>=1&&i<=366:i>=1&&i<=365}set(e,i,s){return e.setMonth(0,s),e.setHours(0,0,0,0),e}};function en(n,t,e){var m,_,y,x,b,w,P,C;let i=Gt(),s=(C=(P=(x=(y=e==null?void 0:e.weekStartsOn)!=null?y:(_=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:_.weekStartsOn)!=null?x:i.weekStartsOn)!=null?P:(w=(b=i.locale)==null?void 0:b.options)==null?void 0:w.weekStartsOn)!=null?C:0,r=F(n,e==null?void 0:e.in),a=r.getDay(),c=(t%7+7)%7,d=7-s,f=t<0||t>6?t-(a+d)%7:(c+d)%7-(a+d)%7;return Ge(r,f,e)}var Ao=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,i,s){switch(i){case"E":case"EE":case"EEE":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,i){return i>=0&&i<=6}set(e,i,s,r){return e=en(e,s,r),e.setHours(0,0,0,0),e}};var Eo=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,i,s,r){let a=h=>{let c=Math.floor((h-1)/7)*7;return(h+r.weekStartsOn+6)%7+c};switch(i){case"e":case"ee":return _t(Q(i.length,e),a);case"eo":return _t(s.ordinalNumber(e,{unit:"day"}),a);case"eee":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeeee":return s.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,i){return i>=0&&i<=6}set(e,i,s,r){return e=en(e,s,r),e.setHours(0,0,0,0),e}};var zo=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,i,s,r){let a=h=>{let c=Math.floor((h-1)/7)*7;return(h+r.weekStartsOn+6)%7+c};switch(i){case"c":case"cc":return _t(Q(i.length,e),a);case"co":return _t(s.ordinalNumber(e,{unit:"day"}),a);case"ccc":return s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"ccccc":return s.day(e,{width:"narrow",context:"standalone"});case"cccccc":return s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(e,{width:"wide",context:"standalone"})||s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"})}}validate(e,i){return i>=0&&i<=6}set(e,i,s,r){return e=en(e,s,r),e.setHours(0,0,0,0),e}};function gd(n,t,e){let i=F(n,e==null?void 0:e.in),s=dd(i,e),r=t-s;return Ge(i,r,e)}var Ro=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,i,s){let r=a=>a===0?7:a;switch(i){case"i":case"ii":return Q(i.length,e);case"io":return s.ordinalNumber(e,{unit:"day"});case"iii":return _t(s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return _t(s.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return _t(s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),r);case"iiii":default:return _t(s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,i){return i>=1&&i<=7}set(e,i,s){return e=gd(e,s),e.setHours(0,0,0,0),e}};var Bo=class extends Z{constructor(){super(...arguments);k(this,"priority",80);k(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,i,s){switch(i){case"a":case"aa":case"aaa":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,i,s){return e.setHours(tn(s),0,0,0),e}};var Fo=class extends Z{constructor(){super(...arguments);k(this,"priority",80);k(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,i,s){switch(i){case"b":case"bb":case"bbb":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,i,s){return e.setHours(tn(s),0,0,0),e}};var No=class extends Z{constructor(){super(...arguments);k(this,"priority",80);k(this,"incompatibleTokens",["a","b","t","T"])}parse(e,i,s){switch(i){case"B":case"BB":case"BBB":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,i,s){return e.setHours(tn(s),0,0,0),e}};var Wo=class extends Z{constructor(){super(...arguments);k(this,"priority",70);k(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,i,s){switch(i){case"h":return at(ct.hour12h,e);case"ho":return s.ordinalNumber(e,{unit:"hour"});default:return Q(i.length,e)}}validate(e,i){return i>=1&&i<=12}set(e,i,s){let r=e.getHours()>=12;return r&&s<12?e.setHours(s+12,0,0,0):!r&&s===12?e.setHours(0,0,0,0):e.setHours(s,0,0,0),e}};var Ho=class extends Z{constructor(){super(...arguments);k(this,"priority",70);k(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,i,s){switch(i){case"H":return at(ct.hour23h,e);case"Ho":return s.ordinalNumber(e,{unit:"hour"});default:return Q(i.length,e)}}validate(e,i){return i>=0&&i<=23}set(e,i,s){return e.setHours(s,0,0,0),e}};var Zo=class extends Z{constructor(){super(...arguments);k(this,"priority",70);k(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,i,s){switch(i){case"K":return at(ct.hour11h,e);case"Ko":return s.ordinalNumber(e,{unit:"hour"});default:return Q(i.length,e)}}validate(e,i){return i>=0&&i<=11}set(e,i,s){return e.getHours()>=12&&s<12?e.setHours(s+12,0,0,0):e.setHours(s,0,0,0),e}};var Vo=class extends Z{constructor(){super(...arguments);k(this,"priority",70);k(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,i,s){switch(i){case"k":return at(ct.hour24h,e);case"ko":return s.ordinalNumber(e,{unit:"hour"});default:return Q(i.length,e)}}validate(e,i){return i>=1&&i<=24}set(e,i,s){let r=s<=24?s%24:s;return e.setHours(r,0,0,0),e}};var Yo=class extends Z{constructor(){super(...arguments);k(this,"priority",60);k(this,"incompatibleTokens",["t","T"])}parse(e,i,s){switch(i){case"m":return at(ct.minute,e);case"mo":return s.ordinalNumber(e,{unit:"minute"});default:return Q(i.length,e)}}validate(e,i){return i>=0&&i<=59}set(e,i,s){return e.setMinutes(s,0,0),e}};var jo=class extends Z{constructor(){super(...arguments);k(this,"priority",50);k(this,"incompatibleTokens",["t","T"])}parse(e,i,s){switch(i){case"s":return at(ct.second,e);case"so":return s.ordinalNumber(e,{unit:"second"});default:return Q(i.length,e)}}validate(e,i){return i>=0&&i<=59}set(e,i,s){return e.setSeconds(s,0),e}};var Uo=class extends Z{constructor(){super(...arguments);k(this,"priority",30);k(this,"incompatibleTokens",["t","T"])}parse(e,i){let s=r=>Math.trunc(r*Math.pow(10,-i.length+3));return _t(Q(i.length,e),s)}set(e,i,s){return e.setMilliseconds(s),e}};var Go=class extends Z{constructor(){super(...arguments);k(this,"priority",10);k(this,"incompatibleTokens",["t","T","x"])}parse(e,i){switch(i){case"X":return se(ne.basicOptionalMinutes,e);case"XX":return se(ne.basic,e);case"XXXX":return se(ne.basicOptionalSeconds,e);case"XXXXX":return se(ne.extendedOptionalSeconds,e);case"XXX":default:return se(ne.extended,e)}}set(e,i,s){return i.timestampIsSet?e:tt(e,e.getTime()-ui(e)-s)}};var qo=class extends Z{constructor(){super(...arguments);k(this,"priority",10);k(this,"incompatibleTokens",["t","T","X"])}parse(e,i){switch(i){case"x":return se(ne.basicOptionalMinutes,e);case"xx":return se(ne.basic,e);case"xxxx":return se(ne.basicOptionalSeconds,e);case"xxxxx":return se(ne.extendedOptionalSeconds,e);case"xxx":default:return se(ne.extended,e)}}set(e,i,s){return i.timestampIsSet?e:tt(e,e.getTime()-ui(e)-s)}};var Xo=class extends Z{constructor(){super(...arguments);k(this,"priority",40);k(this,"incompatibleTokens","*")}parse(e){return yo(e)}set(e,i,s){return[tt(e,s*1e3),{timestampIsSet:!0}]}};var $o=class extends Z{constructor(){super(...arguments);k(this,"priority",20);k(this,"incompatibleTokens","*")}parse(e){return yo(e)}set(e,i,s){return[tt(e,s),{timestampIsSet:!0}]}};var _d={G:new _o,y:new bo,Y:new wo,R:new Mo,u:new Lo,Q:new Po,q:new ko,M:new To,L:new Co,w:new So,I:new Oo,d:new Do,D:new Io,E:new Ao,e:new Eo,c:new zo,i:new Ro,a:new Bo,b:new Fo,B:new No,h:new Wo,H:new Ho,K:new Zo,k:new Vo,m:new Yo,s:new jo,S:new Uo,X:new Go,x:new qo,t:new Xo,T:new $o};var Sv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ov=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Dv=/^'([^]*?)'?$/,Iv=/''/g,Av=/\S/,Ev=/[a-zA-Z]/;function yd(n,t,e,i){var w,P,C,O,I,D,z,R,B,N,j,q,Y,nt,lt,st,W,yt;let s=()=>tt((i==null?void 0:i.in)||e,NaN),r=ud(),a=(P=(w=i==null?void 0:i.locale)!=null?w:r.locale)!=null?P:Yn,h=(N=(B=(D=(I=i==null?void 0:i.firstWeekContainsDate)!=null?I:(O=(C=i==null?void 0:i.locale)==null?void 0:C.options)==null?void 0:O.firstWeekContainsDate)!=null?D:r.firstWeekContainsDate)!=null?B:(R=(z=r.locale)==null?void 0:z.options)==null?void 0:R.firstWeekContainsDate)!=null?N:1,c=(yt=(W=(nt=(Y=i==null?void 0:i.weekStartsOn)!=null?Y:(q=(j=i==null?void 0:i.locale)==null?void 0:j.options)==null?void 0:q.weekStartsOn)!=null?nt:r.weekStartsOn)!=null?W:(st=(lt=r.locale)==null?void 0:lt.options)==null?void 0:st.weekStartsOn)!=null?yt:0;if(!t)return n?s():F(e,i==null?void 0:i.in);let d={firstWeekContainsDate:h,weekStartsOn:c,locale:a},f=[new go(i==null?void 0:i.in,e)],m=t.match(Ov).map(E=>{let V=E[0];if(V in jn){let dt=jn[V];return dt(E,a.formatLong)}return E}).join("").match(Sv),_=[];for(let E of m){!(i!=null&&i.useAdditionalWeekYearTokens)&&fo(E)&&Un(E,t,n),!(i!=null&&i.useAdditionalDayOfYearTokens)&&uo(E)&&Un(E,t,n);let V=E[0],dt=_d[V];if(dt){let{incompatibleTokens:kt}=dt;if(Array.isArray(kt)){let ot=_.find(X=>kt.includes(X.token)||X.token===V);if(ot)throw new RangeError(`The format string mustn't contain \`${ot.fullToken}\` and \`${E}\` at the same time`)}else if(dt.incompatibleTokens==="*"&&_.length>0)throw new RangeError(`The format string mustn't contain \`${E}\` and any other token at the same time`);_.push({token:V,fullToken:E});let pt=dt.run(n,E,a.match,d);if(!pt)return s();f.push(pt.setter),n=pt.rest}else{if(V.match(Ev))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");if(E==="''"?E="'":V==="'"&&(E=zv(E)),n.indexOf(E)===0)n=n.slice(E.length);else return s()}}if(n.length>0&&Av.test(n))return s();let y=f.map(E=>E.priority).sort((E,V)=>V-E).filter((E,V,dt)=>dt.indexOf(E)===V).map(E=>f.filter(V=>V.priority===E).sort((V,dt)=>dt.subPriority-V.subPriority)).map(E=>E[0]),x=F(e,i==null?void 0:i.in);if(isNaN(+x))return s();let b={};for(let E of y){if(!E.validate(x,d))return s();let V=E.set(x,b,d);Array.isArray(V)?(x=V[0],Object.assign(b,V[1])):x=V}return x}function zv(n){return n.match(Dv)[1].replace(Iv,"'")}function vd(n,t){let e=F(n,t==null?void 0:t.in);return e.setMinutes(0,0,0),e}function xd(n,t){let e=F(n,t==null?void 0:t.in);return e.setSeconds(0,0),e}function bd(n,t){let e=F(n,t==null?void 0:t.in);return e.setMilliseconds(0),e}function wd(n,t){var d;let e=()=>tt(t==null?void 0:t.in,NaN),i=(d=t==null?void 0:t.additionalDigits)!=null?d:2,s=Nv(n),r;if(s.date){let f=Wv(s.date,i);r=Hv(f.restDateString,f.year)}if(!r||isNaN(+r))return e();let a=+r,h=0,c;if(s.time&&(h=Zv(s.time),isNaN(h)))return e();if(s.timezone){if(c=Vv(s.timezone),isNaN(c))return e()}else{let f=new Date(a+h),m=F(0,t==null?void 0:t.in);return m.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),m.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),m}return F(a+h+c,t==null?void 0:t.in)}var Ko={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Rv=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Bv=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Fv=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Nv(n){let t={},e=n.split(Ko.dateTimeDelimiter),i;if(e.length>2)return t;if(/:/.test(e[0])?i=e[0]:(t.date=e[0],i=e[1],Ko.timeZoneDelimiter.test(t.date)&&(t.date=n.split(Ko.timeZoneDelimiter)[0],i=n.substr(t.date.length,n.length))),i){let s=Ko.timezone.exec(i);s?(t.time=i.replace(s[1],""),t.timezone=s[1]):t.time=i}return t}function Wv(n,t){let e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=n.match(e);if(!i)return{year:NaN,restDateString:""};let s=i[1]?parseInt(i[1]):null,r=i[2]?parseInt(i[2]):null;return{year:r===null?s:r*100,restDateString:n.slice((i[1]||i[2]).length)}}function Hv(n,t){if(t===null)return new Date(NaN);let e=n.match(Rv);if(!e)return new Date(NaN);let i=!!e[4],s=Gn(e[1]),r=Gn(e[2])-1,a=Gn(e[3]),h=Gn(e[4]),c=Gn(e[5])-1;if(i)return qv(t,h,c)?Yv(t,h,c):new Date(NaN);{let d=new Date(0);return!Uv(t,r,a)||!Gv(t,s)?new Date(NaN):(d.setUTCFullYear(t,r,Math.max(s,a)),d)}}function Gn(n){return n?parseInt(n):1}function Zv(n){let t=n.match(Bv);if(!t)return NaN;let e=Ga(t[1]),i=Ga(t[2]),s=Ga(t[3]);return Xv(e,i,s)?e*Ee+i*Ae+s*1e3:NaN}function Ga(n){return n&&parseFloat(n.replace(",","."))||0}function Vv(n){if(n==="Z")return 0;let t=n.match(Fv);if(!t)return 0;let e=t[1]==="+"?-1:1,i=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return $v(i,s)?e*(i*Ee+s*Ae):NaN}function Yv(n,t,e){let i=new Date(0);i.setUTCFullYear(n,0,4);let s=i.getUTCDay()||7,r=(t-1)*7+e+1-s;return i.setUTCDate(i.getUTCDate()+r),i}var jv=[31,null,31,30,31,30,31,31,30,31,30,31];function Md(n){return n%400===0||n%4===0&&n%100!==0}function Uv(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(jv[t]||(Md(n)?29:28))}function Gv(n,t){return t>=1&&t<=(Md(n)?366:365)}function qv(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function Xv(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function $v(n,t){return t>=0&&t<=59}var Kv={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Ya._date.override({_id:"date-fns",formats:function(){return Kv},parse:function(n,t){if(n===null||typeof n=="undefined")return null;let e=typeof n;return e==="number"||n instanceof Date?n=F(n):e==="string"&&(typeof t=="string"?n=yd(n,t,new Date,this.options):n=wd(n,this.options)),io(n)?n.getTime():null},format:function(n,t){return cd(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return Gi(n,t);case"second":return Ou(n,t);case"minute":return Cu(n,t);case"hour":return ku(n,t);case"day":return Ge(n,t);case"week":return Du(n,t);case"month":return Ui(n,t);case"quarter":return Su(n,t);case"year":return Iu(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return qi(n,t);case"second":return Hu(n,t);case"minute":return Fu(n,t);case"hour":return Bu(n,t);case"day":return no(n,t);case"week":return Zu(n,t);case"month":return ro(n,t);case"quarter":return Wu(n,t);case"year":return Vu(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return bd(n);case"minute":return xd(n);case"hour":return vd(n);case"day":return Vn(n);case"week":return Ft(n);case"isoWeek":return Ft(n,{weekStartsOn:+e});case"month":return ju(n);case"quarter":return Yu(n);case"year":return ao(n);default:return n}},endOf:function(n,t){switch(t){case"second":return Ku(n);case"minute":return Xu(n);case"hour":return Gu(n);case"day":return so(n);case"week":return qu(n);case"month":return oo(n);case"quarter":return $u(n);case"year":return Uu(n);default:return n}}});var kd=Rr(Pd());window.L=Qv;window.Chart=wu;window.topbar=kd.default;})(); +/*! Bundled license information: + +leaflet/dist/leaflet-src.js: + (* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + *) + +topbar/topbar.min.js: + (** + * @license MIT + * topbar 3.0.0 + * http://buunguyen.github.io/topbar + * Copyright (c) 2024 Buu Nguyen + *) + +@kurkle/color/dist/color.esm.js: + (*! + * @kurkle/color v0.3.4 + * https://github.com/kurkle/color#readme + * (c) 2024 Jukka Kurkela + * Released under the MIT License + *) + +chart.js/dist/chunks/helpers.dataset.js: + (*! + * Chart.js v4.5.0 + * https://www.chartjs.org + * (c) 2025 Chart.js Contributors + * Released under the MIT License + *) + +chart.js/dist/chart.js: + (*! + * Chart.js v4.5.0 + * https://www.chartjs.org + * (c) 2025 Chart.js Contributors + * Released under the MIT License + *) + +chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.esm.js: + (*! + * chartjs-adapter-date-fns v3.0.0 + * https://www.chartjs.org + * (c) 2022 chartjs-adapter-date-fns Contributors + * Released under the MIT license + *) +*/