@sailingrotevista/rotevista-webapp 1.0.20 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ Error generating stack: `+e.message+`
14
14
  ${h}px !important;
15
15
  ${g}px !important;
16
16
  }
17
- `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,q.jsx)(Sc,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:S.cloneElement(e,{ref:u})})}var wc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=w(Tc),d=(0,S.useId)(),f=!0,p=(0,S.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),(0,S.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),S.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,q.jsx)(Cc,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,q.jsx)(E.Provider,{value:p,children:e})};function Tc(){return new Map}function Ec(e=!0){let t=(0,S.useContext)(E);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,S.useId)();(0,S.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,S.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Dc=e=>e.key||``;function Oc(e){let t=[];return S.Children.forEach(e,e=>{(0,S.isValidElement)(e)&&t.push(e)}),t}var kc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=Ec(o),f=(0,S.useMemo)(()=>Oc(e),[e]),p=o&&!u?[]:f.map(Dc),m=(0,S.useRef)(!0),h=(0,S.useRef)(f),g=w(()=>new Map),_=(0,S.useRef)(new Set),[v,y]=(0,S.useState)(f),[b,x]=(0,S.useState)(f);T(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=Dc(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let E=[];if(f!==v){let e=[...f];for(let t=0;t<b.length;t++){let n=b[t],r=Dc(n);p.includes(r)||(e.splice(t,0,n),E.push(n))}return a===`wait`&&E.length&&(e=E),x(Oc(e)),y(f),null}let{forceRender:D}=(0,S.useContext)(C);return(0,q.jsx)(q.Fragment,{children:b.map(e=>{let v=Dc(e),y=o&&!u?!1:f===b||p.includes(v);return(0,q.jsx)(wc,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(D?.(),x(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},Ac=(0,S.createContext)({strict:!1}),jc={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Mc=!1;function Nc(){if(Mc)return;let e={};for(let t in jc)e[t]={isEnabled:e=>jc[t].some(t=>!!e[t])};Fa(e),Mc=!0}function Pc(){return Nc(),Ia()}function Fc(e){let t=Pc();for(let n in e)t[n]={...t[n],...e[n]};Fa(t)}var Ic=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Lc(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Ic.has(e)}var Rc=c({default:()=>zc}),zc,Bc=o((()=>{throw zc={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),Vc=e=>!Lc(e);function Hc(e){typeof e==`function`&&(Vc=t=>t.startsWith(`on`)?!Lc(t):e(t))}try{Hc((Bc(),d(Rc)).default)}catch{}function Uc(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||ei(e[i])||(Vc(i)||n===!0&&Lc(i)||!t&&!Lc(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var Wc=(0,S.createContext)({});function Gc(e,t){if(Ea(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Ca(t)?t:void 0,animate:Ca(n)?n:void 0}}return e.inherit===!1?{}:t}function Kc(e){let{initial:t,animate:n}=Gc(e,(0,S.useContext)(Wc));return(0,S.useMemo)(()=>({initial:t,animate:n}),[qc(t),qc(n)])}function qc(e){return Array.isArray(e)?e.join(` `):e}var Jc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Yc(e,t,n){for(let r in t)!ei(t[r])&&!go(r,n)&&(e[r]=t[r])}function Xc({transformTemplate:e},t){return(0,S.useMemo)(()=>{let n=Jc();return lo(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Zc(e,t){let n=e.style||{},r={};return Yc(r,n,e),Object.assign(r,Xc(e,t)),r}function Qc(e,t){let n={},r=Zc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var $c=()=>({...Jc(),attrs:{}});function el(e,t,n,r){let i=(0,S.useMemo)(()=>{let n=$c();return wo(n,t,Eo(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Yc(t,e.style,e),i.style={...t,...i.style}}return i}var tl=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function nl(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(tl.indexOf(e)>-1||/[A-Z]/u.test(e))}function rl(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??nl(e)?el:Qc)(t,r,i,e),c=Uc(t,typeof e==`string`,a),l=e===S.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,S.useMemo)(()=>ei(u)?u.get():u,[u]);return(0,S.createElement)(e,{...l,children:d})}function il({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:al(n,r,i,e),renderState:t()}}function al(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Ns(a[e]);let{initial:o,animate:s}=e,c=Ea(e),l=Da(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Sa(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Hr(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var ol=e=>(t,n)=>{let r=(0,S.useContext)(Wc),i=(0,S.useContext)(E),a=()=>il(e,t,r,i);return n?a():w(a)},sl=ol({scrapeMotionValuesFromProps:_o,createRenderState:Jc}),cl=ol({scrapeMotionValuesFromProps:Oo,createRenderState:$c}),ll=Symbol.for(`motionComponentSymbol`);function ul(e,t,n){let r=(0,S.useRef)(n);(0,S.useInsertionEffect)(()=>{r.current=n});let i=(0,S.useRef)(null);return(0,S.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var dl=(0,S.createContext)({});function fl(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function pl(e,t,n,r,i,a){let{visualElement:o}=(0,S.useContext)(Wc),s=(0,S.useContext)(Ac),c=(0,S.useContext)(E),l=(0,S.useContext)(vc),u=l.reducedMotion,d=l.skipAnimations,f=(0,S.useRef)(null),p=(0,S.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,S.useContext)(dl);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&ml(f.current,n,i,h);let g=(0,S.useRef)(!1);(0,S.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[ii],v=(0,S.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return T(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,S.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function ml(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:hl(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&fl(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function hl(e){if(e)return e.options.allowProjection===!1?hl(e.parent):e.projection}function gl(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Fc(r);let a=n?n===`svg`:nl(e),o=a?cl:sl;function s(n,s){let c,l={...(0,S.useContext)(vc),...n,layoutId:_l(n)},{isStatic:u}=l,d=Kc(n),f=o(n,u);if(!u&&typeof window<`u`){vl(l,r);let t=yl(l);c=t.MeasureLayout,d.visualElement=pl(e,f,l,i,t.ProjectionNode,a)}return(0,q.jsxs)(Wc.Provider,{value:d,children:[c&&d.visualElement?(0,q.jsx)(c,{visualElement:d.visualElement,...l}):null,rl(e,n,ul(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,S.forwardRef)(s);return c[ll]=e,c}function _l({layoutId:e}){let t=(0,S.useContext)(C).id;return t&&e!==void 0?t+`-`+e:e}function vl(e,t){(0,S.useContext)(Ac).strict}function yl(e){let{drag:t,layout:n}=Pc();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function bl(e,t){if(typeof Proxy>`u`)return gl;let n=new Map,r=(n,r)=>gl(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,gl(a,void 0,e,t)),n.get(a))})}var xl=(e,t)=>t.isSVG??nl(e)?new ko(t):new yo(t,{allowProjection:e!==S.Fragment}),Sl=class extends za{constructor(e){super(e),e.animationState||=Io(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Sa(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Cl=0,wl={animation:{Feature:Sl},exit:{Feature:class extends za{constructor(){super(...arguments),this.id=Cl++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=Ur(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Tl(e){return{point:{x:e.pageX,y:e.pageY}}}var El=e=>t=>Vi(t)&&e(t,Tl(t));function Dl(e,t,n,r){return ks(e,t,El(n),r)}var Ol=({current:e})=>e?e.ownerDocument.defaultView:null,kl=(e,t)=>Math.abs(e-t);function Al(e,t){let n=kl(e.x,t.x),r=kl(e.y,t.y);return Math.sqrt(n**2+r**2)}var jl=new Set([`auto`,`scroll`]),Ml=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Nl(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Fl(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Al(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=Fe;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Nl(t,this.transformPagePoint),Ne.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Fl(e.type===`pointercancel`?this.lastMoveEventInfo:Nl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Vi(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Nl(Tl(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Fe;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Fl(s,this.history)),this.removeListeners=F(Dl(this.contextWindow,`pointermove`,this.handlePointerMove),Dl(this.contextWindow,`pointerup`,this.handlePointerUp),Dl(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(jl.has(e.overflowX)||jl.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),Ne.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Pe(this.updatePoint)}};function Nl(e,t){return t?{point:t(e.point)}:e}function Pl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fl({point:e},t){return{point:e,delta:Pl(e,Ll(t)),offset:Pl(e,Il(t)),velocity:Rl(t,.1)}}function Il(e){return e[0]}function Ll(e){return e[e.length-1]}function Rl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Ll(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>I(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>I(t)*2&&(r=e[1]);let a=ie(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function zl(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?jt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?jt(n,e,r.max):Math.min(e,n)),e}function J(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Bl(e,{top:t,left:n,bottom:r,right:i}){return{x:J(e.x,n,i),y:J(e.y,t,r)}}function Vl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Hl(e,t){return{x:Vl(e.x,t.x),y:Vl(e.y,t.y)}}function Ul(e,t){let n=.5,r=Yo(e),i=Yo(t);return i>r?n=ne(t.min,t.max-r,e.min):r>i&&(n=ne(e.min,e.max-i,t.min)),k(0,1,n)}function Wl(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Gl=.35;function Kl(e=Gl){return e===!1?e=0:e===!0&&(e=Gl),{x:ql(e,`left`,`right`),y:ql(e,`top`,`bottom`)}}function ql(e,t,n){return{min:Jl(e,t),max:Jl(e,n)}}function Jl(e,t){return typeof e==`number`?e:e[t]||0}var Yl=new WeakMap,Xl=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ba(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Tl(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ii(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_s(e=>{let t=this.getAxisMotionValue(e).get()||0;if(ct.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Yo(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&Ne.update(()=>i(e,t),!1,!0),ni(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=eu(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&Ne.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Ml(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Ol(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&Ne.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!$l(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=zl(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&fl(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Bl(n.layoutBox,e):this.constraints=!1,this.elastic=Kl(t),r!==this.constraints&&!fl(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&_s(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Wl(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!fl(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=oo(n,r.root,this.visualElement.getTransformPagePoint()),a=Hl(r.layout.layoutBox,i);if(t){let e=t(Va(a));this.hasMutatedConstraints=!!e,e&&(a=Ba(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=_s(o=>{if(!$l(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return ni(this.visualElement,e),n.start(Br(e,n,0,t,this.visualElement,!1))}stopAnimation(){_s(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){_s(t=>{let{drag:n}=this.getProps();if(!$l(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-jt(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!fl(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};_s(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Ul({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),_s(t=>{if(!$l(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(jt(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Yl.set(this.visualElement,this);let e=this.visualElement.current,t=Dl(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Gi(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();fl(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Ql(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ne.read(r);let o=ks(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(_s(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Gl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Zl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Ql(e,t,n){let r=pa(e,Zl(n)),i=pa(t,Zl(n));return()=>{r(),i()}}function $l(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function eu(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var tu=class extends za{constructor(e){super(e),this.removeGroupControls=N,this.removeListeners=N,this.controls=new Xl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||N}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},nu=e=>(t,n)=>{e&&Ne.update(()=>e(t,n),!1,!0)},ru=class extends za{constructor(){super(...arguments),this.removePointerDownListener=N}onPointerDown(e){this.session=new Ml(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ol(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:nu(e),onStart:nu(t),onMove:nu(n),onEnd:(e,t)=>{delete this.session,r&&Ne.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Dl(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},iu=!1,au=class extends S.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),iu&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Fs.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),iu=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Ne.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Mi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;iu=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function ou(e){let[t,n]=Ec(),r=(0,S.useContext)(C);return(0,q.jsx)(au,{...e,layoutGroup:r,switchLayoutGroup:(0,S.useContext)(dl),isPresent:t,safeToRemove:n})}var su={pan:{Feature:ru},drag:{Feature:tu,ProjectionNode:_c,MeasureLayout:ou}};function cu(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&Ne.postRender(()=>i(t,Tl(t)))}var lu=class extends za{mount(){let{current:e}=this.node;e&&(this.unmount=zi(e,(e,t)=>(cu(this.node,t,`Start`),e=>cu(this.node,e,`End`))))}unmount(){}},uu=class extends za{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=F(ks(this.node.current,`focus`,()=>this.onFocus()),ks(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function du(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&Ne.postRender(()=>i(t,Tl(t)))}var fu=class extends za{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Qi(e,(e,t)=>(du(this.node,t,`Start`),(e,{success:t})=>du(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},pu=new WeakMap,mu=new WeakMap,hu=e=>{let t=pu.get(e.target);t&&t(e)},gu=e=>{e.forEach(hu)};function _u({root:e,...t}){let n=e||document;mu.has(n)||mu.set(n,{});let r=mu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(gu,{root:e,...t})),r[i]}function vu(e,t,n){let r=_u(t);return pu.set(e,n),r.observe(e),()=>{pu.delete(e),r.unobserve(e)}}var yu={some:0,all:1},bu=class extends za{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:yu[r]};this.stopObserver=vu(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(xu(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function xu({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Su={inView:{Feature:bu},tap:{Feature:fu},focus:{Feature:uu},hover:{Feature:lu}},Cu={layout:{ProjectionNode:_c,MeasureLayout:ou}},wu=bl({...wl,...Su,...su,...Cu},xl),Tu=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Eu=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Du=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ou=e=>{let t=Du(e);return t.charAt(0).toUpperCase()+t.slice(1)},ku={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Au=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ju=(0,S.createContext)({}),Mu=()=>(0,S.useContext)(ju),Nu=(0,S.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Mu()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,S.createElement)(`svg`,{ref:c,...ku,width:t??l??ku.width,height:t??l??ku.height,stroke:e??f,strokeWidth:m,className:Tu(`lucide`,p,i),...!a&&!Au(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,S.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Pu=(e,t)=>{let n=(0,S.forwardRef)(({className:n,...r},i)=>(0,S.createElement)(Nu,{ref:i,iconNode:t,className:Tu(`lucide-${Eu(Ou(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ou(e),n},Fu=Pu(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Iu=Pu(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Lu=Pu(`battery`,[[`path`,{d:`M 22 14 L 22 10`,key:`nqc4tb`}],[`rect`,{x:`2`,y:`6`,width:`16`,height:`12`,rx:`2`,key:`13zb55`}]]),Ru=Pu(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),zu=Pu(`cloud-drizzle`,[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`M8 19v1`,key:`1dk2by`}],[`path`,{d:`M8 14v1`,key:`84yxot`}],[`path`,{d:`M16 19v1`,key:`v220m7`}],[`path`,{d:`M16 14v1`,key:`g12gj6`}],[`path`,{d:`M12 21v1`,key:`q8vafk`}],[`path`,{d:`M12 16v1`,key:`1mx6rx`}]]),Bu=Pu(`cloud-lightning`,[[`path`,{d:`M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973`,key:`1cez44`}],[`path`,{d:`m13 12-3 5h4l-3 5`,key:`1t22er`}]]),Vu=Pu(`cloud-rain`,[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`M16 14v6`,key:`1j4efv`}],[`path`,{d:`M8 14v6`,key:`17c4r9`}],[`path`,{d:`M12 16v6`,key:`c8a4gj`}]]),Hu=Pu(`cloud-sun`,[[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}],[`path`,{d:`M15.947 12.65a4 4 0 0 0-5.925-4.128`,key:`dpwdj0`}],[`path`,{d:`M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z`,key:`s09mg5`}]]),Uu=Pu(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),Wu=Pu(`droplet`,[[`path`,{d:`M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z`,key:`c7niix`}]]),Gu=Pu(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),Ku=Pu(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),qu=Pu(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),Ju=Pu(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Yu=Pu(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Xu=Pu(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Zu=Pu(`navigation`,[[`polygon`,{points:`3 11 22 2 13 21 11 13 3 11`,key:`1ltx0t`}]]),Qu=Pu(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),$u=Pu(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),ed=Pu(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),td=Pu(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),nd=Pu(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),rd=Pu(`shirt`,[[`path`,{d:`M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z`,key:`1wgbhj`}]]),id=Pu(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),ad=Pu(`snowflake`,[[`path`,{d:`m10 20-1.25-2.5L6 18`,key:`18frcb`}],[`path`,{d:`M10 4 8.75 6.5 6 6`,key:`7mghy3`}],[`path`,{d:`m14 20 1.25-2.5L18 18`,key:`1chtki`}],[`path`,{d:`m14 4 1.25 2.5L18 6`,key:`1b4wsy`}],[`path`,{d:`m17 21-3-6h-4`,key:`15hhxa`}],[`path`,{d:`m17 3-3 6 1.5 3`,key:`11697g`}],[`path`,{d:`M2 12h6.5L10 9`,key:`kv9z4n`}],[`path`,{d:`m20 10-1.5 2 1.5 2`,key:`1swlpi`}],[`path`,{d:`M22 12h-6.5L14 15`,key:`1mxi28`}],[`path`,{d:`m4 10 1.5 2L4 14`,key:`k9enpj`}],[`path`,{d:`m7 21 3-6-1.5-3`,key:`j8hb9u`}],[`path`,{d:`m7 3 3 6h4`,key:`1otusx`}]]),od=Pu(`sofa`,[[`path`,{d:`M20 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v3`,key:`1dgpiv`}],[`path`,{d:`M2 16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z`,key:`xacw8m`}],[`path`,{d:`M4 18v2`,key:`jwo5n2`}],[`path`,{d:`M20 18v2`,key:`1ar1qi`}],[`path`,{d:`M12 4v9`,key:`oqhhn3`}]]),sd=Pu(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),cd=Pu(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),ld=Pu(`thermometer`,[[`path`,{d:`M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z`,key:`17jzev`}]]),ud=Pu(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),dd=Pu(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),fd=Pu(`triangle`,[[`path`,{d:`M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`,key:`14u9p9`}]]),pd=Pu(`wind`,[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`,key:`148xed`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`,key:`1u4tom`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`,key:`75valh`}]]),md=Pu(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),hd=u(y(),1),gd=()=>{let e=window.location.hostname;return e===`localhost`||e===`127.0.0.1`||e.startsWith(`192.168.`)?`https://192.168.111.240:1881`:`https://${e}:1881`},_d=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(!0),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(!1),f=gd(),p=`${f}/api/boat`,m=`${f}/api/boat/control`,h=async()=>{try{let e=await fetch(p);if(!e.ok)throw Error(`Errore Server: ${e.status}`);t(await e.json()),r(new Date),s(!1),l(null),d(!1)}catch(e){console.error(`Fetch Error:`,e),l(e.message),s(!0),d(!1)}},g=async(e,t)=>{d(!0);try{if(!(await fetch(m,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({device:e,state:t})})).ok)throw Error(`Comando fallito`);setTimeout(h,1e3)}catch(e){console.error(`Errore invio comando:`,e),d(!1)}};return(0,S.useEffect)(()=>{h();let e=setInterval(h,5e3);return()=>clearInterval(e)},[]),(0,S.useEffect)(()=>{let e=setInterval(()=>{if(n){let e=Math.floor((new Date-n)/1e3);a(e),s(e>30)}},1e3);return()=>clearInterval(e)},[n]),{data:e,secondsSinceLastUpdate:i,isDataStale:o,statusColor:i<15?`bg-green-500`:i<30?`bg-orange-500`:`bg-red-500`,isUpdating:u,error:c,apiUrl:f,toggleSwitch:(e,t)=>g(e,t),setShoreLimit:e=>g(`shore_limit`,e)}};function vd(e,t){let n=(0,S.useRef)(t);(0,S.useEffect)(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}function yd(e){return Object.freeze({__version:1,map:e})}function bd(e,t){return Object.freeze({...e,...t})}var xd=(0,S.createContext)(null);function Sd(){let e=(0,S.use)(xd);if(e==null)throw Error(`No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>`);return e}var Cd=_();function Y(e){function t(t,n){let{instance:r,context:i}=e(t).current;(0,S.useImperativeHandle)(n,()=>r);let{children:a}=t;return a==null?null:S.createElement(xd,{value:i},a)}return(0,S.forwardRef)(t)}function wd(e){function t(t,n){let{instance:r}=e(t).current;return(0,S.useImperativeHandle)(n,()=>r),null}return(0,S.forwardRef)(t)}function Td(e,t){let n=(0,S.useRef)(void 0);(0,S.useEffect)(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function Ed(e,t){let n=e.pane??t.pane;return n?{...e,pane:n}:e}var Dd=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.leaflet={}))})(e,(function(e){var t=`1.9.4`;function n(e){var t,n,r,i;for(n=1,r=arguments.length;n<r;n++)for(t in i=arguments[n],i)e[t]=i[t];return e}var r=Object.create||(function(){function e(){}return function(t){return e.prototype=t,new e}})();function i(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var r=n.call(arguments,2);return function(){return e.apply(t,r.length?r.concat(n.call(arguments)):arguments)}}var a=0;function o(e){return`_leaflet_id`in e||(e._leaflet_id=++a),e._leaflet_id}function s(e,t,n){var r,i,a,o=function(){r=!1,i&&=(a.apply(n,i),!1)};return a=function(){r?i=arguments:(e.apply(n,arguments),setTimeout(o,t),r=!0)},a}function c(e,t,n){var r=t[1],i=t[0],a=r-i;return e===r&&n?e:((e-i)%a+a)%a+i}function l(){return!1}function u(e,t){if(t===!1)return e;var n=10**(t===void 0?6:t);return Math.round(e*n)/n}function d(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,``)}function f(e){return d(e).split(/\s+/)}function p(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,`options`)||(e.options=e.options?r(e.options):{}),t)e.options[n]=t[n];return e.options}function m(e,t,n){var r=[];for(var i in e)r.push(encodeURIComponent(n?i.toUpperCase():i)+`=`+encodeURIComponent(e[i]));return(!t||t.indexOf(`?`)===-1?`?`:`&`)+r.join(`&`)}var h=/\{ *([\w_ -]+) *\}/g;function g(e,t){return e.replace(h,function(e,n){var r=t[n];if(r===void 0)throw Error(`No value provided for variable `+e);return typeof r==`function`&&(r=r(t)),r})}var _=Array.isArray||function(e){return Object.prototype.toString.call(e)===`[object Array]`};function v(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var y=`data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=`;function b(e){return window[`webkit`+e]||window[`moz`+e]||window[`ms`+e]}var x=0;function S(e){var t=+new Date,n=Math.max(0,16-(t-x));return x=t+n,window.setTimeout(e,n)}var C=window.requestAnimationFrame||b(`RequestAnimationFrame`)||S,w=window.cancelAnimationFrame||b(`CancelAnimationFrame`)||b(`CancelRequestAnimationFrame`)||function(e){window.clearTimeout(e)};function T(e,t,n){if(n&&C===S)e.call(t);else return C.call(window,i(e,t))}function E(e){e&&w.call(window,e)}var D={__proto__:null,extend:n,create:r,bind:i,get lastId(){return a},stamp:o,throttle:s,wrapNum:c,falseFn:l,formatNum:u,trim:d,splitWords:f,setOptions:p,getParamString:m,template:g,isArray:_,indexOf:v,emptyImageUrl:y,requestFn:C,cancelFn:w,requestAnimFrame:T,cancelAnimFrame:E};function O(){}O.extend=function(e){var t=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=t.__super__=this.prototype,a=r(i);for(var o in a.constructor=t,t.prototype=a,this)Object.prototype.hasOwnProperty.call(this,o)&&o!==`prototype`&&o!==`__super__`&&(t[o]=this[o]);return e.statics&&n(t,e.statics),e.includes&&(k(e.includes),n.apply(null,[a].concat(e.includes))),n(a,e),delete a.statics,delete a.includes,a.options&&(a.options=i.options?r(i.options):{},n(a.options,e.options)),a._initHooks=[],a.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=a._initHooks.length;e<t;e++)a._initHooks[e].call(this)}},t},O.include=function(e){var t=this.prototype.options;return n(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},O.mergeOptions=function(e){return n(this.prototype.options,e),this},O.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n=typeof e==`function`?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};function k(e){if(!(typeof L>`u`||!L||!L.Mixin)){e=_(e)?e:[e];for(var t=0;t<e.length;t++)e[t]===L.Mixin.Events&&console.warn(`Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.`,Error().stack)}}var A={on:function(e,t,n){if(typeof e==`object`)for(var r in e)this._on(r,e[r],t);else{e=f(e);for(var i=0,a=e.length;i<a;i++)this._on(e[i],t,n)}return this},off:function(e,t,n){if(!arguments.length)delete this._events;else if(typeof e==`object`)for(var r in e)this._off(r,e[r],t);else{e=f(e);for(var i=arguments.length===1,a=0,o=e.length;a<o;a++)i?this._off(e[a]):this._off(e[a],t,n)}return this},_on:function(e,t,n,r){if(typeof t!=`function`){console.warn(`wrong listener type: `+typeof t);return}if(this._listens(e,t,n)===!1){n===this&&(n=void 0);var i={fn:t,ctx:n};r&&(i.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(i)}},_off:function(e,t,n){var r,i,a;if(this._events&&(r=this._events[e],r)){if(arguments.length===1){if(this._firingCount)for(i=0,a=r.length;i<a;i++)r[i].fn=l;delete this._events[e];return}if(typeof t!=`function`){console.warn(`wrong listener type: `+typeof t);return}var o=this._listens(e,t,n);if(o!==!1){var s=r[o];this._firingCount&&(s.fn=l,this._events[e]=r=r.slice()),r.splice(o,1)}}},fire:function(e,t,r){if(!this.listens(e,r))return this;var i=n({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this});if(this._events){var a=this._events[e];if(a){this._firingCount=this._firingCount+1||1;for(var o=0,s=a.length;o<s;o++){var c=a[o],l=c.fn;c.once&&this.off(e,l,c.ctx),l.call(c.ctx||this,i)}this._firingCount--}}return r&&this._propagateEvent(i),this},listens:function(e,t,n,r){typeof e!=`string`&&console.warn(`"string" type argument expected`);var i=t;typeof t!=`function`&&(r=!!t,i=void 0,n=void 0);var a=this._events&&this._events[e];if(a&&a.length&&this._listens(e,i,n)!==!1)return!0;if(r){for(var o in this._eventParents)if(this._eventParents[o].listens(e,t,n,r))return!0}return!1},_listens:function(e,t,n){if(!this._events)return!1;var r=this._events[e]||[];if(!t)return!!r.length;n===this&&(n=void 0);for(var i=0,a=r.length;i<a;i++)if(r[i].fn===t&&r[i].ctx===n)return i;return!1},once:function(e,t,n){if(typeof e==`object`)for(var r in e)this._on(r,e[r],t,!0);else{e=f(e);for(var i=0,a=e.length;i<a;i++)this._on(e[i],t,n,!0)}return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[o(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[o(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,n({layer:e.target,propagatedFrom:e.target},e),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var ee=O.extend(A);function j(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}var te=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};j.prototype={clone:function(){return new j(this.x,this.y)},add:function(e){return this.clone()._add(M(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(M(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new j(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new j(this.x/e.x,this.y/e.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=te(this.x),this.y=te(this.y),this},distanceTo:function(e){e=M(e);var t=e.x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return e=M(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=M(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return`Point(`+u(this.x)+`, `+u(this.y)+`)`}};function M(e,t,n){return e instanceof j?e:_(e)?new j(e[0],e[1]):e==null?e:typeof e==`object`&&`x`in e&&`y`in e?new j(e.x,e.y):new j(e,t,n)}function N(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;r<i;r++)this.extend(n[r])}N.prototype={extend:function(e){var t,n;if(!e)return this;if(e instanceof j||typeof e[0]==`number`||`x`in e)t=n=M(e);else if(e=P(e),t=e.min,n=e.max,!t||!n)return this;return!this.min&&!this.max?(this.min=t.clone(),this.max=n.clone()):(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)),this},getCenter:function(e){return M((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return M(this.min.x,this.max.y)},getTopRight:function(){return M(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return e=typeof e[0]==`number`||e instanceof j?M(e):P(e),e instanceof N?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=P(e);var t=this.min,n=this.max,r=e.min,i=e.max,a=i.x>=t.x&&r.x<=n.x,o=i.y>=t.y&&r.y<=n.y;return a&&o},overlaps:function(e){e=P(e);var t=this.min,n=this.max,r=e.min,i=e.max,a=i.x>t.x&&r.x<n.x,o=i.y>t.y&&r.y<n.y;return a&&o},isValid:function(){return!!(this.min&&this.max)},pad:function(e){var t=this.min,n=this.max,r=Math.abs(t.x-n.x)*e,i=Math.abs(t.y-n.y)*e;return P(M(t.x-r,t.y-i),M(n.x+r,n.y+i))},equals:function(e){return e?(e=P(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight())):!1}};function P(e,t){return!e||e instanceof N?e:new N(e,t)}function F(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;r<i;r++)this.extend(n[r])}F.prototype={extend:function(e){var t=this._southWest,n=this._northEast,r,i;if(e instanceof re)r=e,i=e;else if(e instanceof F){if(r=e._southWest,i=e._northEast,!r||!i)return this}else return e?this.extend(I(e)||ne(e)):this;return!t&&!n?(this._southWest=new re(r.lat,r.lng),this._northEast=new re(i.lat,i.lng)):(t.lat=Math.min(r.lat,t.lat),t.lng=Math.min(r.lng,t.lng),n.lat=Math.max(i.lat,n.lat),n.lng=Math.max(i.lng,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,r=Math.abs(t.lat-n.lat)*e,i=Math.abs(t.lng-n.lng)*e;return new F(new re(t.lat-r,t.lng-i),new re(n.lat+r,n.lng+i))},getCenter:function(){return new re((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new re(this.getNorth(),this.getWest())},getSouthEast:function(){return new re(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e=typeof e[0]==`number`||e instanceof re||`lat`in e?I(e):ne(e);var t=this._southWest,n=this._northEast,r,i;return e instanceof F?(r=e.getSouthWest(),i=e.getNorthEast()):r=i=e,r.lat>=t.lat&&i.lat<=n.lat&&r.lng>=t.lng&&i.lng<=n.lng},intersects:function(e){e=ne(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),a=i.lat>=t.lat&&r.lat<=n.lat,o=i.lng>=t.lng&&r.lng<=n.lng;return a&&o},overlaps:function(e){e=ne(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),a=i.lat>t.lat&&r.lat<n.lat,o=i.lng>t.lng&&r.lng<n.lng;return a&&o},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(`,`)},equals:function(e,t){return e?(e=ne(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function ne(e,t){return e instanceof F?e:new F(e,t)}function re(e,t,n){if(isNaN(e)||isNaN(t))throw Error(`Invalid LatLng object: (`+e+`, `+t+`)`);this.lat=+e,this.lng=+t,n!==void 0&&(this.alt=+n)}re.prototype={equals:function(e,t){return e?(e=I(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(t===void 0?1e-9:t)):!1},toString:function(e){return`LatLng(`+u(this.lat,e)+`, `+u(this.lng,e)+`)`},distanceTo:function(e){return ae.distance(this,I(e))},wrap:function(){return ae.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return ne([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])},clone:function(){return new re(this.lat,this.lng,this.alt)}};function I(e,t,n){return e instanceof re?e:_(e)&&typeof e[0]!=`object`?e.length===3?new re(e[0],e[1],e[2]):e.length===2?new re(e[0],e[1]):null:e==null?e:typeof e==`object`&&`lat`in e?new re(e.lat,`lng`in e?e.lng:e.lon,e.alt):t===void 0?null:new re(e,t,n)}var ie={latLngToPoint:function(e,t){var n=this.projection.project(e),r=this.scale(t);return this.transformation._transform(n,r)},pointToLatLng:function(e,t){var n=this.scale(t),r=this.transformation.untransform(e,n);return this.projection.unproject(r)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*2**e},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,n=this.scale(e);return new N(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?c(e.lng,this.wrapLng,!0):e.lng,n=this.wrapLat?c(e.lat,this.wrapLat,!0):e.lat,r=e.alt;return new re(n,t,r)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),r=t.lat-n.lat,i=t.lng-n.lng;if(r===0&&i===0)return e;var a=e.getSouthWest(),o=e.getNorthEast();return new F(new re(a.lat-r,a.lng-i),new re(o.lat-r,o.lng-i))}},ae=n({},ie,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=Math.sin((t.lat-e.lat)*n/2),o=Math.sin((t.lng-e.lng)*n/2),s=a*a+Math.cos(r)*Math.cos(i)*o*o,c=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*c}}),oe=6378137,se={R:oe,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),i=Math.sin(r*t);return new j(this.R*e.lng*t,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(e){var t=180/Math.PI;return new re((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:(function(){var e=oe*Math.PI;return new N([-e,-e],[e,e])})()};function ce(e,t,n,r){if(_(e)){this._a=e[0],this._b=e[1],this._c=e[2],this._d=e[3];return}this._a=e,this._b=t,this._c=n,this._d=r}ce.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t||=1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t||=1,new j((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}};function le(e,t,n,r){return new ce(e,t,n,r)}var ue=n({},ae,{code:`EPSG:3857`,projection:se,transformation:function(){var e=.5/(Math.PI*se.R);return le(e,.5,-e,.5)}()}),de=n({},ue,{code:`EPSG:900913`});function fe(e){return document.createElementNS(`http://www.w3.org/2000/svg`,e)}function pe(e,t){var n=``,r,i,a,o,s,c;for(r=0,a=e.length;r<a;r++){for(s=e[r],i=0,o=s.length;i<o;i++)c=s[i],n+=(i?`L`:`M`)+c.x+` `+c.y;n+=t?R.svg?`z`:`x`:``}return n||`M0 0`}var me=document.documentElement.style,he=`ActiveXObject`in window,ge=he&&!document.addEventListener,_e=`msLaunchUri`in navigator&&!(`documentMode`in document),ve=Ze(`webkit`),ye=Ze(`android`),be=Ze(`android 2`)||Ze(`android 3`),xe=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Se=ye&&Ze(`Google`)&&xe<537&&!(`AudioNode`in window),Ce=!!window.opera,we=!_e&&Ze(`chrome`),Te=Ze(`gecko`)&&!ve&&!Ce&&!he,Ee=!we&&Ze(`safari`),De=Ze(`phantom`),Oe=`OTransition`in me,ke=navigator.platform.indexOf(`Win`)===0,Ae=he&&`transition`in me,je=`WebKitCSSMatrix`in window&&`m11`in new window.WebKitCSSMatrix&&!be,Me=`MozPerspective`in me,Ne=!window.L_DISABLE_3D&&(Ae||je||Me)&&!Oe&&!De,Pe=typeof orientation<`u`||Ze(`mobile`),Fe=Pe&&ve,Ie=Pe&&je,Le=!window.PointerEvent&&window.MSPointerEvent,Re=!!(window.PointerEvent||Le),ze=`ontouchstart`in window||!!window.TouchEvent,Be=!window.L_NO_TOUCH&&(ze||Re),Ve=Pe&&Ce,He=Pe&&Te,Ue=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,We=function(){var e=!1;try{var t=Object.defineProperty({},`passive`,{get:function(){e=!0}});window.addEventListener(`testPassiveEventSupport`,l,t),window.removeEventListener(`testPassiveEventSupport`,l,t)}catch{}return e}(),Ge=function(){return!!document.createElement(`canvas`).getContext}(),Ke=!!(document.createElementNS&&fe(`svg`).createSVGRect),qe=!!Ke&&(function(){var e=document.createElement(`div`);return e.innerHTML=`<svg/>`,(e.firstChild&&e.firstChild.namespaceURI)===`http://www.w3.org/2000/svg`})(),Je=!Ke&&function(){try{var e=document.createElement(`div`);e.innerHTML=`<v:shape adj="1"/>`;var t=e.firstChild;return t.style.behavior=`url(#default#VML)`,t&&typeof t.adj==`object`}catch{return!1}}(),Ye=navigator.platform.indexOf(`Mac`)===0,Xe=navigator.platform.indexOf(`Linux`)===0;function Ze(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var R={ie:he,ielt9:ge,edge:_e,webkit:ve,android:ye,android23:be,androidStock:Se,opera:Ce,chrome:we,gecko:Te,safari:Ee,phantom:De,opera12:Oe,win:ke,ie3d:Ae,webkit3d:je,gecko3d:Me,any3d:Ne,mobile:Pe,mobileWebkit:Fe,mobileWebkit3d:Ie,msPointer:Le,pointer:Re,touch:Be,touchNative:ze,mobileOpera:Ve,mobileGecko:He,retina:Ue,passiveEvents:We,canvas:Ge,svg:Ke,vml:Je,inlineSvg:qe,mac:Ye,linux:Xe},Qe=R.msPointer?`MSPointerDown`:`pointerdown`,$e=R.msPointer?`MSPointerMove`:`pointermove`,et=R.msPointer?`MSPointerUp`:`pointerup`,tt=R.msPointer?`MSPointerCancel`:`pointercancel`,nt={touchstart:Qe,touchmove:$e,touchend:et,touchcancel:tt},rt={touchstart:ft,touchmove:dt,touchend:dt,touchcancel:dt},it={},at=!1;function ot(e,t,n){return t===`touchstart`&&ut(),rt[t]?(n=rt[t].bind(this,n),e.addEventListener(nt[t],n,!1),n):(console.warn(`wrong event specified:`,t),l)}function st(e,t,n){if(!nt[t]){console.warn(`wrong event specified:`,t);return}e.removeEventListener(nt[t],n,!1)}function ct(e){it[e.pointerId]=e}function z(e){it[e.pointerId]&&(it[e.pointerId]=e)}function lt(e){delete it[e.pointerId]}function ut(){at||=(document.addEventListener(Qe,ct,!0),document.addEventListener($e,z,!0),document.addEventListener(et,lt,!0),document.addEventListener(tt,lt,!0),!0)}function dt(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||`mouse`)){for(var n in t.touches=[],it)t.touches.push(it[n]);t.changedTouches=[t],e(t)}}function ft(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&rn(t),dt(e,t)}function pt(e){var t={},n,r;for(r in e)n=e[r],t[r]=n&&n.bind?n.bind(e):n;return e=t,t.type=`dblclick`,t.detail=2,t.isTrusted=!1,t._simulated=!0,t}var mt=200;function ht(e,t){e.addEventListener(`dblclick`,t);var n=0,r;function i(e){if(e.detail!==1){r=e.detail;return}if(!(e.pointerType===`mouse`||e.sourceCapabilities&&!e.sourceCapabilities.firesTouchEvents)){var i=on(e);if(!(i.some(function(e){return e instanceof HTMLLabelElement&&e.attributes.for})&&!i.some(function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement}))){var a=Date.now();a-n<=mt?(r++,r===2&&t(pt(e))):r=1,n=a}}}return e.addEventListener(`click`,i),{dblclick:t,simDblclick:i}}function gt(e,t){e.removeEventListener(`dblclick`,t.dblclick),e.removeEventListener(`click`,t.simDblclick)}var _t=Mt([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),vt=Mt([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]),yt=vt===`webkitTransition`||vt===`OTransition`?vt+`End`:`transitionend`;function bt(e){return typeof e==`string`?document.getElementById(e):e}function xt(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||n===`auto`)&&document.defaultView){var r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return n===`auto`?null:n}function B(e,t,n){var r=document.createElement(e);return r.className=t||``,n&&n.appendChild(r),r}function St(e){var t=e.parentNode;t&&t.removeChild(e)}function Ct(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function wt(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function Tt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function Et(e,t){if(e.classList!==void 0)return e.classList.contains(t);var n=kt(e);return n.length>0&&RegExp(`(^|\\s)`+t+`(\\s|$)`).test(n)}function V(e,t){if(e.classList!==void 0)for(var n=f(t),r=0,i=n.length;r<i;r++)e.classList.add(n[r]);else if(!Et(e,t)){var a=kt(e);Ot(e,(a?a+` `:``)+t)}}function Dt(e,t){e.classList===void 0?Ot(e,d((` `+kt(e)+` `).replace(` `+t+` `,` `))):e.classList.remove(t)}function Ot(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t}function kt(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}function At(e,t){`opacity`in e.style?e.style.opacity=t:`filter`in e.style&&jt(e,t)}function jt(e,t){var n=!1,r=`DXImageTransform.Microsoft.Alpha`;try{n=e.filters.item(r)}catch{if(t===1)return}t=Math.round(t*100),n?(n.Enabled=t!==100,n.Opacity=t):e.style.filter+=` progid:`+r+`(opacity=`+t+`)`}function Mt(e){for(var t=document.documentElement.style,n=0;n<e.length;n++)if(e[n]in t)return e[n];return!1}function Nt(e,t,n){var r=t||new j(0,0);e.style[_t]=(R.ie3d?`translate(`+r.x+`px,`+r.y+`px)`:`translate3d(`+r.x+`px,`+r.y+`px,0)`)+(n?` scale(`+n+`)`:``)}function Pt(e,t){e._leaflet_pos=t,R.any3d?Nt(e,t):(e.style.left=t.x+`px`,e.style.top=t.y+`px`)}function Ft(e){return e._leaflet_pos||new j(0,0)}var It,Lt,Rt;if(`onselectstart`in document)It=function(){H(window,`selectstart`,rn)},Lt=function(){U(window,`selectstart`,rn)};else{var zt=Mt([`userSelect`,`WebkitUserSelect`,`OUserSelect`,`MozUserSelect`,`msUserSelect`]);It=function(){if(zt){var e=document.documentElement.style;Rt=e[zt],e[zt]=`none`}},Lt=function(){zt&&(document.documentElement.style[zt]=Rt,Rt=void 0)}}function Bt(){H(window,`dragstart`,rn)}function Vt(){U(window,`dragstart`,rn)}var Ht,Ut;function Wt(e){for(;e.tabIndex===-1;)e=e.parentNode;e.style&&(Gt(),Ht=e,Ut=e.style.outlineStyle,e.style.outlineStyle=`none`,H(window,`keydown`,Gt))}function Gt(){Ht&&(Ht.style.outlineStyle=Ut,Ht=void 0,Ut=void 0,U(window,`keydown`,Gt))}function Kt(e){do e=e.parentNode;while((!e.offsetWidth||!e.offsetHeight)&&e!==document.body);return e}function qt(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}var Jt={__proto__:null,TRANSFORM:_t,TRANSITION:vt,TRANSITION_END:yt,get:bt,getStyle:xt,create:B,remove:St,empty:Ct,toFront:wt,toBack:Tt,hasClass:Et,addClass:V,removeClass:Dt,setClass:Ot,getClass:kt,setOpacity:At,testProp:Mt,setTransform:Nt,setPosition:Pt,getPosition:Ft,get disableTextSelection(){return It},get enableTextSelection(){return Lt},disableImageDrag:Bt,enableImageDrag:Vt,preventOutline:Wt,restoreOutline:Gt,getSizedParentNode:Kt,getScale:qt};function H(e,t,n,r){if(t&&typeof t==`object`)for(var i in t)Qt(e,i,t[i],n);else{t=f(t);for(var a=0,o=t.length;a<o;a++)Qt(e,t[a],n,r)}return this}var Yt=`_leaflet_events`;function U(e,t,n,r){if(arguments.length===1)Xt(e),delete e[Yt];else if(t&&typeof t==`object`)for(var i in t)$t(e,i,t[i],n);else if(t=f(t),arguments.length===2)Xt(e,function(e){return v(t,e)!==-1});else for(var a=0,o=t.length;a<o;a++)$t(e,t[a],n,r);return this}function Xt(e,t){for(var n in e[Yt]){var r=n.split(/\d/)[0];(!t||t(r))&&$t(e,r,null,null,n)}}var Zt={mouseenter:`mouseover`,mouseleave:`mouseout`,wheel:!(`onwheel`in window)&&`mousewheel`};function Qt(e,t,n,r){var i=t+o(n)+(r?`_`+o(r):``);if(e[Yt]&&e[Yt][i])return this;var a=function(t){return n.call(r||e,t||window.event)},s=a;!R.touchNative&&R.pointer&&t.indexOf(`touch`)===0?a=ot(e,t,a):R.touch&&t===`dblclick`?a=ht(e,a):`addEventListener`in e?t===`touchstart`||t===`touchmove`||t===`wheel`||t===`mousewheel`?e.addEventListener(Zt[t]||t,a,R.passiveEvents?{passive:!1}:!1):t===`mouseenter`||t===`mouseleave`?(a=function(t){t||=window.event,un(e,t)&&s(t)},e.addEventListener(Zt[t],a,!1)):e.addEventListener(t,s,!1):e.attachEvent(`on`+t,a),e[Yt]=e[Yt]||{},e[Yt][i]=a}function $t(e,t,n,r,i){i||=t+o(n)+(r?`_`+o(r):``);var a=e[Yt]&&e[Yt][i];if(!a)return this;!R.touchNative&&R.pointer&&t.indexOf(`touch`)===0?st(e,t,a):R.touch&&t===`dblclick`?gt(e,a):`removeEventListener`in e?e.removeEventListener(Zt[t]||t,a,!1):e.detachEvent(`on`+t,a),e[Yt][i]=null}function en(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function tn(e){return Qt(e,`wheel`,en),this}function nn(e){return H(e,`mousedown touchstart dblclick contextmenu`,en),e._leaflet_disable_click=!0,this}function rn(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function an(e){return rn(e),en(e),this}function on(e){if(e.composedPath)return e.composedPath();for(var t=[],n=e.target;n;)t.push(n),n=n.parentNode;return t}function sn(e,t){if(!t)return new j(e.clientX,e.clientY);var n=qt(t),r=n.boundingClientRect;return new j((e.clientX-r.left)/n.x-t.clientLeft,(e.clientY-r.top)/n.y-t.clientTop)}var cn=R.linux&&R.chrome?window.devicePixelRatio:R.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ln(e){return R.edge?e.wheelDeltaY/2:e.deltaY&&e.deltaMode===0?-e.deltaY/cn:e.deltaY&&e.deltaMode===1?-e.deltaY*20:e.deltaY&&e.deltaMode===2?-e.deltaY*60:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?-e.detail*20:e.detail?e.detail/-32765*60:0}function un(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch{return!1}return n!==e}var dn={__proto__:null,on:H,off:U,stopPropagation:en,disableScrollPropagation:tn,disableClickPropagation:nn,preventDefault:rn,stop:an,getPropagationPath:on,getMousePosition:sn,getWheelDelta:ln,isExternalTarget:un,addListener:H,removeListener:U},fn=ee.extend({run:function(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=Ft(e),this._offset=t.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=T(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=this._duration*1e3;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),Pt(this._el,n),this.fire(`step`)},_complete:function(){E(this._animId),this._inProgress=!1,this.fire(`end`)},_easeOut:function(e){return 1-(1-e)**this._easeOutPower}}),W=ee.extend({options:{crs:ue,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,t){t=p(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.zoom!==void 0&&(this._zoom=this._limitZoom(t.zoom)),t.center&&t.zoom!==void 0&&this.setView(I(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=vt&&R.any3d&&!R.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),H(this._proxy,yt,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,r){return t=t===void 0?this._zoom:this._limitZoom(t),e=this._limitCenter(I(e),t,this.options.maxBounds),r||={},this._stop(),this._loaded&&!r.reset&&r!==!0&&(r.animate!==void 0&&(r.zoom=n({animate:r.animate},r.zoom),r.pan=n({animate:r.animate,duration:r.duration},r.pan)),this._zoom===t?this._tryAnimatedPan(e,r.pan):this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,r.zoom))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,t,r.pan&&r.pan.noMoveStart),this)},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e||=R.any3d?this.options.zoomDelta:1,this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e||=R.any3d?this.options.zoomDelta:1,this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var r=this.getZoomScale(t),i=this.getSize().divideBy(2),a=(e instanceof j?e:this.latLngToContainerPoint(e)).subtract(i).multiplyBy(1-1/r),o=this.containerPointToLatLng(i.add(a));return this.setView(o,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t||={},e=e.getBounds?e.getBounds():ne(e);var n=M(t.paddingTopLeft||t.padding||[0,0]),r=M(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(e,!1,n.add(r));if(i=typeof t.maxZoom==`number`?Math.min(t.maxZoom,i):i,i===1/0)return{center:e.getCenter(),zoom:i};var a=r.subtract(n).divideBy(2),o=this.project(e.getSouthWest(),i),s=this.project(e.getNorthEast(),i);return{center:this.unproject(o.add(s).divideBy(2).add(a),i),zoom:i}},fitBounds:function(e,t){if(e=ne(e),!e.isValid())throw Error(`Bounds are not valid.`);var n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(e=M(e).round(),t||={},!e.x&&!e.y)return this.fire(`moveend`);if(t.animate!==!0&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new fn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire(`movestart`),t.animate!==!1){V(this._mapPane,`leaflet-pan-anim`);var n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire(`move`).fire(`moveend`);return this},flyTo:function(e,t,n){if(n||={},n.animate===!1||!R.any3d)return this.setView(e,t,n);this._stop();var r=this.project(this.getCenter()),i=this.project(e),a=this.getSize(),o=this._zoom;e=I(e),t=t===void 0?o:t;var s=Math.max(a.x,a.y),c=s*this.getZoomScale(o,t),l=i.distanceTo(r)||1,u=1.42,d=u*u;function f(e){var t=e?-1:1,n=e?c:s,r=(c*c-s*s+t*d*d*l*l)/(2*n*d*l),i=Math.sqrt(r*r+1)-r;return i<1e-9?-18:Math.log(i)}function p(e){return(Math.exp(e)-Math.exp(-e))/2}function m(e){return(Math.exp(e)+Math.exp(-e))/2}function h(e){return p(e)/m(e)}var g=f(0);function _(e){return s*(m(g)/m(g+u*e))}function v(e){return s*(m(g)*h(g+u*e)-p(g))/d}function y(e){return 1-(1-e)**1.5}var b=Date.now(),x=(f(1)-g)/u,S=n.duration?1e3*n.duration:1e3*x*.8;function C(){var n=(Date.now()-b)/S,a=y(n)*x;n<=1?(this._flyToFrame=T(C,this),this._move(this.unproject(r.add(i.subtract(r).multiplyBy(v(a)/l)),o),this.getScaleZoom(s/_(a),o),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),C.call(this),this},flyToBounds:function(e,t){var n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)},setMaxBounds:function(e){return e=ne(e),this.listens(`moveend`,this._panInsideMaxBounds)&&this.off(`moveend`,this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on(`moveend`,this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire(`zoomlevelschange`),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire(`zoomlevelschange`),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,ne(e));return n.equals(r)||this.panTo(r,t),this._enforcingBounds=!1,this},panInside:function(e,t){t||={};var n=M(t.paddingTopLeft||t.padding||[0,0]),r=M(t.paddingBottomRight||t.padding||[0,0]),i=this.project(this.getCenter()),a=this.project(e),o=this.getPixelBounds(),s=P([o.min.add(n),o.max.subtract(r)]),c=s.getSize();if(!s.contains(a)){this._enforcingBounds=!0;var l=a.subtract(s.getCenter()),u=s.extend(a).getSize().subtract(c);i.x+=l.x<0?-u.x:u.x,i.y+=l.y<0?-u.y:u.y,this.panTo(this.unproject(i),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=n({animate:!1,pan:!0},e===!0?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),a=t.divideBy(2).round(),o=r.divideBy(2).round(),s=a.subtract(o);return!s.x&&!s.y?this:(e.animate&&e.pan?this.panBy(s):(e.pan&&this._rawPanBy(s),this.fire(`move`),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,`moveend`),200)):this.fire(`moveend`)),this.fire(`resize`,{oldSize:t,newSize:r}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire(`viewreset`),this._stop()},locate:function(e){if(e=this._locateOptions=n({timeout:1e4,watch:!1},e),!(`geolocation`in navigator))return this._handleGeolocationError({code:0,message:`Geolocation not supported.`}),this;var t=i(this._handleGeolocationResponse,this),r=i(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,r,e):navigator.geolocation.getCurrentPosition(t,r,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,n=e.message||(t===1?`permission denied`:t===2?`position unavailable`:`timeout`);this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire(`locationerror`,{code:t,message:`Geolocation error: `+n+`.`})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=e.coords.latitude,n=e.coords.longitude,r=new re(t,n),i=r.toBounds(e.coords.accuracy*2),a=this._locateOptions;if(a.setView){var o=this.getBoundsZoom(i);this.setView(r,a.maxZoom?Math.min(o,a.maxZoom):o)}var s={latlng:r,bounds:i,timestamp:e.timestamp};for(var c in e.coords)typeof e.coords[c]==`number`&&(s[c]=e.coords[c]);this.fire(`locationfound`,s)}},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off(`moveend`,this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw Error(`Map container is being reused by another instance`);try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}for(var e in this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),St(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&=(E(this._resizeRequest),null),this._clearHandlers(),this._loaded&&this.fire(`unload`),this._layers)this._layers[e].remove();for(e in this._panes)St(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=B(`div`,`leaflet-pane`+(e?` leaflet-`+e.replace(`Pane`,``)+`-pane`:``),t||this._mapPane);return e&&(this._panes[e]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new F(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},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(e,t,n){e=ne(e),n=M(n||[0,0]);var r=this.getZoom()||0,i=this.getMinZoom(),a=this.getMaxZoom(),o=e.getNorthWest(),s=e.getSouthEast(),c=this.getSize().subtract(n),l=P(this.project(s,r),this.project(o,r)).getSize(),u=R.any3d?this.options.zoomSnap:1,d=c.x/l.x,f=c.y/l.y,p=t?Math.max(d,f):Math.min(d,f);return r=this.getScaleZoom(p,r),u&&(r=Math.round(r/(u/100))*(u/100),r=t?Math.ceil(r/u)*u:Math.floor(r/u)*u),Math.max(i,Math.min(a,r))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new j(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new N(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(e===void 0?this.getZoom():e)},getPane:function(e){return typeof e==`string`?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=t===void 0?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=t===void 0?this._zoom:t;var r=n.zoom(e*n.scale(t));return isNaN(r)?1/0:r},project:function(e,t){return t=t===void 0?this._zoom:t,this.options.crs.latLngToPoint(I(e),t)},unproject:function(e,t){return t=t===void 0?this._zoom:t,this.options.crs.pointToLatLng(M(e),t)},layerPointToLatLng:function(e){var t=M(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(I(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(I(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(ne(e))},distance:function(e,t){return this.options.crs.distance(I(e),I(t))},containerPointToLayerPoint:function(e){return M(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return M(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(M(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(I(e)))},mouseEventToContainerPoint:function(e){return sn(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=bt(e);if(!t)throw Error(`Map container not found.`);if(t._leaflet_id)throw Error(`Map container is already initialized.`);H(t,`scroll`,this._onScroll,this),this._containerId=o(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&R.any3d,V(e,`leaflet-container`+(R.touch?` leaflet-touch`:``)+(R.retina?` leaflet-retina`:``)+(R.ielt9?` leaflet-oldie`:``)+(R.safari?` leaflet-safari`:``)+(this._fadeAnimated?` leaflet-fade-anim`:``));var t=xt(e,`position`);t!==`absolute`&&t!==`relative`&&t!==`fixed`&&t!==`sticky`&&(e.style.position=`relative`),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane(`mapPane`,this._container),Pt(this._mapPane,new j(0,0)),this.createPane(`tilePane`),this.createPane(`overlayPane`),this.createPane(`shadowPane`),this.createPane(`markerPane`),this.createPane(`tooltipPane`),this.createPane(`popupPane`),this.options.markerZoomAnimation||(V(e.markerPane,`leaflet-zoom-hide`),V(e.shadowPane,`leaflet-zoom-hide`))},_resetView:function(e,t,n){Pt(this._mapPane,new j(0,0));var r=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire(`viewprereset`);var i=this._zoom!==t;this._moveStart(i,n)._move(e,t)._moveEnd(i),this.fire(`viewreset`),r&&this.fire(`load`)},_moveStart:function(e,t){return e&&this.fire(`zoomstart`),t||this.fire(`movestart`),this},_move:function(e,t,n,r){t===void 0&&(t=this._zoom);var i=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),r?n&&n.pinch&&this.fire(`zoom`,n):((i||n&&n.pinch)&&this.fire(`zoom`,n),this.fire(`move`,n)),this},_moveEnd:function(e){return e&&this.fire(`zoomend`),this.fire(`moveend`)},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){Pt(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw Error(`Set map center and zoom first.`)},_initEvents:function(e){this._targets={},this._targets[o(this._container)]=this;var t=e?U:H;t(this._container,`click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup`,this._handleDOMEvent,this),this.options.trackResize&&t(window,`resize`,this._onResize,this),R.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,`moveend`,this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=T(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n=[],r,i=t===`mouseout`||t===`mouseover`,a=e.target||e.srcElement,s=!1;a;){if(r=this._targets[o(a)],r&&(t===`click`||t===`preclick`)&&this._draggableMoved(r)){s=!0;break}if(r&&r.listens(t,!0)&&(i&&!un(a,e)||(n.push(r),i))||a===this._container)break;a=a.parentNode}return!n.length&&!s&&!i&&this.listens(t,!0)&&(n=[this]),n},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||e.type===`click`&&this._isClickDisabled(t))){var n=e.type;n===`mousedown`&&Wt(t),this._fireDOMEvent(e,n)}},_mouseEvents:[`click`,`dblclick`,`mouseover`,`mouseout`,`contextmenu`],_fireDOMEvent:function(e,t,r){if(e.type===`click`){var i=n({},e);i.type=`preclick`,this._fireDOMEvent(i,i.type,r)}var a=this._findEventTargets(e,t);if(r){for(var o=[],s=0;s<r.length;s++)r[s].listens(t,!0)&&o.push(r[s]);a=o.concat(a)}if(a.length){t===`contextmenu`&&rn(e);var c=a[0],l={originalEvent:e};if(e.type!==`keypress`&&e.type!==`keydown`&&e.type!==`keyup`){var u=c.getLatLng&&(!c._radius||c._radius<=10);l.containerPoint=u?this.latLngToContainerPoint(c.getLatLng()):this.mouseEventToContainerPoint(e),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=u?c.getLatLng():this.layerPointToLatLng(l.layerPoint)}for(s=0;s<a.length;s++)if(a[s].fire(t,l,!0),l.originalEvent._stopped||a[s].options.bubblingMouseEvents===!1&&v(this._mouseEvents,t)!==-1)return}},_draggableMoved:function(e){return e=e.dragging&&e.dragging.enabled()?e:this,e.dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on(`load`,e,t),this},_getMapPanePos:function(){return Ft(this._mapPane)||new j(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&t!==void 0?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){var r=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(r)},_latLngBoundsToNewLayerBounds:function(e,t,n){var r=this._getNewPixelOrigin(n,t);return P([this.project(e.getSouthWest(),t)._subtract(r),this.project(e.getNorthWest(),t)._subtract(r),this.project(e.getSouthEast(),t)._subtract(r),this.project(e.getNorthEast(),t)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){if(!n)return e;var r=this.project(e,t),i=this.getSize().divideBy(2),a=new N(r.subtract(i),r.add(i)),o=this._getBoundsOffset(a,n,t);return Math.abs(o.x)<=1&&Math.abs(o.y)<=1?e:this.unproject(r.add(o),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),r=new N(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(r,t))},_getBoundsOffset:function(e,t,n){var r=P(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n)),i=r.min.subtract(e.min),a=r.max.subtract(e.max);return new j(this._rebound(i.x,-a.x),this._rebound(i.y,-a.y))},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),r=R.any3d?this.options.zoomSnap:1;return r&&(e=Math.round(e/r)*r),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire(`move`)},_onPanTransitionEnd:function(){Dt(this._mapPane,`leaflet-pan-anim`),this.fire(`moveend`)},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return(t&&t.animate)!==!0&&!this.getSize().contains(n)?!1:(this.panBy(n,t),!0)},_createAnimProxy:function(){var e=this._proxy=B(`div`,`leaflet-proxy leaflet-zoom-animated`);this._panes.mapPane.appendChild(e),this.on(`zoomanim`,function(e){var t=_t,n=this._proxy.style[t];Nt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on(`load moveend`,this._animMoveEnd,this),this._on(`unload`,this._destroyAnimProxy,this)},_destroyAnimProxy:function(){St(this._proxy),this.off(`load moveend`,this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();Nt(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf(`transform`)>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName(`leaflet-zoom-animated`).length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n||={},!this._zoomAnimated||n.animate===!1||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),i=this._getCenterOffset(e)._divideBy(1-1/r);return n.animate!==!0&&!this.getSize().contains(i)?!1:(T(function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(e,t,!0)},this),!0)},_animateZoom:function(e,t,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,V(this._mapPane,`leaflet-zoom-anim`)),this.fire(`zoomanim`,{center:e,zoom:t,noUpdate:r}),this._tempFireZoomEvent||=this._zoom!==this._animateToZoom,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Dt(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 pn(e,t){return new W(e,t)}var mn=O.extend({options:{position:`topright`},initialize:function(e){p(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),r=e._controlCorners[n];return V(t,`leaflet-control`),n.indexOf(`bottom`)===-1?r.appendChild(t):r.insertBefore(t,r.firstChild),this._map.on(`unload`,this.remove,this),this},remove:function(){return this._map?(St(this._container),this.onRemove&&this.onRemove(this._map),this._map.off(`unload`,this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),hn=function(e){return new mn(e)};W.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t=`leaflet-`,n=this._controlContainer=B(`div`,t+`control-container`,this._container);function r(r,i){var a=t+r+` `+t+i;e[r+i]=B(`div`,a,n)}r(`top`,`left`),r(`top`,`right`),r(`bottom`,`left`),r(`bottom`,`right`)},_clearControlPos:function(){for(var e in this._controlCorners)St(this._controlCorners[e]);St(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var gn=mn.extend({options:{collapsed:!0,position:`topright`,autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,r){return n<r?-1:r<n?1:0}},initialize:function(e,t,n){for(var r in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[r],r);for(r in t)this._addLayer(t[r],r,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on(`zoomend`,this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on(`add remove`,this._onLayerChange,this);return this._container},addTo:function(e){return mn.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off(`zoomend`,this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off(`add remove`,this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off(`add remove`,this._onLayerChange,this);var t=this._getLayer(o(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){V(this._container,`leaflet-control-layers-expanded`),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(V(this._section,`leaflet-control-layers-scrollbar`),this._section.style.height=e+`px`):Dt(this._section,`leaflet-control-layers-scrollbar`),this._checkDisabledLayers(),this},collapse:function(){return Dt(this._container,`leaflet-control-layers-expanded`),this},_initLayout:function(){var e=`leaflet-control-layers`,t=this._container=B(`div`,e),n=this.options.collapsed;t.setAttribute(`aria-haspopup`,!0),nn(t),tn(t);var r=this._section=B(`section`,e+`-list`);n&&(this._map.on(`click`,this.collapse,this),H(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var i=this._layersLink=B(`a`,e+`-toggle`,t);i.href=`#`,i.title=`Layers`,i.setAttribute(`role`,`button`),H(i,{keydown:function(e){e.keyCode===13&&this._expandSafely()},click:function(e){rn(e),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=B(`div`,e+`-base`,r),this._separator=B(`div`,e+`-separator`,r),this._overlaysList=B(`div`,e+`-overlays`,r),t.appendChild(r)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&o(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,n){this._map&&e.on(`add remove`,this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(i(function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Ct(this._baseLayersList),Ct(this._overlaysList),this._layerControlInputs=[];var e,t,n,r,i=0;for(n=0;n<this._layers.length;n++)r=this._layers[n],this._addItem(r),t||=r.overlay,e||=!r.overlay,i+=r.overlay?0:1;return this.options.hideSingleBase&&(e&&=i>1,this._baseLayersList.style.display=e?``:`none`),this._separator.style.display=t&&e?``:`none`,this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(o(e.target)),n=t.overlay?e.type===`add`?`overlayadd`:`overlayremove`:e.type===`add`?`baselayerchange`:null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var n=`<input type="radio" class="leaflet-control-layers-selector" name="`+e+`"`+(t?` checked="checked"`:``)+`/>`,r=document.createElement(`div`);return r.innerHTML=n,r.firstChild},_addItem:function(e){var t=document.createElement(`label`),n=this._map.hasLayer(e.layer),r;e.overlay?(r=document.createElement(`input`),r.type=`checkbox`,r.className=`leaflet-control-layers-selector`,r.defaultChecked=n):r=this._createRadioElement(`leaflet-base-layers_`+o(this),n),this._layerControlInputs.push(r),r.layerId=o(e.layer),H(r,`click`,this._onInputClick,this);var i=document.createElement(`span`);i.innerHTML=` `+e.name;var a=document.createElement(`span`);return t.appendChild(a),a.appendChild(r),a.appendChild(i),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(t),this._checkDisabledLayers(),t},_onInputClick:function(){if(!this._preventClick){var e=this._layerControlInputs,t,n,r=[],i=[];this._handlingClick=!0;for(var a=e.length-1;a>=0;a--)t=e[a],n=this._getLayer(t.layerId).layer,t.checked?r.push(n):t.checked||i.push(n);for(a=0;a<i.length;a++)this._map.hasLayer(i[a])&&this._map.removeLayer(i[a]);for(a=0;a<r.length;a++)this._map.hasLayer(r[a])||this._map.addLayer(r[a]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e=this._layerControlInputs,t,n,r=this._map.getZoom(),i=e.length-1;i>=0;i--)t=e[i],n=this._getLayer(t.layerId).layer,t.disabled=n.options.minZoom!==void 0&&r<n.options.minZoom||n.options.maxZoom!==void 0&&r>n.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,H(e,`click`,rn),this.expand();var t=this;setTimeout(function(){U(e,`click`,rn),t._preventClick=!1})}}),_n=function(e,t,n){return new gn(e,t,n)},vn=mn.extend({options:{position:`topleft`,zoomInText:`<span aria-hidden="true">+</span>`,zoomInTitle:`Zoom in`,zoomOutText:`<span aria-hidden="true">&#x2212;</span>`,zoomOutTitle:`Zoom out`},onAdd:function(e){var t=`leaflet-control-zoom`,n=B(`div`,t+` leaflet-bar`),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,t+`-in`,n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,t+`-out`,n,this._zoomOut),this._updateDisabled(),e.on(`zoomend zoomlevelschange`,this._updateDisabled,this),n},onRemove:function(e){e.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(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,r,i){var a=B(`a`,n,r);return a.innerHTML=e,a.href=`#`,a.title=t,a.setAttribute(`role`,`button`),a.setAttribute(`aria-label`,t),nn(a),H(a,`click`,an),H(a,`click`,i,this),H(a,`click`,this._refocusOnMap,this),a},_updateDisabled:function(){var e=this._map,t=`leaflet-disabled`;Dt(this._zoomInButton,t),Dt(this._zoomOutButton,t),this._zoomInButton.setAttribute(`aria-disabled`,`false`),this._zoomOutButton.setAttribute(`aria-disabled`,`false`),(this._disabled||e._zoom===e.getMinZoom())&&(V(this._zoomOutButton,t),this._zoomOutButton.setAttribute(`aria-disabled`,`true`)),(this._disabled||e._zoom===e.getMaxZoom())&&(V(this._zoomInButton,t),this._zoomInButton.setAttribute(`aria-disabled`,`true`))}});W.mergeOptions({zoomControl:!0}),W.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new vn,this.addControl(this.zoomControl))});var yn=function(e){return new vn(e)},bn=mn.extend({options:{position:`bottomleft`,maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t=`leaflet-control-scale`,n=B(`div`,t),r=this.options;return this._addScales(r,t+`-line`,n),e.on(r.updateWhenIdle?`moveend`:`move`,this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?`moveend`:`move`,this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=B(`div`,t,n)),e.imperial&&(this._iScale=B(`div`,t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+` m`:t/1e3+` km`;this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var t=e*3.2808399,n,r,i;t>5280?(n=t/5280,r=this._getRoundNum(n),this._updateScale(this._iScale,r+` mi`,r/n)):(i=this._getRoundNum(t),this._updateScale(this._iScale,i+` ft`,i/t))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+`px`,e.innerHTML=t},_getRoundNum:function(e){var t=10**((Math.floor(e)+``).length-1),n=e/t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,t*n}}),xn=function(e){return new bn(e)},Sn=mn.extend({options:{position:`bottomright`,prefix:`<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">`+(R.inlineSvg?`<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> `:``)+`Leaflet</a>`},initialize:function(e){p(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=B(`div`,`leaflet-control-attribution`),nn(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on(`layeradd`,this._addAttribution,this),this._container},onRemove:function(e){e.off(`layeradd`,this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once(`remove`,function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e&&this._attributions[e]&&(this._attributions[e]--,this._update()),this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(`, `)),this._container.innerHTML=n.join(` <span aria-hidden="true">|</span> `)}}});W.mergeOptions({attributionControl:!0}),W.addInitHook(function(){this.options.attributionControl&&new Sn().addTo(this)}),mn.Layers=gn,mn.Zoom=vn,mn.Scale=bn,mn.Attribution=Sn,hn.layers=_n,hn.zoom=yn,hn.scale=xn,hn.attribution=function(e){return new Sn(e)};var Cn=O.extend({initialize:function(e){this._map=e},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}});Cn.addTo=function(e,t){return e.addHandler(t,this),this};var wn={Events:A},Tn=R.touch?`touchstart mousedown`:`mousedown`,En=ee.extend({options:{clickTolerance:3},initialize:function(e,t,n,r){p(this,r),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||=(H(this._dragStartTarget,Tn,this._onDown,this),!0)},disable:function(){this._enabled&&(En._dragging===this&&this.finishDrag(!0),U(this._dragStartTarget,Tn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!Et(this._element,`leaflet-zoom-anim`))){if(e.touches&&e.touches.length!==1){En._dragging===this&&this.finishDrag();return}if(!(En._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches)&&(En._dragging=this,this._preventOutline&&Wt(this._element),Bt(),It(),!this._moving)){this.fire(`down`);var t=e.touches?e.touches[0]:e,n=Kt(this._element);this._startPoint=new j(t.clientX,t.clientY),this._startPos=Ft(this._element),this._parentScale=qt(n);var r=e.type===`mousedown`;H(document,r?`mousemove`:`touchmove`,this._onMove,this),H(document,r?`mouseup`:`touchend touchcancel`,this._onUp,this)}}},_onMove:function(e){if(this._enabled){if(e.touches&&e.touches.length>1){this._moved=!0;return}var t=e.touches&&e.touches.length===1?e.touches[0]:e,n=new j(t.clientX,t.clientY)._subtract(this._startPoint);!n.x&&!n.y||Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,rn(e),this._moved||(this.fire(`dragstart`),this._moved=!0,V(document.body,`leaflet-dragging`),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),V(this._lastTarget,`leaflet-drag-target`)),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=e,this._updatePosition())}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire(`predrag`,e),Pt(this._element,this._newPos),this.fire(`drag`,e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){Dt(document.body,`leaflet-dragging`),this._lastTarget&&=(Dt(this._lastTarget,`leaflet-drag-target`),null),U(document,`mousemove touchmove`,this._onMove,this),U(document,`mouseup touchend touchcancel`,this._onUp,this),Vt(),Lt();var t=this._moved&&this._moving;this._moving=!1,En._dragging=!1,t&&this.fire(`dragend`,{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function Dn(e,t,n){var r,i=[1,4,2,8],a,o,s,c,l,u,d,f;for(a=0,u=e.length;a<u;a++)e[a]._code=Bn(e[a],t);for(s=0;s<4;s++){for(d=i[s],r=[],a=0,u=e.length,o=u-1;a<u;o=a++)c=e[a],l=e[o],c._code&d?l._code&d||(f=zn(l,c,d,t,n),f._code=Bn(f,t),r.push(f)):(l._code&d&&(f=zn(l,c,d,t,n),f._code=Bn(f,t),r.push(f)),r.push(c));e=r}return e}function On(e,t){var n,r,i,a,o,s,c,l,u;if(!e||e.length===0)throw Error(`latlngs not passed`);Un(e)||(console.warn(`latlngs are not flat! Only the first ring will be used`),e=e[0]);var d=I([0,0]),f=ne(e);f.getNorthWest().distanceTo(f.getSouthWest())*f.getNorthEast().distanceTo(f.getNorthWest())<1700&&(d=kn(e));var p=e.length,m=[];for(n=0;n<p;n++){var h=I(e[n]);m.push(t.project(I([h.lat-d.lat,h.lng-d.lng])))}for(s=c=l=0,n=0,r=p-1;n<p;r=n++)i=m[n],a=m[r],o=i.y*a.x-a.y*i.x,c+=(i.x+a.x)*o,l+=(i.y+a.y)*o,s+=o*3;u=s===0?m[0]:[c/s,l/s];var g=t.unproject(M(u));return I([g.lat+d.lat,g.lng+d.lng])}function kn(e){for(var t=0,n=0,r=0,i=0;i<e.length;i++){var a=I(e[i]);t+=a.lat,n+=a.lng,r++}return I([t/r,n/r])}var An={__proto__:null,clipPolygon:Dn,polygonCenter:On,centroid:kn};function jn(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=In(e,n),e=Pn(e,n),e}function Mn(e,t,n){return Math.sqrt(Hn(e,t,n,!0))}function Nn(e,t,n){return Hn(e,t,n)}function Pn(e,t){var n=e.length,r=new(typeof Uint8Array<`u`?Uint8Array:Array)(n);r[0]=r[n-1]=1,Fn(e,r,t,0,n-1);var i,a=[];for(i=0;i<n;i++)r[i]&&a.push(e[i]);return a}function Fn(e,t,n,r,i){var a=0,o,s,c;for(s=r+1;s<=i-1;s++)c=Hn(e[s],e[r],e[i],!0),c>a&&(o=s,a=c);a>n&&(t[o]=1,Fn(e,t,n,r,o),Fn(e,t,n,o,i))}function In(e,t){for(var n=[e[0]],r=1,i=0,a=e.length;r<a;r++)Vn(e[r],e[i])>t&&(n.push(e[r]),i=r);return i<a-1&&n.push(e[a-1]),n}var Ln;function Rn(e,t,n,r,i){var a=r?Ln:Bn(e,n),o=Bn(t,n),s,c,l;for(Ln=o;;){if(!(a|o))return[e,t];if(a&o)return!1;s=a||o,c=zn(e,t,s,n,i),l=Bn(c,n),s===a?(e=c,a=l):(t=c,o=l)}}function zn(e,t,n,r,i){var a=t.x-e.x,o=t.y-e.y,s=r.min,c=r.max,l,u;return n&8?(l=e.x+a*(c.y-e.y)/o,u=c.y):n&4?(l=e.x+a*(s.y-e.y)/o,u=s.y):n&2?(l=c.x,u=e.y+o*(c.x-e.x)/a):n&1&&(l=s.x,u=e.y+o*(s.x-e.x)/a),new j(l,u,i)}function Bn(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function Vn(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function Hn(e,t,n,r){var i=t.x,a=t.y,o=n.x-i,s=n.y-a,c=o*o+s*s,l;return c>0&&(l=((e.x-i)*o+(e.y-a)*s)/c,l>1?(i=n.x,a=n.y):l>0&&(i+=o*l,a+=s*l)),o=e.x-i,s=e.y-a,r?o*o+s*s:new j(i,a)}function Un(e){return!_(e[0])||typeof e[0][0]!=`object`&&e[0][0]!==void 0}function Wn(e){return console.warn(`Deprecated use of _flat, please use L.LineUtil.isFlat instead.`),Un(e)}function Gn(e,t){var n,r,i,a,o,s,c,l;if(!e||e.length===0)throw Error(`latlngs not passed`);Un(e)||(console.warn(`latlngs are not flat! Only the first ring will be used`),e=e[0]);var u=I([0,0]),d=ne(e);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(u=kn(e));var f=e.length,p=[];for(n=0;n<f;n++){var m=I(e[n]);p.push(t.project(I([m.lat-u.lat,m.lng-u.lng])))}for(n=0,r=0;n<f-1;n++)r+=p[n].distanceTo(p[n+1])/2;if(r===0)l=p[0];else for(n=0,a=0;n<f-1;n++)if(o=p[n],s=p[n+1],i=o.distanceTo(s),a+=i,a>r){c=(a-r)/i,l=[s.x-c*(s.x-o.x),s.y-c*(s.y-o.y)];break}var h=t.unproject(M(l));return I([h.lat+u.lat,h.lng+u.lng])}var Kn={__proto__:null,simplify:jn,pointToSegmentDistance:Mn,closestPointOnSegment:Nn,clipSegment:Rn,_getEdgeIntersection:zn,_getBitCode:Bn,_sqClosestPointOnSegment:Hn,isFlat:Un,_flat:Wn,polylineCenter:Gn},qn={project:function(e){return new j(e.lng,e.lat)},unproject:function(e){return new re(e.y,e.x)},bounds:new N([-180,-90],[180,90])},Jn={R:6378137,R_MINOR:6356752.314245179,bounds:new N([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,r=e.lat*t,i=this.R_MINOR/n,a=Math.sqrt(1-i*i),o=a*Math.sin(r),s=Math.tan(Math.PI/4-r/2)/((1-o)/(1+o))**(a/2);return r=-n*Math.log(Math.max(s,1e-10)),new j(e.lng*t*n,r)},unproject:function(e){for(var t=180/Math.PI,n=this.R,r=this.R_MINOR/n,i=Math.sqrt(1-r*r),a=Math.exp(-e.y/n),o=Math.PI/2-2*Math.atan(a),s=0,c=.1,l;s<15&&Math.abs(c)>1e-7;s++)l=i*Math.sin(o),l=((1-l)/(1+l))**(i/2),c=Math.PI/2-2*Math.atan(a*l)-o,o+=c;return new re(o*t,e.x*t/n)}},Yn={__proto__:null,LonLat:qn,Mercator:Jn,SphericalMercator:se},Xn=n({},ae,{code:`EPSG:3395`,projection:Jn,transformation:function(){var e=.5/(Math.PI*Jn.R);return le(e,.5,-e,.5)}()}),Zn=n({},ae,{code:`EPSG:4326`,projection:qn,transformation:le(1/180,1,-1/180,.5)}),Qn=n({},ie,{projection:qn,transformation:le(1,0,-1,0),scale:function(e){return 2**e},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,r=t.lat-e.lat;return Math.sqrt(n*n+r*r)},infinite:!0});ie.Earth=ae,ie.EPSG3395=Xn,ie.EPSG3857=ue,ie.EPSG900913=de,ie.EPSG4326=Zn,ie.Simple=Qn;var $n=ee.extend({options:{pane:`overlayPane`,attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[o(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[o(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var n=this.getEvents();t.on(n,this),this.once(`remove`,function(){t.off(n,this)},this)}this.onAdd(t),this.fire(`add`),t.fire(`layeradd`,{layer:this})}}});W.include({addLayer:function(e){if(!e._layerAdd)throw Error(`The provided object is not a Layer.`);var t=o(e);return this._layers[t]?this:(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var t=o(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire(`layerremove`,{layer:e}),e.fire(`remove`)),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return o(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){e=e?_(e)?e:[e]:[];for(var t=0,n=e.length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){(!isNaN(e.options.maxZoom)||!isNaN(e.options.minZoom))&&(this._zoomBoundLayers[o(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=o(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,t=-1/0,n=this._getZoomSpan();for(var r in this._zoomBoundLayers){var i=this._zoomBoundLayers[r].options;e=i.minZoom===void 0?e:Math.min(e,i.minZoom),t=i.maxZoom===void 0?t:Math.max(t,i.maxZoom)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire(`zoomlevelschange`),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var er=$n.extend({initialize:function(e,t){p(this,t),this._layers={};var n,r;if(e)for(n=0,r=e.length;n<r;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return(typeof e==`number`?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t=Array.prototype.slice.call(arguments,1),n,r;for(n in this._layers)r=this._layers[n],r[e]&&r[e].apply(r,t);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke(`setZIndex`,e)},getLayerId:function(e){return o(e)}}),tr=function(e,t){return new er(e,t)},nr=er.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),er.prototype.addLayer.call(this,e),this.fire(`layeradd`,{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),er.prototype.removeLayer.call(this,e),this.fire(`layerremove`,{layer:e})):this},setStyle:function(e){return this.invoke(`setStyle`,e)},bringToFront:function(){return this.invoke(`bringToFront`)},bringToBack:function(){return this.invoke(`bringToBack`)},getBounds:function(){var e=new F;for(var t in this._layers){var n=this._layers[t];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}}),rr=function(e,t){return new nr(e,t)},ir=O.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){p(this,e)},createIcon:function(e){return this._createIcon(`icon`,e)},createShadow:function(e){return this._createIcon(`shadow`,e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(!n){if(e===`icon`)throw Error(`iconUrl not set in Icon options (see the docs).`);return null}var r=this._createImg(n,t&&t.tagName===`IMG`?t:null);return this._setIconStyles(r,e),(this.options.crossOrigin||this.options.crossOrigin===``)&&(r.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),r},_setIconStyles:function(e,t){var n=this.options,r=n[t+`Size`];typeof r==`number`&&(r=[r,r]);var i=M(r),a=M(t===`shadow`&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2,!0));e.className=`leaflet-marker-`+t+` `+(n.className||``),a&&(e.style.marginLeft=-a.x+`px`,e.style.marginTop=-a.y+`px`),i&&(e.style.width=i.x+`px`,e.style.height=i.y+`px`)},_createImg:function(e,t){return t||=document.createElement(`img`),t.src=e,t},_getIconUrl:function(e){return R.retina&&this.options[e+`RetinaUrl`]||this.options[e+`Url`]}});function ar(e){return new ir(e)}var or=ir.extend({options:{iconUrl:`marker-icon.png`,iconRetinaUrl:`marker-icon-2x.png`,shadowUrl:`marker-shadow.png`,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return typeof or.imagePath!=`string`&&(or.imagePath=this._detectIconPath()),(this.options.imagePath||or.imagePath)+ir.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var t=function(e,t,n){var r=t.exec(e);return r&&r[n]};return e=t(e,/^url\((['"])?(.+)\1\)$/,2),e&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=B(`div`,`leaflet-default-icon-path`,document.body),t=xt(e,`background-image`)||xt(e,`backgroundImage`);if(document.body.removeChild(e),t=this._stripUrl(t),t)return t;var n=document.querySelector(`link[href$="leaflet.css"]`);return n?n.href.substring(0,n.href.length-11-1):``}}),sr=Cn.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||=new En(e,e,!0),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),V(e,`leaflet-marker-draggable`)},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Dt(this._marker._icon,`leaflet-marker-draggable`)},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,r=this._marker.options.autoPanSpeed,i=this._marker.options.autoPanPadding,a=Ft(t._icon),o=n.getPixelBounds(),s=n.getPixelOrigin(),c=P(o.min._subtract(s).add(i),o.max._subtract(s).subtract(i));if(!c.contains(a)){var l=M((Math.max(c.max.x,a.x)-c.max.x)/(o.max.x-c.max.x)-(Math.min(c.min.x,a.x)-c.min.x)/(o.min.x-c.min.x),(Math.max(c.max.y,a.y)-c.max.y)/(o.max.y-c.max.y)-(Math.min(c.min.y,a.y)-c.min.y)/(o.min.y-c.min.y)).multiplyBy(r);n.panBy(l,{animate:!1}),this._draggable._newPos._add(l),this._draggable._startPos._add(l),Pt(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=T(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire(`movestart`).fire(`dragstart`)},_onPreDrag:function(e){this._marker.options.autoPan&&(E(this._panRequest),this._panRequest=T(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,r=Ft(t._icon),i=t._map.layerPointToLatLng(r);n&&Pt(n,r),t._latlng=i,e.latlng=i,e.oldLatLng=this._oldLatLng,t.fire(`move`,e).fire(`drag`,e)},_onDragEnd:function(e){E(this._panRequest),delete this._oldLatLng,this._marker.fire(`moveend`).fire(`dragend`,e)}}),cr=$n.extend({options:{icon:new or,interactive:!0,keyboard:!0,title:``,alt:`Marker`,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:`markerPane`,shadowPane:`shadowPane`,bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){p(this,t),this._latlng=I(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on(`zoomanim`,this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off(`zoomanim`,this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var t=this._latlng;return this._latlng=I(e),this.update(),this.fire(`move`,{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,t=`leaflet-zoom-`+(this._zoomAnimated?`animated`:`hide`),n=e.icon.createIcon(this._icon),r=!1;n!==this._icon&&(this._icon&&this._removeIcon(),r=!0,e.title&&(n.title=e.title),n.tagName===`IMG`&&(n.alt=e.alt||``)),V(n,t),e.keyboard&&(n.tabIndex=`0`,n.setAttribute(`role`,`button`)),this._icon=n,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&H(n,`focus`,this._panOnFocus,this);var i=e.icon.createShadow(this._shadow),a=!1;i!==this._shadow&&(this._removeShadow(),a=!0),i&&(V(i,t),i.alt=``),this._shadow=i,e.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),i&&a&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&U(this._icon,`focus`,this._panOnFocus,this),St(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&St(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&Pt(this._icon,e),this._shadow&&Pt(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(V(this._icon,`leaflet-interactive`),this.addInteractiveTarget(this._icon),sr)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new sr(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&At(this._icon,e),this._shadow&&At(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var t=this.options.icon.options,n=t.iconSize?M(t.iconSize):M(0,0),r=t.iconAnchor?M(t.iconAnchor):M(0,0);e.panInside(this._latlng,{paddingTopLeft:r,paddingBottomRight:n.subtract(r)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function lr(e,t){return new cr(e,t)}var ur=$n.extend({options:{stroke:!0,color:`#3388ff`,weight:3,opacity:1,lineCap:`round`,lineJoin:`round`,dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:`evenodd`,interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return p(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,`weight`)&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),dr=ur.extend({options:{fill:!0,radius:10},initialize:function(e,t){p(this,t),this._latlng=I(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=I(e),this.redraw(),this.fire(`move`,{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return ur.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,n=this._clickTolerance(),r=[e+n,t+n];this._pxBounds=new N(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function fr(e,t){return new dr(e,t)}var pr=dr.extend({initialize:function(e,t,r){if(typeof t==`number`&&(t=n({},r,{radius:t})),p(this,t),this._latlng=I(e),isNaN(this.options.radius))throw Error(`Circle radius cannot be NaN`);this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new F(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:ur.prototype.setStyle,_project:function(){var e=this._latlng.lng,t=this._latlng.lat,n=this._map,r=n.options.crs;if(r.distance===ae.distance){var i=Math.PI/180,a=this._mRadius/ae.R/i,o=n.project([t+a,e]),s=n.project([t-a,e]),c=o.add(s).divideBy(2),l=n.unproject(c).lat,u=Math.acos((Math.cos(a*i)-Math.sin(t*i)*Math.sin(l*i))/(Math.cos(t*i)*Math.cos(l*i)))/i;(isNaN(u)||u===0)&&(u=a/Math.cos(Math.PI/180*t)),this._point=c.subtract(n.getPixelOrigin()),this._radius=isNaN(u)?0:c.x-n.project([l,e-u]).x,this._radiusY=c.y-o.y}else{var d=r.unproject(r.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(d).x}this._updateBounds()}});function mr(e,t,n){return new pr(e,t,n)}var hr=ur.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){p(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t=1/0,n=null,r=Hn,i,a,o=0,s=this._parts.length;o<s;o++)for(var c=this._parts[o],l=1,u=c.length;l<u;l++){i=c[l-1],a=c[l];var d=r(e,i,a,!0);d<t&&(t=d,n=r(e,i,a))}return n&&(n.distance=Math.sqrt(t)),n},getCenter:function(){if(!this._map)throw Error(`Must add layer to map before using getCenter()`);return Gn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t||=this._defaultShape(),e=I(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new F,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return Un(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=Un(e),r=0,i=e.length;r<i;r++)n?(t[r]=I(e[r]),this._bounds.extend(t[r])):t[r]=this._convertLatLngs(e[r]);return t},_project:function(){var e=new N;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),t=new j(e,e);this._rawPxBounds&&(this._pxBounds=new N([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(e,t,n){var r=e[0]instanceof re,i=e.length,a,o;if(r){for(o=[],a=0;a<i;a++)o[a]=this._map.latLngToLayerPoint(e[a]),n.extend(o[a]);t.push(o)}else for(a=0;a<i;a++)this._projectLatlngs(e[a],t,n)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}var t=this._parts,n,r,i,a,o,s,c;for(n=0,i=0,a=this._rings.length;n<a;n++)for(c=this._rings[n],r=0,o=c.length;r<o-1;r++)s=Rn(c[r],c[r+1],e,r,!0),s&&(t[i]=t[i]||[],t[i].push(s[0]),(s[1]!==c[r+1]||r===o-2)&&(t[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,r=e.length;n<r;n++)e[n]=jn(e[n],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,r,i,a,o,s,c=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(n=0,a=this._parts.length;n<a;n++)for(s=this._parts[n],r=0,o=s.length,i=o-1;r<o;i=r++)if(!(!t&&r===0)&&Mn(e,s[i],s[r])<=c)return!0;return!1}});function gr(e,t){return new hr(e,t)}hr._flat=Wn;var _r=hr.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw Error(`Must add layer to map before using getCenter()`);return On(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var t=hr.prototype._convertLatLngs.call(this,e),n=t.length;return n>=2&&t[0]instanceof re&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){hr.prototype._setLatLngs.call(this,e),Un(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Un(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new j(t,t);if(e=new N(e.min.subtract(n),e.max.add(n)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}for(var r=0,i=this._rings.length,a;r<i;r++)a=Dn(this._rings[r],e,!0),a.length&&this._parts.push(a)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t=!1,n,r,i,a,o,s,c,l;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(a=0,c=this._parts.length;a<c;a++)for(n=this._parts[a],o=0,l=n.length,s=l-1;o<l;s=o++)r=n[o],i=n[s],r.y>e.y!=i.y>e.y&&e.x<(i.x-r.x)*(e.y-r.y)/(i.y-r.y)+r.x&&(t=!t);return t||hr.prototype._containsPoint.call(this,e,!0)}});function vr(e,t){return new _r(e,t)}var yr=nr.extend({initialize:function(e,t){p(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t=_(e)?e:e.features,n,r,i;if(t){for(n=0,r=t.length;n<r;n++)i=t[n],(i.geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var a=this.options;if(a.filter&&!a.filter(e))return this;var o=br(e,a);return o?(o.feature=Dr(e),o.defaultOptions=o.options,this.resetStyle(o),a.onEachFeature&&a.onEachFeature(e,o),this.addLayer(o)):this},resetStyle:function(e){return e===void 0?this.eachLayer(this.resetStyle,this):(e.options=n({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){e.setStyle&&(typeof t==`function`&&(t=t(e.feature)),e.setStyle(t))}});function br(e,t){var n=e.type===`Feature`?e.geometry:e,r=n?n.coordinates:null,i=[],a=t&&t.pointToLayer,o=t&&t.coordsToLatLng||Sr,s,c,l,u;if(!r&&!n)return null;switch(n.type){case`Point`:return s=o(r),xr(a,e,s,t);case`MultiPoint`:for(l=0,u=r.length;l<u;l++)s=o(r[l]),i.push(xr(a,e,s,t));return new nr(i);case`LineString`:case`MultiLineString`:return c=Cr(r,n.type===`LineString`?0:1,o),new hr(c,t);case`Polygon`:case`MultiPolygon`:return c=Cr(r,n.type===`Polygon`?1:2,o),new _r(c,t);case`GeometryCollection`:for(l=0,u=n.geometries.length;l<u;l++){var d=br({geometry:n.geometries[l],type:`Feature`,properties:e.properties},t);d&&i.push(d)}return new nr(i);case`FeatureCollection`:for(l=0,u=n.features.length;l<u;l++){var f=br(n.features[l],t);f&&i.push(f)}return new nr(i);default:throw Error(`Invalid GeoJSON object.`)}}function xr(e,t,n,r){return e?e(t,n):new cr(n,r&&r.markersInheritOptions&&r)}function Sr(e){return new re(e[1],e[0],e[2])}function Cr(e,t,n){for(var r=[],i=0,a=e.length,o;i<a;i++)o=t?Cr(e[i],t-1,n):(n||Sr)(e[i]),r.push(o);return r}function wr(e,t){return e=I(e),e.alt===void 0?[u(e.lng,t),u(e.lat,t)]:[u(e.lng,t),u(e.lat,t),u(e.alt,t)]}function Tr(e,t,n,r){for(var i=[],a=0,o=e.length;a<o;a++)i.push(t?Tr(e[a],Un(e[a])?0:t-1,n,r):wr(e[a],r));return!t&&n&&i.length>0&&i.push(i[0].slice()),i}function Er(e,t){return e.feature?n({},e.feature,{geometry:t}):Dr(t)}function Dr(e){return e.type===`Feature`||e.type===`FeatureCollection`?e:{type:`Feature`,properties:{},geometry:e}}var Or={toGeoJSON:function(e){return Er(this,{type:`Point`,coordinates:wr(this.getLatLng(),e)})}};cr.include(Or),pr.include(Or),dr.include(Or),hr.include({toGeoJSON:function(e){var t=!Un(this._latlngs),n=Tr(this._latlngs,t?1:0,!1,e);return Er(this,{type:(t?`Multi`:``)+`LineString`,coordinates:n})}}),_r.include({toGeoJSON:function(e){var t=!Un(this._latlngs),n=t&&!Un(this._latlngs[0]),r=Tr(this._latlngs,n?2:t?1:0,!0,e);return t||(r=[r]),Er(this,{type:(n?`Multi`:``)+`Polygon`,coordinates:r})}}),er.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(n){t.push(n.toGeoJSON(e).geometry.coordinates)}),Er(this,{type:`MultiPoint`,coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(t===`MultiPoint`)return this.toMultiPoint(e);var n=t===`GeometryCollection`,r=[];return this.eachLayer(function(t){if(t.toGeoJSON){var i=t.toGeoJSON(e);if(n)r.push(i.geometry);else{var a=Dr(i);a.type===`FeatureCollection`?r.push.apply(r,a.features):r.push(a)}}}),n?Er(this,{geometries:r,type:`GeometryCollection`}):{type:`FeatureCollection`,features:r}}});function kr(e,t){return new yr(e,t)}var Ar=kr,jr=$n.extend({options:{opacity:1,alt:``,interactive:!1,crossOrigin:!1,errorOverlayUrl:``,zIndex:1,className:``},initialize:function(e,t,n){this._url=e,this._bounds=ne(t),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(V(this._image,`leaflet-interactive`),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){St(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&wt(this._image),this},bringToBack:function(){return this._map&&Tt(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=ne(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e=this._url.tagName===`IMG`,t=this._image=e?this._url:B(`img`);if(V(t,`leaflet-image-layer`),this._zoomAnimated&&V(t,`leaflet-zoom-animated`),this.options.className&&V(t,this.options.className),t.onselectstart=l,t.onmousemove=l,t.onload=i(this.fire,this,`load`),t.onerror=i(this._overlayOnError,this,`error`),(this.options.crossOrigin||this.options.crossOrigin===``)&&(t.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e){this._url=t.src;return}t.src=this._url,t.alt=this.options.alt},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;Nt(this._image,n,t)},_reset:function(){var e=this._image,t=new N(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();Pt(e,t.min),e.style.width=n.x+`px`,e.style.height=n.y+`px`},_updateOpacity:function(){At(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 e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Mr=function(e,t,n){return new jr(e,t,n)},Nr=jr.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e=this._url.tagName===`VIDEO`,t=this._image=e?this._url:B(`video`);if(V(t,`leaflet-image-layer`),this._zoomAnimated&&V(t,`leaflet-zoom-animated`),this.options.className&&V(t,this.options.className),t.onselectstart=l,t.onmousemove=l,t.onloadeddata=i(this.fire,this,`load`),e){for(var n=t.getElementsByTagName(`source`),r=[],a=0;a<n.length;a++)r.push(n[a].src);this._url=n.length>0?r:[t.src];return}_(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,`objectFit`)&&(t.style.objectFit=`fill`),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var o=0;o<this._url.length;o++){var s=B(`source`);s.src=this._url[o],t.appendChild(s)}}});function Pr(e,t,n){return new Nr(e,t,n)}var Fr=jr.extend({_initImage:function(){var e=this._image=this._url;V(e,`leaflet-image-layer`),this._zoomAnimated&&V(e,`leaflet-zoom-animated`),this.options.className&&V(e,this.options.className),e.onselectstart=l,e.onmousemove=l}});function Ir(e,t,n){return new Fr(e,t,n)}var Lr=$n.extend({options:{interactive:!1,offset:[0,0],className:``,pane:void 0,content:``},initialize:function(e,t){e&&(e instanceof re||_(e))?(this._latlng=I(e),p(this,t)):(p(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return e=arguments.length?e:this._source._map,e.hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&At(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&At(this._container,1),this.bringToFront(),this.options.interactive&&(V(this._container,`leaflet-interactive`),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(At(this._container,0),this._removeTimeout=setTimeout(i(St,void 0,this._container),200)):St(this._container),this.options.interactive&&(Dt(this._container,`leaflet-interactive`),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=I(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility=`hidden`,this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility=``,this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&wt(this._container),this},bringToBack:function(){return this._map&&Tt(this._container),this},_prepareOpen:function(e){var t=this._source;if(!t._map)return!1;if(t instanceof nr){t=null;var n=this._source._layers;for(var r in n)if(n[r]._map){t=n[r];break}if(!t)return!1;this._source=t}if(!e)if(t.getCenter)e=t.getCenter();else if(t.getLatLng)e=t.getLatLng();else if(t.getBounds)e=t.getBounds().getCenter();else throw Error(`Unable to get source layer LatLng.`);return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t=typeof this._content==`function`?this._content(this._source||this):this._content;if(typeof t==`string`)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire(`contentupdate`)}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=M(this.options.offset),n=this._getAnchor();this._zoomAnimated?Pt(this._container,e.add(n)):t=t.add(e).add(n);var r=this._containerBottom=-t.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=r+`px`,this._container.style.left=i+`px`}},_getAnchor:function(){return[0,0]}});W.include({_initOverlay:function(e,t,n,r){var i=t;return i instanceof e||(i=new e(r).setContent(t)),n&&i.setLatLng(n),i}}),$n.include({_initOverlay:function(e,t,n,r){var i=n;return i instanceof e?(p(i,r),i._source=this):(i=t&&!r?t:new e(r,this),i.setContent(n)),i}});var Rr=Lr.extend({options:{pane:`popupPane`,offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:``},openOn:function(e){return e=arguments.length?e:this._source._map,!e.hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,Lr.prototype.openOn.call(this,e)},onAdd:function(e){Lr.prototype.onAdd.call(this,e),e.fire(`popupopen`,{popup:this}),this._source&&(this._source.fire(`popupopen`,{popup:this},!0),this._source instanceof ur||this._source.on(`preclick`,en))},onRemove:function(e){Lr.prototype.onRemove.call(this,e),e.fire(`popupclose`,{popup:this}),this._source&&(this._source.fire(`popupclose`,{popup:this},!0),this._source instanceof ur||this._source.off(`preclick`,en))},getEvents:function(){var e=Lr.prototype.getEvents.call(this);return(this.options.closeOnClick===void 0?this._map.options.closePopupOnClick:this.options.closeOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e=`leaflet-popup`,t=this._container=B(`div`,e+` `+(this.options.className||``)+` leaflet-zoom-animated`),n=this._wrapper=B(`div`,e+`-content-wrapper`,t);if(this._contentNode=B(`div`,e+`-content`,n),nn(t),tn(this._contentNode),H(t,`contextmenu`,en),this._tipContainer=B(`div`,e+`-tip-container`,t),this._tip=B(`div`,e+`-tip`,this._tipContainer),this.options.closeButton){var r=this._closeButton=B(`a`,e+`-close-button`,t);r.setAttribute(`role`,`button`),r.setAttribute(`aria-label`,`Close popup`),r.href=`#close`,r.innerHTML=`<span aria-hidden="true">&#215;</span>`,H(r,`click`,function(e){rn(e),this.close()},this)}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width=``,t.whiteSpace=`nowrap`;var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),t.width=n+1+`px`,t.whiteSpace=``,t.height=``;var r=e.offsetHeight,i=this.options.maxHeight,a=`leaflet-popup-scrolled`;i&&r>i?(t.height=i+`px`,V(e,a)):Dt(e,a),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();Pt(this._container,t.add(n))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var e=this._map,t=parseInt(xt(this._container,`marginBottom`),10)||0,n=this._container.offsetHeight+t,r=this._containerWidth,i=new j(this._containerLeft,-n-this._containerBottom);i._add(Ft(this._container));var a=e.layerPointToContainerPoint(i),o=M(this.options.autoPanPadding),s=M(this.options.autoPanPaddingTopLeft||o),c=M(this.options.autoPanPaddingBottomRight||o),l=e.getSize(),u=0,d=0;a.x+r+c.x>l.x&&(u=a.x+r-l.x+c.x),a.x-u-s.x<0&&(u=a.x-s.x),a.y+n+c.y>l.y&&(d=a.y+n-l.y+c.y),a.y-d-s.y<0&&(d=a.y-s.y),(u||d)&&(this.options.keepInView&&(this._autopanning=!0),e.fire(`autopanstart`).panBy([u,d]))}},_getAnchor:function(){return M(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),zr=function(e,t){return new Rr(e,t)};W.mergeOptions({closePopupOnClick:!0}),W.include({openPopup:function(e,t,n){return this._initOverlay(Rr,e,t,n).openOn(this),this},closePopup:function(e){return e=arguments.length?e:this._popup,e&&e.close(),this}}),$n.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Rr,this._popup,e,t),this._popupHandlersAdded||=(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),!0),this},unbindPopup:function(){return this._popup&&=(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,null),this},openPopup:function(e){return this._popup&&(this instanceof nr||(this._popup._source=this),this._popup._prepareOpen(e||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(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(!(!this._popup||!this._map)){an(e);var t=e.layer||e.target;if(this._popup._source===t&&!(t instanceof ur)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng);return}this._popup._source=t,this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){e.originalEvent.keyCode===13&&this._openPopup(e)}});var Br=Lr.extend({options:{pane:`tooltipPane`,offset:[0,0],direction:`auto`,permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Lr.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire(`tooltipopen`,{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire(`tooltipopen`,{tooltip:this},!0))},onRemove:function(e){Lr.prototype.onRemove.call(this,e),e.fire(`tooltipclose`,{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire(`tooltipclose`,{tooltip:this},!0))},getEvents:function(){var e=Lr.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){this._contentNode=this._container=B(`div`,`leaflet-tooltip `+(this.options.className||``)+` leaflet-zoom-`+(this._zoomAnimated?`animated`:`hide`)),this._container.setAttribute(`role`,`tooltip`),this._container.setAttribute(`id`,`leaflet-tooltip-`+o(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n,r=this._map,i=this._container,a=r.latLngToContainerPoint(r.getCenter()),o=r.layerPointToContainerPoint(e),s=this.options.direction,c=i.offsetWidth,l=i.offsetHeight,u=M(this.options.offset),d=this._getAnchor();s===`top`?(t=c/2,n=l):s===`bottom`?(t=c/2,n=0):s===`center`?(t=c/2,n=l/2):s===`right`?(t=0,n=l/2):s===`left`?(t=c,n=l/2):o.x<a.x?(s=`right`,t=0,n=l/2):(s=`left`,t=c+(u.x+d.x)*2,n=l/2),e=e.subtract(M(t,n,!0)).add(u).add(d),Dt(i,`leaflet-tooltip-right`),Dt(i,`leaflet-tooltip-left`),Dt(i,`leaflet-tooltip-top`),Dt(i,`leaflet-tooltip-bottom`),V(i,`leaflet-tooltip-`+s),Pt(i,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&At(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return M(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Vr=function(e,t){return new Br(e,t)};W.include({openTooltip:function(e,t,n){return this._initOverlay(Br,e,t,n).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),$n.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Br,this._tooltip,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&=(this._initTooltipInteractions(!0),this.closeTooltip(),null),this},_initTooltipInteractions:function(e){if(!(!e&&this._tooltipHandlersAdded)){var t=e?`off`:`on`,n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[t](n),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof nr||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t=typeof e.getElement==`function`&&e.getElement();t&&(H(t,`focus`,function(){this._tooltip._source=e,this.openTooltip()},this),H(t,`blur`,this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var t=typeof e.getElement==`function`&&e.getElement();t&&t.setAttribute(`aria-describedby`,this._tooltip._container.id)},_openTooltip:function(e){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var t=this;this._map.once(`moveend`,function(){t._openOnceFlag=!1,t._openTooltip(e)});return}this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)}},_moveTooltip:function(e){var t=e.latlng,n,r;this._tooltip.options.sticky&&e.originalEvent&&(n=this._map.mouseEventToContainerPoint(e.originalEvent),r=this._map.containerPointToLayerPoint(n),t=this._map.layerPointToLatLng(r)),this._tooltip.setLatLng(t)}});var Hr=ir.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:`leaflet-div-icon`},createIcon:function(e){var t=e&&e.tagName===`DIV`?e:document.createElement(`div`),n=this.options;if(n.html instanceof Element?(Ct(t),t.appendChild(n.html)):t.innerHTML=n.html===!1?``:n.html,n.bgPos){var r=M(n.bgPos);t.style.backgroundPosition=-r.x+`px `+-r.y+`px`}return this._setIconStyles(t,`icon`),t},createShadow:function(){return null}});function Ur(e){return new Hr(e)}ir.Default=or;var Wr=$n.extend({options:{tileSize:256,opacity:1,updateWhenIdle:R.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:`tilePane`,className:``,keepBuffer:2},initialize:function(e){p(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),St(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(wt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Tt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||=s(this._onMoveEnd,this.options.updateInterval,this),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement(`div`)},getTileSize:function(){var e=this.options.tileSize;return e instanceof j?e:new j(e,e)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t=this.getPane().children,n=-e(-1/0,1/0),r=0,i=t.length,a;r<i;r++)a=t[r].style.zIndex,t[r]!==this._container&&a&&(n=e(n,+a));isFinite(n)&&(this.options.zIndex=n+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!R.ielt9){At(this._container,this.options.opacity);var e=+new Date,t=!1,n=!1;for(var r in this._tiles){var i=this._tiles[r];if(!(!i.current||!i.loaded)){var a=Math.min(1,(e-i.loaded)/200);At(i.el,a),a<1?t=!0:(i.active?n=!0:this._onOpaqueTile(i),i.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),t&&(E(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this))}},_onOpaqueTile:l,_initContainer:function(){this._container||(this._container=B(`div`,`leaflet-layer `+(this.options.className||``)),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(e!==void 0){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(St(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[e],i=this._map;return r||(r=this._levels[e]={},r.el=B(`div`,`leaflet-tile-container leaflet-zoom-animated`,this._container),r.el.style.zIndex=t,r.origin=i.project(i.unproject(i.getPixelOrigin()),e).round(),r.zoom=e,this._setZoomTransform(r,i.getCenter(),i.getZoom()),r.el.offsetWidth,this._onCreateLevel(r)),this._level=r,r}},_onUpdateLevel:l,_onRemoveLevel:l,_onCreateLevel:l,_pruneTiles:function(){if(this._map){var e,t,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom){this._removeAllTiles();return}for(e in this._tiles)t=this._tiles[e],t.retain=t.current;for(e in this._tiles)if(t=this._tiles[e],t.current&&!t.active){var r=t.coords;this._retainParent(r.x,r.y,r.z,r.z-5)||this._retainChildren(r.x,r.y,r.z,r.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)St(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,r){var i=Math.floor(e/2),a=Math.floor(t/2),o=n-1,s=new j(+i,+a);s.z=+o;var c=this._tileCoordsToKey(s),l=this._tiles[c];return l&&l.active?(l.retain=!0,!0):(l&&l.loaded&&(l.retain=!0),o>r?this._retainParent(i,a,o,r):!1)},_retainChildren:function(e,t,n,r){for(var i=2*e;i<2*e+2;i++)for(var a=2*t;a<2*t+2;a++){var o=new j(i,a);o.z=n+1;var s=this._tileCoordsToKey(o),c=this._tiles[s];if(c&&c.active){c.retain=!0;continue}else c&&c.loaded&&(c.retain=!0);n+1<r&&this._retainChildren(i,a,n+1,r)}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return t.minNativeZoom!==void 0&&e<t.minNativeZoom?t.minNativeZoom:t.maxNativeZoom!==void 0&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,r){var i=Math.round(t);i=this.options.maxZoom!==void 0&&i>this.options.maxZoom||this.options.minZoom!==void 0&&i<this.options.minZoom?void 0:this._clampZoom(i);var a=this.options.updateWhenZooming&&i!==this._tileZoom;(!r||a)&&(this._tileZoom=i,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),i!==void 0&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,t,n){var r=this._map.getZoomScale(n,e.zoom),i=e.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(t,n)).round();R.any3d?Nt(e.el,i,r):Pt(e.el,i)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),r=this._tileZoom,i=this._map.getPixelWorldBounds(this._tileZoom);i&&(this._globalTileRange=this._pxBoundsToTileRange(i)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],r).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],r).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],r).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],r).y/n.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(e){var t=this._map,n=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),r=t.getZoomScale(n,this._tileZoom),i=t.project(e,this._tileZoom).floor(),a=t.getSize().divideBy(r*2);return new N(i.subtract(a),i.add(a))},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(e===void 0&&(e=t.getCenter()),this._tileZoom!==void 0){var r=this._getTiledPixelBounds(e),i=this._pxBoundsToTileRange(r),a=i.getCenter(),o=[],s=this.options.keepBuffer,c=new N(i.getBottomLeft().subtract([s,-s]),i.getTopRight().add([s,-s]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw Error(`Attempted to load an infinite number of tiles`);for(var l in this._tiles){var u=this._tiles[l].coords;(u.z!==this._tileZoom||!c.contains(new j(u.x,u.y)))&&(this._tiles[l].current=!1)}if(Math.abs(n-this._tileZoom)>1){this._setView(e,n);return}for(var d=i.min.y;d<=i.max.y;d++)for(var f=i.min.x;f<=i.max.x;f++){var p=new j(f,d);if(p.z=this._tileZoom,this._isValidTile(p)){var m=this._tiles[this._tileCoordsToKey(p)];m?m.current=!0:o.push(p)}}if(o.sort(function(e,t){return e.distanceTo(a)-t.distanceTo(a)}),o.length!==0){this._loading||(this._loading=!0,this.fire(`loading`));var h=document.createDocumentFragment();for(f=0;f<o.length;f++)this._addTile(o[f],h);this._level.el.appendChild(h)}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(e);return ne(this.options.bounds).overlaps(r)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),r=e.scaleBy(n),i=r.add(n);return[t.unproject(r,e.z),t.unproject(i,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new F(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(e){return e.x+`:`+e.y+`:`+e.z},_keyToTileCoords:function(e){var t=e.split(`:`),n=new j(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(St(t.el),delete this._tiles[e],this.fire(`tileunload`,{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){V(e,`leaflet-tile`);var t=this.getTileSize();e.style.width=t.x+`px`,e.style.height=t.y+`px`,e.onselectstart=l,e.onmousemove=l,R.ielt9&&this.options.opacity<1&&At(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),r=this._tileCoordsToKey(e),a=this.createTile(this._wrapCoords(e),i(this._tileReady,this,e));this._initTile(a),this.createTile.length<2&&T(i(this._tileReady,this,e,null,a)),Pt(a,n),this._tiles[r]={el:a,coords:e,current:!0},t.appendChild(a),this.fire(`tileloadstart`,{tile:a,coords:e})},_tileReady:function(e,t,n){t&&this.fire(`tileerror`,{error:t,tile:n,coords:e});var r=this._tileCoordsToKey(e);n=this._tiles[r],n&&(n.loaded=+new Date,this._map._fadeAnimated?(At(n.el,0),E(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(V(n.el,`leaflet-tile-loaded`),this.fire(`tileload`,{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire(`load`),R.ielt9||!this._map._fadeAnimated?T(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new j(this._wrapX?c(e.x,this._wrapX):e.x,this._wrapY?c(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new N(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Gr(e){return new Wr(e)}var Kr=Wr.extend({options:{minZoom:0,maxZoom:18,subdomains:`abc`,errorTileUrl:``,zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,t=p(this,t),t.detectRetina&&R.retina&&t.maxZoom>0?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),typeof t.subdomains==`string`&&(t.subdomains=t.subdomains.split(``)),this.on(`tileunload`,this._onTileRemove)},setUrl:function(e,t){return this._url===e&&t===void 0&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement(`img`);return H(n,`load`,i(this._tileOnLoad,this,t,n)),H(n,`error`,i(this._tileOnError,this,t,n)),(this.options.crossOrigin||this.options.crossOrigin===``)&&(n.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),typeof this.options.referrerPolicy==`string`&&(n.referrerPolicy=this.options.referrerPolicy),n.alt=``,n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:R.retina?`@2x`:``,s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var r=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=r),t[`-y`]=r}return g(this._url,n(t,this.options))},_tileOnLoad:function(e,t){R.ielt9?setTimeout(i(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var r=this.options.errorTileUrl;r&&t.getAttribute(`src`)!==r&&(t.src=r),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom,n=this.options.zoomReverse,r=this.options.zoomOffset;return n&&(e=t-e),e+r},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&(t=this._tiles[e].el,t.onload=l,t.onerror=l,!t.complete)){t.src=y;var n=this._tiles[e].coords;St(t),delete this._tiles[e],this.fire(`tileabort`,{tile:t,coords:n})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute(`src`,y),Wr.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(!(!this._map||n&&n.getAttribute(`src`)===y))return Wr.prototype._tileReady.call(this,e,t,n)}});function qr(e,t){return new Kr(e,t)}var Jr=Kr.extend({defaultWmsParams:{service:`WMS`,request:`GetMap`,layers:``,styles:``,format:`image/jpeg`,transparent:!1,version:`1.1.1`},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var r=n({},this.defaultWmsParams);for(var i in t)i in this.options||(r[i]=t[i]);t=p(this,t);var a=t.detectRetina&&R.retina?2:1,o=this.getTileSize();r.width=o.x*a,r.height=o.y*a,this.wmsParams=r},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?`crs`:`srs`;this.wmsParams[t]=this._crs.code,Kr.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,r=P(n.project(t[0]),n.project(t[1])),i=r.min,a=r.max,o=(this._wmsVersion>=1.3&&this._crs===Zn?[i.y,i.x,a.y,a.x]:[i.x,i.y,a.x,a.y]).join(`,`),s=Kr.prototype.getTileUrl.call(this,e);return s+m(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?`&BBOX=`:`&bbox=`)+o},setParams:function(e,t){return n(this.wmsParams,e),t||this.redraw(),this}});function Yr(e,t){return new Jr(e,t)}Kr.WMS=Jr,qr.wms=Yr;var Xr=$n.extend({options:{padding:.1},initialize:function(e){p(this,e),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),V(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 e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),i=this._map.project(this._center,t),a=r.multiplyBy(-n).add(i).subtract(this._map._getNewPixelOrigin(e,t));R.any3d?Nt(this._container,a,n):Pt(this._container,a)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new N(n,n.add(t.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Zr=Xr.extend({options:{tolerance:0},getEvents:function(){var e=Xr.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Xr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement(`canvas`);H(e,`mousemove`,this._onMouseMove,this),H(e,`click dblclick mousedown mouseup contextmenu`,this._onClick,this),H(e,`mouseout`,this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext(`2d`)},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,St(this._container),U(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var e;for(var t in this._redrawBounds=null,this._layers)e=this._layers[t],e._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Xr.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),r=R.retina?2:1;Pt(t,e.min),t.width=r*n.x,t.height=r*n.y,t.style.width=n.x+`px`,t.style.height=n.y+`px`,R.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire(`update`)}},_reset:function(){Xr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[o(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,n=t.next,r=t.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete e._order,delete this._layers[o(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if(typeof e.options.dashArray==`string`){var t=e.options.dashArray.split(/[, ]+/),n=[],r,i;for(i=0;i<t.length;i++){if(r=Number(t[i]),isNaN(r))return;n.push(r)}e.options._dashArray=n}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||T(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new N,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e=this._redrawBounds;if(e){var t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var e,t=this._redrawBounds;if(this._ctx.save(),t){var n=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)e=r.layer,(!t||e._pxBounds&&e._pxBounds.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,r,i,a,o=e._parts,s=o.length,c=this._ctx;if(s){for(c.beginPath(),n=0;n<s;n++){for(r=0,i=o[n].length;r<i;r++)a=o[n][r],c[r?`lineTo`:`moveTo`](a.x,a.y);t&&c.closePath()}this._fillStroke(c,e)}}},_updateCircle:function(e){if(!(!this._drawing||e._empty())){var t=e._point,n=this._ctx,r=Math.max(Math.round(e._radius),1),i=(Math.max(Math.round(e._radiusY),1)||r)/r;i!==1&&(n.save(),n.scale(1,i)),n.beginPath(),n.arc(t.x,t.y/i,r,0,Math.PI*2,!1),i!==1&&n.restore(),this._fillStroke(n,e)}},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||`evenodd`)),n.stroke&&n.weight!==0&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t=this._map.mouseEventToLayerPoint(e),n,r,i=this._drawFirst;i;i=i.next)n=i.layer,n.options.interactive&&n._containsPoint(t)&&(!(e.type===`click`||e.type===`preclick`)||!this._map._draggableMoved(n))&&(r=n);this._fireEvent(r?[r]:!1,e)},_onMouseMove:function(e){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var t=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,t)}},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(Dt(this._container,`leaflet-interactive`),this._fireEvent([t],e,`mouseout`),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var n,r,a=this._drawFirst;a;a=a.next)n=a.layer,n.options.interactive&&n._containsPoint(t)&&(r=n);r!==this._hoveredLayer&&(this._handleMouseOut(e),r&&(V(this._container,`leaflet-interactive`),this._fireEvent([r],e,`mouseover`),this._hoveredLayer=r)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,e),this._mouseHoverThrottled=!0,setTimeout(i(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){var t=e._order;if(t){var n=t.next,r=t.prev;if(n)n.prev=r;else return;r?r.next=n:n&&(this._drawFirst=n),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e)}},_bringToBack:function(e){var t=e._order;if(t){var n=t.next,r=t.prev;if(r)r.next=n;else return;n?n.prev=r:r&&(this._drawLast=r),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e)}}});function Qr(e){return R.canvas?new Zr(e):null}var $r=(function(){try{return document.namespaces.add(`lvml`,`urn:schemas-microsoft-com:vml`),function(e){return document.createElement(`<lvml:`+e+` class="lvml">`)}}catch{}return function(e){return document.createElement(`<`+e+` xmlns="urn:schemas-microsoft.com:vml" class="lvml">`)}})(),ei={_initContainer:function(){this._container=B(`div`,`leaflet-vml-container`)},_update:function(){this._map._animatingZoom||(Xr.prototype._update.call(this),this.fire(`update`))},_initPath:function(e){var t=e._container=$r(`shape`);V(t,`leaflet-vml-shape `+(this.options.className||``)),t.coordsize=`1 1`,e._path=$r(`path`),t.appendChild(e._path),this._updateStyle(e),this._layers[o(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;St(t),e.removeInteractiveTarget(t),delete this._layers[o(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,r=e.options,i=e._container;i.stroked=!!r.stroke,i.filled=!!r.fill,r.stroke?(t||=e._stroke=$r(`stroke`),i.appendChild(t),t.weight=r.weight+`px`,t.color=r.color,t.opacity=r.opacity,r.dashArray?t.dashStyle=_(r.dashArray)?r.dashArray.join(` `):r.dashArray.replace(/( *, *)/g,` `):t.dashStyle=``,t.endcap=r.lineCap.replace(`butt`,`flat`),t.joinstyle=r.lineJoin):t&&(i.removeChild(t),e._stroke=null),r.fill?(n||=e._fill=$r(`fill`),i.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(i.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),r=Math.round(e._radiusY||n);this._setPath(e,e._empty()?`M0 0`:`AL `+t.x+`,`+t.y+` `+n+`,`+r+` 0,23592600`)},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){wt(e._container)},_bringToBack:function(e){Tt(e._container)}},ti=R.vml?$r:fe,ni=Xr.extend({_initContainer:function(){this._container=ti(`svg`),this._container.setAttribute(`pointer-events`,`none`),this._rootGroup=ti(`g`),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){St(this._container),U(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Xr.prototype._update.call(this);var e=this._bounds,t=e.getSize(),n=this._container;(!this._svgSize||!this._svgSize.equals(t))&&(this._svgSize=t,n.setAttribute(`width`,t.x),n.setAttribute(`height`,t.y)),Pt(n,e.min),n.setAttribute(`viewBox`,[e.min.x,e.min.y,t.x,t.y].join(` `)),this.fire(`update`)}},_initPath:function(e){var t=e._path=ti(`path`);e.options.className&&V(t,e.options.className),e.options.interactive&&V(t,`leaflet-interactive`),this._updateStyle(e),this._layers[o(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){St(e._path),e.removeInteractiveTarget(e._path),delete this._layers[o(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute(`stroke`,n.color),t.setAttribute(`stroke-opacity`,n.opacity),t.setAttribute(`stroke-width`,n.weight),t.setAttribute(`stroke-linecap`,n.lineCap),t.setAttribute(`stroke-linejoin`,n.lineJoin),n.dashArray?t.setAttribute(`stroke-dasharray`,n.dashArray):t.removeAttribute(`stroke-dasharray`),n.dashOffset?t.setAttribute(`stroke-dashoffset`,n.dashOffset):t.removeAttribute(`stroke-dashoffset`)):t.setAttribute(`stroke`,`none`),n.fill?(t.setAttribute(`fill`,n.fillColor||n.color),t.setAttribute(`fill-opacity`,n.fillOpacity),t.setAttribute(`fill-rule`,n.fillRule||`evenodd`)):t.setAttribute(`fill`,`none`))},_updatePoly:function(e,t){this._setPath(e,pe(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),r=Math.max(Math.round(e._radiusY),1)||n,i=`a`+n+`,`+r+` 0 1,0 `,a=e._empty()?`M0 0`:`M`+(t.x-n)+`,`+t.y+i+n*2+`,0 `+i+-n*2+`,0 `;this._setPath(e,a)},_setPath:function(e,t){e._path.setAttribute(`d`,t)},_bringToFront:function(e){wt(e._path)},_bringToBack:function(e){Tt(e._path)}});R.vml&&ni.include(ei);function ri(e){return R.svg||R.vml?new ni(e):null}W.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||=this._renderer=this._createRenderer(),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if(e===`overlayPane`||e===void 0)return!1;var t=this._paneRenderers[e];return t===void 0&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&Qr(e)||ri(e)}});var ii=_r.extend({initialize:function(e,t){_r.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=ne(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function ai(e,t){return new ii(e,t)}ni.create=ti,ni.pointsToPath=pe,yr.geometryToLayer=br,yr.coordsToLatLng=Sr,yr.coordsToLatLngs=Cr,yr.latLngToCoords=wr,yr.latLngsToCoords=Tr,yr.getFeature=Er,yr.asFeature=Dr,W.mergeOptions({boxZoom:!0});var oi=Cn.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on(`unload`,this._destroy,this)},addHooks:function(){H(this._container,`mousedown`,this._onMouseDown,this)},removeHooks:function(){U(this._container,`mousedown`,this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){St(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(e){if(!e.shiftKey||e.which!==1&&e.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),It(),Bt(),this._startPoint=this._map.mouseEventToContainerPoint(e),H(document,{contextmenu:an,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=B(`div`,`leaflet-zoom-box`,this._container),V(this._container,`leaflet-crosshair`),this._map.fire(`boxzoomstart`)),this._point=this._map.mouseEventToContainerPoint(e);var t=new N(this._point,this._startPoint),n=t.getSize();Pt(this._box,t.min),this._box.style.width=n.x+`px`,this._box.style.height=n.y+`px`},_finish:function(){this._moved&&(St(this._box),Dt(this._container,`leaflet-crosshair`)),Lt(),Vt(),U(document,{contextmenu:an,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if(!(e.which!==1&&e.button!==1)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var t=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire(`boxzoomend`,{boxZoomBounds:t})}},_onKeyDown:function(e){e.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});W.addInitHook(`addHandler`,`boxZoom`,oi),W.mergeOptions({doubleClickZoom:!0});var si=Cn.extend({addHooks:function(){this._map.on(`dblclick`,this._onDoubleClick,this)},removeHooks:function(){this._map.off(`dblclick`,this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),r=t.options.zoomDelta,i=e.originalEvent.shiftKey?n-r:n+r;t.options.doubleClickZoom===`center`?t.setZoom(i):t.setZoomAround(e.containerPoint,i)}});W.addInitHook(`addHandler`,`doubleClickZoom`,si),W.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ci=Cn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new En(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on(`predrag`,this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on(`predrag`,this._onPreDragWrap,this),e.on(`zoomend`,this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}V(this._map._container,`leaflet-grab leaflet-touch-drag`),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Dt(this._map._container,`leaflet-grab`),Dt(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 e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=ne(this._map.options.maxBounds);this._offsetLimit=P(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire(`movestart`).fire(`dragstart`),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire(`move`,e).fire(`drag`,e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2);this._initialWorldOffset=this._map.latLngToLayerPoint([0,0]).subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-t+n)%e+t-n,a=(r+t+n)%e-t-n,o=Math.abs(i+n)<Math.abs(a+n)?i:a;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=o},_onDragEnd:function(e){var t=this._map,n=t.options,r=!n.inertia||e.noInertia||this._times.length<2;if(t.fire(`dragend`,e),r)t.fire(`moveend`);else{this._prunePositions(+new Date);var i=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,o=n.easeLinearity,s=i.multiplyBy(o/a),c=s.distanceTo([0,0]),l=Math.min(n.inertiaMaxSpeed,c),u=s.multiplyBy(l/c),d=l/(n.inertiaDeceleration*o),f=u.multiplyBy(-d/2).round();!f.x&&!f.y?t.fire(`moveend`):(f=t._limitOffset(f,t.options.maxBounds),T(function(){t.panBy(f,{duration:d,easeLinearity:o,noMoveStart:!0,animate:!0})}))}}});W.addInitHook(`addHandler`,`dragging`,ci),W.mergeOptions({keyboard:!0,keyboardPanDelta:80});var li=Cn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex=`0`),H(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),U(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=document.body,t=document.documentElement,n=e.scrollTop||t.scrollTop,r=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(r,n)}},_onFocus:function(){this._focused=!0,this._map.fire(`focus`)},_onBlur:function(){this._focused=!1,this._map.fire(`blur`)},_setPanDelta:function(e){var t=this._panKeys={},n=this.keyCodes,r,i;for(r=0,i=n.left.length;r<i;r++)t[n.left[r]]=[-1*e,0];for(r=0,i=n.right.length;r<i;r++)t[n.right[r]]=[e,0];for(r=0,i=n.down.length;r<i;r++)t[n.down[r]]=[0,e];for(r=0,i=n.up.length;r<i;r++)t[n.up[r]]=[0,-1*e]},_setZoomDelta:function(e){var t=this._zoomKeys={},n=this.keyCodes,r,i;for(r=0,i=n.zoomIn.length;r<i;r++)t[n.zoomIn[r]]=e;for(r=0,i=n.zoomOut.length;r<i;r++)t[n.zoomOut[r]]=-e},_addHooks:function(){H(document,`keydown`,this._onKeyDown,this)},_removeHooks:function(){U(document,`keydown`,this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t=e.keyCode,n=this._map,r;if(t in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(r=this._panKeys[t],e.shiftKey&&(r=M(r).multiplyBy(3)),n.options.maxBounds&&(r=n._limitOffset(M(r),n.options.maxBounds)),n.options.worldCopyJump){var i=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(r)));n.panTo(i)}else n.panBy(r)}else if(t in this._zoomKeys)n.setZoom(n.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[t]);else if(t===27&&n._popup&&n._popup.options.closeOnEscapeKey)n.closePopup();else return;an(e)}}});W.addInitHook(`addHandler`,`keyboard`,li),W.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ui=Cn.extend({addHooks:function(){H(this._map._container,`wheel`,this._onWheelScroll,this),this._delta=0},removeHooks:function(){U(this._map._container,`wheel`,this._onWheelScroll,this)},_onWheelScroll:function(e){var t=ln(e),n=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||=+new Date;var r=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),r),an(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var r=this._delta/(this._map.options.wheelPxPerZoomLevel*4),i=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,a=n?Math.ceil(i/n)*n:i,o=e._limitZoom(t+(this._delta>0?a:-a))-t;this._delta=0,this._startTime=null,o&&(e.options.scrollWheelZoom===`center`?e.setZoom(t+o):e.setZoomAround(this._lastMousePos,t+o))}});W.addInitHook(`addHandler`,`scrollWheelZoom`,ui);var di=600;W.mergeOptions({tapHold:R.touchNative&&R.safari&&R.mobile,tapTolerance:15});var fi=Cn.extend({addHooks:function(){H(this._map._container,`touchstart`,this._onDown,this)},removeHooks:function(){U(this._map._container,`touchstart`,this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),e.touches.length===1){var t=e.touches[0];this._startPos=this._newPos=new j(t.clientX,t.clientY),this._holdTimeout=setTimeout(i(function(){this._cancel(),this._isTapValid()&&(H(document,`touchend`,rn),H(document,`touchend touchcancel`,this._cancelClickPrevent),this._simulateEvent(`contextmenu`,t))},this),di),H(document,`touchend touchcancel contextmenu`,this._cancel,this),H(document,`touchmove`,this._onMove,this)}},_cancelClickPrevent:function e(){U(document,`touchend`,rn),U(document,`touchend touchcancel`,e)},_cancel:function(){clearTimeout(this._holdTimeout),U(document,`touchend touchcancel contextmenu`,this._cancel,this),U(document,`touchmove`,this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new j(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});n._simulated=!0,t.target.dispatchEvent(n)}});W.addInitHook(`addHandler`,`tapHold`,fi),W.mergeOptions({touchZoom:R.touch,bounceAtZoomLimits:!0});var pi=Cn.extend({addHooks:function(){V(this._map._container,`leaflet-touch-zoom`),H(this._map._container,`touchstart`,this._onTouchStart,this)},removeHooks:function(){Dt(this._map._container,`leaflet-touch-zoom`),U(this._map._container,`touchstart`,this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(!(!e.touches||e.touches.length!==2||t._animatingZoom||this._zooming)){var n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),t.options.touchZoom!==`center`&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(r)._divideBy(2))),this._startDist=n.distanceTo(r),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),H(document,`touchmove`,this._onTouchMove,this),H(document,`touchend touchcancel`,this._onTouchEnd,this),rn(e)}},_onTouchMove:function(e){if(!(!e.touches||e.touches.length!==2||!this._zooming)){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]),a=n.distanceTo(r)/this._startDist;if(this._zoom=t.getScaleZoom(a,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&a<1||this._zoom>t.getMaxZoom()&&a>1)&&(this._zoom=t._limitZoom(this._zoom)),t.options.touchZoom===`center`){if(this._center=this._startLatLng,a===1)return}else{var o=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(a===1&&o.x===0&&o.y===0)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||=(t._moveStart(!0,!1),!0),E(this._animRequest),this._animRequest=T(i(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0),this,!0),rn(e)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,E(this._animRequest),U(document,`touchmove`,this._onTouchMove,this),U(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))}});W.addInitHook(`addHandler`,`touchZoom`,pi),W.BoxZoom=oi,W.DoubleClickZoom=si,W.Drag=ci,W.Keyboard=li,W.ScrollWheelZoom=ui,W.TapHold=fi,W.TouchZoom=pi,e.Bounds=N,e.Browser=R,e.CRS=ie,e.Canvas=Zr,e.Circle=pr,e.CircleMarker=dr,e.Class=O,e.Control=mn,e.DivIcon=Hr,e.DivOverlay=Lr,e.DomEvent=dn,e.DomUtil=Jt,e.Draggable=En,e.Evented=ee,e.FeatureGroup=nr,e.GeoJSON=yr,e.GridLayer=Wr,e.Handler=Cn,e.Icon=ir,e.ImageOverlay=jr,e.LatLng=re,e.LatLngBounds=F,e.Layer=$n,e.LayerGroup=er,e.LineUtil=Kn,e.Map=W,e.Marker=cr,e.Mixin=wn,e.Path=ur,e.Point=j,e.PolyUtil=An,e.Polygon=_r,e.Polyline=hr,e.Popup=Rr,e.PosAnimation=fn,e.Projection=Yn,e.Rectangle=ii,e.Renderer=Xr,e.SVG=ni,e.SVGOverlay=Fr,e.TileLayer=Kr,e.Tooltip=Br,e.Transformation=ce,e.Util=D,e.VideoOverlay=Nr,e.bind=i,e.bounds=P,e.canvas=Qr,e.circle=mr,e.circleMarker=fr,e.control=hn,e.divIcon=Ur,e.extend=n,e.featureGroup=rr,e.geoJSON=kr,e.geoJson=Ar,e.gridLayer=Gr,e.icon=ar,e.imageOverlay=Mr,e.latLng=I,e.latLngBounds=ne,e.layerGroup=tr,e.map=pn,e.marker=lr,e.point=M,e.polygon=vr,e.polyline=gr,e.popup=zr,e.rectangle=ai,e.setOptions=p,e.stamp=o,e.svg=ri,e.svgOverlay=Ir,e.tileLayer=qr,e.tooltip=Vr,e.transformation=le,e.version=t,e.videoOverlay=Pr;var mi=window.L;e.noConflict=function(){return window.L=mi,this},window.L=e}))}));function Od(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function kd(e,t){return t==null?function(t,n){let r=(0,S.useRef)(void 0);return r.current||=e(t,n),r}:function(n,r){let i=(0,S.useRef)(void 0);i.current||=e(n,r);let a=(0,S.useRef)(n),{instance:o}=i.current;return(0,S.useEffect)(function(){a.current!==n&&(t(o,n,a.current),a.current=n)},[o,n,t]),i}}function Ad(e,t){(0,S.useEffect)(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function jd(e){return function(t){let n=Sd(),r=e(Ed(t,n),n);return vd(n.map,t.attribution),Td(r.current,t.eventHandlers),Ad(r.current,n),r}}function Md(e,t){let n=(0,S.useRef)(void 0);(0,S.useEffect)(function(){if(t.pathOptions!==n.current){let r=t.pathOptions??{};e.instance.setStyle(r),n.current=r}},[e,t])}function Nd(e){return function(t){let n=Sd(),r=e(Ed(t,n),n);return Td(r.current,t.eventHandlers),Ad(r.current,n),Md(r.current,t),r}}function Pd(e,t){return Y(jd(kd(e,t)))}function Fd(e,t){return Y(Nd(kd(e,t)))}function Id(e,t){return wd(jd(kd(e,t)))}function Ld(e,t,n){let{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function Rd(){return Sd().map}function zd(e){let t=Rd();return(0,S.useEffect)(function(){return t.on(e),function(){t.off(e)}},[t,e]),t}var Bd=u(Dd(),1);function Vd({bounds:e,boundsOptions:t,center:n,children:r,className:i,id:a,placeholder:o,style:s,whenReady:c,zoom:l,...u},d){let[f]=(0,S.useState)({className:i,id:a,style:s}),[p,m]=(0,S.useState)(null),h=(0,S.useRef)(void 0);(0,S.useImperativeHandle)(d,()=>p?.map??null,[p]);let g=(0,S.useCallback)(r=>{if(r!==null&&!h.current){let i=new Bd.Map(r,u);h.current=i,n!=null&&l!=null?i.setView(n,l):e!=null&&i.fitBounds(e,t),c!=null&&i.whenReady(c),m(yd(i))}},[]);(0,S.useEffect)(()=>()=>{p?.map.remove()},[p]);let _=p?S.createElement(xd,{value:p},r):o??null;return S.createElement(`div`,{...f,ref:g},_)}var Hd=(0,S.forwardRef)(Vd),Ud=Pd(function({position:e,...t},n){let r=new Bd.Marker(e,t);return Od(r,bd(n,{overlayContainer:r}))},function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),t.icon!=null&&t.icon!==n.icon&&e.setIcon(t.icon),t.zIndexOffset!=null&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),t.opacity!=null&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),e.dragging!=null&&t.draggable!==n.draggable&&(t.draggable===!0?e.dragging.enable():e.dragging.disable())}),Wd=Fd(function({positions:e,...t},n){let r=new Bd.Polyline(e,t);return Od(r,bd(n,{overlayContainer:r}))},function(e,t,n){t.positions!==n.positions&&e.setLatLngs(t.positions)}),Gd=Id(function({url:e,...t},n){return Od(new Bd.TileLayer(e,Ed(t,n)),n)},function(e,t,n){Ld(e,t,n);let{url:r}=t;r!=null&&r!==n.url&&e.setUrl(r)}),Kd=new Bd.default.DivIcon({html:`<div style="font-size: 30px; filter: drop-shadow(0 0 5px black);">⛵</div>`,className:`boat-marker`,iconSize:[30,30],iconAnchor:[15,15]}),qd=e=>!e||e<50?`text-gray-500`:e<195||e>255?`text-red-500`:e<210||e>245?`text-orange-500`:`text-gray-400`,Jd=(e,t,n,r)=>{let i=Math.abs(e),a=r&&n>180,o=a?t*n:1200,s=i/(o>100?o:1200);return s>.9?`text-red-500 animate-pulse font-black`:s>.7?`text-orange-500 font-black`:a&&i>1e3?`text-yellow-400 font-black`:`text-gray-100`},Yd=e=>e==null?`text-white`:e<=-12?`text-blue-600`:e<-4?`text-blue-400`:e<4?`text-orange-500`:e<=9?`text-white`:e<=12?`text-orange-500`:`text-red-500`,Xd=({coords:e,trail:t,autoFollow:n,setAutoFollow:r})=>{let i=Rd();return zd({dragstart:()=>r(!1),zoomstart:()=>r(!1),touchstart:()=>r(!1)}),(0,S.useEffect)(()=>{n&&e[0]!==0&&(i.invalidateSize(),i.setView(e,i.getZoom(),{animate:!0,duration:1}))},[e,n,i]),(0,S.useEffect)(()=>{let e=setTimeout(()=>{i.invalidateSize()},400);return()=>clearTimeout(e)},[i]),(0,q.jsxs)(q.Fragment,{children:[t.length>0&&(0,q.jsx)(Wd,{positions:t,color:`#22d3ee`,weight:5,opacity:.8,lineCap:`round`,lineJoin:`round`}),(0,q.jsxs)(`div`,{className:`absolute right-4 top-1/2 -translate-y-1/2 flex flex-col gap-4 z-[1000]`,children:[(0,q.jsx)(`button`,{onClick:e=>{e.stopPropagation(),r(!1),i.zoomIn()},className:`w-12 h-12 rounded-2xl bg-black/40 backdrop-blur-md border border-white/10 flex items-center justify-center text-white shadow-lg active:scale-90 transition-all`,children:(0,q.jsx)($u,{size:24})}),(0,q.jsx)(`button`,{onClick:e=>{e.stopPropagation(),r(!1),i.zoomOut()},className:`w-12 h-12 rounded-2xl bg-black/40 backdrop-blur-md border border-white/10 flex items-center justify-center text-white shadow-lg active:scale-90 transition-all`,children:(0,q.jsx)(Yu,{size:24})}),(0,q.jsx)(`button`,{onClick:t=>{t.stopPropagation(),i.invalidateSize(),r(!0),i.setView(e,18,{animate:!0})},className:`w-12 h-12 rounded-2xl backdrop-blur-md border transition-all flex items-center justify-center shadow-lg active:scale-90 ${n?`bg-cyan-500/30 border-cyan-500/50 shadow-[0_0_15px_rgba(6,182,212,0.4)]`:`bg-black/40 border-white/10`}`,children:(0,q.jsx)(cd,{size:24,className:n?`text-cyan-400`:`text-white`})})]})]})},Zd=({manager:e,onTabChange:t})=>{let{data:n,toggleSwitch:r,apiUrl:i,error:a,isUpdating:o}=e,[s,c]=(0,S.useState)(!0),[l,u]=(0,S.useState)(!1);(0,S.useEffect)(()=>{u(!!a)},[a]);let d=parseFloat(n?.gps?.lat)||36.78,f=parseFloat(n?.gps?.lon)||14.54,p=[d,f],m=(0,S.useMemo)(()=>{let e=n?.environment?.gps_history||[];if(e.length<4)return e.map(e=>[parseFloat(e.lat),parseFloat(e.lon)]);let t=e.map(e=>({x:parseFloat(e.lat),y:parseFloat(e.lon)})),r=[];for(let e=0;e<t.length-1;e++){let n=t[e===0?e:e-1],i=t[e],a=t[e+1],o=t[e+1===t.length-1?e+1:e+2];for(let e=0;e<1;e+=.25){let t=.5*(2*i.x+(-n.x+a.x)*e+(2*n.x-5*i.x+4*a.x-o.x)*e*e+(-n.x+3*i.x-3*a.x+o.x)*e*e*e),s=.5*(2*i.y+(-n.y+a.y)*e+(2*n.y-5*i.y+4*a.y-o.y)*e*e+(-n.y+3*i.y-3*a.y+o.y)*e*e*e);r.push([t,s])}}return r.push([t[t.length-1].x,t[t.length-1].y]),r},[n?.environment?.gps_history]);return(0,q.jsxs)(`div`,{className:`px-2 pt-5 pb-4 landscape:p-2 landscape:pt-4 space-y-2 landscape:space-y-2`,children:[l&&(0,q.jsx)(`div`,{className:`fixed inset-0 z-[5000] flex items-center justify-center p-4 bg-black/80 backdrop-blur-md overflow-y-auto`,children:(0,q.jsxs)(`div`,{className:`bg-[#1a1a1a] border border-white/10 p-6 landscape:p-5 rounded-[2rem] shadow-2xl max-w-sm w-full space-y-4 landscape:space-y-3 my-auto`,children:[(0,q.jsx)(`div`,{className:`bg-red-500/20 w-12 h-12 rounded-full flex items-center justify-center mx-auto shadow-lg text-red-500`,children:(0,q.jsx)(dd,{size:24})}),(0,q.jsxs)(`div`,{className:`space-y-1 text-center`,children:[(0,q.jsx)(`h2`,{className:`text-lg font-black uppercase tracking-tight text-white font-mono leading-none`,children:`Sicurezza API`}),(0,q.jsx)(`p`,{className:`text-gray-400 text-[11px] font-bold px-2`,children:`Autorizza il certificato per ricevere i dati.`})]}),(0,q.jsxs)(`div`,{className:`space-y-2 pt-2`,children:[(0,q.jsx)(`button`,{onClick:()=>window.open(`${i}`,`_blank`),className:`w-full bg-red-500 hover:bg-red-600 text-white font-black py-3.5 rounded-2xl transition-all shadow-lg active:scale-95 flex items-center justify-center gap-2 uppercase text-[11px] tracking-widest font-mono`,children:`1. Autorizza SSL`}),(0,q.jsx)(`p`,{className:`text-[9px] text-gray-600 font-black uppercase tracking-tighter text-center`,children:`Poi chiudi la scheda e torna qui`}),(0,q.jsx)(`button`,{onClick:()=>u(!1),className:`w-full bg-white/5 hover:bg-white/10 text-white font-black py-3 rounded-2xl border border-white/10 active:scale-95 uppercase text-[11px] tracking-widest font-mono`,children:`2. Ho fatto`})]})]})}),(0,q.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 landscape:gap-2`,children:[(0,q.jsx)(`div`,{onClick:()=>t(1),className:`cursor-pointer active:scale-95 transition-transform`,children:(0,q.jsx)(Qd,{title:`BATTERIA`,icon:(0,q.jsx)(Lu,{className:`text-green-500`}),value:`${n?.power?.soc?.toFixed(1)||`-`}%`,sub:(0,q.jsxs)(`span`,{className:n?.power?.dc_draw_w>=0?`text-green-400`:`text-gray-100`,children:[n?.power?.dc_draw_w>0?`+${Math.round(n.power.dc_draw_w)}`:Math.round(n?.power?.dc_draw_w||0),(0,q.jsx)(`span`,{className:`opacity-40 ml-0.5 font-black uppercase text-[12px]`,children:`w`})]})})}),(0,q.jsx)(`div`,{onClick:()=>t(3),className:`cursor-pointer active:scale-95 transition-transform`,children:(0,q.jsx)(Qd,{title:`BANCHINA`,icon:(0,q.jsx)(ed,{className:n?.power?.shore_power?`text-green-500`:`text-red-500`}),value:n?.power?.shore_power?`ON`:`OFF`,sub:(0,q.jsxs)(`div`,{className:`flex flex-col items-end leading-none`,children:[(0,q.jsxs)(`span`,{className:Jd(n?.power?.ac_power_w,n?.switches?.shore_limit,n?.power?.shore_v,n?.power?.shore_power),children:[Math.round(n?.power?.ac_power_w||0),(0,q.jsx)(`span`,{className:`opacity-40 ml-0.5 font-black uppercase text-[12px]`,children:`w`})]}),n?.power?.shore_power&&n?.power?.shore_v>50&&(0,q.jsxs)(`span`,{className:`${qd(n?.power?.shore_v)} text-[12px] font-bold mt-1.5`,children:[`(`,n?.power?.shore_v?.toFixed(0),`V)`]})]})})})]}),(0,q.jsxs)(`div`,{className:`flex flex-col md:flex-row gap-2 landscape:gap-2 w-full`,children:[(0,q.jsxs)(`div`,{className:`w-full md:w-1/2 grid grid-cols-4 md:grid-cols-2 gap-2`,children:[(0,q.jsx)(`div`,{onClick:()=>t(2),className:`cursor-pointer active:scale-95 transition-transform h-full`,children:(0,q.jsx)($d,{icon:(0,q.jsx)(ld,{size:18}),title:`POZZ.`,val:n?.environment?.temp_pozzetto,color:`text-yellow-500`})}),(0,q.jsx)($d,{icon:(0,q.jsx)(od,{size:18}),title:`QUADR.`,val:n?.environment?.temp_quadrato,color:`text-orange-500`}),(0,q.jsx)($d,{icon:(0,q.jsx)(ad,{size:18}),title:`FRIGO`,val:n?.environment?.temp_frigo,color:`text-cyan-400`,valueColor:Yd(n?.environment?.temp_frigo)}),(0,q.jsx)($d,{icon:(0,q.jsx)(ad,{size:18}),title:`FREEZER`,val:n?.environment?.temp_freezer,color:`text-blue-500`,valueColor:Yd(n?.environment?.temp_freezer)})]}),(0,q.jsxs)(`div`,{className:`w-full md:w-1/2 bg-white/5 rounded-[2rem] flex flex-col divide-y divide-white/5 border border-white/10 overflow-hidden shadow-xl transition-all duration-300 ${o?`opacity-60 grayscale-[0.5]`:`opacity-100`}`,children:[(0,q.jsx)(ef,{icon:(0,q.jsx)(Wu,{className:`text-blue-400`}),name:`Pompa Acqua`,isOn:n?.switches?.pump_on,onToggle:e=>r(`pump`,e),disabled:o}),(0,q.jsx)(ef,{icon:(0,q.jsx)(Gu,{className:`text-orange-400`}),name:`Boiler`,isOn:n?.switches?.boiler_on,onToggle:e=>r(`boiler`,e),disabled:o}),(0,q.jsx)(ef,{icon:(0,q.jsx)(rd,{className:`text-purple-400`}),name:`Lavatrice`,isOn:n?.switches?.washing_machine_on,onToggle:e=>r(`washer`,e),disabled:o})]})]}),(0,q.jsxs)(`div`,{className:`space-y-2 pb-22 flex flex-col items-center`,children:[(0,q.jsxs)(`div`,{className:`flex justify-between items-center w-[80%] px-2 text-white`,children:[(0,q.jsx)(`h3`,{className:`text-[10px] font-black text-gray-500 tracking-widest uppercase font-mono opacity-50`,children:`Posizione GPS`}),(0,q.jsxs)(`button`,{onClick:()=>window.open(`maps://?q=${d},${f}`,`_blank`),className:`text-[9px] font-black bg-cyan-500/10 text-cyan-400 px-3 py-1 rounded-full border border-cyan-500/20 flex items-center gap-1 uppercase active:scale-95 transition-transform`,children:[(0,q.jsx)(Zu,{size:10}),` Apri in Mappe`]})]}),(0,q.jsx)(`div`,{onPointerDown:e=>e.stopPropagation(),onPointerMove:e=>e.stopPropagation(),className:`h-64 landscape:h-80 w-[80%] rounded-[2.5rem] overflow-hidden border border-white/10 shadow-2xl relative isolate touch-none`,children:(0,q.jsxs)(Hd,{center:p,zoom:18,maxZoom:21,style:{height:`100%`,width:`100%`},zoomControl:!1,attributionControl:!1,children:[(0,q.jsx)(Gd,{url:`https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}`,maxZoom:20,maxNativeZoom:19}),(0,q.jsx)(Xd,{coords:p,trail:m,autoFollow:s,setAutoFollow:c}),(0,q.jsx)(Ud,{position:p,icon:Kd})]})})]})]})},Qd=({icon:e,title:t,value:n,sub:r})=>(0,q.jsxs)(`div`,{className:`bg-white/5 p-5 rounded-[2rem] border border-white/10 flex flex-row items-center justify-between shadow-lg text-white group hover:bg-white/10 transition-colors h-full`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1 text-gray-500 text-[9px] font-black tracking-widest uppercase whitespace-nowrap`,children:[e,` `,t]}),(0,q.jsx)(`div`,{className:`text-3xl font-black mt-1 tracking-tighter`,children:n})]}),(0,q.jsx)(`div`,{className:`text-[18px] text-gray-200 font-black uppercase tracking-tight text-right pl-2 leading-tight`,children:r})]}),$d=({icon:e,title:t,val:n,color:r,valueColor:i=`text-white`})=>(0,q.jsxs)(`div`,{className:`bg-white/5 py-4 landscape:py-3 rounded-3xl border border-white/5 flex flex-col items-center gap-1 text-center shadow-md hover:bg-white/10 transition-colors h-full justify-center text-white`,children:[(0,q.jsx)(`div`,{className:r,children:e}),(0,q.jsx)(`div`,{className:`text-[8px] font-black text-gray-600 uppercase tracking-tighter mt-1`,children:t}),(0,q.jsxs)(`div`,{className:`text-lg font-black ${i}`,children:[n?.toFixed(1)||`-`,`°`]})]}),ef=({icon:e,name:t,isOn:n,onToggle:r,disabled:i})=>(0,q.jsxs)(`div`,{className:`flex flex-1 items-center justify-between p-5 landscape:p-4 bg-white/[0.02] text-white transition-all ${i?`pointer-events-none opacity-40`:`hover:bg-white/5`}`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[S.cloneElement(e,{size:20,className:n?e.props.className:`text-gray-700 opacity-50`}),(0,q.jsx)(`span`,{className:`text-sm font-bold text-white tracking-tight uppercase`,children:t})]}),(0,q.jsxs)(`label`,{className:`relative inline-flex items-center cursor-pointer`,children:[(0,q.jsx)(`input`,{type:`checkbox`,className:`sr-only peer`,checked:n||!1,onChange:e=>r(e.target.checked),disabled:i}),(0,q.jsx)(`div`,{className:`w-11 h-6 bg-gray-800 rounded-full peer peer-checked:bg-cyan-500 after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:after:translate-x-full shadow-inner`})]})]});function tf(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=tf(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function nf(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=tf(e))&&(r&&(r+=` `),r+=t);return r}var rf=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function af(e){return typeof e==`string`?rf.includes(e):!1}var of=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function sf(e){return typeof e==`string`?of.has(e):!1}function cf(e){return typeof e==`string`&&e.startsWith(`data-`)}function lf(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(sf(n)||cf(n))&&(t[n]=e[n]);return t}function uf(e){if(e==null)return null;if((0,S.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return lf(t)}return typeof e==`object`&&!Array.isArray(e)?lf(e):null}function df(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(sf(n)||cf(n)||af(n))&&(t[n]=e[n]);return t}function ff(e){return e==null?null:(0,S.isValidElement)(e)?df(e.props):typeof e==`object`&&!Array.isArray(e)?df(e):null}var pf=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function mf(){return mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mf.apply(null,arguments)}function hf(e,t){if(e==null)return{};var n,r,i=gf(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gf(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var _f=(0,S.forwardRef)((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:s,title:c,desc:l}=e,u=hf(e,pf),d=a||{width:r,height:i,x:0,y:0},f=nf(`recharts-surface`,o);return S.createElement(`svg`,mf({},df(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),S.createElement(`title`,null,c),S.createElement(`desc`,null,l),n)}),vf=[`children`,`className`];function yf(){return yf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yf.apply(null,arguments)}function bf(e,t){if(e==null)return{};var n,r,i=xf(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function xf(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Sf=S.forwardRef((e,t)=>{var{children:n,className:r}=e,i=bf(e,vf),a=nf(`recharts-layer`,r);return S.createElement(`g`,yf({className:a},df(i),{ref:t}),n)}),Cf=(0,S.createContext)(null);function wf(e){return function(){return e}}var Tf=Math.cos,Ef=Math.sin,Df=Math.sqrt,Of=Math.PI;Of/2;var kf=2*Of,Af=Math.PI,jf=2*Af,Mf=1e-6,Nf=jf-Mf;function Pf(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Ff(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Pf;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var If=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Pf:Ff(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Mf)if(!(Math.abs(u*s-c*l)>Mf)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Af-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Mf&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Mf||Math.abs(this._y1-l)>Mf)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%jf+jf),d>Nf?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Mf&&this._append`A${n},${n},0,${+(d>=Af)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Lf(){return new If}Lf.prototype=If.prototype;function Rf(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new If(t)}Array.prototype.slice;function zf(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Bf(e){this._context=e}Bf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Vf(e){return new Bf(e)}function Hf(e){return e[0]}function Uf(e){return e[1]}function Wf(e,t){var n=wf(!0),r=null,i=Vf,a=null,o=Rf(s);e=typeof e==`function`?e:e===void 0?Hf:wf(e),t=typeof t==`function`?t:t===void 0?Uf:wf(t);function s(s){var c,l=(s=zf(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:wf(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:wf(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:wf(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function Gf(e,t,n){var r=null,i=wf(!0),a=null,o=Vf,s=null,c=Rf(l);e=typeof e==`function`?e:e===void 0?Hf:wf(+e),t=typeof t==`function`?t:wf(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?Uf:wf(+n);function l(l){var u,d,f,p=(l=zf(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return Wf().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:wf(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:wf(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:wf(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:wf(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:wf(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:wf(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:wf(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var Kf=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function qf(e){return new Kf(e,!0)}function Jf(e){return new Kf(e,!1)}var Yf={draw(e,t){let n=Df(t/Of);e.moveTo(n,0),e.arc(0,0,n,0,kf)}},Xf={draw(e,t){let n=Df(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Zf=Df(1/3),Qf=Zf*2,$f={draw(e,t){let n=Df(t/Qf),r=n*Zf;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},ep={draw(e,t){let n=Df(t),r=-n/2;e.rect(r,r,n,n)}},tp=.8908130915292852,np=Ef(Of/10)/Ef(7*Of/10),rp=Ef(kf/10)*np,ip=-Tf(kf/10)*np,ap={draw(e,t){let n=Df(t*tp),r=rp*n,i=ip*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=kf*t/5,o=Tf(a),s=Ef(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},op=Df(3),sp={draw(e,t){let n=-Df(t/(op*3));e.moveTo(0,n*2),e.lineTo(-op*n,-n),e.lineTo(op*n,-n),e.closePath()}},cp=-.5,lp=Df(3)/2,up=1/Df(12),dp=(up/2+1)*3,fp={draw(e,t){let n=Df(t/dp),r=n/2,i=n*up,a=r,o=n*up+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(cp*r-lp*i,lp*r+cp*i),e.lineTo(cp*a-lp*o,lp*a+cp*o),e.lineTo(cp*s-lp*c,lp*s+cp*c),e.lineTo(cp*r+lp*i,cp*i-lp*r),e.lineTo(cp*a+lp*o,cp*o-lp*a),e.lineTo(cp*s+lp*c,cp*c-lp*s),e.closePath()}};function pp(e,t){let n=null,r=Rf(i);e=typeof e==`function`?e:wf(e||Yf),t=typeof t==`function`?t:wf(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:wf(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:wf(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function mp(){}function hp(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function gp(e){this._context=e}gp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:hp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:hp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _p(e){return new gp(e)}function vp(e){this._context=e}vp.prototype={areaStart:mp,areaEnd:mp,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:hp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yp(e){return new vp(e)}function bp(e){this._context=e}bp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:hp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xp(e){return new bp(e)}function Sp(e){this._context=e}Sp.prototype={areaStart:mp,areaEnd:mp,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Cp(e){return new Sp(e)}function wp(e){return e<0?-1:1}function Tp(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(wp(a)+wp(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ep(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Dp(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Op(e){this._context=e}Op.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Dp(this,this._t0,Ep(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Dp(this,Ep(this,n=Tp(this,e,t)),n);break;default:Dp(this,this._t0,n=Tp(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kp(e){this._context=new Ap(e)}(kp.prototype=Object.create(Op.prototype)).point=function(e,t){Op.prototype.point.call(this,t,e)};function Ap(e){this._context=e}Ap.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function jp(e){return new Op(e)}function Mp(e){return new kp(e)}function Np(e){this._context=e}Np.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Pp(e),i=Pp(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Pp(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Fp(e){return new Np(e)}function Ip(e,t){this._context=e,this._t=t}Ip.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function Lp(e){return new Ip(e,.5)}function Rp(e){return new Ip(e,0)}function zp(e){return new Ip(e,1)}function Bp(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Vp(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Hp(e,t){return e[t]}function Up(e){let t=[];return t.key=e,t}function Wp(){var e=wf([]),t=Vp,n=Bp,r=Hp;function i(i){var a=Array.from(e.apply(this,arguments),Up),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=zf(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:wf(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:wf(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Vp:typeof e==`function`?e:wf(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Bp,i):n},i}function Gp(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Bp(e,t)}}function Kp(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Bp(e,t)}}function qp(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Bp(e,t)}}var Jp=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e===`__proto__`}e.isUnsafeProperty=t})),Yp=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}e.isDeepKey=t})),Xp=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}e.toKey=t})),Zp=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(t).join(`,`);let n=String(e);return n===`0`&&Object.is(Number(e),-0)?`-0`:n}e.toString=t})),Qp=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Zp(),n=Xp();function r(e){if(Array.isArray(e))return e.map(n.toKey);if(typeof e==`symbol`)return[e];e=t.toString(e);let r=[],i=e.length;if(i===0)return r;let a=0,o=``,s=``,c=!1;for(e.charCodeAt(0)===46&&(r.push(``),a++);a<i;){let t=e[a];s?t===`\\`&&a+1<i?(a++,o+=e[a]):t===s?s=``:o+=t:c?t===`"`||t===`'`?s=t:t===`]`?(c=!1,r.push(o),o=``):o+=t:t===`[`?(c=!0,o&&=(r.push(o),``)):t===`.`?o&&=(r.push(o),``):o+=t,a++}return o&&r.push(o),r}e.toPath=r})),$p=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Jp(),n=Yp(),r=Xp(),i=Qp();function a(e,s,c){if(e==null)return c;switch(typeof s){case`string`:{if(t.isUnsafeProperty(s))return c;let r=e[s];return r===void 0?n.isDeepKey(s)?a(e,i.toPath(s),c):c:r}case`number`:case`symbol`:{typeof s==`number`&&(s=r.toKey(s));let t=e[s];return t===void 0?c:t}default:{if(Array.isArray(s))return o(e,s,c);if(s=Object.is(s?.valueOf(),-0)?`-0`:String(s),t.isUnsafeProperty(s))return c;let n=e[s];return n===void 0?c:n}}}function o(e,n,r){if(n.length===0)return r;let i=e;for(let e=0;e<n.length;e++){if(i==null||t.isUnsafeProperty(n[e]))return r;i=i[n[e]]}return i===void 0?r:i}e.get=a})),em=s(((e,t)=>{t.exports=$p().get})),tm=4;function nm(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:tm),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function rm(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+nm(i)+n},``)}var im=u(em()),am=e=>e===0?0:e>0?1:-1,om=e=>typeof e==`number`&&e!=+e,sm=e=>typeof e==`string`&&e.indexOf(`%`)===e.length-1,X=e=>(typeof e==`number`||e instanceof Number)&&!om(e),cm=e=>X(e)||typeof e==`string`,lm=0,um=e=>{var t=++lm;return`${e||``}${t}`},dm=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!X(e)&&typeof e!=`string`)return n;var i;if(sm(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return om(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},fm=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function pm(e,t,n){return X(e)&&X(t)?nm(e+n*(t-e)):t}function mm(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):(0,im.default)(e,t))===n)}var hm=e=>e==null,gm=e=>hm(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function _m(e){return e!=null}function vm(){}var ym=[`type`,`size`,`sizeType`];function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bm.apply(null,arguments)}function xm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xm(Object(n),!0).forEach(function(t){Cm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cm(e,t,n){return(t=wm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wm(e){var t=Tm(e,`string`);return typeof t==`symbol`?t:t+``}function Tm(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Em(e,t){if(e==null)return{};var n,r,i=Dm(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dm(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Om={symbolCircle:Yf,symbolCross:Xf,symbolDiamond:$f,symbolSquare:ep,symbolStar:ap,symbolTriangle:sp,symbolWye:fp},km=Math.PI/180,Am=e=>Om[`symbol${gm(e)}`]||Yf,jm=(e,t,n)=>{if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*km;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Mm=(e,t)=>{Om[`symbol${gm(e)}`]=t},Nm=e=>{var{type:t=`circle`,size:n=64,sizeType:r=`area`}=e,i=Sm(Sm({},Em(e,ym)),{},{type:t,size:n,sizeType:r}),a=`circle`;typeof t==`string`&&(a=t);var o=()=>{var e=Am(a),t=pp().type(e).size(jm(n,r,a))();if(t!==null)return t},{className:s,cx:c,cy:l}=i,u=df(i);return X(c)&&X(l)&&X(n)?S.createElement(`path`,bm({},u,{className:nf(`recharts-symbols`,s),transform:`translate(${c}, ${l})`,d:o()})):null};Nm.registerSymbol=Mm;var Pm=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,S.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{af(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},Fm=(e,t,n)=>r=>(e(t,n,r),null),Im=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];af(i)&&typeof a==`function`&&(r||={},r[i]=Fm(a,t,n))}),r};function Lm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Lm(Object(n),!0).forEach(function(t){zm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zm(e,t,n){return(t=Bm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bm(e){var t=Vm(e,`string`);return typeof t==`symbol`?t:t+``}function Vm(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Hm(e,t){var n=Rm({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}var Um=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return Number.isSafeInteger(e)&&e>=0}e.isLength=t})),Wm=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Um();function n(e){return e!=null&&typeof e!=`function`&&t.isLength(e.length)}e.isArrayLike=n})),Gm=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}e.isObject=t})),Km=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}e.isEqualsSameValueZero=t})),qm=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=/^(?:0|[1-9]\d*)$/;function n(e,n=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<n;case`symbol`:return!1;case`string`:return t.test(e)}}e.isIndex=n})),Jm=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Ym=s(((e,t)=>{t.exports=Jm()})),Xm=s((e=>{var t=p(),n=Ym();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Zm=s(((e,t)=>{t.exports=Xm()})),Qm=(0,S.createContext)(null),$m=Zm(),eh=e=>e,th=()=>{var e=(0,S.useContext)(Qm);return e?e.store.dispatch:eh},nh=()=>{},rh=()=>nh,ih=(e,t)=>e===t;function Z(e){var t=(0,S.useContext)(Qm),n=(0,S.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:nh,[t,e]);return(0,$m.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:rh,t?t.store.getState:nh,t?t.store.getState:nh,n,ih)}function ah(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function oh(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function sh(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var ch=e=>Array.isArray(e)?e:[e];function lh(e){let t=Array.isArray(e[0])?e[0]:e;return sh(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function uh(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var dh=class{constructor(e){this.value=e}deref(){return this.value}},fh=typeof WeakRef<`u`?WeakRef:dh,ph=0,mh=1;function hh(){return{s:ph,v:void 0,o:null,p:null}}function gh(e,t={}){let n=hh(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=hh(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=hh(),e.set(n,t)):t=r}}let s=t,c;if(t.s===mh)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new fh(c):c}return s.s=mh,s.v=c,c}return o.clearCache=()=>{n=hh(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function _h(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),ah(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=gh,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=ch(c),p=ch(u),m=lh(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=uh(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var Q=_h(gh),vh=Object.assign((e,t=Q)=>{oh(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>vh}),yh=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}e.compareValues=(e,n,r)=>{if(e!==n){let i=t(e),a=t(n);if(i===a&&i===0){if(e<n)return r===`desc`?1:-1;if(e>n)return r===`desc`?-1:1}return r===`desc`?a-i:i-a}return 0}})),bh=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`||e instanceof Symbol}e.isSymbol=t})),xh=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=bh(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(e,i){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||t.isSymbol(e)?!0:typeof e==`string`&&(r.test(e)||!n.test(e))||i!=null&&Object.hasOwn(i,e)}e.isKey=i})),Sh=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=yh(),n=xh(),r=Qp();function i(e,i,a,o){if(e==null)return[];a=o?void 0:a,Array.isArray(e)||(e=Object.values(e)),Array.isArray(i)||(i=i==null?[null]:[i]),i.length===0&&(i=[null]),Array.isArray(a)||(a=a==null?[]:[a]),a=a.map(e=>String(e));let s=(e,t)=>{let n=e;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},c=(e,t)=>t==null||e==null?t:typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?s(t,e):typeof t==`object`?t[e]:t,l=i.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)}));return e.map(e=>({original:e,criteria:l.map(t=>c(t,e))})).slice().sort((e,n)=>{for(let r=0;r<l.length;r++){let i=t.compareValues(e.criteria[r],n.criteria[r],a[r]);if(i!==0)return i}return 0}).map(e=>e.original)}e.orderBy=i})),Ch=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}e.flatten=t})),wh=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=qm(),n=Wm(),r=Gm(),i=Km();function a(e,a,o){return r.isObject(o)&&(typeof a==`number`&&n.isArrayLike(o)&&t.isIndex(a)&&a<o.length||typeof a==`string`&&a in o)?i.isEqualsSameValueZero(o[a],e):!1}e.isIterateeCall=a})),Th=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Sh(),n=Ch(),r=wh();function i(e,...i){let a=i.length;return a>1&&r.isIterateeCall(e,i[0],i[1])?i=[]:a>2&&r.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),t.orderBy(e,n.flatten(i),[`asc`])}e.sortBy=i})),Eh=u(s(((e,t)=>{t.exports=Th().sortBy}))()),Dh=e=>e.legend.settings,Oh=e=>e.legend.size;Q([e=>e.legend.payload,Dh],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?(0,Eh.default)(r,n):r});function kh(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ah=typeof Symbol==`function`&&Symbol.observable||`@@observable`,jh=()=>Math.random().toString(36).substring(7).split(``).join(`.`),Mh={INIT:`@@redux/INIT${jh()}`,REPLACE:`@@redux/REPLACE${jh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${jh()}`};function Nh(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ph(e,t,n){if(typeof e!=`function`)throw Error(kh(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(kh(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(kh(1));return n(Ph)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(kh(3));return i}function d(e){if(typeof e!=`function`)throw Error(kh(4));if(c)throw Error(kh(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(kh(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!Nh(e))throw Error(kh(7));if(e.type===void 0)throw Error(kh(8));if(typeof e.type!=`string`)throw Error(kh(17));if(c)throw Error(kh(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(kh(10));r=e,f({type:Mh.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(kh(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[Ah](){return this}}}return f({type:Mh.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[Ah]:m}}function Fh(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:Mh.INIT})===void 0)throw Error(kh(12));if(n(void 0,{type:Mh.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(kh(13))})}function Ih(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{Fh(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(kh(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function Lh(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function Rh(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(kh(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=Lh(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function zh(e){return Nh(e)&&`type`in e&&typeof e.type==`string`}var Bh=Symbol.for(`immer-nothing`),Vh=Symbol.for(`immer-draftable`),Hh=Symbol.for(`immer-state`);function Uh(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Wh=Object,Gh=Wh.getPrototypeOf,Kh=`constructor`,qh=`prototype`,Jh=`configurable`,Yh=`enumerable`,Xh=`writable`,Zh=`value`,Qh=e=>!!e&&!!e[Hh];function $h(e){return e?ng(e)||lg(e)||!!e[Vh]||!!e[Kh]?.[Vh]||ug(e)||dg(e):!1}var eg=Wh[qh][Kh].toString(),tg=new WeakMap;function ng(e){if(!e||!fg(e))return!1;let t=Gh(e);if(t===null||t===Wh[qh])return!0;let n=Wh.hasOwnProperty.call(t,Kh)&&t[Kh];if(n===Object)return!0;if(!pg(n))return!1;let r=tg.get(n);return r===void 0&&(r=Function.toString.call(n),tg.set(n,r)),r===eg}function rg(e,t,n=!0){ig(e)===0?(n?Reflect.ownKeys(e):Wh.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ig(e){let t=e[Hh];return t?t.type_:lg(e)?1:ug(e)?2:dg(e)?3:0}var ag=(e,t,n=ig(e))=>n===2?e.has(t):Wh[qh].hasOwnProperty.call(e,t),og=(e,t,n=ig(e))=>n===2?e.get(t):e[t],sg=(e,t,n,r=ig(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function cg(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var lg=Array.isArray,ug=e=>e instanceof Map,dg=e=>e instanceof Set,fg=e=>typeof e==`object`,pg=e=>typeof e==`function`,mg=e=>typeof e==`boolean`;function hg(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var gg=e=>e.copy_||e.base_,_g=e=>e.modified_?e.copy_:e.base_;function vg(e,t){if(ug(e))return new Map(e);if(dg(e))return new Set(e);if(lg(e))return Array[qh].slice.call(e);let n=ng(e);if(t===!0||t===`class_only`&&!n){let t=Wh.getOwnPropertyDescriptors(e);delete t[Hh];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Xh]===!1&&(a[Xh]=!0,a[Jh]=!0),(a.get||a.set)&&(t[i]={[Jh]:!0,[Xh]:!0,[Yh]:a[Yh],[Zh]:e[i]})}return Wh.create(Gh(e),t)}else{let t=Gh(e);if(t!==null&&n)return{...e};let r=Wh.create(t);return Wh.assign(r,e)}}function yg(e,t=!1){return Sg(e)||Qh(e)||!$h(e)?e:(ig(e)>1&&Wh.defineProperties(e,{set:xg,add:xg,clear:xg,delete:xg}),Wh.freeze(e),t&&rg(e,(e,t)=>{yg(t,!0)},!1),e)}function bg(){Uh(2)}var xg={[Zh]:bg};function Sg(e){return e===null||!fg(e)?!0:Wh.isFrozen(e)}var Cg=`MapSet`,wg=`Patches`,Tg=`ArrayMethods`,Eg={};function Dg(e){let t=Eg[e];return t||Uh(0,e),t}var Og=e=>!!Eg[e],kg,Ag=()=>kg,jg=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Og(Cg)?Dg(Cg):void 0,arrayMethodsPlugin_:Og(Tg)?Dg(Tg):void 0});function Mg(e,t){t&&(e.patchPlugin_=Dg(wg),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ng(e){Pg(e),e.drafts_.forEach(Ig),e.drafts_=null}function Pg(e){e===kg&&(kg=e.parent_)}var Fg=e=>kg=jg(kg,e);function Ig(e){let t=e[Hh];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Lg(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Hh].modified_&&(Ng(t),Uh(4)),$h(e)&&(e=Rg(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Hh].base_,e,t)}else e=Rg(t,n);return zg(t,e,!0),Ng(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Bh?void 0:e}function Rg(e,t){if(Sg(t))return t;let n=t[Hh];if(!n)return qg(t,e.handledSet_,e);if(!Vg(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Gg(n,e)}return n.copy_}function zg(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&yg(t,n)}function Bg(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Vg=(e,t)=>e.scope_===t,Hg=[];function Ug(e,t,n,r){let i=gg(e),a=e.type_;if(r!==void 0&&og(i,r,a)===t){sg(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;rg(i,(e,n)=>{if(Qh(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Hg;for(let e of o)sg(i,e,n,a)}function Wg(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Vg(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=_g(i);Ug(e,i.draft_??i,a,n),Gg(i,r)})}function Gg(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Bg(e)}}function Kg(e,t,n){let{scope_:r}=e;if(Qh(n)){let i=n[Hh];Vg(i,r)&&i.callbacks_.push(function(){t_(e),Ug(e,n,_g(i),t)})}else $h(n)&&e.callbacks_.push(function(){let i=gg(e);e.type_===3?i.has(n)&&qg(n,r.handledSet_,r):og(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&qg(og(e.copy_,t,e.type_),r.handledSet_,r)})}function qg(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Qh(e)||t.has(e)||!$h(e)||Sg(e)?e:(t.add(e),rg(e,(r,i)=>{if(Qh(i)){let t=i[Hh];Vg(t,n)&&(sg(e,r,_g(t),e.type_),Bg(t))}else $h(i)&&qg(i,t,n)}),e)}function Jg(e,t){let n=lg(e),r={type_:n?1:0,scope_:t?t.scope_:Ag(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Yg;n&&(i=[r],a=Xg);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Yg={get(e,t){if(t===Hh)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=gg(e);if(!ag(i,t,e.type_))return Qg(e,i,t);let a=i[t];if(e.finalized_||!$h(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&hg(t))return a;if(a===Zg(e.base_,t)){t_(e);let n=e.type_===1?+t:t,r=r_(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in gg(e)},ownKeys(e){return Reflect.ownKeys(gg(e))},set(e,t,n){let r=$g(gg(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Zg(gg(e),t),i=r?.[Hh];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(cg(n,r)&&(n!==void 0||ag(e.base_,t,e.type_)))return!0;t_(e),e_(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Kg(e,t,n),!0)},deleteProperty(e,t){return t_(e),Zg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),e_(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=gg(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Xh]:!0,[Jh]:e.type_!==1||t!==`length`,[Yh]:r[Yh],[Zh]:n[t]}},defineProperty(){Uh(11)},getPrototypeOf(e){return Gh(e.base_)},setPrototypeOf(){Uh(12)}},Xg={};for(let e in Yg){let t=Yg[e];Xg[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Xg.deleteProperty=function(e,t){return Xg.set.call(this,e,t,void 0)},Xg.set=function(e,t,n){return Yg.set.call(this,e[0],t,n,e[0])};function Zg(e,t){let n=e[Hh];return(n?gg(n):e)[t]}function Qg(e,t,n){let r=$g(t,n);return r?Zh in r?r[Zh]:r.get?.call(e.draft_):void 0}function $g(e,t){if(!(t in e))return;let n=Gh(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Gh(n)}}function e_(e){e.modified_||(e.modified_=!0,e.parent_&&e_(e.parent_))}function t_(e){e.copy_||=(e.assigned_=new Map,vg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var n_=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(pg(e)&&!pg(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}pg(t)||Uh(6),n!==void 0&&!pg(n)&&Uh(7);let r;if($h(e)){let i=Fg(this),a=r_(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Ng(i):Pg(i)}return Mg(i,n),Lg(r,i)}else if(!e||!fg(e)){if(r=t(e),r===void 0&&(r=e),r===Bh&&(r=void 0),this.autoFreeze_&&yg(r,!0),n){let t=[],i=[];Dg(wg).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else Uh(1,e)},this.produceWithPatches=(e,t)=>{if(pg(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},mg(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),mg(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),mg(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){$h(e)||Uh(8),Qh(e)&&(e=i_(e));let t=Fg(this),n=r_(t,e,void 0);return n[Hh].isManual_=!0,Pg(t),n}finishDraft(e,t){let n=e&&e[Hh];(!n||!n.isManual_)&&Uh(9);let{scope_:r}=n;return Mg(r,t),Lg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Dg(wg).applyPatches_;return Qh(e)?r(e,t):this.produce(e,e=>r(e,t))}};function r_(e,t,n,r){let[i,a]=ug(t)?Dg(Cg).proxyMap_(t,n):dg(t)?Dg(Cg).proxySet_(t,n):Jg(t,n);return(n?.scope_??Ag()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Wg(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function i_(e){return Qh(e)||Uh(10,e),a_(e)}function a_(e){if(!$h(e)||Sg(e))return e;let t=e[Hh],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=vg(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=vg(e,!0);return rg(n,(e,t)=>{sg(n,e,a_(t))},r),t&&(t.finalized_=!1),n}var o_=new n_().produce;function s_(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var c_=s_(),l_=s_,u_=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?Lh:Lh.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function d_(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(yv(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>zh(t)&&t.type===e,n}var f_=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function p_(e){return $h(e)?o_(e,()=>{}):e}function m_(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function h_(e){return typeof e==`boolean`}var g_=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new f_;return t&&(h_(t)?a.push(c_):a.push(l_(t.extraArgument))),a},__=`RTK_autoBatch`,v_=()=>e=>({payload:e,meta:{[__]:!0}}),y_=e=>t=>{setTimeout(t,e)},b_=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?window.requestAnimationFrame:y_(10):e.type===`callback`?e.queueNotification:y_(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[__],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},x_=e=>function(t){let{autoBatch:n=!0}=t??{},r=new f_(e);return n&&r.push(b_(typeof n==`object`?n:void 0)),r};function S_(e){let t=g_(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(Nh(n))c=Ih(n);else throw Error(yv(1));let l;l=typeof r==`function`?r(t):t();let u=Lh;i&&(u=u_({trace:!1,...typeof i==`object`&&i}));let d=x_(Rh(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return Ph(c,o,p)}function C_(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(yv(28));if(r in t)throw Error(yv(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function w_(e){return typeof e==`function`}function T_(e,t){let[n,r,i]=C_(t),a;if(w_(e))a=()=>p_(e());else{let t=p_(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n)if(Qh(e)){let r=n(e,t);return r===void 0?e:r}else if($h(e))return o_(e,e=>n(e,t));else{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}return e},e)}return o.getInitialState=a,o}var E_=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,D_=(e=21)=>{let t=``,n=e;for(;n--;)t+=E_[Math.random()*64|0];return t},O_=Symbol.for(`rtk-slice-createasyncthunk`);function k_(e,t){return`${e}/${t}`}function A_({creators:e}={}){let t=e?.asyncThunk?.[O_];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(yv(11));let i=(typeof e.reducers==`function`?e.reducers(N_()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(yv(12));if(n in o.sliceCaseReducersByType)throw Error(yv(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:k_(n,r),createNotation:typeof e.reducers==`function`};F_(a)?L_(o,a,s,t):P_(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?C_(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return T_(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=m_(d,r,m)),i}function i(t=l){return m_(m_(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=j_(a,t,()=>m_(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function j_(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var M_=A_();function N_(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function P_({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!I_(r))throw Error(yv(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?d_(e,o):d_(e))}function F_(e){return e._reducerDefinitionType===`asyncThunk`}function I_(e){return e._reducerDefinitionType===`reducerWithPrepare`}function L_({type:e,reducerName:t},n,r,i){if(!i)throw Error(yv(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||R_,pending:s||R_,rejected:c||R_,settled:l||R_})}function R_(){}var z_=`task`,B_=`listener`,V_=`completed`,H_=`cancelled`,U_=`task-${H_}`,W_=`task-${V_}`,G_=`${B_}-${H_}`,K_=`${B_}-${V_}`,q_=class{constructor(e){this.code=e,this.message=`${z_} ${H_} (reason: ${e})`}name=`TaskAbortError`;message},J_=(e,t)=>{if(typeof e!=`function`)throw TypeError(yv(32))},Y_=()=>{},X_=(e,t=Y_)=>(e.catch(t),e),Z_=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),Q_=e=>{if(e.aborted)throw new q_(e.reason)};function $_(e,t){let n=Y_;return new Promise((r,i)=>{let a=()=>i(new q_(e.reason));if(e.aborted){a();return}n=Z_(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Y_})}var ev=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof q_?`cancelled`:`rejected`,error:e}}finally{t?.()}},tv=e=>t=>X_($_(e,t).then(t=>(Q_(e),t))),nv=e=>{let t=tv(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:rv}=Object,iv={},av=`listenerMiddleware`,ov=(e,t)=>{let n=t=>Z_(e,()=>t.abort(e.reason));return(r,i)=>{J_(r,`taskExecutor`);let a=new AbortController;n(a);let o=ev(async()=>{Q_(e),Q_(a.signal);let t=await r({pause:tv(a.signal),delay:nv(a.signal),signal:a.signal});return Q_(a.signal),t},()=>a.abort(W_));return i?.autoJoin&&t.push(o.catch(Y_)),{result:tv(e)(o),cancel(){a.abort(U_)}}}},sv=(e,t)=>{let n=async(n,r)=>{Q_(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await $_(t,Promise.race(a));return Q_(t),e}finally{i()}};return(e,t)=>X_(n(e,t))},cv=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=d_(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(yv(21));return J_(a,`options.listener`),{predicate:i,type:t,effect:a}},lv=rv(e=>{let{type:t,predicate:n,effect:r}=cv(e);return{id:D_(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(yv(22))}}},{withTypes:()=>lv}),uv=(e,t)=>{let{type:n,effect:r,predicate:i}=cv(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},dv=e=>{e.pending.forEach(e=>{e.abort(G_)})},fv=(e,t)=>()=>{for(let e of t.keys())dv(e);e.clear()},pv=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},mv=rv(d_(`${av}/add`),{withTypes:()=>mv}),hv=d_(`${av}/removeAll`),gv=rv(d_(`${av}/remove`),{withTypes:()=>gv}),_v=(...e)=>{console.error(`${av}/error`,...e)},vv=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=_v}=e;J_(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&dv(e)}),c=e=>s(uv(t,e)??lv(e));rv(c,{withTypes:()=>c});let l=e=>{let n=uv(t,e);return n&&(n.unsubscribe(),e.cancelActive&&dv(n)),!!n};rv(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=sv(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,rv({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:nv(u.signal),pause:tv(u.signal),extra:a,signal:u.signal,fork:ov(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(G_),n.delete(e))})},cancel:()=>{u.abort(G_),e.pending.delete(u)},throwIfCancelled:()=>{Q_(u.signal)}})))}catch(e){e instanceof q_||pv(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(K_),i(e),e.pending.delete(u)}},d=fv(t,n);return{middleware:e=>n=>r=>{if(!zh(r))return n(r);if(mv.match(r))return c(r.payload);if(hv.match(r)){d();return}if(gv.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===iv)throw Error(yv(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,pv(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=iv}return s},startListening:c,stopListening:l,clearListeners:d}};function yv(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var bv=M_({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),{setMargin:xv,setLayout:Sv,setChartSize:Cv,setScale:wv}=bv.actions,Tv=bv.reducer;function Ev(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function $(e){return Number.isFinite(e)}function Dv(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function Ov(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ov(Object(n),!0).forEach(function(t){Av(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ov(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Av(e,t,n){return(t=jv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jv(e){var t=Mv(e,`string`);return typeof t==`symbol`?t:t+``}function Mv(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Nv(e,t,n){return hm(e)||hm(t)?n:cm(t)?(0,im.default)(e,t,n):typeof t==`function`?t(e):n}var Pv=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:s}=t;if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&X(e[a]))return kv(kv({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&X(e[o]))return kv(kv({},e),{},{[o]:e[o]+(i||0)})}return e},Fv=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,Iv=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},Lv=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:a,scale:o,realScaleType:s,isCategorical:c,categoricalDomain:l,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?am(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return $(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(_m):c&&l?l.map((e,t)=>{var n=o.map(e);return $(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(_m):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return $(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(_m):o.domain().map((e,t)=>{var n=o.map(e);return $(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(_m)},Rv=(e,t)=>{if(!t||t.length!==2||!X(t[0])||!X(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!X(e[0])||e[0]<n)&&(i[0]=n),(!X(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},zv={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=om(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Gp,none:Bp,silhouette:Kp,wiggle:qp,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=om(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},Bv=(e,t,n)=>{var r=zv[n]??Bp,i=Wp().keys(t).value((e,t)=>Number(Nv(e,t,0))).order(Vp).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=Nv(e[i],t[r],0);Array.isArray(a)&&a.length===2&&X(a[0])&&X(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function Vv(e){return e==null?void 0:String(e)}function Hv(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:a,dataKey:o}=e;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!hm(i[t.dataKey])){var s=mm(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=Nv(i,hm(o)?t.dataKey:o),l=t.scale.map(c);return X(l)?l:null}var Uv=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:a,index:o}=e;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=Nv(a,t.dataKey,t.scale.domain()[o]);if(hm(s))return null;var c=t.scale.map(s);return X(c)?c-i/2+r:null},Wv=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},Gv=e=>{var t=e.flat(2).filter(X);return[Math.min(...t),Math.max(...t)]},Kv=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],qv=(e,t,n)=>{if(e!=null)return Kv(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,s=o.reduce((e,r)=>{var i=Gv(Ev(r,t,n));return!$(i[0])||!$(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},Jv=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Yv=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Xv=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=(0,Eh.default)(t,e=>e.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c?.coordinate||0)-(l?.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function Zv(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return kv(kv({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Qv(e,t){if(e)return String(e);if(typeof t==`string`)return t}var $v=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},ey=(e,t)=>t===`centric`?e.angle:e.radius,ty=e=>e.layout.width,ny=e=>e.layout.height,ry=e=>e.layout.scale,iy=e=>e.layout.margin,ay=Q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),oy=Q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),sy=`data-recharts-item-index`;function cy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ly(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?cy(Object(n),!0).forEach(function(t){uy(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uy(e,t,n){return(t=dy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dy(e){var t=fy(e,`string`);return typeof t==`symbol`?t:t+``}function fy(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var py=e=>e.brush.height;function my(e){return oy(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function hy(e){return oy(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function gy(e){return ay(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+t.height:e,0)}function _y(e){return ay(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+t.height:e,0)}var vy=Q([ty,ny,iy,py,my,hy,gy,_y,Dh,Oh],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=ly(ly({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=Pv(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return ly(ly({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),yy=Q(vy,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),by=Q(ty,ny,(e,t)=>({x:0,y:0,width:e,height:t})),xy=(0,S.createContext)(null),Sy=()=>(0,S.useContext)(xy)!=null,Cy=e=>e.brush,wy=Q([Cy,vy,iy],(e,t,n)=>({height:e.height,x:X(e.x)?e.x:t.left,y:X(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:X(e.width)?e.width:t.width})),Ty=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}e.debounce=t})),Ey=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Ty();function n(e,n=0,r={}){typeof r!=`object`&&(r={});let{leading:i=!1,trailing:a=!0,maxWait:o}=r,s=[,,];i&&(s[0]=`leading`),a&&(s[1]=`trailing`);let c,l=null,u=t.debounce(function(...t){c=e.apply(this,t),l=null},n,{edges:s}),d=function(...t){return o!=null&&(l===null&&(l=Date.now()),Date.now()-l>=o)?(c=e.apply(this,t),l=Date.now(),u.cancel(),u.schedule(),c):(u.apply(this,t),c)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),c),d}e.debounce=n})),Dy=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Ey();function n(e,n=0,r={}){let{leading:i=!0,trailing:a=!0}=r;return t.debounce(e,n,{leading:i,maxWait:n,trailing:a})}e.throttle=n})),Oy=s(((e,t)=>{t.exports=Dy().throttle})),ky=!0,Ay=function(e,t){var n=[...arguments].slice(2);if(ky&&typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e))if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}},jy={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},My=(e,t,n)=>{var{width:r=jy.width,height:i=jy.height,aspect:a,maxHeight:o}=n,s=sm(r)?e:Number(r),c=sm(i)?t:Number(i);return a&&a>0&&(s?c=s/a:c&&(s=c*a),o&&c!=null&&c>o&&(c=o)),{calculatedWidth:s,calculatedHeight:c}},Ny={width:0,height:0,overflow:`visible`},Py={width:0,overflowX:`visible`},Fy={height:0,overflowY:`visible`},Iy={},Ly=e=>{var{width:t,height:n}=e,r=sm(t),i=sm(n);return r&&i?Ny:r?Py:i?Fy:Iy};function Ry(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=jy.width,a=jy.height):i===void 0?i=r&&r>0?void 0:jy.width:a===void 0&&(a=r&&r>0?void 0:jy.height),{width:i,height:a}}var zy=u(Oy());function By(){return By=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},By.apply(null,arguments)}function Vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Vy(Object(n),!0).forEach(function(t){Uy(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Uy(e,t,n){return(t=Wy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wy(e){var t=Gy(e,`string`);return typeof t==`symbol`?t:t+``}function Gy(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ky=(0,S.createContext)(jy.initialDimension);function qy(e){return Dv(e.width)&&Dv(e.height)}function Jy(e){var{children:t,width:n,height:r}=e,i=(0,S.useMemo)(()=>({width:n,height:r}),[n,r]);return qy(i)?S.createElement(Ky.Provider,{value:i},t):null}var Yy=()=>(0,S.useContext)(Ky),Xy=(0,S.forwardRef)((e,t)=>{var{aspect:n,initialDimension:r=jy.initialDimension,width:i,height:a,minWidth:o=jy.minWidth,minHeight:s,maxHeight:c,children:l,debounce:u=jy.debounce,id:d,className:f,onResize:p,style:m={}}=e,h=(0,S.useRef)(null),g=(0,S.useRef)();g.current=p,(0,S.useImperativeHandle)(t,()=>h.current);var[_,v]=(0,S.useState)({containerWidth:r.width,containerHeight:r.height}),y=(0,S.useCallback)((e,t)=>{v(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,S.useEffect)(()=>{if(h.current==null||typeof ResizeObserver>`u`)return vm;var e=e=>{var t,n=e[0];if(n!=null){var{width:r,height:i}=n.contentRect;y(r,i),(t=g.current)==null||t.call(g,r,i)}};u>0&&(e=(0,zy.default)(e,u,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=h.current.getBoundingClientRect();return y(n,r),t.observe(h.current),()=>{t.disconnect()}},[y,u]);var{containerWidth:b,containerHeight:x}=_;Ay(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var{calculatedWidth:C,calculatedHeight:w}=My(b,x,{width:i,height:a,aspect:n,maxHeight:c});return Ay(C!=null&&C>0||w!=null&&w>0,`The width(%s) and height(%s) of chart should be greater than 0,
17
+ `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,q.jsx)(Sc,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:S.cloneElement(e,{ref:u})})}var wc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=w(Tc),d=(0,S.useId)(),f=!0,p=(0,S.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),(0,S.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),S.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,q.jsx)(Cc,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,q.jsx)(E.Provider,{value:p,children:e})};function Tc(){return new Map}function Ec(e=!0){let t=(0,S.useContext)(E);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,S.useId)();(0,S.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,S.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Dc=e=>e.key||``;function Oc(e){let t=[];return S.Children.forEach(e,e=>{(0,S.isValidElement)(e)&&t.push(e)}),t}var kc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=Ec(o),f=(0,S.useMemo)(()=>Oc(e),[e]),p=o&&!u?[]:f.map(Dc),m=(0,S.useRef)(!0),h=(0,S.useRef)(f),g=w(()=>new Map),_=(0,S.useRef)(new Set),[v,y]=(0,S.useState)(f),[b,x]=(0,S.useState)(f);T(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=Dc(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let E=[];if(f!==v){let e=[...f];for(let t=0;t<b.length;t++){let n=b[t],r=Dc(n);p.includes(r)||(e.splice(t,0,n),E.push(n))}return a===`wait`&&E.length&&(e=E),x(Oc(e)),y(f),null}let{forceRender:D}=(0,S.useContext)(C);return(0,q.jsx)(q.Fragment,{children:b.map(e=>{let v=Dc(e),y=o&&!u?!1:f===b||p.includes(v);return(0,q.jsx)(wc,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(D?.(),x(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},Ac=(0,S.createContext)({strict:!1}),jc={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Mc=!1;function Nc(){if(Mc)return;let e={};for(let t in jc)e[t]={isEnabled:e=>jc[t].some(t=>!!e[t])};Fa(e),Mc=!0}function Pc(){return Nc(),Ia()}function Fc(e){let t=Pc();for(let n in e)t[n]={...t[n],...e[n]};Fa(t)}var Ic=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Lc(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Ic.has(e)}var Rc=c({default:()=>zc}),zc,Bc=o((()=>{throw zc={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),Vc=e=>!Lc(e);function Hc(e){typeof e==`function`&&(Vc=t=>t.startsWith(`on`)?!Lc(t):e(t))}try{Hc((Bc(),d(Rc)).default)}catch{}function Uc(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||ei(e[i])||(Vc(i)||n===!0&&Lc(i)||!t&&!Lc(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var Wc=(0,S.createContext)({});function Gc(e,t){if(Ea(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Ca(t)?t:void 0,animate:Ca(n)?n:void 0}}return e.inherit===!1?{}:t}function Kc(e){let{initial:t,animate:n}=Gc(e,(0,S.useContext)(Wc));return(0,S.useMemo)(()=>({initial:t,animate:n}),[qc(t),qc(n)])}function qc(e){return Array.isArray(e)?e.join(` `):e}var Jc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Yc(e,t,n){for(let r in t)!ei(t[r])&&!go(r,n)&&(e[r]=t[r])}function Xc({transformTemplate:e},t){return(0,S.useMemo)(()=>{let n=Jc();return lo(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Zc(e,t){let n=e.style||{},r={};return Yc(r,n,e),Object.assign(r,Xc(e,t)),r}function Qc(e,t){let n={},r=Zc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var $c=()=>({...Jc(),attrs:{}});function el(e,t,n,r){let i=(0,S.useMemo)(()=>{let n=$c();return wo(n,t,Eo(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Yc(t,e.style,e),i.style={...t,...i.style}}return i}var tl=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function nl(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(tl.indexOf(e)>-1||/[A-Z]/u.test(e))}function rl(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??nl(e)?el:Qc)(t,r,i,e),c=Uc(t,typeof e==`string`,a),l=e===S.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,S.useMemo)(()=>ei(u)?u.get():u,[u]);return(0,S.createElement)(e,{...l,children:d})}function il({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:al(n,r,i,e),renderState:t()}}function al(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Ns(a[e]);let{initial:o,animate:s}=e,c=Ea(e),l=Da(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Sa(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Hr(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var ol=e=>(t,n)=>{let r=(0,S.useContext)(Wc),i=(0,S.useContext)(E),a=()=>il(e,t,r,i);return n?a():w(a)},sl=ol({scrapeMotionValuesFromProps:_o,createRenderState:Jc}),cl=ol({scrapeMotionValuesFromProps:Oo,createRenderState:$c}),ll=Symbol.for(`motionComponentSymbol`);function ul(e,t,n){let r=(0,S.useRef)(n);(0,S.useInsertionEffect)(()=>{r.current=n});let i=(0,S.useRef)(null);return(0,S.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var dl=(0,S.createContext)({});function fl(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function pl(e,t,n,r,i,a){let{visualElement:o}=(0,S.useContext)(Wc),s=(0,S.useContext)(Ac),c=(0,S.useContext)(E),l=(0,S.useContext)(vc),u=l.reducedMotion,d=l.skipAnimations,f=(0,S.useRef)(null),p=(0,S.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,S.useContext)(dl);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&ml(f.current,n,i,h);let g=(0,S.useRef)(!1);(0,S.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[ii],v=(0,S.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return T(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,S.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function ml(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:hl(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&fl(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function hl(e){if(e)return e.options.allowProjection===!1?hl(e.parent):e.projection}function gl(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Fc(r);let a=n?n===`svg`:nl(e),o=a?cl:sl;function s(n,s){let c,l={...(0,S.useContext)(vc),...n,layoutId:_l(n)},{isStatic:u}=l,d=Kc(n),f=o(n,u);if(!u&&typeof window<`u`){vl(l,r);let t=yl(l);c=t.MeasureLayout,d.visualElement=pl(e,f,l,i,t.ProjectionNode,a)}return(0,q.jsxs)(Wc.Provider,{value:d,children:[c&&d.visualElement?(0,q.jsx)(c,{visualElement:d.visualElement,...l}):null,rl(e,n,ul(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,S.forwardRef)(s);return c[ll]=e,c}function _l({layoutId:e}){let t=(0,S.useContext)(C).id;return t&&e!==void 0?t+`-`+e:e}function vl(e,t){(0,S.useContext)(Ac).strict}function yl(e){let{drag:t,layout:n}=Pc();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function bl(e,t){if(typeof Proxy>`u`)return gl;let n=new Map,r=(n,r)=>gl(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,gl(a,void 0,e,t)),n.get(a))})}var xl=(e,t)=>t.isSVG??nl(e)?new ko(t):new yo(t,{allowProjection:e!==S.Fragment}),Sl=class extends za{constructor(e){super(e),e.animationState||=Io(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Sa(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Cl=0,wl={animation:{Feature:Sl},exit:{Feature:class extends za{constructor(){super(...arguments),this.id=Cl++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=Ur(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Tl(e){return{point:{x:e.pageX,y:e.pageY}}}var El=e=>t=>Vi(t)&&e(t,Tl(t));function Dl(e,t,n,r){return ks(e,t,El(n),r)}var Ol=({current:e})=>e?e.ownerDocument.defaultView:null,kl=(e,t)=>Math.abs(e-t);function Al(e,t){let n=kl(e.x,t.x),r=kl(e.y,t.y);return Math.sqrt(n**2+r**2)}var jl=new Set([`auto`,`scroll`]),Ml=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Nl(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Fl(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Al(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=Fe;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Nl(t,this.transformPagePoint),Ne.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Fl(e.type===`pointercancel`?this.lastMoveEventInfo:Nl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Vi(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Nl(Tl(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Fe;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Fl(s,this.history)),this.removeListeners=F(Dl(this.contextWindow,`pointermove`,this.handlePointerMove),Dl(this.contextWindow,`pointerup`,this.handlePointerUp),Dl(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(jl.has(e.overflowX)||jl.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),Ne.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Pe(this.updatePoint)}};function Nl(e,t){return t?{point:t(e.point)}:e}function Pl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fl({point:e},t){return{point:e,delta:Pl(e,Ll(t)),offset:Pl(e,Il(t)),velocity:Rl(t,.1)}}function Il(e){return e[0]}function Ll(e){return e[e.length-1]}function Rl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Ll(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>I(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>I(t)*2&&(r=e[1]);let a=ie(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function zl(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?jt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?jt(n,e,r.max):Math.min(e,n)),e}function J(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Bl(e,{top:t,left:n,bottom:r,right:i}){return{x:J(e.x,n,i),y:J(e.y,t,r)}}function Vl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Hl(e,t){return{x:Vl(e.x,t.x),y:Vl(e.y,t.y)}}function Ul(e,t){let n=.5,r=Yo(e),i=Yo(t);return i>r?n=ne(t.min,t.max-r,e.min):r>i&&(n=ne(e.min,e.max-i,t.min)),k(0,1,n)}function Wl(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Gl=.35;function Kl(e=Gl){return e===!1?e=0:e===!0&&(e=Gl),{x:ql(e,`left`,`right`),y:ql(e,`top`,`bottom`)}}function ql(e,t,n){return{min:Jl(e,t),max:Jl(e,n)}}function Jl(e,t){return typeof e==`number`?e:e[t]||0}var Yl=new WeakMap,Xl=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ba(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Tl(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ii(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_s(e=>{let t=this.getAxisMotionValue(e).get()||0;if(ct.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Yo(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&Ne.update(()=>i(e,t),!1,!0),ni(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=eu(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&Ne.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Ml(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Ol(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&Ne.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!$l(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=zl(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&fl(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Bl(n.layoutBox,e):this.constraints=!1,this.elastic=Kl(t),r!==this.constraints&&!fl(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&_s(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Wl(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!fl(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=oo(n,r.root,this.visualElement.getTransformPagePoint()),a=Hl(r.layout.layoutBox,i);if(t){let e=t(Va(a));this.hasMutatedConstraints=!!e,e&&(a=Ba(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=_s(o=>{if(!$l(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return ni(this.visualElement,e),n.start(Br(e,n,0,t,this.visualElement,!1))}stopAnimation(){_s(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){_s(t=>{let{drag:n}=this.getProps();if(!$l(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-jt(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!fl(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};_s(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Ul({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),_s(t=>{if(!$l(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(jt(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Yl.set(this.visualElement,this);let e=this.visualElement.current,t=Dl(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Gi(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();fl(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Ql(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ne.read(r);let o=ks(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(_s(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Gl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Zl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Ql(e,t,n){let r=pa(e,Zl(n)),i=pa(t,Zl(n));return()=>{r(),i()}}function $l(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function eu(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var tu=class extends za{constructor(e){super(e),this.removeGroupControls=N,this.removeListeners=N,this.controls=new Xl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||N}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},nu=e=>(t,n)=>{e&&Ne.update(()=>e(t,n),!1,!0)},ru=class extends za{constructor(){super(...arguments),this.removePointerDownListener=N}onPointerDown(e){this.session=new Ml(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ol(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:nu(e),onStart:nu(t),onMove:nu(n),onEnd:(e,t)=>{delete this.session,r&&Ne.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Dl(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},iu=!1,au=class extends S.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),iu&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Fs.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),iu=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Ne.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Mi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;iu=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function ou(e){let[t,n]=Ec(),r=(0,S.useContext)(C);return(0,q.jsx)(au,{...e,layoutGroup:r,switchLayoutGroup:(0,S.useContext)(dl),isPresent:t,safeToRemove:n})}var su={pan:{Feature:ru},drag:{Feature:tu,ProjectionNode:_c,MeasureLayout:ou}};function cu(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&Ne.postRender(()=>i(t,Tl(t)))}var lu=class extends za{mount(){let{current:e}=this.node;e&&(this.unmount=zi(e,(e,t)=>(cu(this.node,t,`Start`),e=>cu(this.node,e,`End`))))}unmount(){}},uu=class extends za{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=F(ks(this.node.current,`focus`,()=>this.onFocus()),ks(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function du(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&Ne.postRender(()=>i(t,Tl(t)))}var fu=class extends za{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Qi(e,(e,t)=>(du(this.node,t,`Start`),(e,{success:t})=>du(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},pu=new WeakMap,mu=new WeakMap,hu=e=>{let t=pu.get(e.target);t&&t(e)},gu=e=>{e.forEach(hu)};function _u({root:e,...t}){let n=e||document;mu.has(n)||mu.set(n,{});let r=mu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(gu,{root:e,...t})),r[i]}function vu(e,t,n){let r=_u(t);return pu.set(e,n),r.observe(e),()=>{pu.delete(e),r.unobserve(e)}}var yu={some:0,all:1},bu=class extends za{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:yu[r]};this.stopObserver=vu(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(xu(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function xu({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Su={inView:{Feature:bu},tap:{Feature:fu},focus:{Feature:uu},hover:{Feature:lu}},Cu={layout:{ProjectionNode:_c,MeasureLayout:ou}},wu=bl({...wl,...Su,...su,...Cu},xl),Tu=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Eu=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Du=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ou=e=>{let t=Du(e);return t.charAt(0).toUpperCase()+t.slice(1)},ku={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Au=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ju=(0,S.createContext)({}),Mu=()=>(0,S.useContext)(ju),Nu=(0,S.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Mu()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,S.createElement)(`svg`,{ref:c,...ku,width:t??l??ku.width,height:t??l??ku.height,stroke:e??f,strokeWidth:m,className:Tu(`lucide`,p,i),...!a&&!Au(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,S.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Pu=(e,t)=>{let n=(0,S.forwardRef)(({className:n,...r},i)=>(0,S.createElement)(Nu,{ref:i,iconNode:t,className:Tu(`lucide-${Eu(Ou(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ou(e),n},Fu=Pu(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Iu=Pu(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Lu=Pu(`battery`,[[`path`,{d:`M 22 14 L 22 10`,key:`nqc4tb`}],[`rect`,{x:`2`,y:`6`,width:`16`,height:`12`,rx:`2`,key:`13zb55`}]]),Ru=Pu(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),zu=Pu(`cloud-drizzle`,[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`M8 19v1`,key:`1dk2by`}],[`path`,{d:`M8 14v1`,key:`84yxot`}],[`path`,{d:`M16 19v1`,key:`v220m7`}],[`path`,{d:`M16 14v1`,key:`g12gj6`}],[`path`,{d:`M12 21v1`,key:`q8vafk`}],[`path`,{d:`M12 16v1`,key:`1mx6rx`}]]),Bu=Pu(`cloud-lightning`,[[`path`,{d:`M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973`,key:`1cez44`}],[`path`,{d:`m13 12-3 5h4l-3 5`,key:`1t22er`}]]),Vu=Pu(`cloud-rain`,[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`M16 14v6`,key:`1j4efv`}],[`path`,{d:`M8 14v6`,key:`17c4r9`}],[`path`,{d:`M12 16v6`,key:`c8a4gj`}]]),Hu=Pu(`cloud-sun`,[[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}],[`path`,{d:`M15.947 12.65a4 4 0 0 0-5.925-4.128`,key:`dpwdj0`}],[`path`,{d:`M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z`,key:`s09mg5`}]]),Uu=Pu(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),Wu=Pu(`droplet`,[[`path`,{d:`M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z`,key:`c7niix`}]]),Gu=Pu(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),Ku=Pu(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),qu=Pu(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),Ju=Pu(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Yu=Pu(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Xu=Pu(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Zu=Pu(`navigation`,[[`polygon`,{points:`3 11 22 2 13 21 11 13 3 11`,key:`1ltx0t`}]]),Qu=Pu(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),$u=Pu(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),ed=Pu(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),td=Pu(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),nd=Pu(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),rd=Pu(`shirt`,[[`path`,{d:`M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z`,key:`1wgbhj`}]]),id=Pu(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),ad=Pu(`snowflake`,[[`path`,{d:`m10 20-1.25-2.5L6 18`,key:`18frcb`}],[`path`,{d:`M10 4 8.75 6.5 6 6`,key:`7mghy3`}],[`path`,{d:`m14 20 1.25-2.5L18 18`,key:`1chtki`}],[`path`,{d:`m14 4 1.25 2.5L18 6`,key:`1b4wsy`}],[`path`,{d:`m17 21-3-6h-4`,key:`15hhxa`}],[`path`,{d:`m17 3-3 6 1.5 3`,key:`11697g`}],[`path`,{d:`M2 12h6.5L10 9`,key:`kv9z4n`}],[`path`,{d:`m20 10-1.5 2 1.5 2`,key:`1swlpi`}],[`path`,{d:`M22 12h-6.5L14 15`,key:`1mxi28`}],[`path`,{d:`m4 10 1.5 2L4 14`,key:`k9enpj`}],[`path`,{d:`m7 21 3-6-1.5-3`,key:`j8hb9u`}],[`path`,{d:`m7 3 3 6h4`,key:`1otusx`}]]),od=Pu(`sofa`,[[`path`,{d:`M20 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v3`,key:`1dgpiv`}],[`path`,{d:`M2 16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z`,key:`xacw8m`}],[`path`,{d:`M4 18v2`,key:`jwo5n2`}],[`path`,{d:`M20 18v2`,key:`1ar1qi`}],[`path`,{d:`M12 4v9`,key:`oqhhn3`}]]),sd=Pu(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),cd=Pu(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),ld=Pu(`thermometer`,[[`path`,{d:`M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z`,key:`17jzev`}]]),ud=Pu(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),dd=Pu(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),fd=Pu(`triangle`,[[`path`,{d:`M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`,key:`14u9p9`}]]),pd=Pu(`wind`,[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`,key:`148xed`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`,key:`1u4tom`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`,key:`75valh`}]]),md=Pu(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),hd=u(y(),1),gd=()=>{let e=window.location.hostname;return e===`localhost`||e===`127.0.0.1`||e.startsWith(`192.168.`)?`https://192.168.111.240:1881`:`https://${e}:1881`},_d=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(!0),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(!1),f=gd(),p=`${f}/api/boat`,m=`${f}/api/boat/control`,h=async()=>{try{let e=await fetch(p);if(!e.ok)throw Error(`Errore Server: ${e.status}`);t(await e.json()),r(new Date),s(!1),l(null),d(!1)}catch(e){console.error(`Fetch Error:`,e),l(e.message),s(!0),d(!1)}},g=async(e,t)=>{d(!0);try{if(!(await fetch(m,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({device:e,state:t})})).ok)throw Error(`Comando fallito`);setTimeout(h,1e3)}catch(e){console.error(`Errore invio comando:`,e),d(!1)}};return(0,S.useEffect)(()=>{h();let e=setInterval(h,5e3);return()=>clearInterval(e)},[]),(0,S.useEffect)(()=>{let e=setInterval(()=>{if(n){let e=Math.floor((new Date-n)/1e3);a(e),s(e>30)}},1e3);return()=>clearInterval(e)},[n]),{data:e,secondsSinceLastUpdate:i,isDataStale:o,statusColor:i<15?`bg-green-500`:i<30?`bg-orange-500`:`bg-red-500`,isUpdating:u,error:c,apiUrl:f,toggleSwitch:(e,t)=>g(e,t),setShoreLimit:e=>g(`shore_limit`,e)}};function vd(e,t){let n=(0,S.useRef)(t);(0,S.useEffect)(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}function yd(e){return Object.freeze({__version:1,map:e})}function bd(e,t){return Object.freeze({...e,...t})}var xd=(0,S.createContext)(null);function Sd(){let e=(0,S.use)(xd);if(e==null)throw Error(`No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>`);return e}var Cd=_();function Y(e){function t(t,n){let{instance:r,context:i}=e(t).current;(0,S.useImperativeHandle)(n,()=>r);let{children:a}=t;return a==null?null:S.createElement(xd,{value:i},a)}return(0,S.forwardRef)(t)}function wd(e){function t(t,n){let{instance:r}=e(t).current;return(0,S.useImperativeHandle)(n,()=>r),null}return(0,S.forwardRef)(t)}function Td(e,t){let n=(0,S.useRef)(void 0);(0,S.useEffect)(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function Ed(e,t){let n=e.pane??t.pane;return n?{...e,pane:n}:e}var Dd=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.leaflet={}))})(e,(function(e){var t=`1.9.4`;function n(e){var t,n,r,i;for(n=1,r=arguments.length;n<r;n++)for(t in i=arguments[n],i)e[t]=i[t];return e}var r=Object.create||(function(){function e(){}return function(t){return e.prototype=t,new e}})();function i(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var r=n.call(arguments,2);return function(){return e.apply(t,r.length?r.concat(n.call(arguments)):arguments)}}var a=0;function o(e){return`_leaflet_id`in e||(e._leaflet_id=++a),e._leaflet_id}function s(e,t,n){var r,i,a,o=function(){r=!1,i&&=(a.apply(n,i),!1)};return a=function(){r?i=arguments:(e.apply(n,arguments),setTimeout(o,t),r=!0)},a}function c(e,t,n){var r=t[1],i=t[0],a=r-i;return e===r&&n?e:((e-i)%a+a)%a+i}function l(){return!1}function u(e,t){if(t===!1)return e;var n=10**(t===void 0?6:t);return Math.round(e*n)/n}function d(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,``)}function f(e){return d(e).split(/\s+/)}function p(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,`options`)||(e.options=e.options?r(e.options):{}),t)e.options[n]=t[n];return e.options}function m(e,t,n){var r=[];for(var i in e)r.push(encodeURIComponent(n?i.toUpperCase():i)+`=`+encodeURIComponent(e[i]));return(!t||t.indexOf(`?`)===-1?`?`:`&`)+r.join(`&`)}var h=/\{ *([\w_ -]+) *\}/g;function g(e,t){return e.replace(h,function(e,n){var r=t[n];if(r===void 0)throw Error(`No value provided for variable `+e);return typeof r==`function`&&(r=r(t)),r})}var _=Array.isArray||function(e){return Object.prototype.toString.call(e)===`[object Array]`};function v(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var y=`data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=`;function b(e){return window[`webkit`+e]||window[`moz`+e]||window[`ms`+e]}var x=0;function S(e){var t=+new Date,n=Math.max(0,16-(t-x));return x=t+n,window.setTimeout(e,n)}var C=window.requestAnimationFrame||b(`RequestAnimationFrame`)||S,w=window.cancelAnimationFrame||b(`CancelAnimationFrame`)||b(`CancelRequestAnimationFrame`)||function(e){window.clearTimeout(e)};function T(e,t,n){if(n&&C===S)e.call(t);else return C.call(window,i(e,t))}function E(e){e&&w.call(window,e)}var D={__proto__:null,extend:n,create:r,bind:i,get lastId(){return a},stamp:o,throttle:s,wrapNum:c,falseFn:l,formatNum:u,trim:d,splitWords:f,setOptions:p,getParamString:m,template:g,isArray:_,indexOf:v,emptyImageUrl:y,requestFn:C,cancelFn:w,requestAnimFrame:T,cancelAnimFrame:E};function O(){}O.extend=function(e){var t=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=t.__super__=this.prototype,a=r(i);for(var o in a.constructor=t,t.prototype=a,this)Object.prototype.hasOwnProperty.call(this,o)&&o!==`prototype`&&o!==`__super__`&&(t[o]=this[o]);return e.statics&&n(t,e.statics),e.includes&&(k(e.includes),n.apply(null,[a].concat(e.includes))),n(a,e),delete a.statics,delete a.includes,a.options&&(a.options=i.options?r(i.options):{},n(a.options,e.options)),a._initHooks=[],a.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=a._initHooks.length;e<t;e++)a._initHooks[e].call(this)}},t},O.include=function(e){var t=this.prototype.options;return n(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},O.mergeOptions=function(e){return n(this.prototype.options,e),this},O.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n=typeof e==`function`?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};function k(e){if(!(typeof L>`u`||!L||!L.Mixin)){e=_(e)?e:[e];for(var t=0;t<e.length;t++)e[t]===L.Mixin.Events&&console.warn(`Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.`,Error().stack)}}var A={on:function(e,t,n){if(typeof e==`object`)for(var r in e)this._on(r,e[r],t);else{e=f(e);for(var i=0,a=e.length;i<a;i++)this._on(e[i],t,n)}return this},off:function(e,t,n){if(!arguments.length)delete this._events;else if(typeof e==`object`)for(var r in e)this._off(r,e[r],t);else{e=f(e);for(var i=arguments.length===1,a=0,o=e.length;a<o;a++)i?this._off(e[a]):this._off(e[a],t,n)}return this},_on:function(e,t,n,r){if(typeof t!=`function`){console.warn(`wrong listener type: `+typeof t);return}if(this._listens(e,t,n)===!1){n===this&&(n=void 0);var i={fn:t,ctx:n};r&&(i.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(i)}},_off:function(e,t,n){var r,i,a;if(this._events&&(r=this._events[e],r)){if(arguments.length===1){if(this._firingCount)for(i=0,a=r.length;i<a;i++)r[i].fn=l;delete this._events[e];return}if(typeof t!=`function`){console.warn(`wrong listener type: `+typeof t);return}var o=this._listens(e,t,n);if(o!==!1){var s=r[o];this._firingCount&&(s.fn=l,this._events[e]=r=r.slice()),r.splice(o,1)}}},fire:function(e,t,r){if(!this.listens(e,r))return this;var i=n({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this});if(this._events){var a=this._events[e];if(a){this._firingCount=this._firingCount+1||1;for(var o=0,s=a.length;o<s;o++){var c=a[o],l=c.fn;c.once&&this.off(e,l,c.ctx),l.call(c.ctx||this,i)}this._firingCount--}}return r&&this._propagateEvent(i),this},listens:function(e,t,n,r){typeof e!=`string`&&console.warn(`"string" type argument expected`);var i=t;typeof t!=`function`&&(r=!!t,i=void 0,n=void 0);var a=this._events&&this._events[e];if(a&&a.length&&this._listens(e,i,n)!==!1)return!0;if(r){for(var o in this._eventParents)if(this._eventParents[o].listens(e,t,n,r))return!0}return!1},_listens:function(e,t,n){if(!this._events)return!1;var r=this._events[e]||[];if(!t)return!!r.length;n===this&&(n=void 0);for(var i=0,a=r.length;i<a;i++)if(r[i].fn===t&&r[i].ctx===n)return i;return!1},once:function(e,t,n){if(typeof e==`object`)for(var r in e)this._on(r,e[r],t,!0);else{e=f(e);for(var i=0,a=e.length;i<a;i++)this._on(e[i],t,n,!0)}return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[o(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[o(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,n({layer:e.target,propagatedFrom:e.target},e),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var ee=O.extend(A);function j(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}var te=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};j.prototype={clone:function(){return new j(this.x,this.y)},add:function(e){return this.clone()._add(M(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(M(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new j(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new j(this.x/e.x,this.y/e.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=te(this.x),this.y=te(this.y),this},distanceTo:function(e){e=M(e);var t=e.x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return e=M(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=M(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return`Point(`+u(this.x)+`, `+u(this.y)+`)`}};function M(e,t,n){return e instanceof j?e:_(e)?new j(e[0],e[1]):e==null?e:typeof e==`object`&&`x`in e&&`y`in e?new j(e.x,e.y):new j(e,t,n)}function N(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;r<i;r++)this.extend(n[r])}N.prototype={extend:function(e){var t,n;if(!e)return this;if(e instanceof j||typeof e[0]==`number`||`x`in e)t=n=M(e);else if(e=P(e),t=e.min,n=e.max,!t||!n)return this;return!this.min&&!this.max?(this.min=t.clone(),this.max=n.clone()):(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)),this},getCenter:function(e){return M((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return M(this.min.x,this.max.y)},getTopRight:function(){return M(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return e=typeof e[0]==`number`||e instanceof j?M(e):P(e),e instanceof N?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=P(e);var t=this.min,n=this.max,r=e.min,i=e.max,a=i.x>=t.x&&r.x<=n.x,o=i.y>=t.y&&r.y<=n.y;return a&&o},overlaps:function(e){e=P(e);var t=this.min,n=this.max,r=e.min,i=e.max,a=i.x>t.x&&r.x<n.x,o=i.y>t.y&&r.y<n.y;return a&&o},isValid:function(){return!!(this.min&&this.max)},pad:function(e){var t=this.min,n=this.max,r=Math.abs(t.x-n.x)*e,i=Math.abs(t.y-n.y)*e;return P(M(t.x-r,t.y-i),M(n.x+r,n.y+i))},equals:function(e){return e?(e=P(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight())):!1}};function P(e,t){return!e||e instanceof N?e:new N(e,t)}function F(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;r<i;r++)this.extend(n[r])}F.prototype={extend:function(e){var t=this._southWest,n=this._northEast,r,i;if(e instanceof re)r=e,i=e;else if(e instanceof F){if(r=e._southWest,i=e._northEast,!r||!i)return this}else return e?this.extend(I(e)||ne(e)):this;return!t&&!n?(this._southWest=new re(r.lat,r.lng),this._northEast=new re(i.lat,i.lng)):(t.lat=Math.min(r.lat,t.lat),t.lng=Math.min(r.lng,t.lng),n.lat=Math.max(i.lat,n.lat),n.lng=Math.max(i.lng,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,r=Math.abs(t.lat-n.lat)*e,i=Math.abs(t.lng-n.lng)*e;return new F(new re(t.lat-r,t.lng-i),new re(n.lat+r,n.lng+i))},getCenter:function(){return new re((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new re(this.getNorth(),this.getWest())},getSouthEast:function(){return new re(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e=typeof e[0]==`number`||e instanceof re||`lat`in e?I(e):ne(e);var t=this._southWest,n=this._northEast,r,i;return e instanceof F?(r=e.getSouthWest(),i=e.getNorthEast()):r=i=e,r.lat>=t.lat&&i.lat<=n.lat&&r.lng>=t.lng&&i.lng<=n.lng},intersects:function(e){e=ne(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),a=i.lat>=t.lat&&r.lat<=n.lat,o=i.lng>=t.lng&&r.lng<=n.lng;return a&&o},overlaps:function(e){e=ne(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),a=i.lat>t.lat&&r.lat<n.lat,o=i.lng>t.lng&&r.lng<n.lng;return a&&o},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(`,`)},equals:function(e,t){return e?(e=ne(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function ne(e,t){return e instanceof F?e:new F(e,t)}function re(e,t,n){if(isNaN(e)||isNaN(t))throw Error(`Invalid LatLng object: (`+e+`, `+t+`)`);this.lat=+e,this.lng=+t,n!==void 0&&(this.alt=+n)}re.prototype={equals:function(e,t){return e?(e=I(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(t===void 0?1e-9:t)):!1},toString:function(e){return`LatLng(`+u(this.lat,e)+`, `+u(this.lng,e)+`)`},distanceTo:function(e){return ae.distance(this,I(e))},wrap:function(){return ae.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return ne([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])},clone:function(){return new re(this.lat,this.lng,this.alt)}};function I(e,t,n){return e instanceof re?e:_(e)&&typeof e[0]!=`object`?e.length===3?new re(e[0],e[1],e[2]):e.length===2?new re(e[0],e[1]):null:e==null?e:typeof e==`object`&&`lat`in e?new re(e.lat,`lng`in e?e.lng:e.lon,e.alt):t===void 0?null:new re(e,t,n)}var ie={latLngToPoint:function(e,t){var n=this.projection.project(e),r=this.scale(t);return this.transformation._transform(n,r)},pointToLatLng:function(e,t){var n=this.scale(t),r=this.transformation.untransform(e,n);return this.projection.unproject(r)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*2**e},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,n=this.scale(e);return new N(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?c(e.lng,this.wrapLng,!0):e.lng,n=this.wrapLat?c(e.lat,this.wrapLat,!0):e.lat,r=e.alt;return new re(n,t,r)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),r=t.lat-n.lat,i=t.lng-n.lng;if(r===0&&i===0)return e;var a=e.getSouthWest(),o=e.getNorthEast();return new F(new re(a.lat-r,a.lng-i),new re(o.lat-r,o.lng-i))}},ae=n({},ie,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=Math.sin((t.lat-e.lat)*n/2),o=Math.sin((t.lng-e.lng)*n/2),s=a*a+Math.cos(r)*Math.cos(i)*o*o,c=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*c}}),oe=6378137,se={R:oe,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),i=Math.sin(r*t);return new j(this.R*e.lng*t,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(e){var t=180/Math.PI;return new re((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:(function(){var e=oe*Math.PI;return new N([-e,-e],[e,e])})()};function ce(e,t,n,r){if(_(e)){this._a=e[0],this._b=e[1],this._c=e[2],this._d=e[3];return}this._a=e,this._b=t,this._c=n,this._d=r}ce.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t||=1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t||=1,new j((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}};function le(e,t,n,r){return new ce(e,t,n,r)}var ue=n({},ae,{code:`EPSG:3857`,projection:se,transformation:function(){var e=.5/(Math.PI*se.R);return le(e,.5,-e,.5)}()}),de=n({},ue,{code:`EPSG:900913`});function fe(e){return document.createElementNS(`http://www.w3.org/2000/svg`,e)}function pe(e,t){var n=``,r,i,a,o,s,c;for(r=0,a=e.length;r<a;r++){for(s=e[r],i=0,o=s.length;i<o;i++)c=s[i],n+=(i?`L`:`M`)+c.x+` `+c.y;n+=t?R.svg?`z`:`x`:``}return n||`M0 0`}var me=document.documentElement.style,he=`ActiveXObject`in window,ge=he&&!document.addEventListener,_e=`msLaunchUri`in navigator&&!(`documentMode`in document),ve=Ze(`webkit`),ye=Ze(`android`),be=Ze(`android 2`)||Ze(`android 3`),xe=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Se=ye&&Ze(`Google`)&&xe<537&&!(`AudioNode`in window),Ce=!!window.opera,we=!_e&&Ze(`chrome`),Te=Ze(`gecko`)&&!ve&&!Ce&&!he,Ee=!we&&Ze(`safari`),De=Ze(`phantom`),Oe=`OTransition`in me,ke=navigator.platform.indexOf(`Win`)===0,Ae=he&&`transition`in me,je=`WebKitCSSMatrix`in window&&`m11`in new window.WebKitCSSMatrix&&!be,Me=`MozPerspective`in me,Ne=!window.L_DISABLE_3D&&(Ae||je||Me)&&!Oe&&!De,Pe=typeof orientation<`u`||Ze(`mobile`),Fe=Pe&&ve,Ie=Pe&&je,Le=!window.PointerEvent&&window.MSPointerEvent,Re=!!(window.PointerEvent||Le),ze=`ontouchstart`in window||!!window.TouchEvent,Be=!window.L_NO_TOUCH&&(ze||Re),Ve=Pe&&Ce,He=Pe&&Te,Ue=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,We=function(){var e=!1;try{var t=Object.defineProperty({},`passive`,{get:function(){e=!0}});window.addEventListener(`testPassiveEventSupport`,l,t),window.removeEventListener(`testPassiveEventSupport`,l,t)}catch{}return e}(),Ge=function(){return!!document.createElement(`canvas`).getContext}(),Ke=!!(document.createElementNS&&fe(`svg`).createSVGRect),qe=!!Ke&&(function(){var e=document.createElement(`div`);return e.innerHTML=`<svg/>`,(e.firstChild&&e.firstChild.namespaceURI)===`http://www.w3.org/2000/svg`})(),Je=!Ke&&function(){try{var e=document.createElement(`div`);e.innerHTML=`<v:shape adj="1"/>`;var t=e.firstChild;return t.style.behavior=`url(#default#VML)`,t&&typeof t.adj==`object`}catch{return!1}}(),Ye=navigator.platform.indexOf(`Mac`)===0,Xe=navigator.platform.indexOf(`Linux`)===0;function Ze(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var R={ie:he,ielt9:ge,edge:_e,webkit:ve,android:ye,android23:be,androidStock:Se,opera:Ce,chrome:we,gecko:Te,safari:Ee,phantom:De,opera12:Oe,win:ke,ie3d:Ae,webkit3d:je,gecko3d:Me,any3d:Ne,mobile:Pe,mobileWebkit:Fe,mobileWebkit3d:Ie,msPointer:Le,pointer:Re,touch:Be,touchNative:ze,mobileOpera:Ve,mobileGecko:He,retina:Ue,passiveEvents:We,canvas:Ge,svg:Ke,vml:Je,inlineSvg:qe,mac:Ye,linux:Xe},Qe=R.msPointer?`MSPointerDown`:`pointerdown`,$e=R.msPointer?`MSPointerMove`:`pointermove`,et=R.msPointer?`MSPointerUp`:`pointerup`,tt=R.msPointer?`MSPointerCancel`:`pointercancel`,nt={touchstart:Qe,touchmove:$e,touchend:et,touchcancel:tt},rt={touchstart:ft,touchmove:dt,touchend:dt,touchcancel:dt},it={},at=!1;function ot(e,t,n){return t===`touchstart`&&ut(),rt[t]?(n=rt[t].bind(this,n),e.addEventListener(nt[t],n,!1),n):(console.warn(`wrong event specified:`,t),l)}function st(e,t,n){if(!nt[t]){console.warn(`wrong event specified:`,t);return}e.removeEventListener(nt[t],n,!1)}function ct(e){it[e.pointerId]=e}function z(e){it[e.pointerId]&&(it[e.pointerId]=e)}function lt(e){delete it[e.pointerId]}function ut(){at||=(document.addEventListener(Qe,ct,!0),document.addEventListener($e,z,!0),document.addEventListener(et,lt,!0),document.addEventListener(tt,lt,!0),!0)}function dt(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||`mouse`)){for(var n in t.touches=[],it)t.touches.push(it[n]);t.changedTouches=[t],e(t)}}function ft(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&rn(t),dt(e,t)}function pt(e){var t={},n,r;for(r in e)n=e[r],t[r]=n&&n.bind?n.bind(e):n;return e=t,t.type=`dblclick`,t.detail=2,t.isTrusted=!1,t._simulated=!0,t}var mt=200;function ht(e,t){e.addEventListener(`dblclick`,t);var n=0,r;function i(e){if(e.detail!==1){r=e.detail;return}if(!(e.pointerType===`mouse`||e.sourceCapabilities&&!e.sourceCapabilities.firesTouchEvents)){var i=on(e);if(!(i.some(function(e){return e instanceof HTMLLabelElement&&e.attributes.for})&&!i.some(function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement}))){var a=Date.now();a-n<=mt?(r++,r===2&&t(pt(e))):r=1,n=a}}}return e.addEventListener(`click`,i),{dblclick:t,simDblclick:i}}function gt(e,t){e.removeEventListener(`dblclick`,t.dblclick),e.removeEventListener(`click`,t.simDblclick)}var _t=Mt([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),vt=Mt([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]),yt=vt===`webkitTransition`||vt===`OTransition`?vt+`End`:`transitionend`;function bt(e){return typeof e==`string`?document.getElementById(e):e}function xt(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||n===`auto`)&&document.defaultView){var r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return n===`auto`?null:n}function B(e,t,n){var r=document.createElement(e);return r.className=t||``,n&&n.appendChild(r),r}function St(e){var t=e.parentNode;t&&t.removeChild(e)}function Ct(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function wt(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function Tt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function Et(e,t){if(e.classList!==void 0)return e.classList.contains(t);var n=kt(e);return n.length>0&&RegExp(`(^|\\s)`+t+`(\\s|$)`).test(n)}function V(e,t){if(e.classList!==void 0)for(var n=f(t),r=0,i=n.length;r<i;r++)e.classList.add(n[r]);else if(!Et(e,t)){var a=kt(e);Ot(e,(a?a+` `:``)+t)}}function Dt(e,t){e.classList===void 0?Ot(e,d((` `+kt(e)+` `).replace(` `+t+` `,` `))):e.classList.remove(t)}function Ot(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t}function kt(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}function At(e,t){`opacity`in e.style?e.style.opacity=t:`filter`in e.style&&jt(e,t)}function jt(e,t){var n=!1,r=`DXImageTransform.Microsoft.Alpha`;try{n=e.filters.item(r)}catch{if(t===1)return}t=Math.round(t*100),n?(n.Enabled=t!==100,n.Opacity=t):e.style.filter+=` progid:`+r+`(opacity=`+t+`)`}function Mt(e){for(var t=document.documentElement.style,n=0;n<e.length;n++)if(e[n]in t)return e[n];return!1}function Nt(e,t,n){var r=t||new j(0,0);e.style[_t]=(R.ie3d?`translate(`+r.x+`px,`+r.y+`px)`:`translate3d(`+r.x+`px,`+r.y+`px,0)`)+(n?` scale(`+n+`)`:``)}function Pt(e,t){e._leaflet_pos=t,R.any3d?Nt(e,t):(e.style.left=t.x+`px`,e.style.top=t.y+`px`)}function Ft(e){return e._leaflet_pos||new j(0,0)}var It,Lt,Rt;if(`onselectstart`in document)It=function(){H(window,`selectstart`,rn)},Lt=function(){U(window,`selectstart`,rn)};else{var zt=Mt([`userSelect`,`WebkitUserSelect`,`OUserSelect`,`MozUserSelect`,`msUserSelect`]);It=function(){if(zt){var e=document.documentElement.style;Rt=e[zt],e[zt]=`none`}},Lt=function(){zt&&(document.documentElement.style[zt]=Rt,Rt=void 0)}}function Bt(){H(window,`dragstart`,rn)}function Vt(){U(window,`dragstart`,rn)}var Ht,Ut;function Wt(e){for(;e.tabIndex===-1;)e=e.parentNode;e.style&&(Gt(),Ht=e,Ut=e.style.outlineStyle,e.style.outlineStyle=`none`,H(window,`keydown`,Gt))}function Gt(){Ht&&(Ht.style.outlineStyle=Ut,Ht=void 0,Ut=void 0,U(window,`keydown`,Gt))}function Kt(e){do e=e.parentNode;while((!e.offsetWidth||!e.offsetHeight)&&e!==document.body);return e}function qt(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}var Jt={__proto__:null,TRANSFORM:_t,TRANSITION:vt,TRANSITION_END:yt,get:bt,getStyle:xt,create:B,remove:St,empty:Ct,toFront:wt,toBack:Tt,hasClass:Et,addClass:V,removeClass:Dt,setClass:Ot,getClass:kt,setOpacity:At,testProp:Mt,setTransform:Nt,setPosition:Pt,getPosition:Ft,get disableTextSelection(){return It},get enableTextSelection(){return Lt},disableImageDrag:Bt,enableImageDrag:Vt,preventOutline:Wt,restoreOutline:Gt,getSizedParentNode:Kt,getScale:qt};function H(e,t,n,r){if(t&&typeof t==`object`)for(var i in t)Qt(e,i,t[i],n);else{t=f(t);for(var a=0,o=t.length;a<o;a++)Qt(e,t[a],n,r)}return this}var Yt=`_leaflet_events`;function U(e,t,n,r){if(arguments.length===1)Xt(e),delete e[Yt];else if(t&&typeof t==`object`)for(var i in t)$t(e,i,t[i],n);else if(t=f(t),arguments.length===2)Xt(e,function(e){return v(t,e)!==-1});else for(var a=0,o=t.length;a<o;a++)$t(e,t[a],n,r);return this}function Xt(e,t){for(var n in e[Yt]){var r=n.split(/\d/)[0];(!t||t(r))&&$t(e,r,null,null,n)}}var Zt={mouseenter:`mouseover`,mouseleave:`mouseout`,wheel:!(`onwheel`in window)&&`mousewheel`};function Qt(e,t,n,r){var i=t+o(n)+(r?`_`+o(r):``);if(e[Yt]&&e[Yt][i])return this;var a=function(t){return n.call(r||e,t||window.event)},s=a;!R.touchNative&&R.pointer&&t.indexOf(`touch`)===0?a=ot(e,t,a):R.touch&&t===`dblclick`?a=ht(e,a):`addEventListener`in e?t===`touchstart`||t===`touchmove`||t===`wheel`||t===`mousewheel`?e.addEventListener(Zt[t]||t,a,R.passiveEvents?{passive:!1}:!1):t===`mouseenter`||t===`mouseleave`?(a=function(t){t||=window.event,un(e,t)&&s(t)},e.addEventListener(Zt[t],a,!1)):e.addEventListener(t,s,!1):e.attachEvent(`on`+t,a),e[Yt]=e[Yt]||{},e[Yt][i]=a}function $t(e,t,n,r,i){i||=t+o(n)+(r?`_`+o(r):``);var a=e[Yt]&&e[Yt][i];if(!a)return this;!R.touchNative&&R.pointer&&t.indexOf(`touch`)===0?st(e,t,a):R.touch&&t===`dblclick`?gt(e,a):`removeEventListener`in e?e.removeEventListener(Zt[t]||t,a,!1):e.detachEvent(`on`+t,a),e[Yt][i]=null}function en(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function tn(e){return Qt(e,`wheel`,en),this}function nn(e){return H(e,`mousedown touchstart dblclick contextmenu`,en),e._leaflet_disable_click=!0,this}function rn(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function an(e){return rn(e),en(e),this}function on(e){if(e.composedPath)return e.composedPath();for(var t=[],n=e.target;n;)t.push(n),n=n.parentNode;return t}function sn(e,t){if(!t)return new j(e.clientX,e.clientY);var n=qt(t),r=n.boundingClientRect;return new j((e.clientX-r.left)/n.x-t.clientLeft,(e.clientY-r.top)/n.y-t.clientTop)}var cn=R.linux&&R.chrome?window.devicePixelRatio:R.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ln(e){return R.edge?e.wheelDeltaY/2:e.deltaY&&e.deltaMode===0?-e.deltaY/cn:e.deltaY&&e.deltaMode===1?-e.deltaY*20:e.deltaY&&e.deltaMode===2?-e.deltaY*60:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?-e.detail*20:e.detail?e.detail/-32765*60:0}function un(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch{return!1}return n!==e}var dn={__proto__:null,on:H,off:U,stopPropagation:en,disableScrollPropagation:tn,disableClickPropagation:nn,preventDefault:rn,stop:an,getPropagationPath:on,getMousePosition:sn,getWheelDelta:ln,isExternalTarget:un,addListener:H,removeListener:U},fn=ee.extend({run:function(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=Ft(e),this._offset=t.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=T(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=this._duration*1e3;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),Pt(this._el,n),this.fire(`step`)},_complete:function(){E(this._animId),this._inProgress=!1,this.fire(`end`)},_easeOut:function(e){return 1-(1-e)**this._easeOutPower}}),W=ee.extend({options:{crs:ue,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,t){t=p(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.zoom!==void 0&&(this._zoom=this._limitZoom(t.zoom)),t.center&&t.zoom!==void 0&&this.setView(I(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=vt&&R.any3d&&!R.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),H(this._proxy,yt,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,r){return t=t===void 0?this._zoom:this._limitZoom(t),e=this._limitCenter(I(e),t,this.options.maxBounds),r||={},this._stop(),this._loaded&&!r.reset&&r!==!0&&(r.animate!==void 0&&(r.zoom=n({animate:r.animate},r.zoom),r.pan=n({animate:r.animate,duration:r.duration},r.pan)),this._zoom===t?this._tryAnimatedPan(e,r.pan):this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,r.zoom))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,t,r.pan&&r.pan.noMoveStart),this)},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e||=R.any3d?this.options.zoomDelta:1,this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e||=R.any3d?this.options.zoomDelta:1,this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var r=this.getZoomScale(t),i=this.getSize().divideBy(2),a=(e instanceof j?e:this.latLngToContainerPoint(e)).subtract(i).multiplyBy(1-1/r),o=this.containerPointToLatLng(i.add(a));return this.setView(o,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t||={},e=e.getBounds?e.getBounds():ne(e);var n=M(t.paddingTopLeft||t.padding||[0,0]),r=M(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(e,!1,n.add(r));if(i=typeof t.maxZoom==`number`?Math.min(t.maxZoom,i):i,i===1/0)return{center:e.getCenter(),zoom:i};var a=r.subtract(n).divideBy(2),o=this.project(e.getSouthWest(),i),s=this.project(e.getNorthEast(),i);return{center:this.unproject(o.add(s).divideBy(2).add(a),i),zoom:i}},fitBounds:function(e,t){if(e=ne(e),!e.isValid())throw Error(`Bounds are not valid.`);var n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(e=M(e).round(),t||={},!e.x&&!e.y)return this.fire(`moveend`);if(t.animate!==!0&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new fn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire(`movestart`),t.animate!==!1){V(this._mapPane,`leaflet-pan-anim`);var n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire(`move`).fire(`moveend`);return this},flyTo:function(e,t,n){if(n||={},n.animate===!1||!R.any3d)return this.setView(e,t,n);this._stop();var r=this.project(this.getCenter()),i=this.project(e),a=this.getSize(),o=this._zoom;e=I(e),t=t===void 0?o:t;var s=Math.max(a.x,a.y),c=s*this.getZoomScale(o,t),l=i.distanceTo(r)||1,u=1.42,d=u*u;function f(e){var t=e?-1:1,n=e?c:s,r=(c*c-s*s+t*d*d*l*l)/(2*n*d*l),i=Math.sqrt(r*r+1)-r;return i<1e-9?-18:Math.log(i)}function p(e){return(Math.exp(e)-Math.exp(-e))/2}function m(e){return(Math.exp(e)+Math.exp(-e))/2}function h(e){return p(e)/m(e)}var g=f(0);function _(e){return s*(m(g)/m(g+u*e))}function v(e){return s*(m(g)*h(g+u*e)-p(g))/d}function y(e){return 1-(1-e)**1.5}var b=Date.now(),x=(f(1)-g)/u,S=n.duration?1e3*n.duration:1e3*x*.8;function C(){var n=(Date.now()-b)/S,a=y(n)*x;n<=1?(this._flyToFrame=T(C,this),this._move(this.unproject(r.add(i.subtract(r).multiplyBy(v(a)/l)),o),this.getScaleZoom(s/_(a),o),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),C.call(this),this},flyToBounds:function(e,t){var n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)},setMaxBounds:function(e){return e=ne(e),this.listens(`moveend`,this._panInsideMaxBounds)&&this.off(`moveend`,this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on(`moveend`,this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire(`zoomlevelschange`),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire(`zoomlevelschange`),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,ne(e));return n.equals(r)||this.panTo(r,t),this._enforcingBounds=!1,this},panInside:function(e,t){t||={};var n=M(t.paddingTopLeft||t.padding||[0,0]),r=M(t.paddingBottomRight||t.padding||[0,0]),i=this.project(this.getCenter()),a=this.project(e),o=this.getPixelBounds(),s=P([o.min.add(n),o.max.subtract(r)]),c=s.getSize();if(!s.contains(a)){this._enforcingBounds=!0;var l=a.subtract(s.getCenter()),u=s.extend(a).getSize().subtract(c);i.x+=l.x<0?-u.x:u.x,i.y+=l.y<0?-u.y:u.y,this.panTo(this.unproject(i),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=n({animate:!1,pan:!0},e===!0?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),a=t.divideBy(2).round(),o=r.divideBy(2).round(),s=a.subtract(o);return!s.x&&!s.y?this:(e.animate&&e.pan?this.panBy(s):(e.pan&&this._rawPanBy(s),this.fire(`move`),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,`moveend`),200)):this.fire(`moveend`)),this.fire(`resize`,{oldSize:t,newSize:r}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire(`viewreset`),this._stop()},locate:function(e){if(e=this._locateOptions=n({timeout:1e4,watch:!1},e),!(`geolocation`in navigator))return this._handleGeolocationError({code:0,message:`Geolocation not supported.`}),this;var t=i(this._handleGeolocationResponse,this),r=i(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,r,e):navigator.geolocation.getCurrentPosition(t,r,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,n=e.message||(t===1?`permission denied`:t===2?`position unavailable`:`timeout`);this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire(`locationerror`,{code:t,message:`Geolocation error: `+n+`.`})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=e.coords.latitude,n=e.coords.longitude,r=new re(t,n),i=r.toBounds(e.coords.accuracy*2),a=this._locateOptions;if(a.setView){var o=this.getBoundsZoom(i);this.setView(r,a.maxZoom?Math.min(o,a.maxZoom):o)}var s={latlng:r,bounds:i,timestamp:e.timestamp};for(var c in e.coords)typeof e.coords[c]==`number`&&(s[c]=e.coords[c]);this.fire(`locationfound`,s)}},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off(`moveend`,this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw Error(`Map container is being reused by another instance`);try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}for(var e in this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),St(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&=(E(this._resizeRequest),null),this._clearHandlers(),this._loaded&&this.fire(`unload`),this._layers)this._layers[e].remove();for(e in this._panes)St(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=B(`div`,`leaflet-pane`+(e?` leaflet-`+e.replace(`Pane`,``)+`-pane`:``),t||this._mapPane);return e&&(this._panes[e]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new F(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},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(e,t,n){e=ne(e),n=M(n||[0,0]);var r=this.getZoom()||0,i=this.getMinZoom(),a=this.getMaxZoom(),o=e.getNorthWest(),s=e.getSouthEast(),c=this.getSize().subtract(n),l=P(this.project(s,r),this.project(o,r)).getSize(),u=R.any3d?this.options.zoomSnap:1,d=c.x/l.x,f=c.y/l.y,p=t?Math.max(d,f):Math.min(d,f);return r=this.getScaleZoom(p,r),u&&(r=Math.round(r/(u/100))*(u/100),r=t?Math.ceil(r/u)*u:Math.floor(r/u)*u),Math.max(i,Math.min(a,r))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new j(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new N(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(e===void 0?this.getZoom():e)},getPane:function(e){return typeof e==`string`?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=t===void 0?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=t===void 0?this._zoom:t;var r=n.zoom(e*n.scale(t));return isNaN(r)?1/0:r},project:function(e,t){return t=t===void 0?this._zoom:t,this.options.crs.latLngToPoint(I(e),t)},unproject:function(e,t){return t=t===void 0?this._zoom:t,this.options.crs.pointToLatLng(M(e),t)},layerPointToLatLng:function(e){var t=M(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(I(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(I(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(ne(e))},distance:function(e,t){return this.options.crs.distance(I(e),I(t))},containerPointToLayerPoint:function(e){return M(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return M(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(M(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(I(e)))},mouseEventToContainerPoint:function(e){return sn(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=bt(e);if(!t)throw Error(`Map container not found.`);if(t._leaflet_id)throw Error(`Map container is already initialized.`);H(t,`scroll`,this._onScroll,this),this._containerId=o(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&R.any3d,V(e,`leaflet-container`+(R.touch?` leaflet-touch`:``)+(R.retina?` leaflet-retina`:``)+(R.ielt9?` leaflet-oldie`:``)+(R.safari?` leaflet-safari`:``)+(this._fadeAnimated?` leaflet-fade-anim`:``));var t=xt(e,`position`);t!==`absolute`&&t!==`relative`&&t!==`fixed`&&t!==`sticky`&&(e.style.position=`relative`),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane(`mapPane`,this._container),Pt(this._mapPane,new j(0,0)),this.createPane(`tilePane`),this.createPane(`overlayPane`),this.createPane(`shadowPane`),this.createPane(`markerPane`),this.createPane(`tooltipPane`),this.createPane(`popupPane`),this.options.markerZoomAnimation||(V(e.markerPane,`leaflet-zoom-hide`),V(e.shadowPane,`leaflet-zoom-hide`))},_resetView:function(e,t,n){Pt(this._mapPane,new j(0,0));var r=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire(`viewprereset`);var i=this._zoom!==t;this._moveStart(i,n)._move(e,t)._moveEnd(i),this.fire(`viewreset`),r&&this.fire(`load`)},_moveStart:function(e,t){return e&&this.fire(`zoomstart`),t||this.fire(`movestart`),this},_move:function(e,t,n,r){t===void 0&&(t=this._zoom);var i=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),r?n&&n.pinch&&this.fire(`zoom`,n):((i||n&&n.pinch)&&this.fire(`zoom`,n),this.fire(`move`,n)),this},_moveEnd:function(e){return e&&this.fire(`zoomend`),this.fire(`moveend`)},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){Pt(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw Error(`Set map center and zoom first.`)},_initEvents:function(e){this._targets={},this._targets[o(this._container)]=this;var t=e?U:H;t(this._container,`click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup`,this._handleDOMEvent,this),this.options.trackResize&&t(window,`resize`,this._onResize,this),R.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,`moveend`,this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=T(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n=[],r,i=t===`mouseout`||t===`mouseover`,a=e.target||e.srcElement,s=!1;a;){if(r=this._targets[o(a)],r&&(t===`click`||t===`preclick`)&&this._draggableMoved(r)){s=!0;break}if(r&&r.listens(t,!0)&&(i&&!un(a,e)||(n.push(r),i))||a===this._container)break;a=a.parentNode}return!n.length&&!s&&!i&&this.listens(t,!0)&&(n=[this]),n},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||e.type===`click`&&this._isClickDisabled(t))){var n=e.type;n===`mousedown`&&Wt(t),this._fireDOMEvent(e,n)}},_mouseEvents:[`click`,`dblclick`,`mouseover`,`mouseout`,`contextmenu`],_fireDOMEvent:function(e,t,r){if(e.type===`click`){var i=n({},e);i.type=`preclick`,this._fireDOMEvent(i,i.type,r)}var a=this._findEventTargets(e,t);if(r){for(var o=[],s=0;s<r.length;s++)r[s].listens(t,!0)&&o.push(r[s]);a=o.concat(a)}if(a.length){t===`contextmenu`&&rn(e);var c=a[0],l={originalEvent:e};if(e.type!==`keypress`&&e.type!==`keydown`&&e.type!==`keyup`){var u=c.getLatLng&&(!c._radius||c._radius<=10);l.containerPoint=u?this.latLngToContainerPoint(c.getLatLng()):this.mouseEventToContainerPoint(e),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=u?c.getLatLng():this.layerPointToLatLng(l.layerPoint)}for(s=0;s<a.length;s++)if(a[s].fire(t,l,!0),l.originalEvent._stopped||a[s].options.bubblingMouseEvents===!1&&v(this._mouseEvents,t)!==-1)return}},_draggableMoved:function(e){return e=e.dragging&&e.dragging.enabled()?e:this,e.dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on(`load`,e,t),this},_getMapPanePos:function(){return Ft(this._mapPane)||new j(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&t!==void 0?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){var r=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(r)},_latLngBoundsToNewLayerBounds:function(e,t,n){var r=this._getNewPixelOrigin(n,t);return P([this.project(e.getSouthWest(),t)._subtract(r),this.project(e.getNorthWest(),t)._subtract(r),this.project(e.getSouthEast(),t)._subtract(r),this.project(e.getNorthEast(),t)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){if(!n)return e;var r=this.project(e,t),i=this.getSize().divideBy(2),a=new N(r.subtract(i),r.add(i)),o=this._getBoundsOffset(a,n,t);return Math.abs(o.x)<=1&&Math.abs(o.y)<=1?e:this.unproject(r.add(o),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),r=new N(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(r,t))},_getBoundsOffset:function(e,t,n){var r=P(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n)),i=r.min.subtract(e.min),a=r.max.subtract(e.max);return new j(this._rebound(i.x,-a.x),this._rebound(i.y,-a.y))},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),r=R.any3d?this.options.zoomSnap:1;return r&&(e=Math.round(e/r)*r),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire(`move`)},_onPanTransitionEnd:function(){Dt(this._mapPane,`leaflet-pan-anim`),this.fire(`moveend`)},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return(t&&t.animate)!==!0&&!this.getSize().contains(n)?!1:(this.panBy(n,t),!0)},_createAnimProxy:function(){var e=this._proxy=B(`div`,`leaflet-proxy leaflet-zoom-animated`);this._panes.mapPane.appendChild(e),this.on(`zoomanim`,function(e){var t=_t,n=this._proxy.style[t];Nt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on(`load moveend`,this._animMoveEnd,this),this._on(`unload`,this._destroyAnimProxy,this)},_destroyAnimProxy:function(){St(this._proxy),this.off(`load moveend`,this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();Nt(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf(`transform`)>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName(`leaflet-zoom-animated`).length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n||={},!this._zoomAnimated||n.animate===!1||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),i=this._getCenterOffset(e)._divideBy(1-1/r);return n.animate!==!0&&!this.getSize().contains(i)?!1:(T(function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(e,t,!0)},this),!0)},_animateZoom:function(e,t,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,V(this._mapPane,`leaflet-zoom-anim`)),this.fire(`zoomanim`,{center:e,zoom:t,noUpdate:r}),this._tempFireZoomEvent||=this._zoom!==this._animateToZoom,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Dt(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 pn(e,t){return new W(e,t)}var mn=O.extend({options:{position:`topright`},initialize:function(e){p(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),r=e._controlCorners[n];return V(t,`leaflet-control`),n.indexOf(`bottom`)===-1?r.appendChild(t):r.insertBefore(t,r.firstChild),this._map.on(`unload`,this.remove,this),this},remove:function(){return this._map?(St(this._container),this.onRemove&&this.onRemove(this._map),this._map.off(`unload`,this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),hn=function(e){return new mn(e)};W.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t=`leaflet-`,n=this._controlContainer=B(`div`,t+`control-container`,this._container);function r(r,i){var a=t+r+` `+t+i;e[r+i]=B(`div`,a,n)}r(`top`,`left`),r(`top`,`right`),r(`bottom`,`left`),r(`bottom`,`right`)},_clearControlPos:function(){for(var e in this._controlCorners)St(this._controlCorners[e]);St(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var gn=mn.extend({options:{collapsed:!0,position:`topright`,autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,r){return n<r?-1:r<n?1:0}},initialize:function(e,t,n){for(var r in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[r],r);for(r in t)this._addLayer(t[r],r,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on(`zoomend`,this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on(`add remove`,this._onLayerChange,this);return this._container},addTo:function(e){return mn.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off(`zoomend`,this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off(`add remove`,this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off(`add remove`,this._onLayerChange,this);var t=this._getLayer(o(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){V(this._container,`leaflet-control-layers-expanded`),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(V(this._section,`leaflet-control-layers-scrollbar`),this._section.style.height=e+`px`):Dt(this._section,`leaflet-control-layers-scrollbar`),this._checkDisabledLayers(),this},collapse:function(){return Dt(this._container,`leaflet-control-layers-expanded`),this},_initLayout:function(){var e=`leaflet-control-layers`,t=this._container=B(`div`,e),n=this.options.collapsed;t.setAttribute(`aria-haspopup`,!0),nn(t),tn(t);var r=this._section=B(`section`,e+`-list`);n&&(this._map.on(`click`,this.collapse,this),H(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var i=this._layersLink=B(`a`,e+`-toggle`,t);i.href=`#`,i.title=`Layers`,i.setAttribute(`role`,`button`),H(i,{keydown:function(e){e.keyCode===13&&this._expandSafely()},click:function(e){rn(e),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=B(`div`,e+`-base`,r),this._separator=B(`div`,e+`-separator`,r),this._overlaysList=B(`div`,e+`-overlays`,r),t.appendChild(r)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&o(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,n){this._map&&e.on(`add remove`,this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(i(function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Ct(this._baseLayersList),Ct(this._overlaysList),this._layerControlInputs=[];var e,t,n,r,i=0;for(n=0;n<this._layers.length;n++)r=this._layers[n],this._addItem(r),t||=r.overlay,e||=!r.overlay,i+=r.overlay?0:1;return this.options.hideSingleBase&&(e&&=i>1,this._baseLayersList.style.display=e?``:`none`),this._separator.style.display=t&&e?``:`none`,this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(o(e.target)),n=t.overlay?e.type===`add`?`overlayadd`:`overlayremove`:e.type===`add`?`baselayerchange`:null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var n=`<input type="radio" class="leaflet-control-layers-selector" name="`+e+`"`+(t?` checked="checked"`:``)+`/>`,r=document.createElement(`div`);return r.innerHTML=n,r.firstChild},_addItem:function(e){var t=document.createElement(`label`),n=this._map.hasLayer(e.layer),r;e.overlay?(r=document.createElement(`input`),r.type=`checkbox`,r.className=`leaflet-control-layers-selector`,r.defaultChecked=n):r=this._createRadioElement(`leaflet-base-layers_`+o(this),n),this._layerControlInputs.push(r),r.layerId=o(e.layer),H(r,`click`,this._onInputClick,this);var i=document.createElement(`span`);i.innerHTML=` `+e.name;var a=document.createElement(`span`);return t.appendChild(a),a.appendChild(r),a.appendChild(i),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(t),this._checkDisabledLayers(),t},_onInputClick:function(){if(!this._preventClick){var e=this._layerControlInputs,t,n,r=[],i=[];this._handlingClick=!0;for(var a=e.length-1;a>=0;a--)t=e[a],n=this._getLayer(t.layerId).layer,t.checked?r.push(n):t.checked||i.push(n);for(a=0;a<i.length;a++)this._map.hasLayer(i[a])&&this._map.removeLayer(i[a]);for(a=0;a<r.length;a++)this._map.hasLayer(r[a])||this._map.addLayer(r[a]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e=this._layerControlInputs,t,n,r=this._map.getZoom(),i=e.length-1;i>=0;i--)t=e[i],n=this._getLayer(t.layerId).layer,t.disabled=n.options.minZoom!==void 0&&r<n.options.minZoom||n.options.maxZoom!==void 0&&r>n.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,H(e,`click`,rn),this.expand();var t=this;setTimeout(function(){U(e,`click`,rn),t._preventClick=!1})}}),_n=function(e,t,n){return new gn(e,t,n)},vn=mn.extend({options:{position:`topleft`,zoomInText:`<span aria-hidden="true">+</span>`,zoomInTitle:`Zoom in`,zoomOutText:`<span aria-hidden="true">&#x2212;</span>`,zoomOutTitle:`Zoom out`},onAdd:function(e){var t=`leaflet-control-zoom`,n=B(`div`,t+` leaflet-bar`),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,t+`-in`,n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,t+`-out`,n,this._zoomOut),this._updateDisabled(),e.on(`zoomend zoomlevelschange`,this._updateDisabled,this),n},onRemove:function(e){e.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(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,r,i){var a=B(`a`,n,r);return a.innerHTML=e,a.href=`#`,a.title=t,a.setAttribute(`role`,`button`),a.setAttribute(`aria-label`,t),nn(a),H(a,`click`,an),H(a,`click`,i,this),H(a,`click`,this._refocusOnMap,this),a},_updateDisabled:function(){var e=this._map,t=`leaflet-disabled`;Dt(this._zoomInButton,t),Dt(this._zoomOutButton,t),this._zoomInButton.setAttribute(`aria-disabled`,`false`),this._zoomOutButton.setAttribute(`aria-disabled`,`false`),(this._disabled||e._zoom===e.getMinZoom())&&(V(this._zoomOutButton,t),this._zoomOutButton.setAttribute(`aria-disabled`,`true`)),(this._disabled||e._zoom===e.getMaxZoom())&&(V(this._zoomInButton,t),this._zoomInButton.setAttribute(`aria-disabled`,`true`))}});W.mergeOptions({zoomControl:!0}),W.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new vn,this.addControl(this.zoomControl))});var yn=function(e){return new vn(e)},bn=mn.extend({options:{position:`bottomleft`,maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t=`leaflet-control-scale`,n=B(`div`,t),r=this.options;return this._addScales(r,t+`-line`,n),e.on(r.updateWhenIdle?`moveend`:`move`,this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?`moveend`:`move`,this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=B(`div`,t,n)),e.imperial&&(this._iScale=B(`div`,t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+` m`:t/1e3+` km`;this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var t=e*3.2808399,n,r,i;t>5280?(n=t/5280,r=this._getRoundNum(n),this._updateScale(this._iScale,r+` mi`,r/n)):(i=this._getRoundNum(t),this._updateScale(this._iScale,i+` ft`,i/t))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+`px`,e.innerHTML=t},_getRoundNum:function(e){var t=10**((Math.floor(e)+``).length-1),n=e/t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,t*n}}),xn=function(e){return new bn(e)},Sn=mn.extend({options:{position:`bottomright`,prefix:`<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">`+(R.inlineSvg?`<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> `:``)+`Leaflet</a>`},initialize:function(e){p(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=B(`div`,`leaflet-control-attribution`),nn(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on(`layeradd`,this._addAttribution,this),this._container},onRemove:function(e){e.off(`layeradd`,this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once(`remove`,function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e&&this._attributions[e]&&(this._attributions[e]--,this._update()),this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(`, `)),this._container.innerHTML=n.join(` <span aria-hidden="true">|</span> `)}}});W.mergeOptions({attributionControl:!0}),W.addInitHook(function(){this.options.attributionControl&&new Sn().addTo(this)}),mn.Layers=gn,mn.Zoom=vn,mn.Scale=bn,mn.Attribution=Sn,hn.layers=_n,hn.zoom=yn,hn.scale=xn,hn.attribution=function(e){return new Sn(e)};var Cn=O.extend({initialize:function(e){this._map=e},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}});Cn.addTo=function(e,t){return e.addHandler(t,this),this};var wn={Events:A},Tn=R.touch?`touchstart mousedown`:`mousedown`,En=ee.extend({options:{clickTolerance:3},initialize:function(e,t,n,r){p(this,r),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||=(H(this._dragStartTarget,Tn,this._onDown,this),!0)},disable:function(){this._enabled&&(En._dragging===this&&this.finishDrag(!0),U(this._dragStartTarget,Tn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!Et(this._element,`leaflet-zoom-anim`))){if(e.touches&&e.touches.length!==1){En._dragging===this&&this.finishDrag();return}if(!(En._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches)&&(En._dragging=this,this._preventOutline&&Wt(this._element),Bt(),It(),!this._moving)){this.fire(`down`);var t=e.touches?e.touches[0]:e,n=Kt(this._element);this._startPoint=new j(t.clientX,t.clientY),this._startPos=Ft(this._element),this._parentScale=qt(n);var r=e.type===`mousedown`;H(document,r?`mousemove`:`touchmove`,this._onMove,this),H(document,r?`mouseup`:`touchend touchcancel`,this._onUp,this)}}},_onMove:function(e){if(this._enabled){if(e.touches&&e.touches.length>1){this._moved=!0;return}var t=e.touches&&e.touches.length===1?e.touches[0]:e,n=new j(t.clientX,t.clientY)._subtract(this._startPoint);!n.x&&!n.y||Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,rn(e),this._moved||(this.fire(`dragstart`),this._moved=!0,V(document.body,`leaflet-dragging`),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),V(this._lastTarget,`leaflet-drag-target`)),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=e,this._updatePosition())}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire(`predrag`,e),Pt(this._element,this._newPos),this.fire(`drag`,e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){Dt(document.body,`leaflet-dragging`),this._lastTarget&&=(Dt(this._lastTarget,`leaflet-drag-target`),null),U(document,`mousemove touchmove`,this._onMove,this),U(document,`mouseup touchend touchcancel`,this._onUp,this),Vt(),Lt();var t=this._moved&&this._moving;this._moving=!1,En._dragging=!1,t&&this.fire(`dragend`,{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function Dn(e,t,n){var r,i=[1,4,2,8],a,o,s,c,l,u,d,f;for(a=0,u=e.length;a<u;a++)e[a]._code=Bn(e[a],t);for(s=0;s<4;s++){for(d=i[s],r=[],a=0,u=e.length,o=u-1;a<u;o=a++)c=e[a],l=e[o],c._code&d?l._code&d||(f=zn(l,c,d,t,n),f._code=Bn(f,t),r.push(f)):(l._code&d&&(f=zn(l,c,d,t,n),f._code=Bn(f,t),r.push(f)),r.push(c));e=r}return e}function On(e,t){var n,r,i,a,o,s,c,l,u;if(!e||e.length===0)throw Error(`latlngs not passed`);Un(e)||(console.warn(`latlngs are not flat! Only the first ring will be used`),e=e[0]);var d=I([0,0]),f=ne(e);f.getNorthWest().distanceTo(f.getSouthWest())*f.getNorthEast().distanceTo(f.getNorthWest())<1700&&(d=kn(e));var p=e.length,m=[];for(n=0;n<p;n++){var h=I(e[n]);m.push(t.project(I([h.lat-d.lat,h.lng-d.lng])))}for(s=c=l=0,n=0,r=p-1;n<p;r=n++)i=m[n],a=m[r],o=i.y*a.x-a.y*i.x,c+=(i.x+a.x)*o,l+=(i.y+a.y)*o,s+=o*3;u=s===0?m[0]:[c/s,l/s];var g=t.unproject(M(u));return I([g.lat+d.lat,g.lng+d.lng])}function kn(e){for(var t=0,n=0,r=0,i=0;i<e.length;i++){var a=I(e[i]);t+=a.lat,n+=a.lng,r++}return I([t/r,n/r])}var An={__proto__:null,clipPolygon:Dn,polygonCenter:On,centroid:kn};function jn(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=In(e,n),e=Pn(e,n),e}function Mn(e,t,n){return Math.sqrt(Hn(e,t,n,!0))}function Nn(e,t,n){return Hn(e,t,n)}function Pn(e,t){var n=e.length,r=new(typeof Uint8Array<`u`?Uint8Array:Array)(n);r[0]=r[n-1]=1,Fn(e,r,t,0,n-1);var i,a=[];for(i=0;i<n;i++)r[i]&&a.push(e[i]);return a}function Fn(e,t,n,r,i){var a=0,o,s,c;for(s=r+1;s<=i-1;s++)c=Hn(e[s],e[r],e[i],!0),c>a&&(o=s,a=c);a>n&&(t[o]=1,Fn(e,t,n,r,o),Fn(e,t,n,o,i))}function In(e,t){for(var n=[e[0]],r=1,i=0,a=e.length;r<a;r++)Vn(e[r],e[i])>t&&(n.push(e[r]),i=r);return i<a-1&&n.push(e[a-1]),n}var Ln;function Rn(e,t,n,r,i){var a=r?Ln:Bn(e,n),o=Bn(t,n),s,c,l;for(Ln=o;;){if(!(a|o))return[e,t];if(a&o)return!1;s=a||o,c=zn(e,t,s,n,i),l=Bn(c,n),s===a?(e=c,a=l):(t=c,o=l)}}function zn(e,t,n,r,i){var a=t.x-e.x,o=t.y-e.y,s=r.min,c=r.max,l,u;return n&8?(l=e.x+a*(c.y-e.y)/o,u=c.y):n&4?(l=e.x+a*(s.y-e.y)/o,u=s.y):n&2?(l=c.x,u=e.y+o*(c.x-e.x)/a):n&1&&(l=s.x,u=e.y+o*(s.x-e.x)/a),new j(l,u,i)}function Bn(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function Vn(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function Hn(e,t,n,r){var i=t.x,a=t.y,o=n.x-i,s=n.y-a,c=o*o+s*s,l;return c>0&&(l=((e.x-i)*o+(e.y-a)*s)/c,l>1?(i=n.x,a=n.y):l>0&&(i+=o*l,a+=s*l)),o=e.x-i,s=e.y-a,r?o*o+s*s:new j(i,a)}function Un(e){return!_(e[0])||typeof e[0][0]!=`object`&&e[0][0]!==void 0}function Wn(e){return console.warn(`Deprecated use of _flat, please use L.LineUtil.isFlat instead.`),Un(e)}function Gn(e,t){var n,r,i,a,o,s,c,l;if(!e||e.length===0)throw Error(`latlngs not passed`);Un(e)||(console.warn(`latlngs are not flat! Only the first ring will be used`),e=e[0]);var u=I([0,0]),d=ne(e);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(u=kn(e));var f=e.length,p=[];for(n=0;n<f;n++){var m=I(e[n]);p.push(t.project(I([m.lat-u.lat,m.lng-u.lng])))}for(n=0,r=0;n<f-1;n++)r+=p[n].distanceTo(p[n+1])/2;if(r===0)l=p[0];else for(n=0,a=0;n<f-1;n++)if(o=p[n],s=p[n+1],i=o.distanceTo(s),a+=i,a>r){c=(a-r)/i,l=[s.x-c*(s.x-o.x),s.y-c*(s.y-o.y)];break}var h=t.unproject(M(l));return I([h.lat+u.lat,h.lng+u.lng])}var Kn={__proto__:null,simplify:jn,pointToSegmentDistance:Mn,closestPointOnSegment:Nn,clipSegment:Rn,_getEdgeIntersection:zn,_getBitCode:Bn,_sqClosestPointOnSegment:Hn,isFlat:Un,_flat:Wn,polylineCenter:Gn},qn={project:function(e){return new j(e.lng,e.lat)},unproject:function(e){return new re(e.y,e.x)},bounds:new N([-180,-90],[180,90])},Jn={R:6378137,R_MINOR:6356752.314245179,bounds:new N([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,r=e.lat*t,i=this.R_MINOR/n,a=Math.sqrt(1-i*i),o=a*Math.sin(r),s=Math.tan(Math.PI/4-r/2)/((1-o)/(1+o))**(a/2);return r=-n*Math.log(Math.max(s,1e-10)),new j(e.lng*t*n,r)},unproject:function(e){for(var t=180/Math.PI,n=this.R,r=this.R_MINOR/n,i=Math.sqrt(1-r*r),a=Math.exp(-e.y/n),o=Math.PI/2-2*Math.atan(a),s=0,c=.1,l;s<15&&Math.abs(c)>1e-7;s++)l=i*Math.sin(o),l=((1-l)/(1+l))**(i/2),c=Math.PI/2-2*Math.atan(a*l)-o,o+=c;return new re(o*t,e.x*t/n)}},Yn={__proto__:null,LonLat:qn,Mercator:Jn,SphericalMercator:se},Xn=n({},ae,{code:`EPSG:3395`,projection:Jn,transformation:function(){var e=.5/(Math.PI*Jn.R);return le(e,.5,-e,.5)}()}),Zn=n({},ae,{code:`EPSG:4326`,projection:qn,transformation:le(1/180,1,-1/180,.5)}),Qn=n({},ie,{projection:qn,transformation:le(1,0,-1,0),scale:function(e){return 2**e},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,r=t.lat-e.lat;return Math.sqrt(n*n+r*r)},infinite:!0});ie.Earth=ae,ie.EPSG3395=Xn,ie.EPSG3857=ue,ie.EPSG900913=de,ie.EPSG4326=Zn,ie.Simple=Qn;var $n=ee.extend({options:{pane:`overlayPane`,attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[o(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[o(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var n=this.getEvents();t.on(n,this),this.once(`remove`,function(){t.off(n,this)},this)}this.onAdd(t),this.fire(`add`),t.fire(`layeradd`,{layer:this})}}});W.include({addLayer:function(e){if(!e._layerAdd)throw Error(`The provided object is not a Layer.`);var t=o(e);return this._layers[t]?this:(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var t=o(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire(`layerremove`,{layer:e}),e.fire(`remove`)),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return o(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){e=e?_(e)?e:[e]:[];for(var t=0,n=e.length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){(!isNaN(e.options.maxZoom)||!isNaN(e.options.minZoom))&&(this._zoomBoundLayers[o(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=o(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,t=-1/0,n=this._getZoomSpan();for(var r in this._zoomBoundLayers){var i=this._zoomBoundLayers[r].options;e=i.minZoom===void 0?e:Math.min(e,i.minZoom),t=i.maxZoom===void 0?t:Math.max(t,i.maxZoom)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire(`zoomlevelschange`),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var er=$n.extend({initialize:function(e,t){p(this,t),this._layers={};var n,r;if(e)for(n=0,r=e.length;n<r;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return(typeof e==`number`?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t=Array.prototype.slice.call(arguments,1),n,r;for(n in this._layers)r=this._layers[n],r[e]&&r[e].apply(r,t);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke(`setZIndex`,e)},getLayerId:function(e){return o(e)}}),tr=function(e,t){return new er(e,t)},nr=er.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),er.prototype.addLayer.call(this,e),this.fire(`layeradd`,{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),er.prototype.removeLayer.call(this,e),this.fire(`layerremove`,{layer:e})):this},setStyle:function(e){return this.invoke(`setStyle`,e)},bringToFront:function(){return this.invoke(`bringToFront`)},bringToBack:function(){return this.invoke(`bringToBack`)},getBounds:function(){var e=new F;for(var t in this._layers){var n=this._layers[t];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}}),rr=function(e,t){return new nr(e,t)},ir=O.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){p(this,e)},createIcon:function(e){return this._createIcon(`icon`,e)},createShadow:function(e){return this._createIcon(`shadow`,e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(!n){if(e===`icon`)throw Error(`iconUrl not set in Icon options (see the docs).`);return null}var r=this._createImg(n,t&&t.tagName===`IMG`?t:null);return this._setIconStyles(r,e),(this.options.crossOrigin||this.options.crossOrigin===``)&&(r.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),r},_setIconStyles:function(e,t){var n=this.options,r=n[t+`Size`];typeof r==`number`&&(r=[r,r]);var i=M(r),a=M(t===`shadow`&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2,!0));e.className=`leaflet-marker-`+t+` `+(n.className||``),a&&(e.style.marginLeft=-a.x+`px`,e.style.marginTop=-a.y+`px`),i&&(e.style.width=i.x+`px`,e.style.height=i.y+`px`)},_createImg:function(e,t){return t||=document.createElement(`img`),t.src=e,t},_getIconUrl:function(e){return R.retina&&this.options[e+`RetinaUrl`]||this.options[e+`Url`]}});function ar(e){return new ir(e)}var or=ir.extend({options:{iconUrl:`marker-icon.png`,iconRetinaUrl:`marker-icon-2x.png`,shadowUrl:`marker-shadow.png`,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return typeof or.imagePath!=`string`&&(or.imagePath=this._detectIconPath()),(this.options.imagePath||or.imagePath)+ir.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var t=function(e,t,n){var r=t.exec(e);return r&&r[n]};return e=t(e,/^url\((['"])?(.+)\1\)$/,2),e&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=B(`div`,`leaflet-default-icon-path`,document.body),t=xt(e,`background-image`)||xt(e,`backgroundImage`);if(document.body.removeChild(e),t=this._stripUrl(t),t)return t;var n=document.querySelector(`link[href$="leaflet.css"]`);return n?n.href.substring(0,n.href.length-11-1):``}}),sr=Cn.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||=new En(e,e,!0),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),V(e,`leaflet-marker-draggable`)},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Dt(this._marker._icon,`leaflet-marker-draggable`)},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,r=this._marker.options.autoPanSpeed,i=this._marker.options.autoPanPadding,a=Ft(t._icon),o=n.getPixelBounds(),s=n.getPixelOrigin(),c=P(o.min._subtract(s).add(i),o.max._subtract(s).subtract(i));if(!c.contains(a)){var l=M((Math.max(c.max.x,a.x)-c.max.x)/(o.max.x-c.max.x)-(Math.min(c.min.x,a.x)-c.min.x)/(o.min.x-c.min.x),(Math.max(c.max.y,a.y)-c.max.y)/(o.max.y-c.max.y)-(Math.min(c.min.y,a.y)-c.min.y)/(o.min.y-c.min.y)).multiplyBy(r);n.panBy(l,{animate:!1}),this._draggable._newPos._add(l),this._draggable._startPos._add(l),Pt(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=T(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire(`movestart`).fire(`dragstart`)},_onPreDrag:function(e){this._marker.options.autoPan&&(E(this._panRequest),this._panRequest=T(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,r=Ft(t._icon),i=t._map.layerPointToLatLng(r);n&&Pt(n,r),t._latlng=i,e.latlng=i,e.oldLatLng=this._oldLatLng,t.fire(`move`,e).fire(`drag`,e)},_onDragEnd:function(e){E(this._panRequest),delete this._oldLatLng,this._marker.fire(`moveend`).fire(`dragend`,e)}}),cr=$n.extend({options:{icon:new or,interactive:!0,keyboard:!0,title:``,alt:`Marker`,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:`markerPane`,shadowPane:`shadowPane`,bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){p(this,t),this._latlng=I(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on(`zoomanim`,this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off(`zoomanim`,this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var t=this._latlng;return this._latlng=I(e),this.update(),this.fire(`move`,{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,t=`leaflet-zoom-`+(this._zoomAnimated?`animated`:`hide`),n=e.icon.createIcon(this._icon),r=!1;n!==this._icon&&(this._icon&&this._removeIcon(),r=!0,e.title&&(n.title=e.title),n.tagName===`IMG`&&(n.alt=e.alt||``)),V(n,t),e.keyboard&&(n.tabIndex=`0`,n.setAttribute(`role`,`button`)),this._icon=n,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&H(n,`focus`,this._panOnFocus,this);var i=e.icon.createShadow(this._shadow),a=!1;i!==this._shadow&&(this._removeShadow(),a=!0),i&&(V(i,t),i.alt=``),this._shadow=i,e.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),i&&a&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&U(this._icon,`focus`,this._panOnFocus,this),St(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&St(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&Pt(this._icon,e),this._shadow&&Pt(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(V(this._icon,`leaflet-interactive`),this.addInteractiveTarget(this._icon),sr)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new sr(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&At(this._icon,e),this._shadow&&At(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var t=this.options.icon.options,n=t.iconSize?M(t.iconSize):M(0,0),r=t.iconAnchor?M(t.iconAnchor):M(0,0);e.panInside(this._latlng,{paddingTopLeft:r,paddingBottomRight:n.subtract(r)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function lr(e,t){return new cr(e,t)}var ur=$n.extend({options:{stroke:!0,color:`#3388ff`,weight:3,opacity:1,lineCap:`round`,lineJoin:`round`,dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:`evenodd`,interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return p(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,`weight`)&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),dr=ur.extend({options:{fill:!0,radius:10},initialize:function(e,t){p(this,t),this._latlng=I(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=I(e),this.redraw(),this.fire(`move`,{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return ur.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,n=this._clickTolerance(),r=[e+n,t+n];this._pxBounds=new N(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function fr(e,t){return new dr(e,t)}var pr=dr.extend({initialize:function(e,t,r){if(typeof t==`number`&&(t=n({},r,{radius:t})),p(this,t),this._latlng=I(e),isNaN(this.options.radius))throw Error(`Circle radius cannot be NaN`);this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new F(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:ur.prototype.setStyle,_project:function(){var e=this._latlng.lng,t=this._latlng.lat,n=this._map,r=n.options.crs;if(r.distance===ae.distance){var i=Math.PI/180,a=this._mRadius/ae.R/i,o=n.project([t+a,e]),s=n.project([t-a,e]),c=o.add(s).divideBy(2),l=n.unproject(c).lat,u=Math.acos((Math.cos(a*i)-Math.sin(t*i)*Math.sin(l*i))/(Math.cos(t*i)*Math.cos(l*i)))/i;(isNaN(u)||u===0)&&(u=a/Math.cos(Math.PI/180*t)),this._point=c.subtract(n.getPixelOrigin()),this._radius=isNaN(u)?0:c.x-n.project([l,e-u]).x,this._radiusY=c.y-o.y}else{var d=r.unproject(r.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(d).x}this._updateBounds()}});function mr(e,t,n){return new pr(e,t,n)}var hr=ur.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){p(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t=1/0,n=null,r=Hn,i,a,o=0,s=this._parts.length;o<s;o++)for(var c=this._parts[o],l=1,u=c.length;l<u;l++){i=c[l-1],a=c[l];var d=r(e,i,a,!0);d<t&&(t=d,n=r(e,i,a))}return n&&(n.distance=Math.sqrt(t)),n},getCenter:function(){if(!this._map)throw Error(`Must add layer to map before using getCenter()`);return Gn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t||=this._defaultShape(),e=I(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new F,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return Un(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=Un(e),r=0,i=e.length;r<i;r++)n?(t[r]=I(e[r]),this._bounds.extend(t[r])):t[r]=this._convertLatLngs(e[r]);return t},_project:function(){var e=new N;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),t=new j(e,e);this._rawPxBounds&&(this._pxBounds=new N([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(e,t,n){var r=e[0]instanceof re,i=e.length,a,o;if(r){for(o=[],a=0;a<i;a++)o[a]=this._map.latLngToLayerPoint(e[a]),n.extend(o[a]);t.push(o)}else for(a=0;a<i;a++)this._projectLatlngs(e[a],t,n)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}var t=this._parts,n,r,i,a,o,s,c;for(n=0,i=0,a=this._rings.length;n<a;n++)for(c=this._rings[n],r=0,o=c.length;r<o-1;r++)s=Rn(c[r],c[r+1],e,r,!0),s&&(t[i]=t[i]||[],t[i].push(s[0]),(s[1]!==c[r+1]||r===o-2)&&(t[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,r=e.length;n<r;n++)e[n]=jn(e[n],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,r,i,a,o,s,c=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(n=0,a=this._parts.length;n<a;n++)for(s=this._parts[n],r=0,o=s.length,i=o-1;r<o;i=r++)if(!(!t&&r===0)&&Mn(e,s[i],s[r])<=c)return!0;return!1}});function gr(e,t){return new hr(e,t)}hr._flat=Wn;var _r=hr.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw Error(`Must add layer to map before using getCenter()`);return On(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var t=hr.prototype._convertLatLngs.call(this,e),n=t.length;return n>=2&&t[0]instanceof re&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){hr.prototype._setLatLngs.call(this,e),Un(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Un(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new j(t,t);if(e=new N(e.min.subtract(n),e.max.add(n)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}for(var r=0,i=this._rings.length,a;r<i;r++)a=Dn(this._rings[r],e,!0),a.length&&this._parts.push(a)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t=!1,n,r,i,a,o,s,c,l;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(a=0,c=this._parts.length;a<c;a++)for(n=this._parts[a],o=0,l=n.length,s=l-1;o<l;s=o++)r=n[o],i=n[s],r.y>e.y!=i.y>e.y&&e.x<(i.x-r.x)*(e.y-r.y)/(i.y-r.y)+r.x&&(t=!t);return t||hr.prototype._containsPoint.call(this,e,!0)}});function vr(e,t){return new _r(e,t)}var yr=nr.extend({initialize:function(e,t){p(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t=_(e)?e:e.features,n,r,i;if(t){for(n=0,r=t.length;n<r;n++)i=t[n],(i.geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var a=this.options;if(a.filter&&!a.filter(e))return this;var o=br(e,a);return o?(o.feature=Dr(e),o.defaultOptions=o.options,this.resetStyle(o),a.onEachFeature&&a.onEachFeature(e,o),this.addLayer(o)):this},resetStyle:function(e){return e===void 0?this.eachLayer(this.resetStyle,this):(e.options=n({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){e.setStyle&&(typeof t==`function`&&(t=t(e.feature)),e.setStyle(t))}});function br(e,t){var n=e.type===`Feature`?e.geometry:e,r=n?n.coordinates:null,i=[],a=t&&t.pointToLayer,o=t&&t.coordsToLatLng||Sr,s,c,l,u;if(!r&&!n)return null;switch(n.type){case`Point`:return s=o(r),xr(a,e,s,t);case`MultiPoint`:for(l=0,u=r.length;l<u;l++)s=o(r[l]),i.push(xr(a,e,s,t));return new nr(i);case`LineString`:case`MultiLineString`:return c=Cr(r,n.type===`LineString`?0:1,o),new hr(c,t);case`Polygon`:case`MultiPolygon`:return c=Cr(r,n.type===`Polygon`?1:2,o),new _r(c,t);case`GeometryCollection`:for(l=0,u=n.geometries.length;l<u;l++){var d=br({geometry:n.geometries[l],type:`Feature`,properties:e.properties},t);d&&i.push(d)}return new nr(i);case`FeatureCollection`:for(l=0,u=n.features.length;l<u;l++){var f=br(n.features[l],t);f&&i.push(f)}return new nr(i);default:throw Error(`Invalid GeoJSON object.`)}}function xr(e,t,n,r){return e?e(t,n):new cr(n,r&&r.markersInheritOptions&&r)}function Sr(e){return new re(e[1],e[0],e[2])}function Cr(e,t,n){for(var r=[],i=0,a=e.length,o;i<a;i++)o=t?Cr(e[i],t-1,n):(n||Sr)(e[i]),r.push(o);return r}function wr(e,t){return e=I(e),e.alt===void 0?[u(e.lng,t),u(e.lat,t)]:[u(e.lng,t),u(e.lat,t),u(e.alt,t)]}function Tr(e,t,n,r){for(var i=[],a=0,o=e.length;a<o;a++)i.push(t?Tr(e[a],Un(e[a])?0:t-1,n,r):wr(e[a],r));return!t&&n&&i.length>0&&i.push(i[0].slice()),i}function Er(e,t){return e.feature?n({},e.feature,{geometry:t}):Dr(t)}function Dr(e){return e.type===`Feature`||e.type===`FeatureCollection`?e:{type:`Feature`,properties:{},geometry:e}}var Or={toGeoJSON:function(e){return Er(this,{type:`Point`,coordinates:wr(this.getLatLng(),e)})}};cr.include(Or),pr.include(Or),dr.include(Or),hr.include({toGeoJSON:function(e){var t=!Un(this._latlngs),n=Tr(this._latlngs,t?1:0,!1,e);return Er(this,{type:(t?`Multi`:``)+`LineString`,coordinates:n})}}),_r.include({toGeoJSON:function(e){var t=!Un(this._latlngs),n=t&&!Un(this._latlngs[0]),r=Tr(this._latlngs,n?2:t?1:0,!0,e);return t||(r=[r]),Er(this,{type:(n?`Multi`:``)+`Polygon`,coordinates:r})}}),er.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(n){t.push(n.toGeoJSON(e).geometry.coordinates)}),Er(this,{type:`MultiPoint`,coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(t===`MultiPoint`)return this.toMultiPoint(e);var n=t===`GeometryCollection`,r=[];return this.eachLayer(function(t){if(t.toGeoJSON){var i=t.toGeoJSON(e);if(n)r.push(i.geometry);else{var a=Dr(i);a.type===`FeatureCollection`?r.push.apply(r,a.features):r.push(a)}}}),n?Er(this,{geometries:r,type:`GeometryCollection`}):{type:`FeatureCollection`,features:r}}});function kr(e,t){return new yr(e,t)}var Ar=kr,jr=$n.extend({options:{opacity:1,alt:``,interactive:!1,crossOrigin:!1,errorOverlayUrl:``,zIndex:1,className:``},initialize:function(e,t,n){this._url=e,this._bounds=ne(t),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(V(this._image,`leaflet-interactive`),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){St(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&wt(this._image),this},bringToBack:function(){return this._map&&Tt(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=ne(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e=this._url.tagName===`IMG`,t=this._image=e?this._url:B(`img`);if(V(t,`leaflet-image-layer`),this._zoomAnimated&&V(t,`leaflet-zoom-animated`),this.options.className&&V(t,this.options.className),t.onselectstart=l,t.onmousemove=l,t.onload=i(this.fire,this,`load`),t.onerror=i(this._overlayOnError,this,`error`),(this.options.crossOrigin||this.options.crossOrigin===``)&&(t.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e){this._url=t.src;return}t.src=this._url,t.alt=this.options.alt},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;Nt(this._image,n,t)},_reset:function(){var e=this._image,t=new N(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();Pt(e,t.min),e.style.width=n.x+`px`,e.style.height=n.y+`px`},_updateOpacity:function(){At(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 e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Mr=function(e,t,n){return new jr(e,t,n)},Nr=jr.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e=this._url.tagName===`VIDEO`,t=this._image=e?this._url:B(`video`);if(V(t,`leaflet-image-layer`),this._zoomAnimated&&V(t,`leaflet-zoom-animated`),this.options.className&&V(t,this.options.className),t.onselectstart=l,t.onmousemove=l,t.onloadeddata=i(this.fire,this,`load`),e){for(var n=t.getElementsByTagName(`source`),r=[],a=0;a<n.length;a++)r.push(n[a].src);this._url=n.length>0?r:[t.src];return}_(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,`objectFit`)&&(t.style.objectFit=`fill`),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var o=0;o<this._url.length;o++){var s=B(`source`);s.src=this._url[o],t.appendChild(s)}}});function Pr(e,t,n){return new Nr(e,t,n)}var Fr=jr.extend({_initImage:function(){var e=this._image=this._url;V(e,`leaflet-image-layer`),this._zoomAnimated&&V(e,`leaflet-zoom-animated`),this.options.className&&V(e,this.options.className),e.onselectstart=l,e.onmousemove=l}});function Ir(e,t,n){return new Fr(e,t,n)}var Lr=$n.extend({options:{interactive:!1,offset:[0,0],className:``,pane:void 0,content:``},initialize:function(e,t){e&&(e instanceof re||_(e))?(this._latlng=I(e),p(this,t)):(p(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return e=arguments.length?e:this._source._map,e.hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&At(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&At(this._container,1),this.bringToFront(),this.options.interactive&&(V(this._container,`leaflet-interactive`),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(At(this._container,0),this._removeTimeout=setTimeout(i(St,void 0,this._container),200)):St(this._container),this.options.interactive&&(Dt(this._container,`leaflet-interactive`),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=I(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility=`hidden`,this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility=``,this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&wt(this._container),this},bringToBack:function(){return this._map&&Tt(this._container),this},_prepareOpen:function(e){var t=this._source;if(!t._map)return!1;if(t instanceof nr){t=null;var n=this._source._layers;for(var r in n)if(n[r]._map){t=n[r];break}if(!t)return!1;this._source=t}if(!e)if(t.getCenter)e=t.getCenter();else if(t.getLatLng)e=t.getLatLng();else if(t.getBounds)e=t.getBounds().getCenter();else throw Error(`Unable to get source layer LatLng.`);return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t=typeof this._content==`function`?this._content(this._source||this):this._content;if(typeof t==`string`)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire(`contentupdate`)}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=M(this.options.offset),n=this._getAnchor();this._zoomAnimated?Pt(this._container,e.add(n)):t=t.add(e).add(n);var r=this._containerBottom=-t.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=r+`px`,this._container.style.left=i+`px`}},_getAnchor:function(){return[0,0]}});W.include({_initOverlay:function(e,t,n,r){var i=t;return i instanceof e||(i=new e(r).setContent(t)),n&&i.setLatLng(n),i}}),$n.include({_initOverlay:function(e,t,n,r){var i=n;return i instanceof e?(p(i,r),i._source=this):(i=t&&!r?t:new e(r,this),i.setContent(n)),i}});var Rr=Lr.extend({options:{pane:`popupPane`,offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:``},openOn:function(e){return e=arguments.length?e:this._source._map,!e.hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,Lr.prototype.openOn.call(this,e)},onAdd:function(e){Lr.prototype.onAdd.call(this,e),e.fire(`popupopen`,{popup:this}),this._source&&(this._source.fire(`popupopen`,{popup:this},!0),this._source instanceof ur||this._source.on(`preclick`,en))},onRemove:function(e){Lr.prototype.onRemove.call(this,e),e.fire(`popupclose`,{popup:this}),this._source&&(this._source.fire(`popupclose`,{popup:this},!0),this._source instanceof ur||this._source.off(`preclick`,en))},getEvents:function(){var e=Lr.prototype.getEvents.call(this);return(this.options.closeOnClick===void 0?this._map.options.closePopupOnClick:this.options.closeOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e=`leaflet-popup`,t=this._container=B(`div`,e+` `+(this.options.className||``)+` leaflet-zoom-animated`),n=this._wrapper=B(`div`,e+`-content-wrapper`,t);if(this._contentNode=B(`div`,e+`-content`,n),nn(t),tn(this._contentNode),H(t,`contextmenu`,en),this._tipContainer=B(`div`,e+`-tip-container`,t),this._tip=B(`div`,e+`-tip`,this._tipContainer),this.options.closeButton){var r=this._closeButton=B(`a`,e+`-close-button`,t);r.setAttribute(`role`,`button`),r.setAttribute(`aria-label`,`Close popup`),r.href=`#close`,r.innerHTML=`<span aria-hidden="true">&#215;</span>`,H(r,`click`,function(e){rn(e),this.close()},this)}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width=``,t.whiteSpace=`nowrap`;var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),t.width=n+1+`px`,t.whiteSpace=``,t.height=``;var r=e.offsetHeight,i=this.options.maxHeight,a=`leaflet-popup-scrolled`;i&&r>i?(t.height=i+`px`,V(e,a)):Dt(e,a),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();Pt(this._container,t.add(n))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var e=this._map,t=parseInt(xt(this._container,`marginBottom`),10)||0,n=this._container.offsetHeight+t,r=this._containerWidth,i=new j(this._containerLeft,-n-this._containerBottom);i._add(Ft(this._container));var a=e.layerPointToContainerPoint(i),o=M(this.options.autoPanPadding),s=M(this.options.autoPanPaddingTopLeft||o),c=M(this.options.autoPanPaddingBottomRight||o),l=e.getSize(),u=0,d=0;a.x+r+c.x>l.x&&(u=a.x+r-l.x+c.x),a.x-u-s.x<0&&(u=a.x-s.x),a.y+n+c.y>l.y&&(d=a.y+n-l.y+c.y),a.y-d-s.y<0&&(d=a.y-s.y),(u||d)&&(this.options.keepInView&&(this._autopanning=!0),e.fire(`autopanstart`).panBy([u,d]))}},_getAnchor:function(){return M(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),zr=function(e,t){return new Rr(e,t)};W.mergeOptions({closePopupOnClick:!0}),W.include({openPopup:function(e,t,n){return this._initOverlay(Rr,e,t,n).openOn(this),this},closePopup:function(e){return e=arguments.length?e:this._popup,e&&e.close(),this}}),$n.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Rr,this._popup,e,t),this._popupHandlersAdded||=(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),!0),this},unbindPopup:function(){return this._popup&&=(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,null),this},openPopup:function(e){return this._popup&&(this instanceof nr||(this._popup._source=this),this._popup._prepareOpen(e||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(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(!(!this._popup||!this._map)){an(e);var t=e.layer||e.target;if(this._popup._source===t&&!(t instanceof ur)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng);return}this._popup._source=t,this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){e.originalEvent.keyCode===13&&this._openPopup(e)}});var Br=Lr.extend({options:{pane:`tooltipPane`,offset:[0,0],direction:`auto`,permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Lr.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire(`tooltipopen`,{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire(`tooltipopen`,{tooltip:this},!0))},onRemove:function(e){Lr.prototype.onRemove.call(this,e),e.fire(`tooltipclose`,{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire(`tooltipclose`,{tooltip:this},!0))},getEvents:function(){var e=Lr.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){this._contentNode=this._container=B(`div`,`leaflet-tooltip `+(this.options.className||``)+` leaflet-zoom-`+(this._zoomAnimated?`animated`:`hide`)),this._container.setAttribute(`role`,`tooltip`),this._container.setAttribute(`id`,`leaflet-tooltip-`+o(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n,r=this._map,i=this._container,a=r.latLngToContainerPoint(r.getCenter()),o=r.layerPointToContainerPoint(e),s=this.options.direction,c=i.offsetWidth,l=i.offsetHeight,u=M(this.options.offset),d=this._getAnchor();s===`top`?(t=c/2,n=l):s===`bottom`?(t=c/2,n=0):s===`center`?(t=c/2,n=l/2):s===`right`?(t=0,n=l/2):s===`left`?(t=c,n=l/2):o.x<a.x?(s=`right`,t=0,n=l/2):(s=`left`,t=c+(u.x+d.x)*2,n=l/2),e=e.subtract(M(t,n,!0)).add(u).add(d),Dt(i,`leaflet-tooltip-right`),Dt(i,`leaflet-tooltip-left`),Dt(i,`leaflet-tooltip-top`),Dt(i,`leaflet-tooltip-bottom`),V(i,`leaflet-tooltip-`+s),Pt(i,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&At(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return M(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Vr=function(e,t){return new Br(e,t)};W.include({openTooltip:function(e,t,n){return this._initOverlay(Br,e,t,n).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),$n.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Br,this._tooltip,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&=(this._initTooltipInteractions(!0),this.closeTooltip(),null),this},_initTooltipInteractions:function(e){if(!(!e&&this._tooltipHandlersAdded)){var t=e?`off`:`on`,n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[t](n),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof nr||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t=typeof e.getElement==`function`&&e.getElement();t&&(H(t,`focus`,function(){this._tooltip._source=e,this.openTooltip()},this),H(t,`blur`,this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var t=typeof e.getElement==`function`&&e.getElement();t&&t.setAttribute(`aria-describedby`,this._tooltip._container.id)},_openTooltip:function(e){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var t=this;this._map.once(`moveend`,function(){t._openOnceFlag=!1,t._openTooltip(e)});return}this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)}},_moveTooltip:function(e){var t=e.latlng,n,r;this._tooltip.options.sticky&&e.originalEvent&&(n=this._map.mouseEventToContainerPoint(e.originalEvent),r=this._map.containerPointToLayerPoint(n),t=this._map.layerPointToLatLng(r)),this._tooltip.setLatLng(t)}});var Hr=ir.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:`leaflet-div-icon`},createIcon:function(e){var t=e&&e.tagName===`DIV`?e:document.createElement(`div`),n=this.options;if(n.html instanceof Element?(Ct(t),t.appendChild(n.html)):t.innerHTML=n.html===!1?``:n.html,n.bgPos){var r=M(n.bgPos);t.style.backgroundPosition=-r.x+`px `+-r.y+`px`}return this._setIconStyles(t,`icon`),t},createShadow:function(){return null}});function Ur(e){return new Hr(e)}ir.Default=or;var Wr=$n.extend({options:{tileSize:256,opacity:1,updateWhenIdle:R.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:`tilePane`,className:``,keepBuffer:2},initialize:function(e){p(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),St(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(wt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Tt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||=s(this._onMoveEnd,this.options.updateInterval,this),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement(`div`)},getTileSize:function(){var e=this.options.tileSize;return e instanceof j?e:new j(e,e)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t=this.getPane().children,n=-e(-1/0,1/0),r=0,i=t.length,a;r<i;r++)a=t[r].style.zIndex,t[r]!==this._container&&a&&(n=e(n,+a));isFinite(n)&&(this.options.zIndex=n+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!R.ielt9){At(this._container,this.options.opacity);var e=+new Date,t=!1,n=!1;for(var r in this._tiles){var i=this._tiles[r];if(!(!i.current||!i.loaded)){var a=Math.min(1,(e-i.loaded)/200);At(i.el,a),a<1?t=!0:(i.active?n=!0:this._onOpaqueTile(i),i.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),t&&(E(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this))}},_onOpaqueTile:l,_initContainer:function(){this._container||(this._container=B(`div`,`leaflet-layer `+(this.options.className||``)),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(e!==void 0){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(St(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[e],i=this._map;return r||(r=this._levels[e]={},r.el=B(`div`,`leaflet-tile-container leaflet-zoom-animated`,this._container),r.el.style.zIndex=t,r.origin=i.project(i.unproject(i.getPixelOrigin()),e).round(),r.zoom=e,this._setZoomTransform(r,i.getCenter(),i.getZoom()),r.el.offsetWidth,this._onCreateLevel(r)),this._level=r,r}},_onUpdateLevel:l,_onRemoveLevel:l,_onCreateLevel:l,_pruneTiles:function(){if(this._map){var e,t,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom){this._removeAllTiles();return}for(e in this._tiles)t=this._tiles[e],t.retain=t.current;for(e in this._tiles)if(t=this._tiles[e],t.current&&!t.active){var r=t.coords;this._retainParent(r.x,r.y,r.z,r.z-5)||this._retainChildren(r.x,r.y,r.z,r.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)St(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,r){var i=Math.floor(e/2),a=Math.floor(t/2),o=n-1,s=new j(+i,+a);s.z=+o;var c=this._tileCoordsToKey(s),l=this._tiles[c];return l&&l.active?(l.retain=!0,!0):(l&&l.loaded&&(l.retain=!0),o>r?this._retainParent(i,a,o,r):!1)},_retainChildren:function(e,t,n,r){for(var i=2*e;i<2*e+2;i++)for(var a=2*t;a<2*t+2;a++){var o=new j(i,a);o.z=n+1;var s=this._tileCoordsToKey(o),c=this._tiles[s];if(c&&c.active){c.retain=!0;continue}else c&&c.loaded&&(c.retain=!0);n+1<r&&this._retainChildren(i,a,n+1,r)}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return t.minNativeZoom!==void 0&&e<t.minNativeZoom?t.minNativeZoom:t.maxNativeZoom!==void 0&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,r){var i=Math.round(t);i=this.options.maxZoom!==void 0&&i>this.options.maxZoom||this.options.minZoom!==void 0&&i<this.options.minZoom?void 0:this._clampZoom(i);var a=this.options.updateWhenZooming&&i!==this._tileZoom;(!r||a)&&(this._tileZoom=i,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),i!==void 0&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,t,n){var r=this._map.getZoomScale(n,e.zoom),i=e.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(t,n)).round();R.any3d?Nt(e.el,i,r):Pt(e.el,i)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),r=this._tileZoom,i=this._map.getPixelWorldBounds(this._tileZoom);i&&(this._globalTileRange=this._pxBoundsToTileRange(i)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],r).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],r).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],r).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],r).y/n.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(e){var t=this._map,n=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),r=t.getZoomScale(n,this._tileZoom),i=t.project(e,this._tileZoom).floor(),a=t.getSize().divideBy(r*2);return new N(i.subtract(a),i.add(a))},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(e===void 0&&(e=t.getCenter()),this._tileZoom!==void 0){var r=this._getTiledPixelBounds(e),i=this._pxBoundsToTileRange(r),a=i.getCenter(),o=[],s=this.options.keepBuffer,c=new N(i.getBottomLeft().subtract([s,-s]),i.getTopRight().add([s,-s]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw Error(`Attempted to load an infinite number of tiles`);for(var l in this._tiles){var u=this._tiles[l].coords;(u.z!==this._tileZoom||!c.contains(new j(u.x,u.y)))&&(this._tiles[l].current=!1)}if(Math.abs(n-this._tileZoom)>1){this._setView(e,n);return}for(var d=i.min.y;d<=i.max.y;d++)for(var f=i.min.x;f<=i.max.x;f++){var p=new j(f,d);if(p.z=this._tileZoom,this._isValidTile(p)){var m=this._tiles[this._tileCoordsToKey(p)];m?m.current=!0:o.push(p)}}if(o.sort(function(e,t){return e.distanceTo(a)-t.distanceTo(a)}),o.length!==0){this._loading||(this._loading=!0,this.fire(`loading`));var h=document.createDocumentFragment();for(f=0;f<o.length;f++)this._addTile(o[f],h);this._level.el.appendChild(h)}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(e);return ne(this.options.bounds).overlaps(r)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),r=e.scaleBy(n),i=r.add(n);return[t.unproject(r,e.z),t.unproject(i,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new F(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(e){return e.x+`:`+e.y+`:`+e.z},_keyToTileCoords:function(e){var t=e.split(`:`),n=new j(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(St(t.el),delete this._tiles[e],this.fire(`tileunload`,{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){V(e,`leaflet-tile`);var t=this.getTileSize();e.style.width=t.x+`px`,e.style.height=t.y+`px`,e.onselectstart=l,e.onmousemove=l,R.ielt9&&this.options.opacity<1&&At(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),r=this._tileCoordsToKey(e),a=this.createTile(this._wrapCoords(e),i(this._tileReady,this,e));this._initTile(a),this.createTile.length<2&&T(i(this._tileReady,this,e,null,a)),Pt(a,n),this._tiles[r]={el:a,coords:e,current:!0},t.appendChild(a),this.fire(`tileloadstart`,{tile:a,coords:e})},_tileReady:function(e,t,n){t&&this.fire(`tileerror`,{error:t,tile:n,coords:e});var r=this._tileCoordsToKey(e);n=this._tiles[r],n&&(n.loaded=+new Date,this._map._fadeAnimated?(At(n.el,0),E(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(V(n.el,`leaflet-tile-loaded`),this.fire(`tileload`,{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire(`load`),R.ielt9||!this._map._fadeAnimated?T(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new j(this._wrapX?c(e.x,this._wrapX):e.x,this._wrapY?c(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new N(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Gr(e){return new Wr(e)}var Kr=Wr.extend({options:{minZoom:0,maxZoom:18,subdomains:`abc`,errorTileUrl:``,zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,t=p(this,t),t.detectRetina&&R.retina&&t.maxZoom>0?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),typeof t.subdomains==`string`&&(t.subdomains=t.subdomains.split(``)),this.on(`tileunload`,this._onTileRemove)},setUrl:function(e,t){return this._url===e&&t===void 0&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement(`img`);return H(n,`load`,i(this._tileOnLoad,this,t,n)),H(n,`error`,i(this._tileOnError,this,t,n)),(this.options.crossOrigin||this.options.crossOrigin===``)&&(n.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),typeof this.options.referrerPolicy==`string`&&(n.referrerPolicy=this.options.referrerPolicy),n.alt=``,n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:R.retina?`@2x`:``,s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var r=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=r),t[`-y`]=r}return g(this._url,n(t,this.options))},_tileOnLoad:function(e,t){R.ielt9?setTimeout(i(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var r=this.options.errorTileUrl;r&&t.getAttribute(`src`)!==r&&(t.src=r),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom,n=this.options.zoomReverse,r=this.options.zoomOffset;return n&&(e=t-e),e+r},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&(t=this._tiles[e].el,t.onload=l,t.onerror=l,!t.complete)){t.src=y;var n=this._tiles[e].coords;St(t),delete this._tiles[e],this.fire(`tileabort`,{tile:t,coords:n})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute(`src`,y),Wr.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(!(!this._map||n&&n.getAttribute(`src`)===y))return Wr.prototype._tileReady.call(this,e,t,n)}});function qr(e,t){return new Kr(e,t)}var Jr=Kr.extend({defaultWmsParams:{service:`WMS`,request:`GetMap`,layers:``,styles:``,format:`image/jpeg`,transparent:!1,version:`1.1.1`},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var r=n({},this.defaultWmsParams);for(var i in t)i in this.options||(r[i]=t[i]);t=p(this,t);var a=t.detectRetina&&R.retina?2:1,o=this.getTileSize();r.width=o.x*a,r.height=o.y*a,this.wmsParams=r},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?`crs`:`srs`;this.wmsParams[t]=this._crs.code,Kr.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,r=P(n.project(t[0]),n.project(t[1])),i=r.min,a=r.max,o=(this._wmsVersion>=1.3&&this._crs===Zn?[i.y,i.x,a.y,a.x]:[i.x,i.y,a.x,a.y]).join(`,`),s=Kr.prototype.getTileUrl.call(this,e);return s+m(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?`&BBOX=`:`&bbox=`)+o},setParams:function(e,t){return n(this.wmsParams,e),t||this.redraw(),this}});function Yr(e,t){return new Jr(e,t)}Kr.WMS=Jr,qr.wms=Yr;var Xr=$n.extend({options:{padding:.1},initialize:function(e){p(this,e),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),V(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 e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),i=this._map.project(this._center,t),a=r.multiplyBy(-n).add(i).subtract(this._map._getNewPixelOrigin(e,t));R.any3d?Nt(this._container,a,n):Pt(this._container,a)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new N(n,n.add(t.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Zr=Xr.extend({options:{tolerance:0},getEvents:function(){var e=Xr.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Xr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement(`canvas`);H(e,`mousemove`,this._onMouseMove,this),H(e,`click dblclick mousedown mouseup contextmenu`,this._onClick,this),H(e,`mouseout`,this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext(`2d`)},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,St(this._container),U(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var e;for(var t in this._redrawBounds=null,this._layers)e=this._layers[t],e._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Xr.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),r=R.retina?2:1;Pt(t,e.min),t.width=r*n.x,t.height=r*n.y,t.style.width=n.x+`px`,t.style.height=n.y+`px`,R.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire(`update`)}},_reset:function(){Xr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[o(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,n=t.next,r=t.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete e._order,delete this._layers[o(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if(typeof e.options.dashArray==`string`){var t=e.options.dashArray.split(/[, ]+/),n=[],r,i;for(i=0;i<t.length;i++){if(r=Number(t[i]),isNaN(r))return;n.push(r)}e.options._dashArray=n}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||T(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new N,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e=this._redrawBounds;if(e){var t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var e,t=this._redrawBounds;if(this._ctx.save(),t){var n=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)e=r.layer,(!t||e._pxBounds&&e._pxBounds.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,r,i,a,o=e._parts,s=o.length,c=this._ctx;if(s){for(c.beginPath(),n=0;n<s;n++){for(r=0,i=o[n].length;r<i;r++)a=o[n][r],c[r?`lineTo`:`moveTo`](a.x,a.y);t&&c.closePath()}this._fillStroke(c,e)}}},_updateCircle:function(e){if(!(!this._drawing||e._empty())){var t=e._point,n=this._ctx,r=Math.max(Math.round(e._radius),1),i=(Math.max(Math.round(e._radiusY),1)||r)/r;i!==1&&(n.save(),n.scale(1,i)),n.beginPath(),n.arc(t.x,t.y/i,r,0,Math.PI*2,!1),i!==1&&n.restore(),this._fillStroke(n,e)}},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||`evenodd`)),n.stroke&&n.weight!==0&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t=this._map.mouseEventToLayerPoint(e),n,r,i=this._drawFirst;i;i=i.next)n=i.layer,n.options.interactive&&n._containsPoint(t)&&(!(e.type===`click`||e.type===`preclick`)||!this._map._draggableMoved(n))&&(r=n);this._fireEvent(r?[r]:!1,e)},_onMouseMove:function(e){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var t=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,t)}},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(Dt(this._container,`leaflet-interactive`),this._fireEvent([t],e,`mouseout`),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var n,r,a=this._drawFirst;a;a=a.next)n=a.layer,n.options.interactive&&n._containsPoint(t)&&(r=n);r!==this._hoveredLayer&&(this._handleMouseOut(e),r&&(V(this._container,`leaflet-interactive`),this._fireEvent([r],e,`mouseover`),this._hoveredLayer=r)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,e),this._mouseHoverThrottled=!0,setTimeout(i(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){var t=e._order;if(t){var n=t.next,r=t.prev;if(n)n.prev=r;else return;r?r.next=n:n&&(this._drawFirst=n),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e)}},_bringToBack:function(e){var t=e._order;if(t){var n=t.next,r=t.prev;if(r)r.next=n;else return;n?n.prev=r:r&&(this._drawLast=r),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e)}}});function Qr(e){return R.canvas?new Zr(e):null}var $r=(function(){try{return document.namespaces.add(`lvml`,`urn:schemas-microsoft-com:vml`),function(e){return document.createElement(`<lvml:`+e+` class="lvml">`)}}catch{}return function(e){return document.createElement(`<`+e+` xmlns="urn:schemas-microsoft.com:vml" class="lvml">`)}})(),ei={_initContainer:function(){this._container=B(`div`,`leaflet-vml-container`)},_update:function(){this._map._animatingZoom||(Xr.prototype._update.call(this),this.fire(`update`))},_initPath:function(e){var t=e._container=$r(`shape`);V(t,`leaflet-vml-shape `+(this.options.className||``)),t.coordsize=`1 1`,e._path=$r(`path`),t.appendChild(e._path),this._updateStyle(e),this._layers[o(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;St(t),e.removeInteractiveTarget(t),delete this._layers[o(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,r=e.options,i=e._container;i.stroked=!!r.stroke,i.filled=!!r.fill,r.stroke?(t||=e._stroke=$r(`stroke`),i.appendChild(t),t.weight=r.weight+`px`,t.color=r.color,t.opacity=r.opacity,r.dashArray?t.dashStyle=_(r.dashArray)?r.dashArray.join(` `):r.dashArray.replace(/( *, *)/g,` `):t.dashStyle=``,t.endcap=r.lineCap.replace(`butt`,`flat`),t.joinstyle=r.lineJoin):t&&(i.removeChild(t),e._stroke=null),r.fill?(n||=e._fill=$r(`fill`),i.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(i.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),r=Math.round(e._radiusY||n);this._setPath(e,e._empty()?`M0 0`:`AL `+t.x+`,`+t.y+` `+n+`,`+r+` 0,23592600`)},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){wt(e._container)},_bringToBack:function(e){Tt(e._container)}},ti=R.vml?$r:fe,ni=Xr.extend({_initContainer:function(){this._container=ti(`svg`),this._container.setAttribute(`pointer-events`,`none`),this._rootGroup=ti(`g`),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){St(this._container),U(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Xr.prototype._update.call(this);var e=this._bounds,t=e.getSize(),n=this._container;(!this._svgSize||!this._svgSize.equals(t))&&(this._svgSize=t,n.setAttribute(`width`,t.x),n.setAttribute(`height`,t.y)),Pt(n,e.min),n.setAttribute(`viewBox`,[e.min.x,e.min.y,t.x,t.y].join(` `)),this.fire(`update`)}},_initPath:function(e){var t=e._path=ti(`path`);e.options.className&&V(t,e.options.className),e.options.interactive&&V(t,`leaflet-interactive`),this._updateStyle(e),this._layers[o(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){St(e._path),e.removeInteractiveTarget(e._path),delete this._layers[o(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute(`stroke`,n.color),t.setAttribute(`stroke-opacity`,n.opacity),t.setAttribute(`stroke-width`,n.weight),t.setAttribute(`stroke-linecap`,n.lineCap),t.setAttribute(`stroke-linejoin`,n.lineJoin),n.dashArray?t.setAttribute(`stroke-dasharray`,n.dashArray):t.removeAttribute(`stroke-dasharray`),n.dashOffset?t.setAttribute(`stroke-dashoffset`,n.dashOffset):t.removeAttribute(`stroke-dashoffset`)):t.setAttribute(`stroke`,`none`),n.fill?(t.setAttribute(`fill`,n.fillColor||n.color),t.setAttribute(`fill-opacity`,n.fillOpacity),t.setAttribute(`fill-rule`,n.fillRule||`evenodd`)):t.setAttribute(`fill`,`none`))},_updatePoly:function(e,t){this._setPath(e,pe(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),r=Math.max(Math.round(e._radiusY),1)||n,i=`a`+n+`,`+r+` 0 1,0 `,a=e._empty()?`M0 0`:`M`+(t.x-n)+`,`+t.y+i+n*2+`,0 `+i+-n*2+`,0 `;this._setPath(e,a)},_setPath:function(e,t){e._path.setAttribute(`d`,t)},_bringToFront:function(e){wt(e._path)},_bringToBack:function(e){Tt(e._path)}});R.vml&&ni.include(ei);function ri(e){return R.svg||R.vml?new ni(e):null}W.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||=this._renderer=this._createRenderer(),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if(e===`overlayPane`||e===void 0)return!1;var t=this._paneRenderers[e];return t===void 0&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&Qr(e)||ri(e)}});var ii=_r.extend({initialize:function(e,t){_r.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=ne(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function ai(e,t){return new ii(e,t)}ni.create=ti,ni.pointsToPath=pe,yr.geometryToLayer=br,yr.coordsToLatLng=Sr,yr.coordsToLatLngs=Cr,yr.latLngToCoords=wr,yr.latLngsToCoords=Tr,yr.getFeature=Er,yr.asFeature=Dr,W.mergeOptions({boxZoom:!0});var oi=Cn.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on(`unload`,this._destroy,this)},addHooks:function(){H(this._container,`mousedown`,this._onMouseDown,this)},removeHooks:function(){U(this._container,`mousedown`,this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){St(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(e){if(!e.shiftKey||e.which!==1&&e.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),It(),Bt(),this._startPoint=this._map.mouseEventToContainerPoint(e),H(document,{contextmenu:an,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=B(`div`,`leaflet-zoom-box`,this._container),V(this._container,`leaflet-crosshair`),this._map.fire(`boxzoomstart`)),this._point=this._map.mouseEventToContainerPoint(e);var t=new N(this._point,this._startPoint),n=t.getSize();Pt(this._box,t.min),this._box.style.width=n.x+`px`,this._box.style.height=n.y+`px`},_finish:function(){this._moved&&(St(this._box),Dt(this._container,`leaflet-crosshair`)),Lt(),Vt(),U(document,{contextmenu:an,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if(!(e.which!==1&&e.button!==1)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var t=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire(`boxzoomend`,{boxZoomBounds:t})}},_onKeyDown:function(e){e.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});W.addInitHook(`addHandler`,`boxZoom`,oi),W.mergeOptions({doubleClickZoom:!0});var si=Cn.extend({addHooks:function(){this._map.on(`dblclick`,this._onDoubleClick,this)},removeHooks:function(){this._map.off(`dblclick`,this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),r=t.options.zoomDelta,i=e.originalEvent.shiftKey?n-r:n+r;t.options.doubleClickZoom===`center`?t.setZoom(i):t.setZoomAround(e.containerPoint,i)}});W.addInitHook(`addHandler`,`doubleClickZoom`,si),W.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ci=Cn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new En(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on(`predrag`,this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on(`predrag`,this._onPreDragWrap,this),e.on(`zoomend`,this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}V(this._map._container,`leaflet-grab leaflet-touch-drag`),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Dt(this._map._container,`leaflet-grab`),Dt(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 e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=ne(this._map.options.maxBounds);this._offsetLimit=P(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire(`movestart`).fire(`dragstart`),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire(`move`,e).fire(`drag`,e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2);this._initialWorldOffset=this._map.latLngToLayerPoint([0,0]).subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-t+n)%e+t-n,a=(r+t+n)%e-t-n,o=Math.abs(i+n)<Math.abs(a+n)?i:a;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=o},_onDragEnd:function(e){var t=this._map,n=t.options,r=!n.inertia||e.noInertia||this._times.length<2;if(t.fire(`dragend`,e),r)t.fire(`moveend`);else{this._prunePositions(+new Date);var i=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,o=n.easeLinearity,s=i.multiplyBy(o/a),c=s.distanceTo([0,0]),l=Math.min(n.inertiaMaxSpeed,c),u=s.multiplyBy(l/c),d=l/(n.inertiaDeceleration*o),f=u.multiplyBy(-d/2).round();!f.x&&!f.y?t.fire(`moveend`):(f=t._limitOffset(f,t.options.maxBounds),T(function(){t.panBy(f,{duration:d,easeLinearity:o,noMoveStart:!0,animate:!0})}))}}});W.addInitHook(`addHandler`,`dragging`,ci),W.mergeOptions({keyboard:!0,keyboardPanDelta:80});var li=Cn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex=`0`),H(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),U(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=document.body,t=document.documentElement,n=e.scrollTop||t.scrollTop,r=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(r,n)}},_onFocus:function(){this._focused=!0,this._map.fire(`focus`)},_onBlur:function(){this._focused=!1,this._map.fire(`blur`)},_setPanDelta:function(e){var t=this._panKeys={},n=this.keyCodes,r,i;for(r=0,i=n.left.length;r<i;r++)t[n.left[r]]=[-1*e,0];for(r=0,i=n.right.length;r<i;r++)t[n.right[r]]=[e,0];for(r=0,i=n.down.length;r<i;r++)t[n.down[r]]=[0,e];for(r=0,i=n.up.length;r<i;r++)t[n.up[r]]=[0,-1*e]},_setZoomDelta:function(e){var t=this._zoomKeys={},n=this.keyCodes,r,i;for(r=0,i=n.zoomIn.length;r<i;r++)t[n.zoomIn[r]]=e;for(r=0,i=n.zoomOut.length;r<i;r++)t[n.zoomOut[r]]=-e},_addHooks:function(){H(document,`keydown`,this._onKeyDown,this)},_removeHooks:function(){U(document,`keydown`,this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t=e.keyCode,n=this._map,r;if(t in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(r=this._panKeys[t],e.shiftKey&&(r=M(r).multiplyBy(3)),n.options.maxBounds&&(r=n._limitOffset(M(r),n.options.maxBounds)),n.options.worldCopyJump){var i=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(r)));n.panTo(i)}else n.panBy(r)}else if(t in this._zoomKeys)n.setZoom(n.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[t]);else if(t===27&&n._popup&&n._popup.options.closeOnEscapeKey)n.closePopup();else return;an(e)}}});W.addInitHook(`addHandler`,`keyboard`,li),W.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ui=Cn.extend({addHooks:function(){H(this._map._container,`wheel`,this._onWheelScroll,this),this._delta=0},removeHooks:function(){U(this._map._container,`wheel`,this._onWheelScroll,this)},_onWheelScroll:function(e){var t=ln(e),n=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||=+new Date;var r=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),r),an(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var r=this._delta/(this._map.options.wheelPxPerZoomLevel*4),i=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,a=n?Math.ceil(i/n)*n:i,o=e._limitZoom(t+(this._delta>0?a:-a))-t;this._delta=0,this._startTime=null,o&&(e.options.scrollWheelZoom===`center`?e.setZoom(t+o):e.setZoomAround(this._lastMousePos,t+o))}});W.addInitHook(`addHandler`,`scrollWheelZoom`,ui);var di=600;W.mergeOptions({tapHold:R.touchNative&&R.safari&&R.mobile,tapTolerance:15});var fi=Cn.extend({addHooks:function(){H(this._map._container,`touchstart`,this._onDown,this)},removeHooks:function(){U(this._map._container,`touchstart`,this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),e.touches.length===1){var t=e.touches[0];this._startPos=this._newPos=new j(t.clientX,t.clientY),this._holdTimeout=setTimeout(i(function(){this._cancel(),this._isTapValid()&&(H(document,`touchend`,rn),H(document,`touchend touchcancel`,this._cancelClickPrevent),this._simulateEvent(`contextmenu`,t))},this),di),H(document,`touchend touchcancel contextmenu`,this._cancel,this),H(document,`touchmove`,this._onMove,this)}},_cancelClickPrevent:function e(){U(document,`touchend`,rn),U(document,`touchend touchcancel`,e)},_cancel:function(){clearTimeout(this._holdTimeout),U(document,`touchend touchcancel contextmenu`,this._cancel,this),U(document,`touchmove`,this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new j(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});n._simulated=!0,t.target.dispatchEvent(n)}});W.addInitHook(`addHandler`,`tapHold`,fi),W.mergeOptions({touchZoom:R.touch,bounceAtZoomLimits:!0});var pi=Cn.extend({addHooks:function(){V(this._map._container,`leaflet-touch-zoom`),H(this._map._container,`touchstart`,this._onTouchStart,this)},removeHooks:function(){Dt(this._map._container,`leaflet-touch-zoom`),U(this._map._container,`touchstart`,this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(!(!e.touches||e.touches.length!==2||t._animatingZoom||this._zooming)){var n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),t.options.touchZoom!==`center`&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(r)._divideBy(2))),this._startDist=n.distanceTo(r),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),H(document,`touchmove`,this._onTouchMove,this),H(document,`touchend touchcancel`,this._onTouchEnd,this),rn(e)}},_onTouchMove:function(e){if(!(!e.touches||e.touches.length!==2||!this._zooming)){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]),a=n.distanceTo(r)/this._startDist;if(this._zoom=t.getScaleZoom(a,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&a<1||this._zoom>t.getMaxZoom()&&a>1)&&(this._zoom=t._limitZoom(this._zoom)),t.options.touchZoom===`center`){if(this._center=this._startLatLng,a===1)return}else{var o=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(a===1&&o.x===0&&o.y===0)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||=(t._moveStart(!0,!1),!0),E(this._animRequest),this._animRequest=T(i(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0),this,!0),rn(e)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,E(this._animRequest),U(document,`touchmove`,this._onTouchMove,this),U(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))}});W.addInitHook(`addHandler`,`touchZoom`,pi),W.BoxZoom=oi,W.DoubleClickZoom=si,W.Drag=ci,W.Keyboard=li,W.ScrollWheelZoom=ui,W.TapHold=fi,W.TouchZoom=pi,e.Bounds=N,e.Browser=R,e.CRS=ie,e.Canvas=Zr,e.Circle=pr,e.CircleMarker=dr,e.Class=O,e.Control=mn,e.DivIcon=Hr,e.DivOverlay=Lr,e.DomEvent=dn,e.DomUtil=Jt,e.Draggable=En,e.Evented=ee,e.FeatureGroup=nr,e.GeoJSON=yr,e.GridLayer=Wr,e.Handler=Cn,e.Icon=ir,e.ImageOverlay=jr,e.LatLng=re,e.LatLngBounds=F,e.Layer=$n,e.LayerGroup=er,e.LineUtil=Kn,e.Map=W,e.Marker=cr,e.Mixin=wn,e.Path=ur,e.Point=j,e.PolyUtil=An,e.Polygon=_r,e.Polyline=hr,e.Popup=Rr,e.PosAnimation=fn,e.Projection=Yn,e.Rectangle=ii,e.Renderer=Xr,e.SVG=ni,e.SVGOverlay=Fr,e.TileLayer=Kr,e.Tooltip=Br,e.Transformation=ce,e.Util=D,e.VideoOverlay=Nr,e.bind=i,e.bounds=P,e.canvas=Qr,e.circle=mr,e.circleMarker=fr,e.control=hn,e.divIcon=Ur,e.extend=n,e.featureGroup=rr,e.geoJSON=kr,e.geoJson=Ar,e.gridLayer=Gr,e.icon=ar,e.imageOverlay=Mr,e.latLng=I,e.latLngBounds=ne,e.layerGroup=tr,e.map=pn,e.marker=lr,e.point=M,e.polygon=vr,e.polyline=gr,e.popup=zr,e.rectangle=ai,e.setOptions=p,e.stamp=o,e.svg=ri,e.svgOverlay=Ir,e.tileLayer=qr,e.tooltip=Vr,e.transformation=le,e.version=t,e.videoOverlay=Pr;var mi=window.L;e.noConflict=function(){return window.L=mi,this},window.L=e}))}));function Od(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function kd(e,t){return t==null?function(t,n){let r=(0,S.useRef)(void 0);return r.current||=e(t,n),r}:function(n,r){let i=(0,S.useRef)(void 0);i.current||=e(n,r);let a=(0,S.useRef)(n),{instance:o}=i.current;return(0,S.useEffect)(function(){a.current!==n&&(t(o,n,a.current),a.current=n)},[o,n,t]),i}}function Ad(e,t){(0,S.useEffect)(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function jd(e){return function(t){let n=Sd(),r=e(Ed(t,n),n);return vd(n.map,t.attribution),Td(r.current,t.eventHandlers),Ad(r.current,n),r}}function Md(e,t){let n=(0,S.useRef)(void 0);(0,S.useEffect)(function(){if(t.pathOptions!==n.current){let r=t.pathOptions??{};e.instance.setStyle(r),n.current=r}},[e,t])}function Nd(e){return function(t){let n=Sd(),r=e(Ed(t,n),n);return Td(r.current,t.eventHandlers),Ad(r.current,n),Md(r.current,t),r}}function Pd(e,t){return Y(jd(kd(e,t)))}function Fd(e,t){return Y(Nd(kd(e,t)))}function Id(e,t){return wd(jd(kd(e,t)))}function Ld(e,t,n){let{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function Rd(){return Sd().map}function zd(e){let t=Rd();return(0,S.useEffect)(function(){return t.on(e),function(){t.off(e)}},[t,e]),t}var Bd=u(Dd(),1);function Vd({bounds:e,boundsOptions:t,center:n,children:r,className:i,id:a,placeholder:o,style:s,whenReady:c,zoom:l,...u},d){let[f]=(0,S.useState)({className:i,id:a,style:s}),[p,m]=(0,S.useState)(null),h=(0,S.useRef)(void 0);(0,S.useImperativeHandle)(d,()=>p?.map??null,[p]);let g=(0,S.useCallback)(r=>{if(r!==null&&!h.current){let i=new Bd.Map(r,u);h.current=i,n!=null&&l!=null?i.setView(n,l):e!=null&&i.fitBounds(e,t),c!=null&&i.whenReady(c),m(yd(i))}},[]);(0,S.useEffect)(()=>()=>{p?.map.remove()},[p]);let _=p?S.createElement(xd,{value:p},r):o??null;return S.createElement(`div`,{...f,ref:g},_)}var Hd=(0,S.forwardRef)(Vd),Ud=Pd(function({position:e,...t},n){let r=new Bd.Marker(e,t);return Od(r,bd(n,{overlayContainer:r}))},function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),t.icon!=null&&t.icon!==n.icon&&e.setIcon(t.icon),t.zIndexOffset!=null&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),t.opacity!=null&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),e.dragging!=null&&t.draggable!==n.draggable&&(t.draggable===!0?e.dragging.enable():e.dragging.disable())}),Wd=Fd(function({positions:e,...t},n){let r=new Bd.Polyline(e,t);return Od(r,bd(n,{overlayContainer:r}))},function(e,t,n){t.positions!==n.positions&&e.setLatLngs(t.positions)}),Gd=Id(function({url:e,...t},n){return Od(new Bd.TileLayer(e,Ed(t,n)),n)},function(e,t,n){Ld(e,t,n);let{url:r}=t;r!=null&&r!==n.url&&e.setUrl(r)}),Kd=new Bd.default.DivIcon({html:`<div style="font-size: 20px; opacity: 0.5; filter: drop-shadow(0 0 5px black);">⛵</div>`,className:`boat-marker`,iconSize:[30,30],iconAnchor:[15,15]}),qd=e=>!e||e<50?`text-gray-500`:e<195||e>255?`text-red-500`:e<210||e>245?`text-orange-500`:`text-gray-400`,Jd=(e,t,n,r)=>{let i=Math.abs(e),a=r&&n>180,o=a?t*n:1200,s=i/(o>100?o:1200);return s>.9?`text-red-500 animate-pulse font-black`:s>.7?`text-orange-500 font-black`:a&&i>1e3?`text-yellow-400 font-black`:`text-gray-100`},Yd=e=>e==null?`text-white`:e<=-12?`text-blue-600`:e<-4?`text-blue-400`:e<4?`text-orange-500`:e<=9?`text-white`:e<=12?`text-orange-500`:`text-red-500`,Xd=({coords:e,trail:t,autoFollow:n,setAutoFollow:r})=>{let i=Rd(),a=e=>{r(!1);let t=i.getZoom(),n=e===`in`?t+1:t-1;i.setZoom(n)};return zd({dragstart:()=>r(!1),zoomstart:()=>r(!1)}),(0,S.useEffect)(()=>{n&&e[0]!==0&&i.setView(e,i.getZoom(),{animate:!0,duration:.5})},[e,n,i]),(0,q.jsxs)(q.Fragment,{children:[t.length>0&&(0,q.jsx)(Wd,{positions:t,color:`#22d3ee`,weight:3,opacity:.6,lineCap:`round`,smoothFactor:1}),(0,q.jsxs)(`div`,{className:`absolute right-4 top-1/2 -translate-y-1/2 flex flex-col gap-3 z-[1000]`,children:[(0,q.jsx)(`button`,{onClick:()=>a(`in`),className:`w-12 h-12 rounded-2xl bg-black/50 backdrop-blur-xl border border-white/20 flex items-center justify-center text-white shadow-xl active:scale-90 transition-all hover:bg-black/60`,children:(0,q.jsx)($u,{size:24})}),(0,q.jsx)(`button`,{onClick:()=>a(`out`),className:`w-12 h-12 rounded-2xl bg-black/50 backdrop-blur-xl border border-white/20 flex items-center justify-center text-white shadow-xl active:scale-90 transition-all hover:bg-black/60`,children:(0,q.jsx)(Yu,{size:24})}),(0,q.jsx)(`button`,{onClick:()=>{r(!0),i.setView(e,18,{animate:!0})},className:`w-12 h-12 rounded-2xl backdrop-blur-xl border transition-all flex items-center justify-center shadow-xl active:scale-90 ${n?`bg-cyan-500/40 border-cyan-400 shadow-[0_0_20px_rgba(6,182,212,0.3)]`:`bg-black/50 border-white/20`}`,children:(0,q.jsx)(cd,{size:24,className:n?`text-white`:`text-gray-300`})})]})]})},Zd=({manager:e,onTabChange:t})=>{let{data:n,toggleSwitch:r,apiUrl:i,error:a,isUpdating:o}=e,[s,c]=(0,S.useState)(!0),[l,u]=(0,S.useState)(!1);(0,S.useEffect)(()=>{u(!!a)},[a]);let d=parseFloat(n?.gps?.lat)||36.78,f=parseFloat(n?.gps?.lon)||14.54,p=[d,f],m=(0,S.useMemo)(()=>{let e=n?.environment?.gps_history||[];if(e.length<4)return e.map(e=>[parseFloat(e.lat),parseFloat(e.lon)]);let t=e.map(e=>({x:parseFloat(e.lat),y:parseFloat(e.lon)})),r=[];for(let e=0;e<t.length-1;e++){let n=t[e===0?e:e-1],i=t[e],a=t[e+1],o=t[e+1===t.length-1?e+1:e+2];for(let e=0;e<1;e+=.25){let t=.5*(2*i.x+(-n.x+a.x)*e+(2*n.x-5*i.x+4*a.x-o.x)*e*e+(-n.x+3*i.x-3*a.x+o.x)*e*e*e),s=.5*(2*i.y+(-n.y+a.y)*e+(2*n.y-5*i.y+4*a.y-o.y)*e*e+(-n.y+3*i.y-3*a.y+o.y)*e*e*e);r.push([t,s])}}return r.push([t[t.length-1].x,t[t.length-1].y]),r},[n?.environment?.gps_history]);return(0,q.jsxs)(`div`,{className:`px-2 pt-5 pb-4 landscape:p-2 landscape:pt-4 space-y-2 landscape:space-y-2`,children:[l&&(0,q.jsx)(`div`,{className:`fixed inset-0 z-[5000] flex items-center justify-center p-4 bg-black/80 backdrop-blur-md overflow-y-auto`,children:(0,q.jsxs)(`div`,{className:`bg-[#1a1a1a] border border-white/10 p-6 landscape:p-5 rounded-[2rem] shadow-2xl max-w-sm w-full space-y-4 landscape:space-y-3 my-auto`,children:[(0,q.jsx)(`div`,{className:`bg-red-500/20 w-12 h-12 rounded-full flex items-center justify-center mx-auto shadow-lg text-red-500`,children:(0,q.jsx)(dd,{size:24})}),(0,q.jsxs)(`div`,{className:`space-y-1 text-center`,children:[(0,q.jsx)(`h2`,{className:`text-lg font-black uppercase tracking-tight text-white font-mono leading-none`,children:`Sicurezza API`}),(0,q.jsx)(`p`,{className:`text-gray-400 text-[11px] font-bold px-2`,children:`Autorizza il certificato per ricevere i dati.`})]}),(0,q.jsxs)(`div`,{className:`space-y-2 pt-2`,children:[(0,q.jsx)(`button`,{onClick:()=>window.open(`${i}`,`_blank`),className:`w-full bg-red-500 hover:bg-red-600 text-white font-black py-3.5 rounded-2xl transition-all shadow-lg active:scale-95 flex items-center justify-center gap-2 uppercase text-[11px] tracking-widest font-mono`,children:`1. Autorizza SSL`}),(0,q.jsx)(`p`,{className:`text-[9px] text-gray-600 font-black uppercase tracking-tighter text-center`,children:`Poi chiudi la scheda e torna qui`}),(0,q.jsx)(`button`,{onClick:()=>u(!1),className:`w-full bg-white/5 hover:bg-white/10 text-white font-black py-3 rounded-2xl border border-white/10 active:scale-95 uppercase text-[11px] tracking-widest font-mono`,children:`2. Ho fatto`})]})]})}),(0,q.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 landscape:gap-2`,children:[(0,q.jsx)(`div`,{onClick:()=>t(1),className:`cursor-pointer active:scale-95 transition-transform`,children:(0,q.jsx)(Qd,{title:`BATTERIA`,icon:(0,q.jsx)(Lu,{className:`text-green-500`}),value:`${n?.power?.soc?.toFixed(1)||`-`}%`,sub:(0,q.jsxs)(`span`,{className:n?.power?.dc_draw_w>=0?`text-green-400`:`text-gray-100`,children:[n?.power?.dc_draw_w>0?`+${Math.round(n.power.dc_draw_w)}`:Math.round(n?.power?.dc_draw_w||0),(0,q.jsx)(`span`,{className:`opacity-40 ml-0.5 font-black uppercase text-[12px]`,children:`w`})]})})}),(0,q.jsx)(`div`,{onClick:()=>t(3),className:`cursor-pointer active:scale-95 transition-transform`,children:(0,q.jsx)(Qd,{title:`BANCHINA`,icon:(0,q.jsx)(ed,{className:n?.power?.shore_power?`text-green-500`:`text-red-500`}),value:n?.power?.shore_power?`ON`:`OFF`,sub:(0,q.jsxs)(`div`,{className:`flex flex-col items-end leading-none`,children:[(0,q.jsxs)(`span`,{className:Jd(n?.power?.ac_power_w,n?.switches?.shore_limit,n?.power?.shore_v,n?.power?.shore_power),children:[Math.round(n?.power?.ac_power_w||0),(0,q.jsx)(`span`,{className:`opacity-40 ml-0.5 font-black uppercase text-[12px]`,children:`w`})]}),n?.power?.shore_power&&n?.power?.shore_v>50&&(0,q.jsxs)(`span`,{className:`${qd(n?.power?.shore_v)} text-[12px] font-bold mt-1.5`,children:[`(`,n?.power?.shore_v?.toFixed(0),`V)`]})]})})})]}),(0,q.jsxs)(`div`,{className:`flex flex-col md:flex-row gap-2 landscape:gap-2 w-full`,children:[(0,q.jsxs)(`div`,{className:`w-full md:w-1/2 grid grid-cols-4 md:grid-cols-2 gap-2`,children:[(0,q.jsx)(`div`,{onClick:()=>t(2),className:`cursor-pointer active:scale-95 transition-transform h-full`,children:(0,q.jsx)($d,{icon:(0,q.jsx)(ld,{size:18}),title:`POZZ.`,val:n?.environment?.temp_pozzetto,color:`text-yellow-500`})}),(0,q.jsx)($d,{icon:(0,q.jsx)(od,{size:18}),title:`QUADR.`,val:n?.environment?.temp_quadrato,color:`text-orange-500`}),(0,q.jsx)($d,{icon:(0,q.jsx)(ad,{size:18}),title:`FRIGO`,val:n?.environment?.temp_frigo,color:`text-cyan-400`,valueColor:Yd(n?.environment?.temp_frigo)}),(0,q.jsx)($d,{icon:(0,q.jsx)(ad,{size:18}),title:`FREEZER`,val:n?.environment?.temp_freezer,color:`text-blue-500`,valueColor:Yd(n?.environment?.temp_freezer)})]}),(0,q.jsxs)(`div`,{className:`w-full md:w-1/2 bg-white/5 rounded-[2rem] flex flex-col divide-y divide-white/5 border border-white/10 overflow-hidden shadow-xl transition-all duration-300 ${o?`opacity-60 grayscale-[0.5]`:`opacity-100`}`,children:[(0,q.jsx)(ef,{icon:(0,q.jsx)(Wu,{className:`text-blue-400`}),name:`Pompa Acqua`,isOn:n?.switches?.pump_on,onToggle:e=>r(`pump`,e),disabled:o}),(0,q.jsx)(ef,{icon:(0,q.jsx)(Gu,{className:`text-orange-400`}),name:`Boiler`,isOn:n?.switches?.boiler_on,onToggle:e=>r(`boiler`,e),disabled:o}),(0,q.jsx)(ef,{icon:(0,q.jsx)(rd,{className:`text-purple-400`}),name:`Lavatrice`,isOn:n?.switches?.washing_machine_on,onToggle:e=>r(`washer`,e),disabled:o})]})]}),(0,q.jsxs)(`div`,{className:`space-y-2 pb-22 flex flex-col items-center`,children:[(0,q.jsxs)(`div`,{className:`flex justify-between items-center w-[80%] px-2 text-white`,children:[(0,q.jsx)(`h3`,{className:`text-[10px] font-black text-gray-500 tracking-widest uppercase font-mono opacity-50`,children:`Posizione GPS`}),(0,q.jsxs)(`button`,{onClick:()=>window.open(`maps://?q=${d},${f}`,`_blank`),className:`text-[9px] font-black bg-cyan-500/10 text-cyan-400 px-3 py-1 rounded-full border border-cyan-500/20 flex items-center gap-1 uppercase active:scale-95 transition-transform`,children:[(0,q.jsx)(Zu,{size:10}),` Apri in Mappe`]})]}),(0,q.jsx)(`div`,{onPointerDown:e=>e.stopPropagation(),onPointerMove:e=>e.stopPropagation(),className:`h-64 landscape:h-80 w-[80%] rounded-[2.5rem] overflow-hidden border border-white/10 shadow-2xl relative isolate touch-none`,children:(0,q.jsxs)(Hd,{center:p,zoom:18,maxZoom:22,style:{height:`100%`,width:`100%`},zoomControl:!1,attributionControl:!1,preferCanvas:!0,children:[(0,q.jsx)(Gd,{url:`https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}`,maxZoom:22,maxNativeZoom:18,errorTileUrl:``}),(0,q.jsx)(Xd,{coords:p,trail:m,autoFollow:s,setAutoFollow:c}),(0,q.jsx)(Ud,{position:p,icon:Kd})]})})]})]})},Qd=({icon:e,title:t,value:n,sub:r})=>(0,q.jsxs)(`div`,{className:`bg-white/5 p-5 rounded-[2rem] border border-white/10 flex flex-row items-center justify-between shadow-lg text-white group hover:bg-white/10 transition-colors h-full`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1 text-gray-500 text-[9px] font-black tracking-widest uppercase whitespace-nowrap`,children:[e,` `,t]}),(0,q.jsx)(`div`,{className:`text-3xl font-black mt-1 tracking-tighter`,children:n})]}),(0,q.jsx)(`div`,{className:`text-[18px] text-gray-200 font-black uppercase tracking-tight text-right pl-2 leading-tight`,children:r})]}),$d=({icon:e,title:t,val:n,color:r,valueColor:i=`text-white`})=>(0,q.jsxs)(`div`,{className:`bg-white/5 py-4 landscape:py-3 rounded-3xl border border-white/5 flex flex-col items-center gap-1 text-center shadow-md hover:bg-white/10 transition-colors h-full justify-center text-white`,children:[(0,q.jsx)(`div`,{className:r,children:e}),(0,q.jsx)(`div`,{className:`text-[8px] font-black text-gray-600 uppercase tracking-tighter mt-1`,children:t}),(0,q.jsxs)(`div`,{className:`text-lg font-black ${i}`,children:[n?.toFixed(1)||`-`,`°`]})]}),ef=({icon:e,name:t,isOn:n,onToggle:r,disabled:i})=>(0,q.jsxs)(`div`,{className:`flex flex-1 items-center justify-between p-5 landscape:p-4 bg-white/[0.02] text-white transition-all ${i?`pointer-events-none opacity-40`:`hover:bg-white/5`}`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[S.cloneElement(e,{size:20,className:n?e.props.className:`text-gray-700 opacity-50`}),(0,q.jsx)(`span`,{className:`text-sm font-bold text-white tracking-tight uppercase`,children:t})]}),(0,q.jsxs)(`label`,{className:`relative inline-flex items-center cursor-pointer`,children:[(0,q.jsx)(`input`,{type:`checkbox`,className:`sr-only peer`,checked:n||!1,onChange:e=>r(e.target.checked),disabled:i}),(0,q.jsx)(`div`,{className:`w-11 h-6 bg-gray-800 rounded-full peer peer-checked:bg-cyan-500 after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:after:translate-x-full shadow-inner`})]})]});function tf(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=tf(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function nf(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=tf(e))&&(r&&(r+=` `),r+=t);return r}var rf=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function af(e){return typeof e==`string`?rf.includes(e):!1}var of=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function sf(e){return typeof e==`string`?of.has(e):!1}function cf(e){return typeof e==`string`&&e.startsWith(`data-`)}function lf(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(sf(n)||cf(n))&&(t[n]=e[n]);return t}function uf(e){if(e==null)return null;if((0,S.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return lf(t)}return typeof e==`object`&&!Array.isArray(e)?lf(e):null}function df(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(sf(n)||cf(n)||af(n))&&(t[n]=e[n]);return t}function ff(e){return e==null?null:(0,S.isValidElement)(e)?df(e.props):typeof e==`object`&&!Array.isArray(e)?df(e):null}var pf=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function mf(){return mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mf.apply(null,arguments)}function hf(e,t){if(e==null)return{};var n,r,i=gf(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gf(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var _f=(0,S.forwardRef)((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:s,title:c,desc:l}=e,u=hf(e,pf),d=a||{width:r,height:i,x:0,y:0},f=nf(`recharts-surface`,o);return S.createElement(`svg`,mf({},df(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),S.createElement(`title`,null,c),S.createElement(`desc`,null,l),n)}),vf=[`children`,`className`];function yf(){return yf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yf.apply(null,arguments)}function bf(e,t){if(e==null)return{};var n,r,i=xf(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function xf(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Sf=S.forwardRef((e,t)=>{var{children:n,className:r}=e,i=bf(e,vf),a=nf(`recharts-layer`,r);return S.createElement(`g`,yf({className:a},df(i),{ref:t}),n)}),Cf=(0,S.createContext)(null);function wf(e){return function(){return e}}var Tf=Math.cos,Ef=Math.sin,Df=Math.sqrt,Of=Math.PI;Of/2;var kf=2*Of,Af=Math.PI,jf=2*Af,Mf=1e-6,Nf=jf-Mf;function Pf(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Ff(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Pf;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var If=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Pf:Ff(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Mf)if(!(Math.abs(u*s-c*l)>Mf)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Af-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Mf&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Mf||Math.abs(this._y1-l)>Mf)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%jf+jf),d>Nf?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Mf&&this._append`A${n},${n},0,${+(d>=Af)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Lf(){return new If}Lf.prototype=If.prototype;function Rf(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new If(t)}Array.prototype.slice;function zf(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Bf(e){this._context=e}Bf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Vf(e){return new Bf(e)}function Hf(e){return e[0]}function Uf(e){return e[1]}function Wf(e,t){var n=wf(!0),r=null,i=Vf,a=null,o=Rf(s);e=typeof e==`function`?e:e===void 0?Hf:wf(e),t=typeof t==`function`?t:t===void 0?Uf:wf(t);function s(s){var c,l=(s=zf(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:wf(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:wf(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:wf(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function Gf(e,t,n){var r=null,i=wf(!0),a=null,o=Vf,s=null,c=Rf(l);e=typeof e==`function`?e:e===void 0?Hf:wf(+e),t=typeof t==`function`?t:wf(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?Uf:wf(+n);function l(l){var u,d,f,p=(l=zf(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return Wf().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:wf(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:wf(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:wf(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:wf(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:wf(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:wf(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:wf(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var Kf=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function qf(e){return new Kf(e,!0)}function Jf(e){return new Kf(e,!1)}var Yf={draw(e,t){let n=Df(t/Of);e.moveTo(n,0),e.arc(0,0,n,0,kf)}},Xf={draw(e,t){let n=Df(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Zf=Df(1/3),Qf=Zf*2,$f={draw(e,t){let n=Df(t/Qf),r=n*Zf;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},ep={draw(e,t){let n=Df(t),r=-n/2;e.rect(r,r,n,n)}},tp=.8908130915292852,np=Ef(Of/10)/Ef(7*Of/10),rp=Ef(kf/10)*np,ip=-Tf(kf/10)*np,ap={draw(e,t){let n=Df(t*tp),r=rp*n,i=ip*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=kf*t/5,o=Tf(a),s=Ef(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},op=Df(3),sp={draw(e,t){let n=-Df(t/(op*3));e.moveTo(0,n*2),e.lineTo(-op*n,-n),e.lineTo(op*n,-n),e.closePath()}},cp=-.5,lp=Df(3)/2,up=1/Df(12),dp=(up/2+1)*3,fp={draw(e,t){let n=Df(t/dp),r=n/2,i=n*up,a=r,o=n*up+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(cp*r-lp*i,lp*r+cp*i),e.lineTo(cp*a-lp*o,lp*a+cp*o),e.lineTo(cp*s-lp*c,lp*s+cp*c),e.lineTo(cp*r+lp*i,cp*i-lp*r),e.lineTo(cp*a+lp*o,cp*o-lp*a),e.lineTo(cp*s+lp*c,cp*c-lp*s),e.closePath()}};function pp(e,t){let n=null,r=Rf(i);e=typeof e==`function`?e:wf(e||Yf),t=typeof t==`function`?t:wf(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:wf(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:wf(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function mp(){}function hp(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function gp(e){this._context=e}gp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:hp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:hp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _p(e){return new gp(e)}function vp(e){this._context=e}vp.prototype={areaStart:mp,areaEnd:mp,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:hp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yp(e){return new vp(e)}function bp(e){this._context=e}bp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:hp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xp(e){return new bp(e)}function Sp(e){this._context=e}Sp.prototype={areaStart:mp,areaEnd:mp,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Cp(e){return new Sp(e)}function wp(e){return e<0?-1:1}function Tp(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(wp(a)+wp(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ep(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Dp(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Op(e){this._context=e}Op.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Dp(this,this._t0,Ep(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Dp(this,Ep(this,n=Tp(this,e,t)),n);break;default:Dp(this,this._t0,n=Tp(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kp(e){this._context=new Ap(e)}(kp.prototype=Object.create(Op.prototype)).point=function(e,t){Op.prototype.point.call(this,t,e)};function Ap(e){this._context=e}Ap.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function jp(e){return new Op(e)}function Mp(e){return new kp(e)}function Np(e){this._context=e}Np.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Pp(e),i=Pp(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Pp(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Fp(e){return new Np(e)}function Ip(e,t){this._context=e,this._t=t}Ip.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function Lp(e){return new Ip(e,.5)}function Rp(e){return new Ip(e,0)}function zp(e){return new Ip(e,1)}function Bp(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Vp(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Hp(e,t){return e[t]}function Up(e){let t=[];return t.key=e,t}function Wp(){var e=wf([]),t=Vp,n=Bp,r=Hp;function i(i){var a=Array.from(e.apply(this,arguments),Up),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=zf(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:wf(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:wf(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Vp:typeof e==`function`?e:wf(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Bp,i):n},i}function Gp(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Bp(e,t)}}function Kp(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Bp(e,t)}}function qp(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Bp(e,t)}}var Jp=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e===`__proto__`}e.isUnsafeProperty=t})),Yp=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}e.isDeepKey=t})),Xp=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}e.toKey=t})),Zp=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(t).join(`,`);let n=String(e);return n===`0`&&Object.is(Number(e),-0)?`-0`:n}e.toString=t})),Qp=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Zp(),n=Xp();function r(e){if(Array.isArray(e))return e.map(n.toKey);if(typeof e==`symbol`)return[e];e=t.toString(e);let r=[],i=e.length;if(i===0)return r;let a=0,o=``,s=``,c=!1;for(e.charCodeAt(0)===46&&(r.push(``),a++);a<i;){let t=e[a];s?t===`\\`&&a+1<i?(a++,o+=e[a]):t===s?s=``:o+=t:c?t===`"`||t===`'`?s=t:t===`]`?(c=!1,r.push(o),o=``):o+=t:t===`[`?(c=!0,o&&=(r.push(o),``)):t===`.`?o&&=(r.push(o),``):o+=t,a++}return o&&r.push(o),r}e.toPath=r})),$p=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Jp(),n=Yp(),r=Xp(),i=Qp();function a(e,s,c){if(e==null)return c;switch(typeof s){case`string`:{if(t.isUnsafeProperty(s))return c;let r=e[s];return r===void 0?n.isDeepKey(s)?a(e,i.toPath(s),c):c:r}case`number`:case`symbol`:{typeof s==`number`&&(s=r.toKey(s));let t=e[s];return t===void 0?c:t}default:{if(Array.isArray(s))return o(e,s,c);if(s=Object.is(s?.valueOf(),-0)?`-0`:String(s),t.isUnsafeProperty(s))return c;let n=e[s];return n===void 0?c:n}}}function o(e,n,r){if(n.length===0)return r;let i=e;for(let e=0;e<n.length;e++){if(i==null||t.isUnsafeProperty(n[e]))return r;i=i[n[e]]}return i===void 0?r:i}e.get=a})),em=s(((e,t)=>{t.exports=$p().get})),tm=4;function nm(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:tm),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function rm(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+nm(i)+n},``)}var im=u(em()),am=e=>e===0?0:e>0?1:-1,om=e=>typeof e==`number`&&e!=+e,sm=e=>typeof e==`string`&&e.indexOf(`%`)===e.length-1,X=e=>(typeof e==`number`||e instanceof Number)&&!om(e),cm=e=>X(e)||typeof e==`string`,lm=0,um=e=>{var t=++lm;return`${e||``}${t}`},dm=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!X(e)&&typeof e!=`string`)return n;var i;if(sm(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return om(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},fm=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function pm(e,t,n){return X(e)&&X(t)?nm(e+n*(t-e)):t}function mm(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):(0,im.default)(e,t))===n)}var hm=e=>e==null,gm=e=>hm(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function _m(e){return e!=null}function vm(){}var ym=[`type`,`size`,`sizeType`];function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bm.apply(null,arguments)}function xm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xm(Object(n),!0).forEach(function(t){Cm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cm(e,t,n){return(t=wm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wm(e){var t=Tm(e,`string`);return typeof t==`symbol`?t:t+``}function Tm(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Em(e,t){if(e==null)return{};var n,r,i=Dm(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dm(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Om={symbolCircle:Yf,symbolCross:Xf,symbolDiamond:$f,symbolSquare:ep,symbolStar:ap,symbolTriangle:sp,symbolWye:fp},km=Math.PI/180,Am=e=>Om[`symbol${gm(e)}`]||Yf,jm=(e,t,n)=>{if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*km;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Mm=(e,t)=>{Om[`symbol${gm(e)}`]=t},Nm=e=>{var{type:t=`circle`,size:n=64,sizeType:r=`area`}=e,i=Sm(Sm({},Em(e,ym)),{},{type:t,size:n,sizeType:r}),a=`circle`;typeof t==`string`&&(a=t);var o=()=>{var e=Am(a),t=pp().type(e).size(jm(n,r,a))();if(t!==null)return t},{className:s,cx:c,cy:l}=i,u=df(i);return X(c)&&X(l)&&X(n)?S.createElement(`path`,bm({},u,{className:nf(`recharts-symbols`,s),transform:`translate(${c}, ${l})`,d:o()})):null};Nm.registerSymbol=Mm;var Pm=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,S.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{af(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},Fm=(e,t,n)=>r=>(e(t,n,r),null),Im=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];af(i)&&typeof a==`function`&&(r||={},r[i]=Fm(a,t,n))}),r};function Lm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Lm(Object(n),!0).forEach(function(t){zm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zm(e,t,n){return(t=Bm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bm(e){var t=Vm(e,`string`);return typeof t==`symbol`?t:t+``}function Vm(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Hm(e,t){var n=Rm({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}var Um=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return Number.isSafeInteger(e)&&e>=0}e.isLength=t})),Wm=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Um();function n(e){return e!=null&&typeof e!=`function`&&t.isLength(e.length)}e.isArrayLike=n})),Gm=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}e.isObject=t})),Km=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}e.isEqualsSameValueZero=t})),qm=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=/^(?:0|[1-9]\d*)$/;function n(e,n=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<n;case`symbol`:return!1;case`string`:return t.test(e)}}e.isIndex=n})),Jm=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Ym=s(((e,t)=>{t.exports=Jm()})),Xm=s((e=>{var t=p(),n=Ym();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Zm=s(((e,t)=>{t.exports=Xm()})),Qm=(0,S.createContext)(null),$m=Zm(),eh=e=>e,th=()=>{var e=(0,S.useContext)(Qm);return e?e.store.dispatch:eh},nh=()=>{},rh=()=>nh,ih=(e,t)=>e===t;function Z(e){var t=(0,S.useContext)(Qm),n=(0,S.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:nh,[t,e]);return(0,$m.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:rh,t?t.store.getState:nh,t?t.store.getState:nh,n,ih)}function ah(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function oh(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function sh(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var ch=e=>Array.isArray(e)?e:[e];function lh(e){let t=Array.isArray(e[0])?e[0]:e;return sh(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function uh(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var dh=class{constructor(e){this.value=e}deref(){return this.value}},fh=typeof WeakRef<`u`?WeakRef:dh,ph=0,mh=1;function hh(){return{s:ph,v:void 0,o:null,p:null}}function gh(e,t={}){let n=hh(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=hh(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=hh(),e.set(n,t)):t=r}}let s=t,c;if(t.s===mh)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new fh(c):c}return s.s=mh,s.v=c,c}return o.clearCache=()=>{n=hh(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function _h(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),ah(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=gh,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=ch(c),p=ch(u),m=lh(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=uh(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var Q=_h(gh),vh=Object.assign((e,t=Q)=>{oh(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>vh}),yh=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}e.compareValues=(e,n,r)=>{if(e!==n){let i=t(e),a=t(n);if(i===a&&i===0){if(e<n)return r===`desc`?1:-1;if(e>n)return r===`desc`?-1:1}return r===`desc`?a-i:i-a}return 0}})),bh=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`||e instanceof Symbol}e.isSymbol=t})),xh=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=bh(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(e,i){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||t.isSymbol(e)?!0:typeof e==`string`&&(r.test(e)||!n.test(e))||i!=null&&Object.hasOwn(i,e)}e.isKey=i})),Sh=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=yh(),n=xh(),r=Qp();function i(e,i,a,o){if(e==null)return[];a=o?void 0:a,Array.isArray(e)||(e=Object.values(e)),Array.isArray(i)||(i=i==null?[null]:[i]),i.length===0&&(i=[null]),Array.isArray(a)||(a=a==null?[]:[a]),a=a.map(e=>String(e));let s=(e,t)=>{let n=e;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},c=(e,t)=>t==null||e==null?t:typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?s(t,e):typeof t==`object`?t[e]:t,l=i.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)}));return e.map(e=>({original:e,criteria:l.map(t=>c(t,e))})).slice().sort((e,n)=>{for(let r=0;r<l.length;r++){let i=t.compareValues(e.criteria[r],n.criteria[r],a[r]);if(i!==0)return i}return 0}).map(e=>e.original)}e.orderBy=i})),Ch=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}e.flatten=t})),wh=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=qm(),n=Wm(),r=Gm(),i=Km();function a(e,a,o){return r.isObject(o)&&(typeof a==`number`&&n.isArrayLike(o)&&t.isIndex(a)&&a<o.length||typeof a==`string`&&a in o)?i.isEqualsSameValueZero(o[a],e):!1}e.isIterateeCall=a})),Th=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Sh(),n=Ch(),r=wh();function i(e,...i){let a=i.length;return a>1&&r.isIterateeCall(e,i[0],i[1])?i=[]:a>2&&r.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),t.orderBy(e,n.flatten(i),[`asc`])}e.sortBy=i})),Eh=u(s(((e,t)=>{t.exports=Th().sortBy}))()),Dh=e=>e.legend.settings,Oh=e=>e.legend.size;Q([e=>e.legend.payload,Dh],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?(0,Eh.default)(r,n):r});function kh(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ah=typeof Symbol==`function`&&Symbol.observable||`@@observable`,jh=()=>Math.random().toString(36).substring(7).split(``).join(`.`),Mh={INIT:`@@redux/INIT${jh()}`,REPLACE:`@@redux/REPLACE${jh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${jh()}`};function Nh(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ph(e,t,n){if(typeof e!=`function`)throw Error(kh(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(kh(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(kh(1));return n(Ph)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(kh(3));return i}function d(e){if(typeof e!=`function`)throw Error(kh(4));if(c)throw Error(kh(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(kh(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!Nh(e))throw Error(kh(7));if(e.type===void 0)throw Error(kh(8));if(typeof e.type!=`string`)throw Error(kh(17));if(c)throw Error(kh(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(kh(10));r=e,f({type:Mh.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(kh(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[Ah](){return this}}}return f({type:Mh.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[Ah]:m}}function Fh(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:Mh.INIT})===void 0)throw Error(kh(12));if(n(void 0,{type:Mh.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(kh(13))})}function Ih(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{Fh(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(kh(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function Lh(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function Rh(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(kh(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=Lh(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function zh(e){return Nh(e)&&`type`in e&&typeof e.type==`string`}var Bh=Symbol.for(`immer-nothing`),Vh=Symbol.for(`immer-draftable`),Hh=Symbol.for(`immer-state`);function Uh(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Wh=Object,Gh=Wh.getPrototypeOf,Kh=`constructor`,qh=`prototype`,Jh=`configurable`,Yh=`enumerable`,Xh=`writable`,Zh=`value`,Qh=e=>!!e&&!!e[Hh];function $h(e){return e?ng(e)||lg(e)||!!e[Vh]||!!e[Kh]?.[Vh]||ug(e)||dg(e):!1}var eg=Wh[qh][Kh].toString(),tg=new WeakMap;function ng(e){if(!e||!fg(e))return!1;let t=Gh(e);if(t===null||t===Wh[qh])return!0;let n=Wh.hasOwnProperty.call(t,Kh)&&t[Kh];if(n===Object)return!0;if(!pg(n))return!1;let r=tg.get(n);return r===void 0&&(r=Function.toString.call(n),tg.set(n,r)),r===eg}function rg(e,t,n=!0){ig(e)===0?(n?Reflect.ownKeys(e):Wh.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ig(e){let t=e[Hh];return t?t.type_:lg(e)?1:ug(e)?2:dg(e)?3:0}var ag=(e,t,n=ig(e))=>n===2?e.has(t):Wh[qh].hasOwnProperty.call(e,t),og=(e,t,n=ig(e))=>n===2?e.get(t):e[t],sg=(e,t,n,r=ig(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function cg(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var lg=Array.isArray,ug=e=>e instanceof Map,dg=e=>e instanceof Set,fg=e=>typeof e==`object`,pg=e=>typeof e==`function`,mg=e=>typeof e==`boolean`;function hg(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var gg=e=>e.copy_||e.base_,_g=e=>e.modified_?e.copy_:e.base_;function vg(e,t){if(ug(e))return new Map(e);if(dg(e))return new Set(e);if(lg(e))return Array[qh].slice.call(e);let n=ng(e);if(t===!0||t===`class_only`&&!n){let t=Wh.getOwnPropertyDescriptors(e);delete t[Hh];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Xh]===!1&&(a[Xh]=!0,a[Jh]=!0),(a.get||a.set)&&(t[i]={[Jh]:!0,[Xh]:!0,[Yh]:a[Yh],[Zh]:e[i]})}return Wh.create(Gh(e),t)}else{let t=Gh(e);if(t!==null&&n)return{...e};let r=Wh.create(t);return Wh.assign(r,e)}}function yg(e,t=!1){return Sg(e)||Qh(e)||!$h(e)?e:(ig(e)>1&&Wh.defineProperties(e,{set:xg,add:xg,clear:xg,delete:xg}),Wh.freeze(e),t&&rg(e,(e,t)=>{yg(t,!0)},!1),e)}function bg(){Uh(2)}var xg={[Zh]:bg};function Sg(e){return e===null||!fg(e)?!0:Wh.isFrozen(e)}var Cg=`MapSet`,wg=`Patches`,Tg=`ArrayMethods`,Eg={};function Dg(e){let t=Eg[e];return t||Uh(0,e),t}var Og=e=>!!Eg[e],kg,Ag=()=>kg,jg=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Og(Cg)?Dg(Cg):void 0,arrayMethodsPlugin_:Og(Tg)?Dg(Tg):void 0});function Mg(e,t){t&&(e.patchPlugin_=Dg(wg),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ng(e){Pg(e),e.drafts_.forEach(Ig),e.drafts_=null}function Pg(e){e===kg&&(kg=e.parent_)}var Fg=e=>kg=jg(kg,e);function Ig(e){let t=e[Hh];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Lg(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Hh].modified_&&(Ng(t),Uh(4)),$h(e)&&(e=Rg(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Hh].base_,e,t)}else e=Rg(t,n);return zg(t,e,!0),Ng(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Bh?void 0:e}function Rg(e,t){if(Sg(t))return t;let n=t[Hh];if(!n)return qg(t,e.handledSet_,e);if(!Vg(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Gg(n,e)}return n.copy_}function zg(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&yg(t,n)}function Bg(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Vg=(e,t)=>e.scope_===t,Hg=[];function Ug(e,t,n,r){let i=gg(e),a=e.type_;if(r!==void 0&&og(i,r,a)===t){sg(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;rg(i,(e,n)=>{if(Qh(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Hg;for(let e of o)sg(i,e,n,a)}function Wg(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Vg(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=_g(i);Ug(e,i.draft_??i,a,n),Gg(i,r)})}function Gg(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Bg(e)}}function Kg(e,t,n){let{scope_:r}=e;if(Qh(n)){let i=n[Hh];Vg(i,r)&&i.callbacks_.push(function(){t_(e),Ug(e,n,_g(i),t)})}else $h(n)&&e.callbacks_.push(function(){let i=gg(e);e.type_===3?i.has(n)&&qg(n,r.handledSet_,r):og(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&qg(og(e.copy_,t,e.type_),r.handledSet_,r)})}function qg(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Qh(e)||t.has(e)||!$h(e)||Sg(e)?e:(t.add(e),rg(e,(r,i)=>{if(Qh(i)){let t=i[Hh];Vg(t,n)&&(sg(e,r,_g(t),e.type_),Bg(t))}else $h(i)&&qg(i,t,n)}),e)}function Jg(e,t){let n=lg(e),r={type_:n?1:0,scope_:t?t.scope_:Ag(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Yg;n&&(i=[r],a=Xg);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Yg={get(e,t){if(t===Hh)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=gg(e);if(!ag(i,t,e.type_))return Qg(e,i,t);let a=i[t];if(e.finalized_||!$h(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&hg(t))return a;if(a===Zg(e.base_,t)){t_(e);let n=e.type_===1?+t:t,r=r_(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in gg(e)},ownKeys(e){return Reflect.ownKeys(gg(e))},set(e,t,n){let r=$g(gg(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Zg(gg(e),t),i=r?.[Hh];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(cg(n,r)&&(n!==void 0||ag(e.base_,t,e.type_)))return!0;t_(e),e_(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Kg(e,t,n),!0)},deleteProperty(e,t){return t_(e),Zg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),e_(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=gg(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Xh]:!0,[Jh]:e.type_!==1||t!==`length`,[Yh]:r[Yh],[Zh]:n[t]}},defineProperty(){Uh(11)},getPrototypeOf(e){return Gh(e.base_)},setPrototypeOf(){Uh(12)}},Xg={};for(let e in Yg){let t=Yg[e];Xg[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Xg.deleteProperty=function(e,t){return Xg.set.call(this,e,t,void 0)},Xg.set=function(e,t,n){return Yg.set.call(this,e[0],t,n,e[0])};function Zg(e,t){let n=e[Hh];return(n?gg(n):e)[t]}function Qg(e,t,n){let r=$g(t,n);return r?Zh in r?r[Zh]:r.get?.call(e.draft_):void 0}function $g(e,t){if(!(t in e))return;let n=Gh(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Gh(n)}}function e_(e){e.modified_||(e.modified_=!0,e.parent_&&e_(e.parent_))}function t_(e){e.copy_||=(e.assigned_=new Map,vg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var n_=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(pg(e)&&!pg(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}pg(t)||Uh(6),n!==void 0&&!pg(n)&&Uh(7);let r;if($h(e)){let i=Fg(this),a=r_(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Ng(i):Pg(i)}return Mg(i,n),Lg(r,i)}else if(!e||!fg(e)){if(r=t(e),r===void 0&&(r=e),r===Bh&&(r=void 0),this.autoFreeze_&&yg(r,!0),n){let t=[],i=[];Dg(wg).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else Uh(1,e)},this.produceWithPatches=(e,t)=>{if(pg(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},mg(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),mg(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),mg(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){$h(e)||Uh(8),Qh(e)&&(e=i_(e));let t=Fg(this),n=r_(t,e,void 0);return n[Hh].isManual_=!0,Pg(t),n}finishDraft(e,t){let n=e&&e[Hh];(!n||!n.isManual_)&&Uh(9);let{scope_:r}=n;return Mg(r,t),Lg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Dg(wg).applyPatches_;return Qh(e)?r(e,t):this.produce(e,e=>r(e,t))}};function r_(e,t,n,r){let[i,a]=ug(t)?Dg(Cg).proxyMap_(t,n):dg(t)?Dg(Cg).proxySet_(t,n):Jg(t,n);return(n?.scope_??Ag()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Wg(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function i_(e){return Qh(e)||Uh(10,e),a_(e)}function a_(e){if(!$h(e)||Sg(e))return e;let t=e[Hh],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=vg(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=vg(e,!0);return rg(n,(e,t)=>{sg(n,e,a_(t))},r),t&&(t.finalized_=!1),n}var o_=new n_().produce;function s_(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var c_=s_(),l_=s_,u_=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?Lh:Lh.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function d_(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(yv(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>zh(t)&&t.type===e,n}var f_=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function p_(e){return $h(e)?o_(e,()=>{}):e}function m_(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function h_(e){return typeof e==`boolean`}var g_=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new f_;return t&&(h_(t)?a.push(c_):a.push(l_(t.extraArgument))),a},__=`RTK_autoBatch`,v_=()=>e=>({payload:e,meta:{[__]:!0}}),y_=e=>t=>{setTimeout(t,e)},b_=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?window.requestAnimationFrame:y_(10):e.type===`callback`?e.queueNotification:y_(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[__],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},x_=e=>function(t){let{autoBatch:n=!0}=t??{},r=new f_(e);return n&&r.push(b_(typeof n==`object`?n:void 0)),r};function S_(e){let t=g_(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(Nh(n))c=Ih(n);else throw Error(yv(1));let l;l=typeof r==`function`?r(t):t();let u=Lh;i&&(u=u_({trace:!1,...typeof i==`object`&&i}));let d=x_(Rh(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return Ph(c,o,p)}function C_(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(yv(28));if(r in t)throw Error(yv(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function w_(e){return typeof e==`function`}function T_(e,t){let[n,r,i]=C_(t),a;if(w_(e))a=()=>p_(e());else{let t=p_(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n)if(Qh(e)){let r=n(e,t);return r===void 0?e:r}else if($h(e))return o_(e,e=>n(e,t));else{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}return e},e)}return o.getInitialState=a,o}var E_=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,D_=(e=21)=>{let t=``,n=e;for(;n--;)t+=E_[Math.random()*64|0];return t},O_=Symbol.for(`rtk-slice-createasyncthunk`);function k_(e,t){return`${e}/${t}`}function A_({creators:e}={}){let t=e?.asyncThunk?.[O_];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(yv(11));let i=(typeof e.reducers==`function`?e.reducers(N_()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(yv(12));if(n in o.sliceCaseReducersByType)throw Error(yv(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:k_(n,r),createNotation:typeof e.reducers==`function`};F_(a)?L_(o,a,s,t):P_(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?C_(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return T_(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=m_(d,r,m)),i}function i(t=l){return m_(m_(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=j_(a,t,()=>m_(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function j_(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var M_=A_();function N_(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function P_({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!I_(r))throw Error(yv(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?d_(e,o):d_(e))}function F_(e){return e._reducerDefinitionType===`asyncThunk`}function I_(e){return e._reducerDefinitionType===`reducerWithPrepare`}function L_({type:e,reducerName:t},n,r,i){if(!i)throw Error(yv(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||R_,pending:s||R_,rejected:c||R_,settled:l||R_})}function R_(){}var z_=`task`,B_=`listener`,V_=`completed`,H_=`cancelled`,U_=`task-${H_}`,W_=`task-${V_}`,G_=`${B_}-${H_}`,K_=`${B_}-${V_}`,q_=class{constructor(e){this.code=e,this.message=`${z_} ${H_} (reason: ${e})`}name=`TaskAbortError`;message},J_=(e,t)=>{if(typeof e!=`function`)throw TypeError(yv(32))},Y_=()=>{},X_=(e,t=Y_)=>(e.catch(t),e),Z_=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),Q_=e=>{if(e.aborted)throw new q_(e.reason)};function $_(e,t){let n=Y_;return new Promise((r,i)=>{let a=()=>i(new q_(e.reason));if(e.aborted){a();return}n=Z_(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Y_})}var ev=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof q_?`cancelled`:`rejected`,error:e}}finally{t?.()}},tv=e=>t=>X_($_(e,t).then(t=>(Q_(e),t))),nv=e=>{let t=tv(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:rv}=Object,iv={},av=`listenerMiddleware`,ov=(e,t)=>{let n=t=>Z_(e,()=>t.abort(e.reason));return(r,i)=>{J_(r,`taskExecutor`);let a=new AbortController;n(a);let o=ev(async()=>{Q_(e),Q_(a.signal);let t=await r({pause:tv(a.signal),delay:nv(a.signal),signal:a.signal});return Q_(a.signal),t},()=>a.abort(W_));return i?.autoJoin&&t.push(o.catch(Y_)),{result:tv(e)(o),cancel(){a.abort(U_)}}}},sv=(e,t)=>{let n=async(n,r)=>{Q_(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await $_(t,Promise.race(a));return Q_(t),e}finally{i()}};return(e,t)=>X_(n(e,t))},cv=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=d_(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(yv(21));return J_(a,`options.listener`),{predicate:i,type:t,effect:a}},lv=rv(e=>{let{type:t,predicate:n,effect:r}=cv(e);return{id:D_(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(yv(22))}}},{withTypes:()=>lv}),uv=(e,t)=>{let{type:n,effect:r,predicate:i}=cv(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},dv=e=>{e.pending.forEach(e=>{e.abort(G_)})},fv=(e,t)=>()=>{for(let e of t.keys())dv(e);e.clear()},pv=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},mv=rv(d_(`${av}/add`),{withTypes:()=>mv}),hv=d_(`${av}/removeAll`),gv=rv(d_(`${av}/remove`),{withTypes:()=>gv}),_v=(...e)=>{console.error(`${av}/error`,...e)},vv=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=_v}=e;J_(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&dv(e)}),c=e=>s(uv(t,e)??lv(e));rv(c,{withTypes:()=>c});let l=e=>{let n=uv(t,e);return n&&(n.unsubscribe(),e.cancelActive&&dv(n)),!!n};rv(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=sv(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,rv({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:nv(u.signal),pause:tv(u.signal),extra:a,signal:u.signal,fork:ov(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(G_),n.delete(e))})},cancel:()=>{u.abort(G_),e.pending.delete(u)},throwIfCancelled:()=>{Q_(u.signal)}})))}catch(e){e instanceof q_||pv(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(K_),i(e),e.pending.delete(u)}},d=fv(t,n);return{middleware:e=>n=>r=>{if(!zh(r))return n(r);if(mv.match(r))return c(r.payload);if(hv.match(r)){d();return}if(gv.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===iv)throw Error(yv(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,pv(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=iv}return s},startListening:c,stopListening:l,clearListeners:d}};function yv(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var bv=M_({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),{setMargin:xv,setLayout:Sv,setChartSize:Cv,setScale:wv}=bv.actions,Tv=bv.reducer;function Ev(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function $(e){return Number.isFinite(e)}function Dv(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function Ov(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ov(Object(n),!0).forEach(function(t){Av(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ov(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Av(e,t,n){return(t=jv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jv(e){var t=Mv(e,`string`);return typeof t==`symbol`?t:t+``}function Mv(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Nv(e,t,n){return hm(e)||hm(t)?n:cm(t)?(0,im.default)(e,t,n):typeof t==`function`?t(e):n}var Pv=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:s}=t;if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&X(e[a]))return kv(kv({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&X(e[o]))return kv(kv({},e),{},{[o]:e[o]+(i||0)})}return e},Fv=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,Iv=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},Lv=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:a,scale:o,realScaleType:s,isCategorical:c,categoricalDomain:l,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?am(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return $(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(_m):c&&l?l.map((e,t)=>{var n=o.map(e);return $(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(_m):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return $(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(_m):o.domain().map((e,t)=>{var n=o.map(e);return $(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(_m)},Rv=(e,t)=>{if(!t||t.length!==2||!X(t[0])||!X(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!X(e[0])||e[0]<n)&&(i[0]=n),(!X(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},zv={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=om(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Gp,none:Bp,silhouette:Kp,wiggle:qp,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=om(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},Bv=(e,t,n)=>{var r=zv[n]??Bp,i=Wp().keys(t).value((e,t)=>Number(Nv(e,t,0))).order(Vp).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=Nv(e[i],t[r],0);Array.isArray(a)&&a.length===2&&X(a[0])&&X(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function Vv(e){return e==null?void 0:String(e)}function Hv(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:a,dataKey:o}=e;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!hm(i[t.dataKey])){var s=mm(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=Nv(i,hm(o)?t.dataKey:o),l=t.scale.map(c);return X(l)?l:null}var Uv=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:a,index:o}=e;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=Nv(a,t.dataKey,t.scale.domain()[o]);if(hm(s))return null;var c=t.scale.map(s);return X(c)?c-i/2+r:null},Wv=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},Gv=e=>{var t=e.flat(2).filter(X);return[Math.min(...t),Math.max(...t)]},Kv=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],qv=(e,t,n)=>{if(e!=null)return Kv(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,s=o.reduce((e,r)=>{var i=Gv(Ev(r,t,n));return!$(i[0])||!$(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},Jv=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Yv=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Xv=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=(0,Eh.default)(t,e=>e.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c?.coordinate||0)-(l?.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function Zv(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return kv(kv({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Qv(e,t){if(e)return String(e);if(typeof t==`string`)return t}var $v=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},ey=(e,t)=>t===`centric`?e.angle:e.radius,ty=e=>e.layout.width,ny=e=>e.layout.height,ry=e=>e.layout.scale,iy=e=>e.layout.margin,ay=Q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),oy=Q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),sy=`data-recharts-item-index`;function cy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ly(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?cy(Object(n),!0).forEach(function(t){uy(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uy(e,t,n){return(t=dy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dy(e){var t=fy(e,`string`);return typeof t==`symbol`?t:t+``}function fy(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var py=e=>e.brush.height;function my(e){return oy(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function hy(e){return oy(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function gy(e){return ay(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+t.height:e,0)}function _y(e){return ay(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+t.height:e,0)}var vy=Q([ty,ny,iy,py,my,hy,gy,_y,Dh,Oh],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=ly(ly({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=Pv(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return ly(ly({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),yy=Q(vy,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),by=Q(ty,ny,(e,t)=>({x:0,y:0,width:e,height:t})),xy=(0,S.createContext)(null),Sy=()=>(0,S.useContext)(xy)!=null,Cy=e=>e.brush,wy=Q([Cy,vy,iy],(e,t,n)=>({height:e.height,x:X(e.x)?e.x:t.left,y:X(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:X(e.width)?e.width:t.width})),Ty=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}e.debounce=t})),Ey=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Ty();function n(e,n=0,r={}){typeof r!=`object`&&(r={});let{leading:i=!1,trailing:a=!0,maxWait:o}=r,s=[,,];i&&(s[0]=`leading`),a&&(s[1]=`trailing`);let c,l=null,u=t.debounce(function(...t){c=e.apply(this,t),l=null},n,{edges:s}),d=function(...t){return o!=null&&(l===null&&(l=Date.now()),Date.now()-l>=o)?(c=e.apply(this,t),l=Date.now(),u.cancel(),u.schedule(),c):(u.apply(this,t),c)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),c),d}e.debounce=n})),Dy=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Ey();function n(e,n=0,r={}){let{leading:i=!0,trailing:a=!0}=r;return t.debounce(e,n,{leading:i,maxWait:n,trailing:a})}e.throttle=n})),Oy=s(((e,t)=>{t.exports=Dy().throttle})),ky=!0,Ay=function(e,t){var n=[...arguments].slice(2);if(ky&&typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e))if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}},jy={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},My=(e,t,n)=>{var{width:r=jy.width,height:i=jy.height,aspect:a,maxHeight:o}=n,s=sm(r)?e:Number(r),c=sm(i)?t:Number(i);return a&&a>0&&(s?c=s/a:c&&(s=c*a),o&&c!=null&&c>o&&(c=o)),{calculatedWidth:s,calculatedHeight:c}},Ny={width:0,height:0,overflow:`visible`},Py={width:0,overflowX:`visible`},Fy={height:0,overflowY:`visible`},Iy={},Ly=e=>{var{width:t,height:n}=e,r=sm(t),i=sm(n);return r&&i?Ny:r?Py:i?Fy:Iy};function Ry(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=jy.width,a=jy.height):i===void 0?i=r&&r>0?void 0:jy.width:a===void 0&&(a=r&&r>0?void 0:jy.height),{width:i,height:a}}var zy=u(Oy());function By(){return By=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},By.apply(null,arguments)}function Vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Vy(Object(n),!0).forEach(function(t){Uy(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Uy(e,t,n){return(t=Wy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wy(e){var t=Gy(e,`string`);return typeof t==`symbol`?t:t+``}function Gy(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ky=(0,S.createContext)(jy.initialDimension);function qy(e){return Dv(e.width)&&Dv(e.height)}function Jy(e){var{children:t,width:n,height:r}=e,i=(0,S.useMemo)(()=>({width:n,height:r}),[n,r]);return qy(i)?S.createElement(Ky.Provider,{value:i},t):null}var Yy=()=>(0,S.useContext)(Ky),Xy=(0,S.forwardRef)((e,t)=>{var{aspect:n,initialDimension:r=jy.initialDimension,width:i,height:a,minWidth:o=jy.minWidth,minHeight:s,maxHeight:c,children:l,debounce:u=jy.debounce,id:d,className:f,onResize:p,style:m={}}=e,h=(0,S.useRef)(null),g=(0,S.useRef)();g.current=p,(0,S.useImperativeHandle)(t,()=>h.current);var[_,v]=(0,S.useState)({containerWidth:r.width,containerHeight:r.height}),y=(0,S.useCallback)((e,t)=>{v(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,S.useEffect)(()=>{if(h.current==null||typeof ResizeObserver>`u`)return vm;var e=e=>{var t,n=e[0];if(n!=null){var{width:r,height:i}=n.contentRect;y(r,i),(t=g.current)==null||t.call(g,r,i)}};u>0&&(e=(0,zy.default)(e,u,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=h.current.getBoundingClientRect();return y(n,r),t.observe(h.current),()=>{t.disconnect()}},[y,u]);var{containerWidth:b,containerHeight:x}=_;Ay(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var{calculatedWidth:C,calculatedHeight:w}=My(b,x,{width:i,height:a,aspect:n,maxHeight:c});return Ay(C!=null&&C>0||w!=null&&w>0,`The width(%s) and height(%s) of chart should be greater than 0,
18
18
  please check the style of container, or the props width(%s) and height(%s),
19
19
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
20
20
  height and width.`,C,w,i,a,o,s,n),S.createElement(`div`,{id:d?`${d}`:void 0,className:nf(`recharts-responsive-container`,f),style:Hy(Hy({},m),{},{width:i,height:a,minWidth:o,minHeight:s,maxHeight:c}),ref:h},S.createElement(`div`,{style:Ly({width:i,height:a})},S.createElement(Jy,{width:C,height:w},l)))}),Zy=(0,S.forwardRef)((e,t)=>{var n=Yy();if(Dv(n.width)&&Dv(n.height))return e.children;var{width:r,height:i}=Ry({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:o}=My(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return X(a)&&X(o)?S.createElement(Jy,{width:a,height:o},e.children):S.createElement(Xy,By({},e,{width:r,height:i,ref:t}))});function Qy(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var $y=()=>{var e=Sy(),t=Z(yy),n=Z(wy),r=Z(Cy)?.padding;return!e||!n||!r?t:{width:n.width-r.left-r.right,height:n.height-r.top-r.bottom,x:r.left,y:r.top}},eb={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},tb=()=>Z(vy)??eb,nb=()=>Z(ty),rb=()=>Z(ny),ib=e=>e.layout.layoutType,ab=()=>Z(ib),ob=()=>{var e=ab();if(e===`horizontal`||e===`vertical`)return e},sb=e=>{var t=e.layout.layoutType;if(t===`centric`||t===`radial`)return t},cb=()=>ab()!==void 0,lb=e=>{var t=th(),n=Sy(),{width:r,height:i}=e,a=Yy(),o=r,s=i;return a&&(o=a.width>0?a.width:r,s=a.height>0?a.height:i),(0,S.useEffect)(()=>{!n&&Dv(o)&&Dv(s)&&t(Cv({width:o,height:s}))},[t,n,o,s]),null},ub=Symbol.for(`immer-nothing`),db=Symbol.for(`immer-draftable`),fb=Symbol.for(`immer-state`);function pb(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var mb=Object.getPrototypeOf;function hb(e){return!!e&&!!e[fb]}function gb(e){return e?yb(e)||Array.isArray(e)||!!e[db]||!!e.constructor?.[db]||Tb(e)||Eb(e):!1}var _b=Object.prototype.constructor.toString(),vb=new WeakMap;function yb(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;let n=Object.hasOwnProperty.call(t,`constructor`)&&t.constructor;if(n===Object)return!0;if(typeof n!=`function`)return!1;let r=vb.get(n);return r===void 0&&(r=Function.toString.call(n),vb.set(n,r)),r===_b}function bb(e,t,n=!0){xb(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function xb(e){let t=e[fb];return t?t.type_:Array.isArray(e)?1:Tb(e)?2:Eb(e)?3:0}function Sb(e,t){return xb(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Cb(e,t,n){let r=xb(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function wb(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function Tb(e){return e instanceof Map}function Eb(e){return e instanceof Set}function Db(e){return e.copy_||e.base_}function Ob(e,t){if(Tb(e))return new Map(e);if(Eb(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=yb(e);if(t===!0||t===`class_only`&&!n){let t=Object.getOwnPropertyDescriptors(e);delete t[fb];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(mb(e),t)}else{let t=mb(e);return t!==null&&n?{...e}:Object.assign(Object.create(t),e)}}function kb(e,t=!1){return Mb(e)||hb(e)||!gb(e)?e:(xb(e)>1&&Object.defineProperties(e,{set:jb,add:jb,clear:jb,delete:jb}),Object.freeze(e),t&&Object.values(e).forEach(e=>kb(e,!0)),e)}function Ab(){pb(2)}var jb={value:Ab};function Mb(e){return typeof e!=`object`||!e?!0:Object.isFrozen(e)}var Nb={};function Pb(e){let t=Nb[e];return t||pb(0,e),t}var Fb;function Ib(){return Fb}function Lb(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Rb(e,t){t&&(Pb(`Patches`),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zb(e){Bb(e),e.drafts_.forEach(Hb),e.drafts_=null}function Bb(e){e===Fb&&(Fb=e.parent_)}function Vb(e){return Fb=Lb(Fb,e)}function Hb(e){let t=e[fb];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ub(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[fb].modified_&&(zb(t),pb(4)),gb(e)&&(e=Wb(t,e),t.parent_||Kb(t,e)),t.patches_&&Pb(`Patches`).generateReplacementPatches_(n[fb].base_,e,t.patches_,t.inversePatches_)):e=Wb(t,n,[]),zb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===ub?void 0:e}function Wb(e,t,n){if(Mb(t))return t;let r=e.immer_.shouldUseStrictIteration(),i=t[fb];if(!i)return bb(t,(r,a)=>Gb(e,i,t,r,a,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return Kb(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;let t=i.copy_,a=t,o=!1;i.type_===3&&(a=new Set(t),t.clear(),o=!0),bb(a,(r,a)=>Gb(e,i,t,r,a,n,o),r),Kb(e,t,!1),n&&e.patches_&&Pb(`Patches`).generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function Gb(e,t,n,r,i,a,o){if(i==null||typeof i!=`object`&&!o)return;let s=Mb(i);if(!(s&&!o)){if(hb(i)){let o=Wb(e,i,a&&t&&t.type_!==3&&!Sb(t.assigned_,r)?a.concat(r):void 0);if(Cb(n,r,o),hb(o))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(gb(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&s)return;Wb(e,i),(!t||!t.scope_.parent_)&&typeof r!=`symbol`&&(Tb(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Kb(e,i)}}}function Kb(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&kb(t,n)}function qb(e,t){let n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ib(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=r,a=Jb;n&&(i=[r],a=Yb);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var Jb={get(e,t){if(t===fb)return e;let n=Db(e);if(!Sb(n,t))return Zb(e,n,t);let r=n[t];return e.finalized_||!gb(r)?r:r===Xb(e.base_,t)?(ex(e),e.copy_[t]=nx(r,e)):r},has(e,t){return t in Db(e)},ownKeys(e){return Reflect.ownKeys(Db(e))},set(e,t,n){let r=Qb(Db(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Xb(Db(e),t),i=r?.[fb];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(wb(n,r)&&(n!==void 0||Sb(e.base_,t)))return!0;ex(e),$b(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_[t]=!0,!0)},deleteProperty(e,t){return Xb(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ex(e),$b(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Db(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!==`length`,enumerable:r.enumerable,value:n[t]}},defineProperty(){pb(11)},getPrototypeOf(e){return mb(e.base_)},setPrototypeOf(){pb(12)}},Yb={};bb(Jb,(e,t)=>{Yb[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Yb.deleteProperty=function(e,t){return Yb.set.call(this,e,t,void 0)},Yb.set=function(e,t,n){return Jb.set.call(this,e[0],t,n,e[0])};function Xb(e,t){let n=e[fb];return(n?Db(n):e)[t]}function Zb(e,t,n){let r=Qb(t,n);return r?`value`in r?r.value:r.get?.call(e.draft_):void 0}function Qb(e,t){if(!(t in e))return;let n=mb(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=mb(n)}}function $b(e){e.modified_||(e.modified_=!0,e.parent_&&$b(e.parent_))}function ex(e){e.copy_||=Ob(e.base_,e.scope_.immer_.useStrictShallowCopy_)}var tx=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if(typeof e==`function`&&typeof t!=`function`){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}typeof t!=`function`&&pb(6),n!==void 0&&typeof n!=`function`&&pb(7);let r;if(gb(e)){let i=Vb(this),a=nx(e,void 0),o=!0;try{r=t(a),o=!1}finally{o?zb(i):Bb(i)}return Rb(i,n),Ub(r,i)}else if(!e||typeof e!=`object`){if(r=t(e),r===void 0&&(r=e),r===ub&&(r=void 0),this.autoFreeze_&&kb(r,!0),n){let t=[],i=[];Pb(`Patches`).generateReplacementPatches_(e,r,t,i),n(t,i)}return r}else pb(1,e)},this.produceWithPatches=(e,t)=>{if(typeof e==`function`)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},typeof e?.autoFreeze==`boolean`&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy==`boolean`&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration==`boolean`&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){gb(e)||pb(8),hb(e)&&(e=rx(e));let t=Vb(this),n=nx(e,void 0);return n[fb].isManual_=!0,Bb(t),n}finishDraft(e,t){let n=e&&e[fb];(!n||!n.isManual_)&&pb(9);let{scope_:r}=n;return Rb(r,t),Ub(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Pb(`Patches`).applyPatches_;return hb(e)?r(e,t):this.produce(e,e=>r(e,t))}};function nx(e,t){let n=Tb(e)?Pb(`MapSet`).proxyMap_(e,t):Eb(e)?Pb(`MapSet`).proxySet_(e,t):qb(e,t);return(t?t.scope_:Ib()).drafts_.push(n),n}function rx(e){return hb(e)||pb(10,e),ix(e)}function ix(e){if(!gb(e)||Mb(e))return e;let t=e[fb],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ob(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ob(e,!0);return bb(n,(e,t)=>{Cb(n,e,ix(t))},r),t&&(t.finalized_=!1),n}new tx().produce;function ax(e){return e}var ox=M_({name:`legend`,initialState:{settings:{layout:`horizontal`,align:`center`,verticalAlign:`middle`,itemSorter:`value`},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(ax(t.payload))},prepare:v_()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=i_(e).payload.indexOf(ax(n));i>-1&&(e.payload[i]=ax(r))},prepare:v_()},removeLegendPayload:{reducer(e,t){var n=i_(e).payload.indexOf(ax(t.payload));n>-1&&e.payload.splice(n,1)},prepare:v_()}}}),{setLegendSize:sx,setLegendSettings:cx,addLegendPayload:lx,replaceLegendPayload:ux,removeLegendPayload:dx}=ox.actions,fx=ox.reducer,px=s((e=>{var t=p();t.useSyncExternalStore,t.useRef,t.useEffect,t.useMemo,t.useDebugValue}));s(((e,t)=>{t.exports=px()}))();function mx(e){e()}function hx(){let e=null,t=null;return{clear(){e=null,t=null},notify(){mx(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){let t=[],n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0,i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var gx={notify(){},get:()=>[]};function _x(e,t){let n,r=gx,i=0,a=!1;function o(e){u();let t=r.subscribe(e),n=!1;return()=>{n||(n=!0,t(),d())}}function s(){r.notify()}function c(){m.onStateChange&&m.onStateChange()}function l(){return a}function u(){i++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=hx())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=gx)}function f(){a||(a=!0,u())}function p(){a&&(a=!1,d())}let m={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:c,isSubscribed:l,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return m}var vx=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,yx=typeof navigator<`u`&&navigator.product===`ReactNative`,bx=vx||yx?S.useLayoutEffect:S.useEffect;function xx(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}function Sx(e,t){if(xx(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!xx(e[n[r]],t[n[r]]))return!1;return!0}var Cx=Symbol.for(`react-redux-context`),wx=typeof globalThis<`u`?globalThis:{};function Tx(){if(!S.createContext)return{};let e=wx[Cx]??=new Map,t=e.get(S.createContext);return t||(t=S.createContext(null),e.set(S.createContext,t)),t}var Ex=Tx();function Dx(e){let{children:t,context:n,serverState:r,store:i}=e,a=S.useMemo(()=>({store:i,subscription:_x(i),getServerState:r?()=>r:void 0}),[i,r]),o=S.useMemo(()=>i.getState(),[i]);bx(()=>{let{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]);let s=n||Ex;return S.createElement(s.Provider,{value:a},t)}var Ox=Dx,kx=new Set([`axisLine`,`tickLine`,`activeBar`,`activeDot`,`activeLabel`,`activeShape`,`allowEscapeViewBox`,`background`,`cursor`,`dot`,`label`,`line`,`margin`,`padding`,`position`,`shape`,`style`,`tick`,`wrapperStyle`,`radius`,`throttledEvents`]);function Ax(e,t){return e==null&&t==null?!0:typeof e==`number`&&typeof t==`number`?e===t||e!==e&&t!==t:e===t}function jx(e,t){for(var n of new Set([...Object.keys(e),...Object.keys(t)]))if(kx.has(n)){if(e[n]==null&&t[n]==null)continue;if(!Sx(e[n],t[n]))return!1}else if(!Ax(e[n],t[n]))return!1;return!0}var Mx={devToolsEnabled:!0,isSsr:!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)};function Nx(){var[e,t]=(0,S.useState)(()=>Mx.isSsr||!window.matchMedia?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches);return(0,S.useEffect)(()=>{if(window.matchMedia){var e=window.matchMedia(`(prefers-reduced-motion: reduce)`),n=()=>{t(e.matches)};return e.addEventListener(`change`,n),()=>{e.removeEventListener(`change`,n)}}},[]),e}var Px=()=>Z(e=>e.rootProps.accessibilityLayer)??!0;function Fx(){return Fx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fx.apply(null,arguments)}function Ix(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ix(Object(n),!0).forEach(function(t){Rx(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ix(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Rx(e,t,n){return(t=zx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zx(e){var t=Bx(e,`string`);return typeof t==`symbol`?t:t+``}function Bx(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Vx={curveBasisClosed:yp,curveBasisOpen:xp,curveBasis:_p,curveBumpX:qf,curveBumpY:Jf,curveLinearClosed:Cp,curveLinear:Vf,curveMonotoneX:jp,curveMonotoneY:Mp,curveNatural:Fp,curveStep:Lp,curveStepAfter:zp,curveStepBefore:Rp},Hx=e=>$(e.x)&&$(e.y),Ux=e=>e.base!=null&&Hx(e.base)&&Hx(e),Wx=e=>e.x,Gx=e=>e.y,Kx=(e,t)=>{if(typeof e==`function`)return e;var n=`curve${gm(e)}`;if((n===`curveMonotone`||n===`curveBump`)&&t){var r=Vx[`${n}${t===`vertical`?`Y`:`X`}`];if(r)return r}return Vx[n]||Vf},qx={connectNulls:!1,type:`linear`},Jx=e=>{var{type:t=qx.type,points:n=[],baseLine:r,layout:i,connectNulls:a=qx.connectNulls}=e,o=Kx(t,i),s=a?n.filter(Hx):n;if(Array.isArray(r)){var c,l=n.map((e,t)=>Lx(Lx({},e),{},{base:r[t]}));return c=i===`vertical`?Gf().y(Gx).x1(Wx).x0(e=>e.base.x):Gf().x(Wx).y1(Gx).y0(e=>e.base.y),c.defined(Ux).curve(o)(a?l.filter(Ux):l)}return(i===`vertical`&&X(r)?Gf().y(Gx).x1(Wx).x0(r):X(r)?Gf().x(Wx).y1(Gx).y0(r):Wf().x(Wx).y(Gx)).defined(Hx).curve(o)(s)},Yx=e=>{var{className:t,points:n,path:r,pathRef:i}=e,a=ab();if((!n||!n.length)&&!r)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=n&&n.length?Jx(o):r;return S.createElement(`path`,Fx({},lf(e),Pm(e),{className:nf(`recharts-curve`,t),d:s===null?void 0:s,ref:i}))};function Xx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Zx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Xx(Object(n),!0).forEach(function(t){Qx(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qx(e,t,n){return(t=$x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $x(e){var t=eS(e,`string`);return typeof t==`symbol`?t:t+``}function eS(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var tS=e=>e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`),nS=(e,t,n)=>e.map(e=>`${tS(e)} ${t}ms ${n}`).join(`,`),rS=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((e,t)=>e.filter(e=>t.includes(e))),iS=(e,t)=>Object.keys(t).reduce((n,r)=>Zx(Zx({},n),{},{[r]:e(r,t[r])}),{});function aS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aS(Object(n),!0).forEach(function(t){sS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sS(e,t,n){return(t=cS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cS(e){var t=lS(e,`string`);return typeof t==`symbol`?t:t+``}function lS(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var uS=(e,t,n)=>e+(t-e)*n,dS=e=>{var{from:t,to:n}=e;return t!==n},fS=(e,t,n)=>{var r=iS((t,n)=>{if(dS(n)){var[r,i]=e(n.from,n.to,n.velocity);return oS(oS({},n),{},{from:r,velocity:i})}return n},t);return n<1?iS((e,t)=>dS(t)&&r[e]!=null?oS(oS({},t),{},{velocity:uS(t.velocity,r[e].velocity,n),from:uS(t.from,r[e].from,n)}):t,t):fS(e,r,n-1)};function pS(e,t,n,r,i,a){var o,s=r.reduce((n,r)=>oS(oS({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),c=()=>iS((e,t)=>t.from,s),l=()=>!Object.values(s).filter(dS).length,u=null,d=r=>{o||=r;var f=(r-o)/n.dt;s=fS(n,s,f),i(oS(oS(oS({},e),t),c())),o=r,l()||(u=a.setTimeout(d))};return()=>(u=a.setTimeout(d),()=>{var e;(e=u)==null||e()})}function mS(e,t,n,r,i,a,o){var s=null,c=i.reduce((n,r)=>{var i=e[r],a=t[r];return i==null||a==null?n:oS(oS({},n),{},{[r]:[i,a]})},{}),l,u=i=>{l||=i;var d=(i-l)/r,f=iS((e,t)=>uS(...t,n(d)),c);if(a(oS(oS(oS({},e),t),f)),d<1)s=o.setTimeout(u);else{var p=iS((e,t)=>uS(...t,n(1)),c);a(oS(oS(oS({},e),t),p))}};return()=>(s=o.setTimeout(u),()=>{var e;(e=s)==null||e()})}var hS=(e,t,n,r,i,a)=>{var o=rS(e,t);return n==null?()=>(i(oS(oS({},e),t)),()=>{}):n.isStepper===!0?pS(e,t,n,o,i,a):mS(e,t,n,r,o,i,a)},gS=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],_S=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),vS=(e,t)=>n=>_S(gS(e,t),n),yS=(e,t)=>n=>_S([...gS(e,t).map((e,t)=>e*t).slice(1),0],n),bS=e=>{var t,n=e.split(`(`);if(n.length!==2||n[0]!==`cubic-bezier`)return null;var r=(t=n[1])==null||(t=t.split(`)`)[0])==null?void 0:t.split(`,`);if(r==null||r.length!==4)return null;var i=r.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]},xS=function(){var e=[...arguments];if(e.length===1)switch(e[0]){case`linear`:return[0,0,1,1];case`ease`:return[.25,.1,.25,1];case`ease-in`:return[.42,0,1,1];case`ease-out`:return[.42,0,.58,1];case`ease-in-out`:return[0,0,.58,1];default:var t=bS(e[0]);if(t)return t}return e.length===4?e:[0,0,1,1]},SS=(e,t,n,r)=>{var i=vS(e,n),a=vS(t,r),o=yS(e,n),s=e=>e>1?1:e<0?0:e,c=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var c=i(n)-t,l=o(n);if(Math.abs(c-t)<1e-4||l<1e-4)return a(n);n=s(n-c/l)}return a(n)};return c.isStepper=!1,c},CS=function(){return SS(...xS(...arguments))},wS=function(){var{stiff:e=100,damping:t=8,dt:n=17}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=(r,i,a)=>{var o=a+(-(r-i)*e-a*t)*n/1e3,s=a*n/1e3+r;return Math.abs(s-i)<1e-4&&Math.abs(o)<1e-4?[i,0]:[s,o]};return r.isStepper=!0,r.dt=n,r},TS=e=>{if(typeof e==`string`)switch(e){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return CS(e);case`spring`:return wS();default:if(e.split(`(`)[0]===`cubic-bezier`)return CS(e)}return typeof e==`function`?e:null};function ES(e){var t,n=()=>null,r=!1,i=null,a=o=>{if(!r){if(Array.isArray(o)){if(!o.length)return;var[s,...c]=o;if(typeof s==`number`){i=e.setTimeout(a.bind(null,c),s);return}a(s),i=e.setTimeout(a.bind(null,c));return}typeof o==`string`&&(t=o,n(t)),typeof o==`object`&&(t=o,n(t)),typeof o==`function`&&o()}};return{stop:()=>{r=!0},start:e=>{r=!1,i&&=(i(),null),a(e)},subscribe:e=>(n=e,()=>{n=()=>null}),getTimeoutController:()=>e}}var DS=class{setTimeout(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),r=null,i=a=>{a-n>=t?e(a):typeof requestAnimationFrame==`function`&&(r=requestAnimationFrame(i))};return r=requestAnimationFrame(i),()=>{r!=null&&cancelAnimationFrame(r)}}};function OS(){return ES(new DS)}var kS=(0,S.createContext)(OS);function AS(e,t){var n=(0,S.useContext)(kS);return(0,S.useMemo)(()=>t??n(e),[e,t,n])}var jS={begin:0,duration:1e3,easing:`ease`,isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},MS={t:0},NS={t:1};function PS(e){var t=Hm(e,jS),{isActive:n,canBegin:r,duration:i,easing:a,begin:o,onAnimationEnd:s,onAnimationStart:c,children:l}=t,u=Nx(),d=n===`auto`?!Mx.isSsr&&!u:n,f=AS(t.animationId,t.animationManager),[p,m]=(0,S.useState)(d?MS:NS),h=(0,S.useRef)(null);return(0,S.useEffect)(()=>{d||m(NS)},[d]),(0,S.useEffect)(()=>{if(!d||!r)return vm;var e=hS(MS,NS,TS(a),i,m,f.getTimeoutController());return f.start([c,o,()=>{h.current=e()},i,s]),()=>{f.stop(),h.current&&h.current(),s()}},[d,r,i,a,o,c,s,f]),l(p.t)}function FS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`animation-`,n=(0,S.useRef)(um(t)),r=(0,S.useRef)(e);return r.current!==e&&(n.current=um(t),r.current=e),n.current}var IS=[`radius`],LS=[`radius`],RS,zS,BS,VS,HS,US,WS,GS,KS,qS;function JS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JS(Object(n),!0).forEach(function(t){XS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XS(e,t,n){return(t=ZS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZS(e){var t=QS(e,`string`);return typeof t==`symbol`?t:t+``}function QS(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $S(){return $S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$S.apply(null,arguments)}function eC(e,t){if(e==null)return{};var n,r,i=tC(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function tC(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function nC(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var rC=(e,t,n,r,i)=>{var a=nm(n),o=nm(r),s=Math.min(Math.abs(a)/2,Math.abs(o)/2),c=o>=0?1:-1,l=a>=0?1:-1,u=o>=0&&a>=0||o<0&&a<0?1:0,d;if(s>0&&Array.isArray(i)){for(var f=[0,0,0,0],p=0,m=4;p<m;p++){var h=i[p]??0;f[p]=h>s?s:h}d=rm(RS||=nC([`M`,`,`,``]),e,t+c*f[0]),f[0]>0&&(d+=rm(zS||=nC([`A `,`,`,`,0,0,`,`,`,`,`,``]),f[0],f[0],u,e+l*f[0],t)),d+=rm(BS||=nC([`L `,`,`,``]),e+n-l*f[1],t),f[1]>0&&(d+=rm(VS||=nC([`A `,`,`,`,0,0,`,`,