3 lines
472 KiB
JavaScript
3 lines
472 KiB
JavaScript
/*! For license information please see main.97b260f1.js.LICENSE.txt */
|
|
(()=>{var e={43:(e,t,n)=>{"use strict";e.exports=n(202)},153:(e,t,n)=>{"use strict";var i=n(43),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var i,o={},u=null,c=null;for(i in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)a.call(t,i)&&!l.hasOwnProperty(i)&&(o[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===o[i]&&(o[i]=t[i]);return{$$typeof:r,type:e,key:u,ref:c,props:o,_owner:s.current}}t.jsx=u,t.jsxs=u},202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function y(){}function x(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var _=x.prototype=new y;_.constructor=x,m(_,v.prototype),_.isPureReactComponent=!0;var b=Array.isArray,w=Object.prototype.hasOwnProperty,j={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,i){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=i;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:n,type:e,key:a,ref:s,props:o,_owner:j.current}}function N(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var L=/\/+/g;function E(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function C(e,t,r,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case i:l=!0}}if(l)return a=a(l=e),e=""===o?"."+E(l,0):o,b(a)?(r="",null!=e&&(r=e.replace(L,"$&/")+"/"),C(a,t,r,"",function(e){return e})):null!=a&&(N(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,r+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(L,"$&/")+"/")+e)),t.push(a)),1;if(l=0,o=""===o?".":o+":",b(e))for(var u=0;u<e.length;u++){var c=o+E(s=e[u],u);l+=C(s,t,r,c,a)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=C(s=s.value,t,r,c=o+E(s,u++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function P(e,t,n){if(null==e)return e;var i=[],r=0;return C(e,i,"","",function(e){return t.call(n,e,r++)}),i}function T(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},z={transition:null},M={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:z,ReactCurrentOwner:j};function I(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!N(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=r,t.Profiler=a,t.PureComponent=x,t.StrictMode=o,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.act=I,t.cloneElement=function(e,t,i){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=m({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=j.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)w.call(t,u)&&!k.hasOwnProperty(u)&&(r[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)r.children=i;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:n,type:e.type,key:o,ref:a,props:r,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=N,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:T}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=z.transition;z.transition={};try{e()}finally{z.transition=t}},t.unstable_act=I,t.useCallback=function(e,t){return O.current.useCallback(e,t)},t.useContext=function(e){return O.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return O.current.useDeferredValue(e)},t.useEffect=function(e,t){return O.current.useEffect(e,t)},t.useId=function(){return O.current.useId()},t.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return O.current.useMemo(e,t)},t.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},t.useRef=function(e){return O.current.useRef(e)},t.useState=function(e){return O.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return O.current.useTransition()},t.version="18.3.1"},228:function(e,t){!function(e){"use strict";var t="1.9.4";function n(e){var t,n,i,r;for(n=1,i=arguments.length;n<i;n++)for(t in r=arguments[n])e[t]=r[t];return e}var i=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}();function r(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var i=n.call(arguments,2);return function(){return e.apply(t,i.length?i.concat(n.call(arguments)):arguments)}}var o=0;function a(e){return"_leaflet_id"in e||(e._leaflet_id=++o),e._leaflet_id}function s(e,t,n){var i,r,o,a;return a=function(){i=!1,r&&(o.apply(n,r),r=!1)},o=function(){i?r=arguments:(e.apply(n,arguments),setTimeout(a,t),i=!0)},o}function l(e,t,n){var i=t[1],r=t[0],o=i-r;return e===i&&n?e:((e-r)%o+o)%o+r}function u(){return!1}function c(e,t){if(!1===t)return e;var n=Math.pow(10,void 0===t?6:t);return Math.round(e*n)/n}function d(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function h(e){return d(e).split(/\s+/)}function f(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?i(e.options):{}),t)e.options[n]=t[n];return e.options}function p(e,t,n){var i=[];for(var r in e)i.push(encodeURIComponent(n?r.toUpperCase():r)+"="+encodeURIComponent(e[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function g(e,t){return e.replace(m,function(e,n){var i=t[n];if(void 0===i)throw new Error("No value provided for variable "+e);return"function"===typeof i&&(i=i(t)),i})}var v=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function y(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var x="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function _(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var b=0;function w(e){var t=+new Date,n=Math.max(0,16-(t-b));return b=t+n,window.setTimeout(e,n)}var j=window.requestAnimationFrame||_("RequestAnimationFrame")||w,k=window.cancelAnimationFrame||_("CancelAnimationFrame")||_("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function S(e,t,n){if(!n||j!==w)return j.call(window,r(e,t));e.call(t)}function N(e){e&&k.call(window,e)}var E={__proto__:null,extend:n,create:i,bind:r,get lastId(){return o},stamp:a,throttle:s,wrapNum:l,falseFn:u,formatNum:c,trim:d,splitWords:h,setOptions:f,getParamString:p,template:g,isArray:v,indexOf:y,emptyImageUrl:x,requestFn:j,cancelFn:k,requestAnimFrame:S,cancelAnimFrame:N};function C(){}function P(e){if("undefined"!==typeof L&&L&&L.Mixin){e=v(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.",(new Error).stack)}}C.extend=function(e){var t=function(){f(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},r=t.__super__=this.prototype,o=i(r);for(var a in o.constructor=t,t.prototype=o,this)Object.prototype.hasOwnProperty.call(this,a)&&"prototype"!==a&&"__super__"!==a&&(t[a]=this[a]);return e.statics&&n(t,e.statics),e.includes&&(P(e.includes),n.apply(null,[o].concat(e.includes))),n(o,e),delete o.statics,delete o.includes,o.options&&(o.options=r.options?i(r.options):{},n(o.options,e.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){r.callInitHooks&&r.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=o._initHooks.length;e<t;e++)o._initHooks[e].call(this)}},t},C.include=function(e){var t=this.prototype.options;return n(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},C.mergeOptions=function(e){return n(this.prototype.options,e),this},C.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"===typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var T={on:function(e,t,n){if("object"===typeof e)for(var i in e)this._on(i,e[i],t);else for(var r=0,o=(e=h(e)).length;r<o;r++)this._on(e[r],t,n);return this},off:function(e,t,n){if(arguments.length)if("object"===typeof e)for(var i in e)this._off(i,e[i],t);else{e=h(e);for(var r=1===arguments.length,o=0,a=e.length;o<a;o++)r?this._off(e[o]):this._off(e[o],t,n)}else delete this._events;return this},_on:function(e,t,n,i){if("function"===typeof t){if(!1===this._listens(e,t,n)){n===this&&(n=void 0);var r={fn:t,ctx:n};i&&(r.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(r)}}else console.warn("wrong listener type: "+typeof t)},_off:function(e,t,n){var i,r,o;if(this._events&&(i=this._events[e]))if(1!==arguments.length)if("function"===typeof t){var a=this._listens(e,t,n);if(!1!==a){var s=i[a];this._firingCount&&(s.fn=u,this._events[e]=i=i.slice()),i.splice(a,1)}}else console.warn("wrong listener type: "+typeof t);else{if(this._firingCount)for(r=0,o=i.length;r<o;r++)i[r].fn=u;delete this._events[e]}},fire:function(e,t,i){if(!this.listens(e,i))return this;var r=n({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this});if(this._events){var o=this._events[e];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,s=o.length;a<s;a++){var l=o[a],u=l.fn;l.once&&this.off(e,u,l.ctx),u.call(l.ctx||this,r)}this._firingCount--}}return i&&this._propagateEvent(r),this},listens:function(e,t,n,i){"string"!==typeof e&&console.warn('"string" type argument expected');var r=t;"function"!==typeof t&&(i=!!t,r=void 0,n=void 0);var o=this._events&&this._events[e];if(o&&o.length&&!1!==this._listens(e,r,n))return!0;if(i)for(var a in this._eventParents)if(this._eventParents[a].listens(e,t,n,i))return!0;return!1},_listens:function(e,t,n){if(!this._events)return!1;var i=this._events[e]||[];if(!t)return!!i.length;n===this&&(n=void 0);for(var r=0,o=i.length;r<o;r++)if(i[r].fn===t&&i[r].ctx===n)return r;return!1},once:function(e,t,n){if("object"===typeof e)for(var i in e)this._on(i,e[i],t,!0);else for(var r=0,o=(e=h(e)).length;r<o;r++)this._on(e[r],t,n,!0);return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[a(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[a(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)}};T.addEventListener=T.on,T.removeEventListener=T.clearAllEventListeners=T.off,T.addOneTimeEventListener=T.once,T.fireEvent=T.fire,T.hasEventListeners=T.listens;var O=C.extend(T);function z(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}var M=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};function I(e,t,n){return e instanceof z?e:v(e)?new z(e[0],e[1]):void 0===e||null===e?e:"object"===typeof e&&"x"in e&&"y"in e?new z(e.x,e.y):new z(e,t,n)}function R(e,t){if(e)for(var n=t?[e,t]:e,i=0,r=n.length;i<r;i++)this.extend(n[i])}function D(e,t){return!e||e instanceof R?e:new R(e,t)}function A(e,t){if(e)for(var n=t?[e,t]:e,i=0,r=n.length;i<r;i++)this.extend(n[i])}function B(e,t){return e instanceof A?e:new A(e,t)}function F(e,t,n){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==n&&(this.alt=+n)}function U(e,t,n){return e instanceof F?e:v(e)&&"object"!==typeof e[0]?3===e.length?new F(e[0],e[1],e[2]):2===e.length?new F(e[0],e[1]):null:void 0===e||null===e?e:"object"===typeof e&&"lat"in e?new F(e.lat,"lng"in e?e.lng:e.lon,e.alt):void 0===t?null:new F(e,t,n)}z.prototype={clone:function(){return new z(this.x,this.y)},add:function(e){return this.clone()._add(I(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(I(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 z(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new z(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=M(this.x),this.y=M(this.y),this},distanceTo:function(e){var t=(e=I(e)).x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return(e=I(e)).x===this.x&&e.y===this.y},contains:function(e){return e=I(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},R.prototype={extend:function(e){var t,n;if(!e)return this;if(e instanceof z||"number"===typeof e[0]||"x"in e)t=n=I(e);else if(t=(e=D(e)).min,n=e.max,!t||!n)return this;return this.min||this.max?(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.min=t.clone(),this.max=n.clone()),this},getCenter:function(e){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(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="number"===typeof e[0]||e instanceof z?I(e):D(e))instanceof R?(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=D(e);var t=this.min,n=this.max,i=e.min,r=e.max,o=r.x>=t.x&&i.x<=n.x,a=r.y>=t.y&&i.y<=n.y;return o&&a},overlaps:function(e){e=D(e);var t=this.min,n=this.max,i=e.min,r=e.max,o=r.x>t.x&&i.x<n.x,a=r.y>t.y&&i.y<n.y;return o&&a},isValid:function(){return!(!this.min||!this.max)},pad:function(e){var t=this.min,n=this.max,i=Math.abs(t.x-n.x)*e,r=Math.abs(t.y-n.y)*e;return D(I(t.x-i,t.y-r),I(n.x+i,n.y+r))},equals:function(e){return!!e&&(e=D(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight()))}},A.prototype={extend:function(e){var t,n,i=this._southWest,r=this._northEast;if(e instanceof F)t=e,n=e;else{if(!(e instanceof A))return e?this.extend(U(e)||B(e)):this;if(t=e._southWest,n=e._northEast,!t||!n)return this}return i||r?(i.lat=Math.min(t.lat,i.lat),i.lng=Math.min(t.lng,i.lng),r.lat=Math.max(n.lat,r.lat),r.lng=Math.max(n.lng,r.lng)):(this._southWest=new F(t.lat,t.lng),this._northEast=new F(n.lat,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,i=Math.abs(t.lat-n.lat)*e,r=Math.abs(t.lng-n.lng)*e;return new A(new F(t.lat-i,t.lng-r),new F(n.lat+i,n.lng+r))},getCenter:function(){return new F((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 F(this.getNorth(),this.getWest())},getSouthEast:function(){return new F(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="number"===typeof e[0]||e instanceof F||"lat"in e?U(e):B(e);var t,n,i=this._southWest,r=this._northEast;return e instanceof A?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=i.lat&&n.lat<=r.lat&&t.lng>=i.lng&&n.lng<=r.lng},intersects:function(e){e=B(e);var t=this._southWest,n=this._northEast,i=e.getSouthWest(),r=e.getNorthEast(),o=r.lat>=t.lat&&i.lat<=n.lat,a=r.lng>=t.lng&&i.lng<=n.lng;return o&&a},overlaps:function(e){e=B(e);var t=this._southWest,n=this._northEast,i=e.getSouthWest(),r=e.getNorthEast(),o=r.lat>t.lat&&i.lat<n.lat,a=r.lng>t.lng&&i.lng<n.lng;return o&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return!!e&&(e=B(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t))},isValid:function(){return!(!this._southWest||!this._northEast)}},F.prototype={equals:function(e,t){return!!e&&(e=U(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+c(this.lat,e)+", "+c(this.lng,e)+")"},distanceTo:function(e){return H.distance(this,U(e))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return B([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])},clone:function(){return new F(this.lat,this.lng,this.alt)}};var Z={latLngToPoint:function(e,t){var n=this.projection.project(e),i=this.scale(t);return this.transformation._transform(n,i)},pointToLatLng:function(e,t){var n=this.scale(t),i=this.transformation.untransform(e,n);return this.projection.unproject(i)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(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 R(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?l(e.lng,this.wrapLng,!0):e.lng;return new F(this.wrapLat?l(e.lat,this.wrapLat,!0):e.lat,t,e.alt)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),i=t.lat-n.lat,r=t.lng-n.lng;if(0===i&&0===r)return e;var o=e.getSouthWest(),a=e.getNorthEast();return new A(new F(o.lat-i,o.lng-r),new F(a.lat-i,a.lng-r))}},H=n({},Z,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,i=e.lat*n,r=t.lat*n,o=Math.sin((t.lat-e.lat)*n/2),a=Math.sin((t.lng-e.lng)*n/2),s=o*o+Math.cos(i)*Math.cos(r)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),W=6378137,V={R:W,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,e.lat),-n),r=Math.sin(i*t);return new z(this.R*e.lng*t,this.R*Math.log((1+r)/(1-r))/2)},unproject:function(e){var t=180/Math.PI;return new F((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:function(){var e=W*Math.PI;return new R([-e,-e],[e,e])}()};function $(e,t,n,i){if(v(e))return this._a=e[0],this._b=e[1],this._c=e[2],void(this._d=e[3]);this._a=e,this._b=t,this._c=n,this._d=i}function q(e,t,n,i){return new $(e,t,n,i)}$.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=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=t||1,new z((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}};var Y=n({},H,{code:"EPSG:3857",projection:V,transformation:function(){var e=.5/(Math.PI*V.R);return q(e,.5,-e,.5)}()}),G=n({},Y,{code:"EPSG:900913"});function K(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function J(e,t){var n,i,r,o,a,s,l="";for(n=0,r=e.length;n<r;n++){for(i=0,o=(a=e[n]).length;i<o;i++)l+=(i?"L":"M")+(s=a[i]).x+" "+s.y;l+=t?Re.svg?"z":"x":""}return l||"M0 0"}var Q=document.documentElement.style,X="ActiveXObject"in window,ee=X&&!document.addEventListener,te="msLaunchUri"in navigator&&!("documentMode"in document),ne=Ie("webkit"),ie=Ie("android"),re=Ie("android 2")||Ie("android 3"),oe=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ae=ie&&Ie("Google")&&oe<537&&!("AudioNode"in window),se=!!window.opera,le=!te&&Ie("chrome"),ue=Ie("gecko")&&!ne&&!se&&!X,ce=!le&&Ie("safari"),de=Ie("phantom"),he="OTransition"in Q,fe=0===navigator.platform.indexOf("Win"),pe=X&&"transition"in Q,me="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!re,ge="MozPerspective"in Q,ve=!window.L_DISABLE_3D&&(pe||me||ge)&&!he&&!de,ye="undefined"!==typeof orientation||Ie("mobile"),xe=ye&&ne,_e=ye&&me,be=!window.PointerEvent&&window.MSPointerEvent,we=!(!window.PointerEvent&&!be),je="ontouchstart"in window||!!window.TouchEvent,ke=!window.L_NO_TOUCH&&(je||we),Se=ye&&se,Ne=ye&&ue,Le=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ee=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",u,t),window.removeEventListener("testPassiveEventSupport",u,t)}catch(n){}return e}(),Ce=!!document.createElement("canvas").getContext,Pe=!(!document.createElementNS||!K("svg").createSVGRect),Te=!!Pe&&function(){var e=document.createElement("div");return e.innerHTML="<svg/>","http://www.w3.org/2000/svg"===(e.firstChild&&e.firstChild.namespaceURI)}(),Oe=!Pe&&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&&"object"===typeof t.adj}catch(n){return!1}}(),ze=0===navigator.platform.indexOf("Mac"),Me=0===navigator.platform.indexOf("Linux");function Ie(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Re={ie:X,ielt9:ee,edge:te,webkit:ne,android:ie,android23:re,androidStock:ae,opera:se,chrome:le,gecko:ue,safari:ce,phantom:de,opera12:he,win:fe,ie3d:pe,webkit3d:me,gecko3d:ge,any3d:ve,mobile:ye,mobileWebkit:xe,mobileWebkit3d:_e,msPointer:be,pointer:we,touch:ke,touchNative:je,mobileOpera:Se,mobileGecko:Ne,retina:Le,passiveEvents:Ee,canvas:Ce,svg:Pe,vml:Oe,inlineSvg:Te,mac:ze,linux:Me},De=Re.msPointer?"MSPointerDown":"pointerdown",Ae=Re.msPointer?"MSPointerMove":"pointermove",Be=Re.msPointer?"MSPointerUp":"pointerup",Fe=Re.msPointer?"MSPointerCancel":"pointercancel",Ue={touchstart:De,touchmove:Ae,touchend:Be,touchcancel:Fe},Ze={touchstart:Qe,touchmove:Je,touchend:Je,touchcancel:Je},He={},We=!1;function Ve(e,t,n){return"touchstart"===t&&Ke(),Ze[t]?(n=Ze[t].bind(this,n),e.addEventListener(Ue[t],n,!1),n):(console.warn("wrong event specified:",t),u)}function $e(e,t,n){Ue[t]?e.removeEventListener(Ue[t],n,!1):console.warn("wrong event specified:",t)}function qe(e){He[e.pointerId]=e}function Ye(e){He[e.pointerId]&&(He[e.pointerId]=e)}function Ge(e){delete He[e.pointerId]}function Ke(){We||(document.addEventListener(De,qe,!0),document.addEventListener(Ae,Ye,!0),document.addEventListener(Be,Ge,!0),document.addEventListener(Fe,Ge,!0),We=!0)}function Je(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in t.touches=[],He)t.touches.push(He[n]);t.changedTouches=[t],e(t)}}function Qe(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&qt(t),Je(e,t)}function Xe(e){var t,n,i={};for(n in e)t=e[n],i[n]=t&&t.bind?t.bind(e):t;return e=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var et=200;function tt(e,t){e.addEventListener("dblclick",t);var n,i=0;function r(e){if(1===e.detail){if("mouse"!==e.pointerType&&(!e.sourceCapabilities||e.sourceCapabilities.firesTouchEvents)){var r=Gt(e);if(!r.some(function(e){return e instanceof HTMLLabelElement&&e.attributes.for})||r.some(function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement})){var o=Date.now();o-i<=et?2===++n&&t(Xe(e)):n=1,i=o}}}else n=e.detail}return e.addEventListener("click",r),{dblclick:t,simDblclick:r}}function nt(e,t){e.removeEventListener("dblclick",t.dblclick),e.removeEventListener("click",t.simDblclick)}var it,rt,ot,at,st,lt=St(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ut=St(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ct="webkitTransition"===ut||"OTransition"===ut?ut+"End":"transitionend";function dt(e){return"string"===typeof e?document.getElementById(e):e}function ht(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(e,null);n=i?i[t]:null}return"auto"===n?null:n}function ft(e,t,n){var i=document.createElement(e);return i.className=t||"",n&&n.appendChild(i),i}function pt(e){var t=e.parentNode;t&&t.removeChild(e)}function mt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function gt(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function vt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function yt(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=wt(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function xt(e,t){if(void 0!==e.classList)for(var n=h(t),i=0,r=n.length;i<r;i++)e.classList.add(n[i]);else if(!yt(e,t)){var o=wt(e);bt(e,(o?o+" ":"")+t)}}function _t(e,t){void 0!==e.classList?e.classList.remove(t):bt(e,d((" "+wt(e)+" ").replace(" "+t+" "," ")))}function bt(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}function wt(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}function jt(e,t){"opacity"in e.style?e.style.opacity=t:"filter"in e.style&&kt(e,t)}function kt(e,t){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(i)}catch(r){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+i+"(opacity="+t+")"}function St(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 i=t||new z(0,0);e.style[lt]=(Re.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Lt(e,t){e._leaflet_pos=t,Re.any3d?Nt(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")}function Et(e){return e._leaflet_pos||new z(0,0)}if("onselectstart"in document)it=function(){Dt(window,"selectstart",qt)},rt=function(){Bt(window,"selectstart",qt)};else{var Ct=St(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);it=function(){if(Ct){var e=document.documentElement.style;ot=e[Ct],e[Ct]="none"}},rt=function(){Ct&&(document.documentElement.style[Ct]=ot,ot=void 0)}}function Pt(){Dt(window,"dragstart",qt)}function Tt(){Bt(window,"dragstart",qt)}function Ot(e){for(;-1===e.tabIndex;)e=e.parentNode;e.style&&(zt(),at=e,st=e.style.outlineStyle,e.style.outlineStyle="none",Dt(window,"keydown",zt))}function zt(){at&&(at.style.outlineStyle=st,at=void 0,st=void 0,Bt(window,"keydown",zt))}function Mt(e){do{e=e.parentNode}while((!e.offsetWidth||!e.offsetHeight)&&e!==document.body);return e}function It(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}var Rt={__proto__:null,TRANSFORM:lt,TRANSITION:ut,TRANSITION_END:ct,get:dt,getStyle:ht,create:ft,remove:pt,empty:mt,toFront:gt,toBack:vt,hasClass:yt,addClass:xt,removeClass:_t,setClass:bt,getClass:wt,setOpacity:jt,testProp:St,setTransform:Nt,setPosition:Lt,getPosition:Et,get disableTextSelection(){return it},get enableTextSelection(){return rt},disableImageDrag:Pt,enableImageDrag:Tt,preventOutline:Ot,restoreOutline:zt,getSizedParentNode:Mt,getScale:It};function Dt(e,t,n,i){if(t&&"object"===typeof t)for(var r in t)Zt(e,r,t[r],n);else for(var o=0,a=(t=h(t)).length;o<a;o++)Zt(e,t[o],n,i);return this}var At="_leaflet_events";function Bt(e,t,n,i){if(1===arguments.length)Ft(e),delete e[At];else if(t&&"object"===typeof t)for(var r in t)Ht(e,r,t[r],n);else if(t=h(t),2===arguments.length)Ft(e,function(e){return-1!==y(t,e)});else for(var o=0,a=t.length;o<a;o++)Ht(e,t[o],n,i);return this}function Ft(e,t){for(var n in e[At]){var i=n.split(/\d/)[0];t&&!t(i)||Ht(e,i,null,null,n)}}var Ut={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Zt(e,t,n,i){var r=t+a(n)+(i?"_"+a(i):"");if(e[At]&&e[At][r])return this;var o=function(t){return n.call(i||e,t||window.event)},s=o;!Re.touchNative&&Re.pointer&&0===t.indexOf("touch")?o=Ve(e,t,o):Re.touch&&"dblclick"===t?o=tt(e,o):"addEventListener"in e?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?e.addEventListener(Ut[t]||t,o,!!Re.passiveEvents&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?(o=function(t){t=t||window.event,Xt(e,t)&&s(t)},e.addEventListener(Ut[t],o,!1)):e.addEventListener(t,s,!1):e.attachEvent("on"+t,o),e[At]=e[At]||{},e[At][r]=o}function Ht(e,t,n,i,r){r=r||t+a(n)+(i?"_"+a(i):"");var o=e[At]&&e[At][r];if(!o)return this;!Re.touchNative&&Re.pointer&&0===t.indexOf("touch")?$e(e,t,o):Re.touch&&"dblclick"===t?nt(e,o):"removeEventListener"in e?e.removeEventListener(Ut[t]||t,o,!1):e.detachEvent("on"+t,o),e[At][r]=null}function Wt(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function Vt(e){return Zt(e,"wheel",Wt),this}function $t(e){return Dt(e,"mousedown touchstart dblclick contextmenu",Wt),e._leaflet_disable_click=!0,this}function qt(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Yt(e){return qt(e),Wt(e),this}function Gt(e){if(e.composedPath)return e.composedPath();for(var t=[],n=e.target;n;)t.push(n),n=n.parentNode;return t}function Kt(e,t){if(!t)return new z(e.clientX,e.clientY);var n=It(t),i=n.boundingClientRect;return new z((e.clientX-i.left)/n.x-t.clientLeft,(e.clientY-i.top)/n.y-t.clientTop)}var Jt=Re.linux&&Re.chrome?window.devicePixelRatio:Re.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Qt(e){return Re.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/Jt:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function Xt(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(i){return!1}return n!==e}var en={__proto__:null,on:Dt,off:Bt,stopPropagation:Wt,disableScrollPropagation:Vt,disableClickPropagation:$t,preventDefault:qt,stop:Yt,getPropagationPath:Gt,getMousePosition:Kt,getWheelDelta:Qt,isExternalTarget:Xt,addListener:Dt,removeListener:Bt},tn=O.extend({run:function(e,t,n,i){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Et(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=S(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=1e3*this._duration;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(),Lt(this._el,n),this.fire("step")},_complete:function(){N(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),nn=O.extend({options:{crs:Y,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=f(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=r(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),void 0!==t.zoom&&(this._zoom=this._limitZoom(t.zoom)),t.center&&void 0!==t.zoom&&this.setView(U(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ut&&Re.any3d&&!Re.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Dt(this._proxy,ct,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,i){return t=void 0===t?this._zoom:this._limitZoom(t),e=this._limitCenter(U(e),t,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,i.zoom):this._tryAnimatedPan(e,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,t,i.pan&&i.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=e||(Re.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(Re.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var i=this.getZoomScale(t),r=this.getSize().divideBy(2),o=(e instanceof z?e:this.latLngToContainerPoint(e)).subtract(r).multiplyBy(1-1/i),a=this.containerPointToLatLng(r.add(o));return this.setView(a,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():B(e);var n=I(t.paddingTopLeft||t.padding||[0,0]),i=I(t.paddingBottomRight||t.padding||[0,0]),r=this.getBoundsZoom(e,!1,n.add(i));if((r="number"===typeof t.maxZoom?Math.min(t.maxZoom,r):r)===1/0)return{center:e.getCenter(),zoom:r};var o=i.subtract(n).divideBy(2),a=this.project(e.getSouthWest(),r),s=this.project(e.getNorthEast(),r);return{center:this.unproject(a.add(s).divideBy(2).add(o),r),zoom:r}},fitBounds:function(e,t){if(!(e=B(e)).isValid())throw new 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(t=t||{},!(e=I(e).round()).x&&!e.y)return this.fire("moveend");if(!0!==t.animate&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate){xt(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(!1===(n=n||{}).animate||!Re.any3d)return this.setView(e,t,n);this._stop();var i=this.project(this.getCenter()),r=this.project(e),o=this.getSize(),a=this._zoom;e=U(e),t=void 0===t?a:t;var s=Math.max(o.x,o.y),l=s*this.getZoomScale(a,t),u=r.distanceTo(i)||1,c=1.42,d=c*c;function h(e){var t=(l*l-s*s+(e?-1:1)*d*d*u*u)/(2*(e?l:s)*d*u),n=Math.sqrt(t*t+1)-t;return n<1e-9?-18:Math.log(n)}function f(e){return(Math.exp(e)-Math.exp(-e))/2}function p(e){return(Math.exp(e)+Math.exp(-e))/2}function m(e){return f(e)/p(e)}var g=h(0);function v(e){return s*(p(g)/p(g+c*e))}function y(e){return s*(p(g)*m(g+c*e)-f(g))/d}function x(e){return 1-Math.pow(1-e,1.5)}var _=Date.now(),b=(h(1)-g)/c,w=n.duration?1e3*n.duration:1e3*b*.8;function j(){var n=(Date.now()-_)/w,o=x(n)*b;n<=1?(this._flyToFrame=S(j,this),this._move(this.unproject(i.add(r.subtract(i).multiplyBy(y(o)/u)),a),this.getScaleZoom(s/v(o),a),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),j.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=B(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(),i=this._limitCenter(n,this._zoom,B(e));return n.equals(i)||this.panTo(i,t),this._enforcingBounds=!1,this},panInside:function(e,t){var n=I((t=t||{}).paddingTopLeft||t.padding||[0,0]),i=I(t.paddingBottomRight||t.padding||[0,0]),r=this.project(this.getCenter()),o=this.project(e),a=this.getPixelBounds(),s=D([a.min.add(n),a.max.subtract(i)]),l=s.getSize();if(!s.contains(o)){this._enforcingBounds=!0;var u=o.subtract(s.getCenter()),c=s.extend(o).getSize().subtract(l);r.x+=u.x<0?-c.x:c.x,r.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(r),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=n({animate:!1,pan:!0},!0===e?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),o=t.divideBy(2).round(),a=i.divideBy(2).round(),s=o.subtract(a);return s.x||s.y?(e.animate&&e.pan?this.panBy(s):(e.pan&&this._rawPanBy(s),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:i})):this},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=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,i,e):navigator.geolocation.getCurrentPosition(t,i,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||(1===t?"permission denied":2===t?"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=new F(e.coords.latitude,e.coords.longitude),n=t.toBounds(2*e.coords.accuracy),i=this._locateOptions;if(i.setView){var r=this.getBoundsZoom(n);this.setView(t,i.maxZoom?Math.min(r,i.maxZoom):r)}var o={latlng:t,bounds:n,timestamp:e.timestamp};for(var a in e.coords)"number"===typeof e.coords[a]&&(o[a]=e.coords[a]);this.fire("locationfound",o)}},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 new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var e;for(e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),pt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(N(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)pt(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=ft("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 A(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=B(e),n=I(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=e.getNorthWest(),s=e.getSouthEast(),l=this.getSize().subtract(n),u=D(this.project(s,i),this.project(a,i)).getSize(),c=Re.any3d?this.options.zoomSnap:1,d=l.x/u.x,h=l.y/u.y,f=t?Math.max(d,h):Math.min(d,h);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=t?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(r,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new z(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 R(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"===typeof e?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=void 0===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=void 0===t?this._zoom:t;var i=n.zoom(e*n.scale(t));return isNaN(i)?1/0:i},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(U(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(I(e),t)},layerPointToLatLng:function(e){var t=I(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(U(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(U(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(B(e))},distance:function(e,t){return this.options.crs.distance(U(e),U(t))},containerPointToLayerPoint:function(e){return I(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return I(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(I(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(U(e)))},mouseEventToContainerPoint:function(e){return Kt(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=dt(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");Dt(t,"scroll",this._onScroll,this),this._containerId=a(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Re.any3d,xt(e,"leaflet-container"+(Re.touch?" leaflet-touch":"")+(Re.retina?" leaflet-retina":"")+(Re.ielt9?" leaflet-oldie":"")+(Re.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=ht(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&"sticky"!==t&&(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),Lt(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(xt(e.markerPane,"leaflet-zoom-hide"),xt(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,n){Lt(this._mapPane,new z(0,0));var i=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var r=this._zoom!==t;this._moveStart(r,n)._move(e,t)._moveEnd(r),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n,i){void 0===t&&(t=this._zoom);var r=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),i?n&&n.pinch&&this.fire("zoom",n):((r||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 N(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){Lt(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 new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[a(this._container)]=this;var t=e?Bt:Dt;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),Re.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){N(this._resizeRequest),this._resizeRequest=S(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,i=[],r="mouseout"===t||"mouseover"===t,o=e.target||e.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===t||"preclick"===t)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(t,!0)){if(r&&!Xt(o,e))break;if(i.push(n),r)break}if(o===this._container)break;o=o.parentNode}return i.length||s||r||!this.listens(t,!0)||(i=[this]),i},_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||"click"===e.type&&this._isClickDisabled(t))){var n=e.type;"mousedown"===n&&Ot(t),this._fireDOMEvent(e,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,t,i){if("click"===e.type){var r=n({},e);r.type="preclick",this._fireDOMEvent(r,r.type,i)}var o=this._findEventTargets(e,t);if(i){for(var a=[],s=0;s<i.length;s++)i[s].listens(t,!0)&&a.push(i[s]);o=a.concat(o)}if(o.length){"contextmenu"===t&&qt(e);var l=o[0],u={originalEvent:e};if("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type){var c=l.getLatLng&&(!l._radius||l._radius<=10);u.containerPoint=c?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(e),u.layerPoint=this.containerPointToLayerPoint(u.containerPoint),u.latlng=c?l.getLatLng():this.layerPointToLatLng(u.layerPoint)}for(s=0;s<o.length;s++)if(o[s].fire(t,u,!0),u.originalEvent._stopped||!1===o[s].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,t))return}},_draggableMoved:function(e){return(e=e.dragging&&e.dragging.enabled()?e:this).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 Et(this._mapPane)||new z(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&void 0!==t?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 i=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(i)},_latLngBoundsToNewLayerBounds:function(e,t,n){var i=this._getNewPixelOrigin(n,t);return D([this.project(e.getSouthWest(),t)._subtract(i),this.project(e.getNorthWest(),t)._subtract(i),this.project(e.getSouthEast(),t)._subtract(i),this.project(e.getNorthEast(),t)._subtract(i)])},_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 i=this.project(e,t),r=this.getSize().divideBy(2),o=new R(i.subtract(r),i.add(r)),a=this._getBoundsOffset(o,n,t);return Math.abs(a.x)<=1&&Math.abs(a.y)<=1?e:this.unproject(i.add(a),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),i=new R(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(i,t))},_getBoundsOffset:function(e,t,n){var i=D(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n)),r=i.min.subtract(e.min),o=i.max.subtract(e.max);return new z(this._rebound(r.x,-o.x),this._rebound(r.y,-o.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(),i=Re.any3d?this.options.zoomSnap:1;return i&&(e=Math.round(e/i)*i),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){_t(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(n))&&(this.panBy(n,t),!0)},_createAnimProxy:function(){var e=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(e){var t=lt,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(){pt(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=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(t),r=this._getCenterOffset(e)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(r))&&(S(function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(e,t,!0)},this),!0)},_animateZoom:function(e,t,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,xt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_t(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 rn(e,t){return new nn(e,t)}var on=C.extend({options:{position:"topright"},initialize:function(e){f(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(),i=e._controlCorners[n];return xt(t,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(t,i.firstChild):i.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(pt(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()}}),an=function(e){return new on(e)};nn.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=ft("div",t+"control-container",this._container);function i(i,r){var o=t+i+" "+t+r;e[i+r]=ft("div",o,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)pt(this._controlCorners[e]);pt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var sn=on.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,i){return n<i?-1:i<n?1:0}},initialize:function(e,t,n){for(var i in f(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[i],i);for(i in t)this._addLayer(t[i],i,!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 on.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(a(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){xt(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?(xt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):_t(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return _t(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=ft("div",e),n=this.options.collapsed;t.setAttribute("aria-haspopup",!0),$t(t),Vt(t);var i=this._section=ft("section",e+"-list");n&&(this._map.on("click",this.collapse,this),Dt(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var r=this._layersLink=ft("a",e+"-toggle",t);r.href="#",r.title="Layers",r.setAttribute("role","button"),Dt(r,{keydown:function(e){13===e.keyCode&&this._expandSafely()},click:function(e){qt(e),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=ft("div",e+"-base",i),this._separator=ft("div",e+"-separator",i),this._overlaysList=ft("div",e+"-overlays",i),t.appendChild(i)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&a(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(r(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;mt(this._baseLayersList),mt(this._overlaysList),this._layerControlInputs=[];var e,t,n,i,r=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),t=t||i.overlay,e=e||!i.overlay,r+=i.overlay?0:1;return this.options.hideSingleBase&&(e=e&&r>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(a(e.target)),n=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"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"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(e){var t,n=document.createElement("label"),i=this._map.hasLayer(e.layer);e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=i):t=this._createRadioElement("leaflet-base-layers_"+a(this),i),this._layerControlInputs.push(t),t.layerId=a(e.layer),Dt(t,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+e.name;var o=document.createElement("span");return n.appendChild(o),o.appendChild(t),o.appendChild(r),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e,t,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)e=n[o],t=this._getLayer(e.layerId).layer,e.checked?i.push(t):e.checked||r.push(t);for(o=0;o<r.length;o++)this._map.hasLayer(r[o])&&this._map.removeLayer(r[o]);for(o=0;o<i.length;o++)this._map.hasLayer(i[o])||this._map.addLayer(i[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e,t,n=this._layerControlInputs,i=this._map.getZoom(),r=n.length-1;r>=0;r--)e=n[r],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&i<t.options.minZoom||void 0!==t.options.maxZoom&&i>t.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,Dt(e,"click",qt),this.expand();var t=this;setTimeout(function(){Bt(e,"click",qt),t._preventClick=!1})}}),ln=function(e,t,n){return new sn(e,t,n)},un=on.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=ft("div",t+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,t+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.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,i,r){var o=ft("a",n,i);return o.innerHTML=e,o.href="#",o.title=t,o.setAttribute("role","button"),o.setAttribute("aria-label",t),$t(o),Dt(o,"click",Yt),Dt(o,"click",r,this),Dt(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";_t(this._zoomInButton,t),_t(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(xt(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(xt(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}});nn.mergeOptions({zoomControl:!0}),nn.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new un,this.addControl(this.zoomControl))});var cn=function(e){return new un(e)},dn=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",n=ft("div",t),i=this.options;return this._addScales(i,t+"-line",n),e.on(i.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=ft("div",t,n)),e.imperial&&(this._iScale=ft("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,n,i,r=3.2808399*e;r>5280?(t=r/5280,n=this._getRoundNum(t),this._updateScale(this._iScale,n+" mi",n/t)):(i=this._getRoundNum(r),this._updateScale(this._iScale,i+" ft",i/r))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return t*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),hn=function(e){return new dn(e)},fn='<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>',pn=on.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Re.inlineSvg?fn+" ":"")+"Leaflet</a>"},initialize:function(e){f(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),$t(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):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> ')}}});nn.mergeOptions({attributionControl:!0}),nn.addInitHook(function(){this.options.attributionControl&&(new pn).addTo(this)});var mn=function(e){return new pn(e)};on.Layers=sn,on.Zoom=un,on.Scale=dn,on.Attribution=pn,an.layers=ln,an.zoom=cn,an.scale=hn,an.attribution=mn;var gn=C.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});gn.addTo=function(e,t){return e.addHandler(t,this),this};var vn={Events:T},yn=Re.touch?"touchstart mousedown":"mousedown",xn=O.extend({options:{clickTolerance:3},initialize:function(e,t,n,i){f(this,i),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(Dt(this._dragStartTarget,yn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(xn._dragging===this&&this.finishDrag(!0),Bt(this._dragStartTarget,yn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!yt(this._element,"leaflet-zoom-anim")))if(e.touches&&1!==e.touches.length)xn._dragging===this&&this.finishDrag();else if(!(xn._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches)&&(xn._dragging=this,this._preventOutline&&Ot(this._element),Pt(),it(),!this._moving)){this.fire("down");var t=e.touches?e.touches[0]:e,n=Mt(this._element);this._startPoint=new z(t.clientX,t.clientY),this._startPos=Et(this._element),this._parentScale=It(n);var i="mousedown"===e.type;Dt(document,i?"mousemove":"touchmove",this._onMove,this),Dt(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(e){if(this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var t=e.touches&&1===e.touches.length?e.touches[0]:e,n=new z(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,qt(e),this._moved||(this.fire("dragstart"),this._moved=!0,xt(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),xt(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),Lt(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){_t(document.body,"leaflet-dragging"),this._lastTarget&&(_t(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Bt(document,"mousemove touchmove",this._onMove,this),Bt(document,"mouseup touchend touchcancel",this._onUp,this),Tt(),rt();var t=this._moved&&this._moving;this._moving=!1,xn._dragging=!1,t&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function _n(e,t,n){var i,r,o,a,s,l,u,c,d,h=[1,4,2,8];for(r=0,u=e.length;r<u;r++)e[r]._code=zn(e[r],t);for(a=0;a<4;a++){for(c=h[a],i=[],r=0,o=(u=e.length)-1;r<u;o=r++)s=e[r],l=e[o],s._code&c?l._code&c||((d=On(l,s,c,t,n))._code=zn(d,t),i.push(d)):(l._code&c&&((d=On(l,s,c,t,n))._code=zn(d,t),i.push(d)),i.push(s));e=i}return e}function bn(e,t){var n,i,r,o,a,s,l,u,c;if(!e||0===e.length)throw new Error("latlngs not passed");Rn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var d=U([0,0]),h=B(e);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(d=wn(e));var f=e.length,p=[];for(n=0;n<f;n++){var m=U(e[n]);p.push(t.project(U([m.lat-d.lat,m.lng-d.lng])))}for(s=l=u=0,n=0,i=f-1;n<f;i=n++)r=p[n],o=p[i],a=r.y*o.x-o.y*r.x,l+=(r.x+o.x)*a,u+=(r.y+o.y)*a,s+=3*a;c=0===s?p[0]:[l/s,u/s];var g=t.unproject(I(c));return U([g.lat+d.lat,g.lng+d.lng])}function wn(e){for(var t=0,n=0,i=0,r=0;r<e.length;r++){var o=U(e[r]);t+=o.lat,n+=o.lng,i++}return U([t/i,n/i])}var jn,kn={__proto__:null,clipPolygon:_n,polygonCenter:bn,centroid:wn};function Sn(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=En(e=Pn(e,n),n)}function Nn(e,t,n){return Math.sqrt(In(e,t,n,!0))}function Ln(e,t,n){return In(e,t,n)}function En(e,t){var n=e.length,i=new(typeof Uint8Array!==void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Cn(e,i,t,0,n-1);var r,o=[];for(r=0;r<n;r++)i[r]&&o.push(e[r]);return o}function Cn(e,t,n,i,r){var o,a,s,l=0;for(a=i+1;a<=r-1;a++)(s=In(e[a],e[i],e[r],!0))>l&&(o=a,l=s);l>n&&(t[o]=1,Cn(e,t,n,i,o),Cn(e,t,n,o,r))}function Pn(e,t){for(var n=[e[0]],i=1,r=0,o=e.length;i<o;i++)Mn(e[i],e[r])>t&&(n.push(e[i]),r=i);return r<o-1&&n.push(e[o-1]),n}function Tn(e,t,n,i,r){var o,a,s,l=i?jn:zn(e,n),u=zn(t,n);for(jn=u;;){if(!(l|u))return[e,t];if(l&u)return!1;s=zn(a=On(e,t,o=l||u,n,r),n),o===l?(e=a,l=s):(t=a,u=s)}}function On(e,t,n,i,r){var o,a,s=t.x-e.x,l=t.y-e.y,u=i.min,c=i.max;return 8&n?(o=e.x+s*(c.y-e.y)/l,a=c.y):4&n?(o=e.x+s*(u.y-e.y)/l,a=u.y):2&n?(o=c.x,a=e.y+l*(c.x-e.x)/s):1&n&&(o=u.x,a=e.y+l*(u.x-e.x)/s),new z(o,a,r)}function zn(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 Mn(e,t){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i}function In(e,t,n,i){var r,o=t.x,a=t.y,s=n.x-o,l=n.y-a,u=s*s+l*l;return u>0&&((r=((e.x-o)*s+(e.y-a)*l)/u)>1?(o=n.x,a=n.y):r>0&&(o+=s*r,a+=l*r)),s=e.x-o,l=e.y-a,i?s*s+l*l:new z(o,a)}function Rn(e){return!v(e[0])||"object"!==typeof e[0][0]&&"undefined"!==typeof e[0][0]}function Dn(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Rn(e)}function An(e,t){var n,i,r,o,a,s,l,u;if(!e||0===e.length)throw new Error("latlngs not passed");Rn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var c=U([0,0]),d=B(e);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(c=wn(e));var h=e.length,f=[];for(n=0;n<h;n++){var p=U(e[n]);f.push(t.project(U([p.lat-c.lat,p.lng-c.lng])))}for(n=0,i=0;n<h-1;n++)i+=f[n].distanceTo(f[n+1])/2;if(0===i)u=f[0];else for(n=0,o=0;n<h-1;n++)if(a=f[n],s=f[n+1],(o+=r=a.distanceTo(s))>i){l=(o-i)/r,u=[s.x-l*(s.x-a.x),s.y-l*(s.y-a.y)];break}var m=t.unproject(I(u));return U([m.lat+c.lat,m.lng+c.lng])}var Bn={__proto__:null,simplify:Sn,pointToSegmentDistance:Nn,closestPointOnSegment:Ln,clipSegment:Tn,_getEdgeIntersection:On,_getBitCode:zn,_sqClosestPointOnSegment:In,isFlat:Rn,_flat:Dn,polylineCenter:An},Fn={project:function(e){return new z(e.lng,e.lat)},unproject:function(e){return new F(e.y,e.x)},bounds:new R([-180,-90],[180,90])},Un={R:6378137,R_MINOR:6356752.314245179,bounds:new R([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,i=e.lat*t,r=this.R_MINOR/n,o=Math.sqrt(1-r*r),a=o*Math.sin(i),s=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),o/2);return i=-n*Math.log(Math.max(s,1e-10)),new z(e.lng*t*n,i)},unproject:function(e){for(var t,n=180/Math.PI,i=this.R,r=this.R_MINOR/i,o=Math.sqrt(1-r*r),a=Math.exp(-e.y/i),s=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)t=o*Math.sin(s),t=Math.pow((1-t)/(1+t),o/2),s+=u=Math.PI/2-2*Math.atan(a*t)-s;return new F(s*n,e.x*n/i)}},Zn={__proto__:null,LonLat:Fn,Mercator:Un,SphericalMercator:V},Hn=n({},H,{code:"EPSG:3395",projection:Un,transformation:function(){var e=.5/(Math.PI*Un.R);return q(e,.5,-e,.5)}()}),Wn=n({},H,{code:"EPSG:4326",projection:Fn,transformation:q(1/180,1,-1/180,.5)}),Vn=n({},Z,{projection:Fn,transformation:q(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,i=t.lat-e.lat;return Math.sqrt(n*n+i*i)},infinite:!0});Z.Earth=H,Z.EPSG3395=Hn,Z.EPSG3857=Y,Z.EPSG900913=G,Z.EPSG4326=Wn,Z.Simple=Vn;var $n=O.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[a(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[a(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})}}});nn.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=a(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this},removeLayer:function(e){var t=a(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 a(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){for(var t=0,n=(e=e?v(e)?e:[e]:[]).length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[a(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=a(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,t=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var r=this._zoomBoundLayers[i].options;e=void 0===r.minZoom?e:Math.min(e,r.minZoom),t=void 0===r.maxZoom?t:Math.max(t,r.maxZoom)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var qn=$n.extend({initialize:function(e,t){var n,i;if(f(this,t),this._layers={},e)for(n=0,i=e.length;n<i;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("number"===typeof e?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t,n,i=Array.prototype.slice.call(arguments,1);for(t in this._layers)(n=this._layers[t])[e]&&n[e].apply(n,i);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 a(e)}}),Yn=function(e,t){return new qn(e,t)},Gn=qn.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),qn.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),qn.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 A;for(var t in this._layers){var n=this._layers[t];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}}),Kn=function(e,t){return new Gn(e,t)},Jn=C.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){f(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("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,t&&"IMG"===t.tagName?t:null);return this._setIconStyles(i,e),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(e,t){var n=this.options,i=n[t+"Size"];"number"===typeof i&&(i=[i,i]);var r=I(i),o=I("shadow"===t&&n.shadowAnchor||n.iconAnchor||r&&r.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(n.className||""),o&&(e.style.marginLeft=-o.x+"px",e.style.marginTop=-o.y+"px"),r&&(e.style.width=r.x+"px",e.style.height=r.y+"px")},_createImg:function(e,t){return(t=t||document.createElement("img")).src=e,t},_getIconUrl:function(e){return Re.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function Qn(e){return new Jn(e)}var Xn=Jn.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"string"!==typeof Xn.imagePath&&(Xn.imagePath=this._detectIconPath()),(this.options.imagePath||Xn.imagePath)+Jn.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var t=function(e,t,n){var i=t.exec(e);return i&&i[n]};return(e=t(e,/^url\((['"])?(.+)\1\)$/,2))&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=ft("div","leaflet-default-icon-path",document.body),t=ht(e,"background-image")||ht(e,"backgroundImage");if(document.body.removeChild(e),t=this._stripUrl(t))return t;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),ei=gn.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new xn(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),xt(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&&_t(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,i=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,o=Et(t._icon),a=n.getPixelBounds(),s=n.getPixelOrigin(),l=D(a.min._subtract(s).add(r),a.max._subtract(s).subtract(r));if(!l.contains(o)){var u=I((Math.max(l.max.x,o.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(i);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),Lt(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=S(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&&(N(this._panRequest),this._panRequest=S(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,i=Et(t._icon),r=t._map.layerPointToLatLng(i);n&&Lt(n,i),t._latlng=r,e.latlng=r,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){N(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),ti=$n.extend({options:{icon:new Xn,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){f(this,t),this._latlng=U(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=U(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),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,e.title&&(n.title=e.title),"IMG"===n.tagName&&(n.alt=e.alt||"")),xt(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&&Dt(n,"focus",this._panOnFocus,this);var r=e.icon.createShadow(this._shadow),o=!1;r!==this._shadow&&(this._removeShadow(),o=!0),r&&(xt(r,t),r.alt=""),this._shadow=r,e.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),r&&o&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Bt(this._icon,"focus",this._panOnFocus,this),pt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&pt(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&Lt(this._icon,e),this._shadow&&Lt(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&&(xt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ei)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ei(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&&jt(this._icon,e),this._shadow&&jt(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?I(t.iconSize):I(0,0),i=t.iconAnchor?I(t.iconAnchor):I(0,0);e.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function ni(e,t){return new ti(e,t)}var ii=$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 f(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)}}),ri=ii.extend({options:{fill:!0,radius:10},initialize:function(e,t){f(this,t),this._latlng=U(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=U(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 ii.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(),i=[e+n,t+n];this._pxBounds=new R(this._point.subtract(i),this._point.add(i))},_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 oi(e,t){return new ri(e,t)}var ai=ri.extend({initialize:function(e,t,i){if("number"===typeof t&&(t=n({},i,{radius:t})),f(this,t),this._latlng=U(e),isNaN(this.options.radius))throw new 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 A(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:ii.prototype.setStyle,_project:function(){var e=this._latlng.lng,t=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===H.distance){var r=Math.PI/180,o=this._mRadius/H.R/r,a=n.project([t+o,e]),s=n.project([t-o,e]),l=a.add(s).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(o*r)-Math.sin(t*r)*Math.sin(u*r))/(Math.cos(t*r)*Math.cos(u*r)))/r;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*t)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,e-c]).x,this._radiusY=l.y-a.y}else{var d=i.unproject(i.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 si(e,t,n){return new ai(e,t,n)}var li=ii.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){f(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,n,i=1/0,r=null,o=In,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],u=1,c=l.length;u<c;u++){var d=o(e,t=l[u-1],n=l[u],!0);d<i&&(i=d,r=o(e,t,n))}return r&&(r.distance=Math.sqrt(i)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return An(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=U(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new A,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return Rn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=Rn(e),i=0,r=e.length;i<r;i++)n?(t[i]=U(e[i]),this._bounds.extend(t[i])):t[i]=this._convertLatLngs(e[i]);return t},_project:function(){var e=new R;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 z(e,e);this._rawPxBounds&&(this._pxBounds=new R([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(e,t,n){var i,r,o=e[0]instanceof F,a=e.length;if(o){for(r=[],i=0;i<a;i++)r[i]=this._map.latLngToLayerPoint(e[i]),n.extend(r[i]);t.push(r)}else for(i=0;i<a;i++)this._projectLatlngs(e[i],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;else{var t,n,i,r,o,a,s,l=this._parts;for(t=0,i=0,r=this._rings.length;t<r;t++)for(n=0,o=(s=this._rings[t]).length;n<o-1;n++)(a=Tn(s[n],s[n+1],e,n,!0))&&(l[i]=l[i]||[],l[i].push(a[0]),a[1]===s[n+1]&&n!==o-2||(l[i].push(a[1]),i++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,i=e.length;n<i;n++)e[n]=Sn(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,i,r,o,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(n=0,o=this._parts.length;n<o;n++)for(i=0,r=(a=(s=this._parts[n]).length)-1;i<a;r=i++)if((t||0!==i)&&Nn(e,s[r],s[i])<=l)return!0;return!1}});function ui(e,t){return new li(e,t)}li._flat=Dn;var ci=li.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return bn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var t=li.prototype._convertLatLngs.call(this,e),n=t.length;return n>=2&&t[0]instanceof F&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){li.prototype._setLatLngs.call(this,e),Rn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Rn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new z(t,t);if(e=new R(e.min.subtract(n),e.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var i,r=0,o=this._rings.length;r<o;r++)(i=_n(this._rings[r],e,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t,n,i,r,o,a,s,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(r=0,s=this._parts.length;r<s;r++)for(o=0,a=(l=(t=this._parts[r]).length)-1;o<l;a=o++)n=t[o],i=t[a],n.y>e.y!==i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||li.prototype._containsPoint.call(this,e,!0)}});function di(e,t){return new ci(e,t)}var hi=Gn.extend({initialize:function(e,t){f(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,i,r=v(e)?e:e.features;if(r){for(t=0,n=r.length;t<n;t++)((i=r[t]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var o=this.options;if(o.filter&&!o.filter(e))return this;var a=fi(e,o);return a?(a.feature=_i(e),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(e,a),this.addLayer(a)):this},resetStyle:function(e){return void 0===e?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&&("function"===typeof t&&(t=t(e.feature)),e.setStyle(t))}});function fi(e,t){var n,i,r,o,a="Feature"===e.type?e.geometry:e,s=a?a.coordinates:null,l=[],u=t&&t.pointToLayer,c=t&&t.coordsToLatLng||mi;if(!s&&!a)return null;switch(a.type){case"Point":return pi(u,e,n=c(s),t);case"MultiPoint":for(r=0,o=s.length;r<o;r++)n=c(s[r]),l.push(pi(u,e,n,t));return new Gn(l);case"LineString":case"MultiLineString":return i=gi(s,"LineString"===a.type?0:1,c),new li(i,t);case"Polygon":case"MultiPolygon":return i=gi(s,"Polygon"===a.type?1:2,c),new ci(i,t);case"GeometryCollection":for(r=0,o=a.geometries.length;r<o;r++){var d=fi({geometry:a.geometries[r],type:"Feature",properties:e.properties},t);d&&l.push(d)}return new Gn(l);case"FeatureCollection":for(r=0,o=a.features.length;r<o;r++){var h=fi(a.features[r],t);h&&l.push(h)}return new Gn(l);default:throw new Error("Invalid GeoJSON object.")}}function pi(e,t,n,i){return e?e(t,n):new ti(n,i&&i.markersInheritOptions&&i)}function mi(e){return new F(e[1],e[0],e[2])}function gi(e,t,n){for(var i,r=[],o=0,a=e.length;o<a;o++)i=t?gi(e[o],t-1,n):(n||mi)(e[o]),r.push(i);return r}function vi(e,t){return void 0!==(e=U(e)).alt?[c(e.lng,t),c(e.lat,t),c(e.alt,t)]:[c(e.lng,t),c(e.lat,t)]}function yi(e,t,n,i){for(var r=[],o=0,a=e.length;o<a;o++)r.push(t?yi(e[o],Rn(e[o])?0:t-1,n,i):vi(e[o],i));return!t&&n&&r.length>0&&r.push(r[0].slice()),r}function xi(e,t){return e.feature?n({},e.feature,{geometry:t}):_i(t)}function _i(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}var bi={toGeoJSON:function(e){return xi(this,{type:"Point",coordinates:vi(this.getLatLng(),e)})}};function wi(e,t){return new hi(e,t)}ti.include(bi),ai.include(bi),ri.include(bi),li.include({toGeoJSON:function(e){var t=!Rn(this._latlngs);return xi(this,{type:(t?"Multi":"")+"LineString",coordinates:yi(this._latlngs,t?1:0,!1,e)})}}),ci.include({toGeoJSON:function(e){var t=!Rn(this._latlngs),n=t&&!Rn(this._latlngs[0]),i=yi(this._latlngs,n?2:t?1:0,!0,e);return t||(i=[i]),xi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),qn.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(n){t.push(n.toGeoJSON(e).geometry.coordinates)}),xi(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(e);var n="GeometryCollection"===t,i=[];return this.eachLayer(function(t){if(t.toGeoJSON){var r=t.toGeoJSON(e);if(n)i.push(r.geometry);else{var o=_i(r);"FeatureCollection"===o.type?i.push.apply(i,o.features):i.push(o)}}}),n?xi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var ji=wi,ki=$n.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,n){this._url=e,this._bounds=B(t),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(xt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){pt(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&>(this._image),this},bringToBack:function(){return this._map&&vt(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=B(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="IMG"===this._url.tagName,t=this._image=e?this._url:ft("img");xt(t,"leaflet-image-layer"),this._zoomAnimated&&xt(t,"leaflet-zoom-animated"),this.options.className&&xt(t,this.options.className),t.onselectstart=u,t.onmousemove=u,t.onload=r(this.fire,this,"load"),t.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(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 R(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();Lt(e,t.min),e.style.width=n.x+"px",e.style.height=n.y+"px"},_updateOpacity:function(){jt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(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()}}),Si=function(e,t,n){return new ki(e,t,n)},Ni=ki.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:ft("video");if(xt(t,"leaflet-image-layer"),this._zoomAnimated&&xt(t,"leaflet-zoom-animated"),this.options.className&&xt(t,this.options.className),t.onselectstart=u,t.onmousemove=u,t.onloadeddata=r(this.fire,this,"load"),e){for(var n=t.getElementsByTagName("source"),i=[],o=0;o<n.length;o++)i.push(n[o].src);this._url=n.length>0?i:[t.src]}else{v(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 a=0;a<this._url.length;a++){var s=ft("source");s.src=this._url[a],t.appendChild(s)}}}});function Li(e,t,n){return new Ni(e,t,n)}var Ei=ki.extend({_initImage:function(){var e=this._image=this._url;xt(e,"leaflet-image-layer"),this._zoomAnimated&&xt(e,"leaflet-zoom-animated"),this.options.className&&xt(e,this.options.className),e.onselectstart=u,e.onmousemove=u}});function Ci(e,t,n){return new Ei(e,t,n)}var Pi=$n.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,t){e&&(e instanceof F||v(e))?(this._latlng=U(e),f(this,t)):(f(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return(e=arguments.length?e:this._source._map).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&&jt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&jt(this._container,1),this.bringToFront(),this.options.interactive&&(xt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(jt(this._container,0),this._removeTimeout=setTimeout(r(pt,void 0,this._container),200)):pt(this._container),this.options.interactive&&(_t(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=U(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&>(this._container),this},bringToBack:function(){return this._map&&vt(this._container),this},_prepareOpen:function(e){var t=this._source;if(!t._map)return!1;if(t instanceof Gn){t=null;var n=this._source._layers;for(var i in n)if(n[i]._map){t=n[i];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)throw new Error("Unable to get source layer LatLng.");e=t.getBounds().getCenter()}return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"===typeof this._content?this._content(this._source||this):this._content;if("string"===typeof t)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=I(this.options.offset),n=this._getAnchor();this._zoomAnimated?Lt(this._container,e.add(n)):t=t.add(e).add(n);var i=this._containerBottom=-t.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=i+"px",this._container.style.left=r+"px"}},_getAnchor:function(){return[0,0]}});nn.include({_initOverlay:function(e,t,n,i){var r=t;return r instanceof e||(r=new e(i).setContent(t)),n&&r.setLatLng(n),r}}),$n.include({_initOverlay:function(e,t,n,i){var r=n;return r instanceof e?(f(r,i),r._source=this):(r=t&&!i?t:new e(i,this)).setContent(n),r}});var Ti=Pi.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).hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,Pi.prototype.openOn.call(this,e)},onAdd:function(e){Pi.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ii||this._source.on("preclick",Wt))},onRemove:function(e){Pi.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ii||this._source.off("preclick",Wt))},getEvents:function(){var e=Pi.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",t=this._container=ft("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ft("div",e+"-content-wrapper",t);if(this._contentNode=ft("div",e+"-content",n),$t(t),Vt(this._contentNode),Dt(t,"contextmenu",Wt),this._tipContainer=ft("div",e+"-tip-container",t),this._tip=ft("div",e+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ft("a",e+"-close-button",t);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',Dt(i,"click",function(e){qt(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 i=e.offsetHeight,r=this.options.maxHeight,o="leaflet-popup-scrolled";r&&i>r?(t.height=r+"px",xt(e,o)):_t(e,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();Lt(this._container,t.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var e=this._map,t=parseInt(ht(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+t,i=this._containerWidth,r=new z(this._containerLeft,-n-this._containerBottom);r._add(Et(this._container));var o=e.layerPointToContainerPoint(r),a=I(this.options.autoPanPadding),s=I(this.options.autoPanPaddingTopLeft||a),l=I(this.options.autoPanPaddingBottomRight||a),u=e.getSize(),c=0,d=0;o.x+i+l.x>u.x&&(c=o.x+i-u.x+l.x),o.x-c-s.x<0&&(c=o.x-s.x),o.y+n+l.y>u.y&&(d=o.y+n-u.y+l.y),o.y-d-s.y<0&&(d=o.y-s.y),(c||d)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([c,d]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Oi=function(e,t){return new Ti(e,t)};nn.mergeOptions({closePopupOnClick:!0}),nn.include({openPopup:function(e,t,n){return this._initOverlay(Ti,e,t,n).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),$n.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Ti,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof Gn||(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()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(this._popup&&this._map){Yt(e);var t=e.layer||e.target;this._popup._source!==t||t instanceof ii?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var zi=Pi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Pi.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){Pi.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=Pi.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n,i=this._map,r=this._container,o=i.latLngToContainerPoint(i.getCenter()),a=i.layerPointToContainerPoint(e),s=this.options.direction,l=r.offsetWidth,u=r.offsetHeight,c=I(this.options.offset),d=this._getAnchor();"top"===s?(t=l/2,n=u):"bottom"===s?(t=l/2,n=0):"center"===s?(t=l/2,n=u/2):"right"===s?(t=0,n=u/2):"left"===s?(t=l,n=u/2):a.x<o.x?(s="right",t=0,n=u/2):(s="left",t=l+2*(c.x+d.x),n=u/2),e=e.subtract(I(t,n,!0)).add(c).add(d),_t(r,"leaflet-tooltip-right"),_t(r,"leaflet-tooltip-left"),_t(r,"leaflet-tooltip-top"),_t(r,"leaflet-tooltip-bottom"),xt(r,"leaflet-tooltip-"+s),Lt(r,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&jt(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Mi=function(e,t){return new zi(e,t)};nn.include({openTooltip:function(e,t,n){return this._initOverlay(zi,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(zi,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(),this._tooltip=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 Gn||(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="function"===typeof e.getElement&&e.getElement();t&&(Dt(t,"focus",function(){this._tooltip._source=e,this.openTooltip()},this),Dt(t,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var t="function"===typeof e.getElement&&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)})}else this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)},_moveTooltip:function(e){var t,n,i=e.latlng;this._tooltip.options.sticky&&e.originalEvent&&(t=this._map.mouseEventToContainerPoint(e.originalEvent),n=this._map.containerPointToLayerPoint(t),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Ii=Jn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var t=e&&"DIV"===e.tagName?e:document.createElement("div"),n=this.options;if(n.html instanceof Element?(mt(t),t.appendChild(n.html)):t.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=I(n.bgPos);t.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(t,"icon"),t},createShadow:function(){return null}});function Ri(e){return new Ii(e)}Jn.Default=Xn;var Di=$n.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Re.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){f(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),pt(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(gt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(vt(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||(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 z?e:new z(e,e)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t,n=this.getPane().children,i=-e(-1/0,1/0),r=0,o=n.length;r<o;r++)t=n[r].style.zIndex,n[r]!==this._container&&t&&(i=e(i,+t));isFinite(i)&&(this.options.zIndex=i+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Re.ielt9){jt(this._container,this.options.opacity);var e=+new Date,t=!1,n=!1;for(var i in this._tiles){var r=this._tiles[i];if(r.current&&r.loaded){var o=Math.min(1,(e-r.loaded)/200);jt(r.el,o),o<1?t=!0:(r.active?n=!0:this._onOpaqueTile(r),r.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),t&&(N(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=ft("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(void 0!==e){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)):(pt(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[e],r=this._map;return i||((i=this._levels[e]={}).el=ft("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=t,i.origin=r.project(r.unproject(r.getPixelOrigin()),e).round(),i.zoom=e,this._setZoomTransform(i,r.getCenter(),r.getZoom()),u(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var e,t,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(e in this._tiles)(t=this._tiles[e]).retain=t.current;for(e in this._tiles)if((t=this._tiles[e]).current&&!t.active){var i=t.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.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)pt(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,i){var r=Math.floor(e/2),o=Math.floor(t/2),a=n-1,s=new z(+r,+o);s.z=+a;var l=this._tileCoordsToKey(s),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),a>i&&this._retainParent(r,o,a,i))},_retainChildren:function(e,t,n,i){for(var r=2*e;r<2*e+2;r++)for(var o=2*t;o<2*t+2;o++){var a=new z(r,o);a.z=n+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(r,o,n+1,i))}},_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 void 0!==t.minNativeZoom&&e<t.minNativeZoom?t.minNativeZoom:void 0!==t.maxNativeZoom&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,i){var r=Math.round(t);r=void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom?void 0:this._clampZoom(r);var o=this.options.updateWhenZooming&&r!==this._tileZoom;i&&!o||(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&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 i=this._map.getZoomScale(n,e.zoom),r=e.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(t,n)).round();Re.any3d?Nt(e.el,r,i):Lt(e.el,r)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],i).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],i).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],i).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],i).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(),i=t.getZoomScale(n,this._tileZoom),r=t.project(e,this._tileZoom).floor(),o=t.getSize().divideBy(2*i);return new R(r.subtract(o),r.add(o))},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(void 0===e&&(e=t.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(e),r=this._pxBoundsToTileRange(i),o=r.getCenter(),a=[],s=this.options.keepBuffer,l=new R(r.getBottomLeft().subtract([s,-s]),r.getTopRight().add([s,-s]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new z(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(var d=r.min.y;d<=r.max.y;d++)for(var h=r.min.x;h<=r.max.x;h++){var f=new z(h,d);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:a.push(f)}}if(a.sort(function(e,t){return e.distanceTo(o)-t.distanceTo(o)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(h=0;h<a.length;h++)this._addTile(a[h],m);this._level.el.appendChild(m)}}}}},_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 i=this._tileCoordsToBounds(e);return B(this.options.bounds).overlaps(i)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),i=e.scaleBy(n),r=i.add(n);return[t.unproject(i,e.z),t.unproject(r,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new A(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 z(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(pt(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){xt(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=u,e.onmousemove=u,Re.ielt9&&this.options.opacity<1&&jt(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),i=this._tileCoordsToKey(e),o=this.createTile(this._wrapCoords(e),r(this._tileReady,this,e));this._initTile(o),this.createTile.length<2&&S(r(this._tileReady,this,e,null,o)),Lt(o,n),this._tiles[i]={el:o,coords:e,current:!0},t.appendChild(o),this.fire("tileloadstart",{tile:o,coords:e})},_tileReady:function(e,t,n){t&&this.fire("tileerror",{error:t,tile:n,coords:e});var i=this._tileCoordsToKey(e);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(jt(n.el,0),N(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(xt(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Re.ielt9||!this._map._fadeAnimated?S(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new z(this._wrapX?l(e.x,this._wrapX):e.x,this._wrapY?l(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new R(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 Ai(e){return new Di(e)}var Bi=Di.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=f(this,t)).detectRetina&&Re.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),"string"===typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement("img");return Dt(n,"load",r(this._tileOnLoad,this,t,n)),Dt(n,"error",r(this._tileOnError,this,t,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"===typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:Re.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=i),t["-y"]=i}return g(this._url,n(t,this.options))},_tileOnLoad:function(e,t){Re.ielt9?setTimeout(r(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var i=this.options.errorTileUrl;i&&t.getAttribute("src")!==i&&(t.src=i),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return this.options.zoomReverse&&(e=t-e),e+this.options.zoomOffset},_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).onload=u,t.onerror=u,!t.complete)){t.src=x;var n=this._tiles[e].coords;pt(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",x),Di.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==x))return Di.prototype._tileReady.call(this,e,t,n)}});function Fi(e,t){return new Bi(e,t)}var Ui=Bi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var i=n({},this.defaultWmsParams);for(var r in t)r in this.options||(i[r]=t[r]);var o=(t=f(this,t)).detectRetina&&Re.retina?2:1,a=this.getTileSize();i.width=a.x*o,i.height=a.y*o,this.wmsParams=i},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,Bi.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,i=D(n.project(t[0]),n.project(t[1])),r=i.min,o=i.max,a=(this._wmsVersion>=1.3&&this._crs===Wn?[r.y,r.x,o.y,o.x]:[r.x,r.y,o.x,o.y]).join(","),s=Bi.prototype.getTileUrl.call(this,e);return s+p(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(e,t){return n(this.wmsParams,e),t||this.redraw(),this}});function Zi(e,t){return new Ui(e,t)}Bi.WMS=Ui,Fi.wms=Zi;var Hi=$n.extend({options:{padding:.1},initialize:function(e){f(this,e),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),xt(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),i=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,t),o=i.multiplyBy(-n).add(r).subtract(this._map._getNewPixelOrigin(e,t));Re.any3d?Nt(this._container,o,n):Lt(this._container,o)},_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 R(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Wi=Hi.extend({options:{tolerance:0},getEvents:function(){var e=Hi.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Hi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");Dt(e,"mousemove",this._onMouseMove,this),Dt(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Dt(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){N(this._redrawRequest),delete this._ctx,pt(this._container),Bt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Hi.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),i=Re.retina?2:1;Lt(t,e.min),t.width=i*n.x,t.height=i*n.y,t.style.width=n.x+"px",t.style.height=n.y+"px",Re.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){Hi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[a(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,i=t.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete e._order,delete this._layers[a(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("string"===typeof e.options.dashArray){var t,n,i=e.options.dashArray.split(/[, ]+/),r=[];for(n=0;n<i.length;n++){if(t=Number(i[n]),isNaN(t))return;r.push(t)}e.options._dashArray=r}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||S(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new R,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 i=this._drawFirst;i;i=i.next)e=i.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,i,r,o,a=e._parts,s=a.length,l=this._ctx;if(s){for(l.beginPath(),n=0;n<s;n++){for(i=0,r=a[n].length;i<r;i++)o=a[n][i],l[i?"lineTo":"moveTo"](o.x,o.y);t&&l.closePath()}this._fillStroke(l,e)}}},_updateCircle:function(e){if(this._drawing&&!e._empty()){var t=e._point,n=this._ctx,i=Math.max(Math.round(e._radius),1),r=(Math.max(Math.round(e._radiusY),1)||i)/i;1!==r&&(n.save(),n.scale(1,r)),n.beginPath(),n.arc(t.x,t.y/r,i,0,2*Math.PI,!1),1!==r&&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&&0!==n.weight&&(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,n,i=this._map.mouseEventToLayerPoint(e),r=this._drawFirst;r;r=r.next)(t=r.layer).options.interactive&&t._containsPoint(i)&&("click"!==e.type&&"preclick"!==e.type||!this._map._draggableMoved(t))&&(n=t);this._fireEvent(!!n&&[n],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&&(_t(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,i,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(t)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(e),i&&(xt(this._container,"leaflet-interactive"),this._fireEvent([i],e,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],e),this._mouseHoverThrottled=!0,setTimeout(r(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,i=t.prev;n&&(n.prev=i,i?i.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,i=t.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e))}}});function Vi(e){return Re.canvas?new Wi(e):null}var $i=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),qi={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Hi.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=$i("shape");xt(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=$i("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[a(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;pt(t),e.removeInteractiveTarget(t),delete this._layers[a(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,i=e.options,r=e._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(t||(t=e._stroke=$i("stroke")),r.appendChild(t),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=i.lineCap.replace("butt","flat"),t.joinstyle=i.lineJoin):t&&(r.removeChild(t),e._stroke=null),i.fill?(n||(n=e._fill=$i("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),i=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+i+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){gt(e._container)},_bringToBack:function(e){vt(e._container)}},Yi=Re.vml?$i:K,Gi=Hi.extend({_initContainer:function(){this._container=Yi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){pt(this._container),Bt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Hi.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)),Lt(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=Yi("path");e.options.className&&xt(t,e.options.className),e.options.interactive&&xt(t,"leaflet-interactive"),this._updateStyle(e),this._layers[a(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){pt(e._path),e.removeInteractiveTarget(e._path),delete this._layers[a(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,J(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),i="a"+n+","+(Math.max(Math.round(e._radiusY),1)||n)+" 0 1,0 ",r=e._empty()?"M0 0":"M"+(t.x-n)+","+t.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(e,r)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){gt(e._path)},_bringToBack:function(e){vt(e._path)}});function Ki(e){return Re.svg||Re.vml?new Gi(e):null}Re.vml&&Gi.include(qi),nn.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&Vi(e)||Ki(e)}});var Ji=ci.extend({initialize:function(e,t){ci.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=B(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function Qi(e,t){return new Ji(e,t)}Gi.create=Yi,Gi.pointsToPath=J,hi.geometryToLayer=fi,hi.coordsToLatLng=mi,hi.coordsToLatLngs=gi,hi.latLngToCoords=vi,hi.latLngsToCoords=yi,hi.getFeature=xi,hi.asFeature=_i,nn.mergeOptions({boxZoom:!0});var Xi=gn.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(){Dt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Bt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){pt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),it(),Pt(),this._startPoint=this._map.mouseEventToContainerPoint(e),Dt(document,{contextmenu:Yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),xt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new R(this._point,this._startPoint),n=t.getSize();Lt(this._box,t.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(pt(this._box),_t(this._container,"leaflet-crosshair")),rt(),Tt(),Bt(document,{contextmenu:Yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var t=new A(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});nn.addInitHook("addHandler","boxZoom",Xi),nn.mergeOptions({doubleClickZoom:!0});var er=gn.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(),i=t.options.zoomDelta,r=e.originalEvent.shiftKey?n-i:n+i;"center"===t.options.doubleClickZoom?t.setZoom(r):t.setZoomAround(e.containerPoint,r)}});nn.addInitHook("addHandler","doubleClickZoom",er),nn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var tr=gn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new xn(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))}xt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_t(this._map._container,"leaflet-grab"),_t(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=B(this._map.options.maxBounds);this._offsetLimit=D(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),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.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,i=this._draggable._newPos.x,r=(i-t+n)%e+t-n,o=(i+t+n)%e-t-n,a=Math.abs(r+n)<Math.abs(o+n)?r:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(e){var t=this._map,n=t.options,i=!n.inertia||e.noInertia||this._times.length<2;if(t.fire("dragend",e),i)t.fire("moveend");else{this._prunePositions(+new Date);var r=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,a=n.easeLinearity,s=r.multiplyBy(a/o),l=s.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=s.multiplyBy(u/l),d=u/(n.inertiaDeceleration*a),h=c.multiplyBy(-d/2).round();h.x||h.y?(h=t._limitOffset(h,t.options.maxBounds),S(function(){t.panBy(h,{duration:d,easeLinearity:a,noMoveStart:!0,animate:!0})})):t.fire("moveend")}}});nn.addInitHook("addHandler","dragging",tr),nn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var nr=gn.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"),Dt(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(),Bt(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,i=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var t,n,i=this._panKeys={},r=this.keyCodes;for(t=0,n=r.left.length;t<n;t++)i[r.left[t]]=[-1*e,0];for(t=0,n=r.right.length;t<n;t++)i[r.right[t]]=[e,0];for(t=0,n=r.down.length;t<n;t++)i[r.down[t]]=[0,e];for(t=0,n=r.up.length;t<n;t++)i[r.up[t]]=[0,-1*e]},_setZoomDelta:function(e){var t,n,i=this._zoomKeys={},r=this.keyCodes;for(t=0,n=r.zoomIn.length;t<n;t++)i[r.zoomIn[t]]=e;for(t=0,n=r.zoomOut.length;t<n;t++)i[r.zoomOut[t]]=-e},_addHooks:function(){Dt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Bt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t,n=e.keyCode,i=this._map;if(n in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(t=this._panKeys[n],e.shiftKey&&(t=I(t).multiplyBy(3)),i.options.maxBounds&&(t=i._limitOffset(I(t),i.options.maxBounds)),i.options.worldCopyJump){var r=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(t)));i.panTo(r)}else i.panBy(t)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Yt(e)}}});nn.addInitHook("addHandler","keyboard",nr),nn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ir=gn.extend({addHooks:function(){Dt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Bt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t=Qt(e),n=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(r(this._performZoom,this),i),Yt(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,o=n?Math.ceil(r/n)*n:r,a=e._limitZoom(t+(this._delta>0?o:-o))-t;this._delta=0,this._startTime=null,a&&("center"===e.options.scrollWheelZoom?e.setZoom(t+a):e.setZoomAround(this._lastMousePos,t+a))}});nn.addInitHook("addHandler","scrollWheelZoom",ir);var rr=600;nn.mergeOptions({tapHold:Re.touchNative&&Re.safari&&Re.mobile,tapTolerance:15});var or=gn.extend({addHooks:function(){Dt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Bt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),1===e.touches.length){var t=e.touches[0];this._startPos=this._newPos=new z(t.clientX,t.clientY),this._holdTimeout=setTimeout(r(function(){this._cancel(),this._isTapValid()&&(Dt(document,"touchend",qt),Dt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},this),rr),Dt(document,"touchend touchcancel contextmenu",this._cancel,this),Dt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){Bt(document,"touchend",qt),Bt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),Bt(document,"touchend touchcancel contextmenu",this._cancel,this),Bt(document,"touchmove",this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new z(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)}});nn.addInitHook("addHandler","tapHold",or),nn.mergeOptions({touchZoom:Re.touch,bounceAtZoomLimits:!0});var ar=gn.extend({addHooks:function(){xt(this._map._container,"leaflet-touch-zoom"),Dt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_t(this._map._container,"leaflet-touch-zoom"),Bt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var n=t.mouseEventToContainerPoint(e.touches[0]),i=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),Dt(document,"touchmove",this._onTouchMove,this),Dt(document,"touchend touchcancel",this._onTouchEnd,this),qt(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),i=t.mouseEventToContainerPoint(e.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=t.getScaleZoom(o,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&o<1||this._zoom>t.getMaxZoom()&&o>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),N(this._animRequest);var s=r(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=S(s,this,!0),qt(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,N(this._animRequest),Bt(document,"touchmove",this._onTouchMove,this),Bt(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))):this._zooming=!1}});nn.addInitHook("addHandler","touchZoom",ar),nn.BoxZoom=Xi,nn.DoubleClickZoom=er,nn.Drag=tr,nn.Keyboard=nr,nn.ScrollWheelZoom=ir,nn.TapHold=or,nn.TouchZoom=ar,e.Bounds=R,e.Browser=Re,e.CRS=Z,e.Canvas=Wi,e.Circle=ai,e.CircleMarker=ri,e.Class=C,e.Control=on,e.DivIcon=Ii,e.DivOverlay=Pi,e.DomEvent=en,e.DomUtil=Rt,e.Draggable=xn,e.Evented=O,e.FeatureGroup=Gn,e.GeoJSON=hi,e.GridLayer=Di,e.Handler=gn,e.Icon=Jn,e.ImageOverlay=ki,e.LatLng=F,e.LatLngBounds=A,e.Layer=$n,e.LayerGroup=qn,e.LineUtil=Bn,e.Map=nn,e.Marker=ti,e.Mixin=vn,e.Path=ii,e.Point=z,e.PolyUtil=kn,e.Polygon=ci,e.Polyline=li,e.Popup=Ti,e.PosAnimation=tn,e.Projection=Zn,e.Rectangle=Ji,e.Renderer=Hi,e.SVG=Gi,e.SVGOverlay=Ei,e.TileLayer=Bi,e.Tooltip=zi,e.Transformation=$,e.Util=E,e.VideoOverlay=Ni,e.bind=r,e.bounds=D,e.canvas=Vi,e.circle=si,e.circleMarker=oi,e.control=an,e.divIcon=Ri,e.extend=n,e.featureGroup=Kn,e.geoJSON=wi,e.geoJson=ji,e.gridLayer=Ai,e.icon=Qn,e.imageOverlay=Si,e.latLng=U,e.latLngBounds=B,e.layerGroup=Yn,e.map=rn,e.marker=ni,e.point=I,e.polygon=di,e.polyline=ui,e.popup=Oi,e.rectangle=Qi,e.setOptions=f,e.stamp=a,e.svg=Ki,e.svgOverlay=Ci,e.tileLayer=Fi,e.tooltip=Mi,e.transformation=q,e.version=t,e.videoOverlay=Li;var sr=window.L;e.noConflict=function(){return window.L=sr,this},window.L=e}(t)},234:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,r=e[i];if(!(0<o(r,t)))break e;e[i]=t,e[n]=r,n=i}}function i(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,r=e.length,a=r>>>1;i<a;){var s=2*(i+1)-1,l=e[s],u=s+1,c=e[u];if(0>o(l,n))u<r&&0>o(c,l)?(e[i]=c,e[u]=n,i=u):(e[i]=l,e[s]=n,i=s);else{if(!(u<r&&0>o(c,n)))break e;e[i]=c,e[u]=n,i=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,x="undefined"!==typeof setImmediate?setImmediate:null;function _(e){for(var t=i(c);null!==t;){if(null===t.callback)r(c);else{if(!(t.startTime<=e))break;r(c),t.sortIndex=t.expirationTime,n(u,t)}t=i(c)}}function b(e){if(g=!1,_(e),!m)if(null!==i(u))m=!0,z(w);else{var t=i(c);null!==t&&M(b,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,y(N),N=-1),p=!0;var o=f;try{for(_(n),h=i(u);null!==h&&(!(h.expirationTime>n)||e&&!C());){var a=h.callback;if("function"===typeof a){h.callback=null,f=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?h.callback=s:h===i(u)&&r(u),_(n)}else r(u);h=i(u)}if(null!==h)var l=!0;else{var d=i(c);null!==d&&M(b,d.startTime-n),l=!1}return l}finally{h=null,f=o,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var j,k=!1,S=null,N=-1,L=5,E=-1;function C(){return!(t.unstable_now()-E<L)}function P(){if(null!==S){var e=t.unstable_now();E=e;var n=!0;try{n=S(!0,e)}finally{n?j():(k=!1,S=null)}}else k=!1}if("function"===typeof x)j=function(){x(P)};else if("undefined"!==typeof MessageChannel){var T=new MessageChannel,O=T.port2;T.port1.onmessage=P,j=function(){O.postMessage(null)}}else j=function(){v(P,0)};function z(e){S=e,k||(k=!0,j())}function M(e,n){N=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,z(w))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return i(u)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,r,o){var a=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:r,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(c,e),null===i(u)&&e===i(c)&&(g?(y(N),N=-1):g=!0,M(b,o-a))):(e.sortIndex=s,n(u,e),m||p||(m=!0,z(w))),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},391:(e,t,n)=>{"use strict";var i=n(950);t.createRoot=i.createRoot,t.hydrateRoot=i.hydrateRoot},579:(e,t,n)=>{"use strict";e.exports=n(153)},730:(e,t,n)=>{"use strict";var i=n(43),r=n(853);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e,t,n,i,r,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){g[e]=new m(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new m(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new m(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new m(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new m(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function x(e,t,n,i){var r=g.hasOwnProperty(t)?g[t]:null;(null!==r?0!==r.type:i||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,i){if(null===t||"undefined"===typeof t||function(e,t,n,i){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,r,i)&&(n=null),i||null===r?function(e){return!!d.call(p,e)||!d.call(f,e)&&(h.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=null===n?3!==r.type&&"":n:(t=r.attributeName,i=r.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)});var _=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,b=Symbol.for("react.element"),w=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),L=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),O=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var z=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function I(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var R,D=Object.assign;function A(e){if(void 0===R)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||""}return"\n"+R+e}var B=!1;function F(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var i=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){i=u}e.call(t.prototype)}else{try{throw Error()}catch(u){i=u}e()}}catch(u){if(u&&i&&"string"===typeof u.stack){for(var r=u.stack.split("\n"),o=i.stack.split("\n"),a=r.length-1,s=o.length-1;1<=a&&0<=s&&r[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(r[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||r[a]!==o[s]){var l="\n"+r[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?A(e):""}function U(e){switch(e.tag){case 5:return A(e.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return e=F(e.type,!1);case 11:return e=F(e.type.render,!1);case 1:return e=F(e.type,!0);default:return""}}function Z(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case j:return"Fragment";case w:return"Portal";case S:return"Profiler";case k:return"StrictMode";case C:return"Suspense";case P:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case L:return(e.displayName||"Context")+".Consumer";case N:return(e._context.displayName||"Context")+".Provider";case E:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case T:return null!==(t=e.displayName||null)?t:Z(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return Z(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Z(t);case 8:return t===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function $(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){i=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(e){i=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=V(e)?e.checked?"true":"false":e.value),(e=i)!==n&&(t.setValue(e),!0)}function Y(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function G(e,t){var n=t.checked;return D({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K(e,t){var n=null==t.defaultValue?"":t.defaultValue,i=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&x(e,"checked",t,!1)}function Q(e,t){J(e,t);var n=W(t.value),i=t.type;if(null!=n)"number"===i?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===i||"reset"===i)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!("submit"!==i&&"reset"!==i||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&i&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,r=0;r<e.length;r++){if(e[r].value===n)return e[r].selected=!0,void(i&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return D({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function oe(e,t){var n=W(t.value),i=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=i&&(e.defaultValue=""+i)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,de=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,i){MSApp.execUnsafeLocalFunction(function(){return ce(e,t)})}:ce);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var i=0===n.indexOf("--"),r=me(n,t[n],i);"float"===n&&(n="cssFloat"),i?e.setProperty(n,r):e[n]=r}}Object.keys(fe).forEach(function(e){pe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]})});var ve=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function xe(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _e=null;function be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,je=null,ke=null;function Se(e){if(e=xr(e)){if("function"!==typeof we)throw Error(o(280));var t=e.stateNode;t&&(t=br(t),we(e.stateNode,e.type,t))}}function Ne(e){je?ke?ke.push(e):ke=[e]:je=e}function Le(){if(je){var e=je,t=ke;if(ke=je=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Ee(e,t){return e(t)}function Ce(){}var Pe=!1;function Te(e,t,n){if(Pe)return e(t,n);Pe=!0;try{return Ee(e,t,n)}finally{Pe=!1,(null!==je||null!==ke)&&(Ce(),Le())}}function Oe(e,t){var n=e.stateNode;if(null===n)return null;var i=br(n);if(null===i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var ze=!1;if(c)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){ze=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ce){ze=!1}function Ie(e,t,n,i,r,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Re=!1,De=null,Ae=!1,Be=null,Fe={onError:function(e){Re=!0,De=e}};function Ue(e,t,n,i,r,o,a,s,l){Re=!1,De=null,Ie.apply(Fe,arguments)}function Ze(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function He(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function We(e){if(Ze(e)!==e)throw Error(o(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ze(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,i=t;;){var r=n.return;if(null===r)break;var a=r.alternate;if(null===a){if(null!==(i=r.return)){n=i;continue}break}if(r.child===a.child){for(a=r.child;a;){if(a===n)return We(r),e;if(a===i)return We(r),t;a=a.sibling}throw Error(o(188))}if(n.return!==i.return)n=r,i=a;else{for(var s=!1,l=r.child;l;){if(l===n){s=!0,n=r,i=a;break}if(l===i){s=!0,i=r,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,i=r;break}if(l===i){s=!0,i=a,n=r;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==i)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?$e(e):null}function $e(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=$e(e);if(null!==t)return t;e=e.sibling}return null}var qe=r.unstable_scheduleCallback,Ye=r.unstable_cancelCallback,Ge=r.unstable_shouldYield,Ke=r.unstable_requestPaint,Je=r.unstable_now,Qe=r.unstable_getCurrentPriorityLevel,Xe=r.unstable_ImmediatePriority,et=r.unstable_UserBlockingPriority,tt=r.unstable_NormalPriority,nt=r.unstable_LowPriority,it=r.unstable_IdlePriority,rt=null,ot=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ut=64,ct=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var i=0,r=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~r;0!==s?i=dt(s):0!==(o&=a)&&(i=dt(o))}else 0!==(a=n&~r)?i=dt(a):0!==o&&(i=dt(o));if(0===i)return 0;if(0!==t&&t!==i&&0===(t&r)&&((r=i&-i)>=(o=t&-t)||16===r&&0!==(4194240&o)))return t;if(0!==(4&i)&&(i|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=i;0<t;)r=1<<(n=31-at(t)),i|=e[n],t&=~r;return i}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ut;return 0===(4194240&(ut<<=1))&&(ut=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-at(n),r=1<<i;r&t|e[i]&t&&(e[i]|=t),n&=~r}}var xt=0;function _t(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var bt,wt,jt,kt,St,Nt=!1,Lt=[],Et=null,Ct=null,Pt=null,Tt=new Map,Ot=new Map,zt=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function It(e,t){switch(e){case"focusin":case"focusout":Et=null;break;case"dragenter":case"dragleave":Ct=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":Tt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.delete(t.pointerId)}}function Rt(e,t,n,i,r,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:o,targetContainers:[r]},null!==t&&(null!==(t=xr(t))&&wt(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,null!==r&&-1===t.indexOf(r)&&t.push(r),e)}function Dt(e){var t=yr(e.target);if(null!==t){var n=Ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void St(e.priority,function(){jt(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function At(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Gt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=xr(n))&&wt(t),e.blockedOn=n,!1;var i=new(n=e.nativeEvent).constructor(n.type,n);_e=i,n.target.dispatchEvent(i),_e=null,t.shift()}return!0}function Bt(e,t,n){At(e)&&n.delete(t)}function Ft(){Nt=!1,null!==Et&&At(Et)&&(Et=null),null!==Ct&&At(Ct)&&(Ct=null),null!==Pt&&At(Pt)&&(Pt=null),Tt.forEach(Bt),Ot.forEach(Bt)}function Ut(e,t){e.blockedOn===t&&(e.blockedOn=null,Nt||(Nt=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Ft)))}function Zt(e){function t(t){return Ut(t,e)}if(0<Lt.length){Ut(Lt[0],e);for(var n=1;n<Lt.length;n++){var i=Lt[n];i.blockedOn===e&&(i.blockedOn=null)}}for(null!==Et&&Ut(Et,e),null!==Ct&&Ut(Ct,e),null!==Pt&&Ut(Pt,e),Tt.forEach(t),Ot.forEach(t),n=0;n<zt.length;n++)(i=zt[n]).blockedOn===e&&(i.blockedOn=null);for(;0<zt.length&&null===(n=zt[0]).blockedOn;)Dt(n),null===n.blockedOn&&zt.shift()}var Ht=_.ReactCurrentBatchConfig,Wt=!0;function Vt(e,t,n,i){var r=xt,o=Ht.transition;Ht.transition=null;try{xt=1,qt(e,t,n,i)}finally{xt=r,Ht.transition=o}}function $t(e,t,n,i){var r=xt,o=Ht.transition;Ht.transition=null;try{xt=4,qt(e,t,n,i)}finally{xt=r,Ht.transition=o}}function qt(e,t,n,i){if(Wt){var r=Gt(e,t,n,i);if(null===r)Wi(e,t,i,Yt,n),It(e,i);else if(function(e,t,n,i,r){switch(t){case"focusin":return Et=Rt(Et,e,t,n,i,r),!0;case"dragenter":return Ct=Rt(Ct,e,t,n,i,r),!0;case"mouseover":return Pt=Rt(Pt,e,t,n,i,r),!0;case"pointerover":var o=r.pointerId;return Tt.set(o,Rt(Tt.get(o)||null,e,t,n,i,r)),!0;case"gotpointercapture":return o=r.pointerId,Ot.set(o,Rt(Ot.get(o)||null,e,t,n,i,r)),!0}return!1}(r,e,t,n,i))i.stopPropagation();else if(It(e,i),4&t&&-1<Mt.indexOf(e)){for(;null!==r;){var o=xr(r);if(null!==o&&bt(o),null===(o=Gt(e,t,n,i))&&Wi(e,t,i,Yt,n),o===r)break;r=o}null!==r&&i.stopPropagation()}else Wi(e,t,i,null,n)}}var Yt=null;function Gt(e,t,n,i){if(Yt=null,null!==(e=yr(e=be(i))))if(null===(t=Ze(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Xe:return 1;case et:return 4;case tt:case nt:return 16;case it:return 536870912;default:return 16}default:return 16}}var Jt=null,Qt=null,Xt=null;function en(){if(Xt)return Xt;var e,t,n=Qt,i=n.length,r="value"in Jt?Jt.value:Jt.textContent,o=r.length;for(e=0;e<i&&n[e]===r[e];e++);var a=i-e;for(t=1;t<=a&&n[i-t]===r[o-t];t++);return Xt=r.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,i,r,o){for(var a in this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(r):r[a]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=on(un),dn=D({},un,{view:0,detail:0}),hn=on(dn),fn=D({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=on(fn),mn=on(D({},fn,{dataTransfer:0})),gn=on(D({},dn,{relatedTarget:0})),vn=on(D({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=D({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=on(yn),_n=on(D({},un,{data:0})),bn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},jn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=jn[e])&&!!t[e]}function Sn(){return kn}var Nn=D({},dn,{key:function(e){if(e.key){var t=bn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?wn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Ln=on(Nn),En=on(D({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=on(D({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),Pn=on(D({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Tn=D({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),On=on(Tn),zn=[9,13,27,32],Mn=c&&"CompositionEvent"in window,In=null;c&&"documentMode"in document&&(In=document.documentMode);var Rn=c&&"TextEvent"in window&&!In,Dn=c&&(!Mn||In&&8<In&&11>=In),An=String.fromCharCode(32),Bn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==zn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Un(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Zn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Vn(e,t,n,i){Ne(i),0<(t=$i(t,"onChange")).length&&(n=new cn("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var $n=null,qn=null;function Yn(e){Ai(e,0)}function Gn(e){if(q(_r(e)))return e}function Kn(e,t){if("change"===e)return t}var Jn=!1;if(c){var Qn;if(c){var Xn="oninput"in document;if(!Xn){var ei=document.createElement("div");ei.setAttribute("oninput","return;"),Xn="function"===typeof ei.oninput}Qn=Xn}else Qn=!1;Jn=Qn&&(!document.documentMode||9<document.documentMode)}function ti(){$n&&($n.detachEvent("onpropertychange",ni),qn=$n=null)}function ni(e){if("value"===e.propertyName&&Gn(qn)){var t=[];Vn(t,qn,e,be(e)),Te(Yn,t)}}function ii(e,t,n){"focusin"===e?(ti(),qn=n,($n=t).attachEvent("onpropertychange",ni)):"focusout"===e&&ti()}function ri(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Gn(qn)}function oi(e,t){if("click"===e)return Gn(t)}function ai(e,t){if("input"===e||"change"===e)return Gn(t)}var si="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function li(e,t){if(si(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!d.call(t,r)||!si(e[r],t[r]))return!1}return!0}function ui(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ci(e,t){var n,i=ui(e);for(e=0;i;){if(3===i.nodeType){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ui(i)}}function di(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?di(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hi(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(i){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function fi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pi(e){var t=hi(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&di(n.ownerDocument.documentElement,n)){if(null!==i&&fi(n))if(t=i.start,void 0===(e=i.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var r=n.textContent.length,o=Math.min(i.start,r);i=void 0===i.end?o:Math.min(i.end,r),!e.extend&&o>i&&(r=i,i=o,o=r),r=ci(n,o);var a=ci(n,i);r&&a&&(1!==e.rangeCount||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(r.node,r.offset),e.removeAllRanges(),o>i?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mi=c&&"documentMode"in document&&11>=document.documentMode,gi=null,vi=null,yi=null,xi=!1;function _i(e,t,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xi||null==gi||gi!==Y(i)||("selectionStart"in(i=gi)&&fi(i)?i={start:i.selectionStart,end:i.selectionEnd}:i={anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},yi&&li(yi,i)||(yi=i,0<(i=$i(vi,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=gi)))}function bi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wi={animationend:bi("Animation","AnimationEnd"),animationiteration:bi("Animation","AnimationIteration"),animationstart:bi("Animation","AnimationStart"),transitionend:bi("Transition","TransitionEnd")},ji={},ki={};function Si(e){if(ji[e])return ji[e];if(!wi[e])return e;var t,n=wi[e];for(t in n)if(n.hasOwnProperty(t)&&t in ki)return ji[e]=n[t];return e}c&&(ki=document.createElement("div").style,"AnimationEvent"in window||(delete wi.animationend.animation,delete wi.animationiteration.animation,delete wi.animationstart.animation),"TransitionEvent"in window||delete wi.transitionend.transition);var Ni=Si("animationend"),Li=Si("animationiteration"),Ei=Si("animationstart"),Ci=Si("transitionend"),Pi=new Map,Ti="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Oi(e,t){Pi.set(e,t),l(t,[e])}for(var zi=0;zi<Ti.length;zi++){var Mi=Ti[zi];Oi(Mi.toLowerCase(),"on"+(Mi[0].toUpperCase()+Mi.slice(1)))}Oi(Ni,"onAnimationEnd"),Oi(Li,"onAnimationIteration"),Oi(Ei,"onAnimationStart"),Oi("dblclick","onDoubleClick"),Oi("focusin","onFocus"),Oi("focusout","onBlur"),Oi(Ci,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ii="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ri=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ii));function Di(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,i,r,a,s,l,u){if(Ue.apply(this,arguments),Re){if(!Re)throw Error(o(198));var c=De;Re=!1,De=null,Ae||(Ae=!0,Be=c)}}(i,t,void 0,e),e.currentTarget=null}function Ai(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var i=e[n],r=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var a=i.length-1;0<=a;a--){var s=i[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&r.isPropagationStopped())break e;Di(r,s,u),o=l}else for(a=0;a<i.length;a++){if(l=(s=i[a]).instance,u=s.currentTarget,s=s.listener,l!==o&&r.isPropagationStopped())break e;Di(r,s,u),o=l}}}if(Ae)throw e=Be,Ae=!1,Be=null,e}function Bi(e,t){var n=t[mr];void 0===n&&(n=t[mr]=new Set);var i=e+"__bubble";n.has(i)||(Hi(t,e,2,!1),n.add(i))}function Fi(e,t,n){var i=0;t&&(i|=4),Hi(n,e,i,t)}var Ui="_reactListening"+Math.random().toString(36).slice(2);function Zi(e){if(!e[Ui]){e[Ui]=!0,a.forEach(function(t){"selectionchange"!==t&&(Ri.has(t)||Fi(t,!1,e),Fi(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ui]||(t[Ui]=!0,Fi("selectionchange",!1,t))}}function Hi(e,t,n,i){switch(Kt(t)){case 1:var r=Vt;break;case 4:r=$t;break;default:r=qt}n=r.bind(null,t,n,e),r=void 0,!ze||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(r=!0),i?void 0!==r?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):void 0!==r?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function Wi(e,t,n,i,r){var o=i;if(0===(1&t)&&0===(2&t)&&null!==i)e:for(;;){if(null===i)return;var a=i.tag;if(3===a||4===a){var s=i.stateNode.containerInfo;if(s===r||8===s.nodeType&&s.parentNode===r)break;if(4===a)for(a=i.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===r||8===l.nodeType&&l.parentNode===r))return;a=a.return}for(;null!==s;){if(null===(a=yr(s)))return;if(5===(l=a.tag)||6===l){i=o=a;continue e}s=s.parentNode}}i=i.return}Te(function(){var i=o,r=be(n),a=[];e:{var s=Pi.get(e);if(void 0!==s){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Ln;break;case"focusin":u="focus",l=gn;break;case"focusout":u="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Cn;break;case Ni:case Li:case Ei:l=vn;break;case Ci:l=Pn;break;case"scroll":l=hn;break;case"wheel":l=On;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=En}var c=0!==(4&t),d=!c&&"scroll"===e,h=c?null!==s?s+"Capture":null:s;c=[];for(var f,p=i;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==h&&(null!=(m=Oe(p,h))&&c.push(Vi(p,m,f)))),d)break;p=p.return}0<c.length&&(s=new l(s,u,null,n,r),a.push({event:s,listeners:c}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===_e||!(u=n.relatedTarget||n.fromElement)||!yr(u)&&!u[pr])&&(l||s)&&(s=r.window===r?r:(s=r.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=i,null!==(u=(u=n.relatedTarget||n.toElement)?yr(u):null)&&(u!==(d=Ze(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=i),l!==u)){if(c=pn,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=En,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?s:_r(l),f=null==u?s:_r(u),(s=new c(m,p+"leave",l,n,r)).target=d,s.relatedTarget=f,m=null,yr(r)===i&&((c=new c(h,p+"enter",u,n,r)).target=f,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(h=u,p=0,f=c=l;f;f=qi(f))p++;for(f=0,m=h;m;m=qi(m))f++;for(;0<p-f;)c=qi(c),p--;for(;0<f-p;)h=qi(h),f--;for(;p--;){if(c===h||null!==h&&c===h.alternate)break e;c=qi(c),h=qi(h)}c=null}else c=null;null!==l&&Yi(a,s,l,c,!1),null!==u&&null!==d&&Yi(a,d,u,c,!0)}if("select"===(l=(s=i?_r(i):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Kn;else if(Wn(s))if(Jn)g=ai;else{g=ri;var v=ii}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=oi);switch(g&&(g=g(e,i))?Vn(a,g,n,r):(v&&v(e,s,i),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=i?_r(i):window,e){case"focusin":(Wn(v)||"true"===v.contentEditable)&&(gi=v,vi=i,yi=null);break;case"focusout":yi=vi=gi=null;break;case"mousedown":xi=!0;break;case"contextmenu":case"mouseup":case"dragend":xi=!1,_i(a,n,r);break;case"selectionchange":if(mi)break;case"keydown":case"keyup":_i(a,n,r)}var y;if(Mn)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else Zn?Fn(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(Dn&&"ko"!==n.locale&&(Zn||"onCompositionStart"!==x?"onCompositionEnd"===x&&Zn&&(y=en()):(Qt="value"in(Jt=r)?Jt.value:Jt.textContent,Zn=!0)),0<(v=$i(i,x)).length&&(x=new _n(x,e,null,n,r),a.push({event:x,listeners:v}),y?x.data=y:null!==(y=Un(n))&&(x.data=y))),(y=Rn?function(e,t){switch(e){case"compositionend":return Un(t);case"keypress":return 32!==t.which?null:(Bn=!0,An);case"textInput":return(e=t.data)===An&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Zn)return"compositionend"===e||!Mn&&Fn(e,t)?(e=en(),Xt=Qt=Jt=null,Zn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(i=$i(i,"onBeforeInput")).length&&(r=new _n("onBeforeInput","beforeinput",null,n,r),a.push({event:r,listeners:i}),r.data=y))}Ai(a,t)})}function Vi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $i(e,t){for(var n=t+"Capture",i=[];null!==e;){var r=e,o=r.stateNode;5===r.tag&&null!==o&&(r=o,null!=(o=Oe(e,n))&&i.unshift(Vi(e,o,r)),null!=(o=Oe(e,t))&&i.push(Vi(e,o,r))),e=e.return}return i}function qi(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yi(e,t,n,i,r){for(var o=t._reactName,a=[];null!==n&&n!==i;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===i)break;5===s.tag&&null!==u&&(s=u,r?null!=(l=Oe(n,o))&&a.unshift(Vi(n,l,s)):r||null!=(l=Oe(n,o))&&a.push(Vi(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Gi=/\r\n?/g,Ki=/\u0000|\uFFFD/g;function Ji(e){return("string"===typeof e?e:""+e).replace(Gi,"\n").replace(Ki,"")}function Qi(e,t,n){if(t=Ji(t),Ji(e)!==t&&n)throw Error(o(425))}function Xi(){}var er=null,tr=null;function nr(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ir="function"===typeof setTimeout?setTimeout:void 0,rr="function"===typeof clearTimeout?clearTimeout:void 0,or="function"===typeof Promise?Promise:void 0,ar="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof or?function(e){return or.resolve(null).then(e).catch(sr)}:ir;function sr(e){setTimeout(function(){throw e})}function lr(e,t){var n=t,i=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===i)return e.removeChild(r),void Zt(t);i--}else"$"!==n&&"$?"!==n&&"$!"!==n||i++;n=r}while(n);Zt(t)}function ur(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function cr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var dr=Math.random().toString(36).slice(2),hr="__reactFiber$"+dr,fr="__reactProps$"+dr,pr="__reactContainer$"+dr,mr="__reactEvents$"+dr,gr="__reactListeners$"+dr,vr="__reactHandles$"+dr;function yr(e){var t=e[hr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pr]||n[hr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=cr(e);null!==e;){if(n=e[hr])return n;e=cr(e)}return t}n=(e=n).parentNode}return null}function xr(e){return!(e=e[hr]||e[pr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function _r(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function br(e){return e[fr]||null}var wr=[],jr=-1;function kr(e){return{current:e}}function Sr(e){0>jr||(e.current=wr[jr],wr[jr]=null,jr--)}function Nr(e,t){jr++,wr[jr]=e.current,e.current=t}var Lr={},Er=kr(Lr),Cr=kr(!1),Pr=Lr;function Tr(e,t){var n=e.type.contextTypes;if(!n)return Lr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var r,o={};for(r in n)o[r]=t[r];return i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Or(e){return null!==(e=e.childContextTypes)&&void 0!==e}function zr(){Sr(Cr),Sr(Er)}function Mr(e,t,n){if(Er.current!==Lr)throw Error(o(168));Nr(Er,t),Nr(Cr,n)}function Ir(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,"function"!==typeof i.getChildContext)return n;for(var r in i=i.getChildContext())if(!(r in t))throw Error(o(108,H(e)||"Unknown",r));return D({},n,i)}function Rr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lr,Pr=Er.current,Nr(Er,e),Nr(Cr,Cr.current),!0}function Dr(e,t,n){var i=e.stateNode;if(!i)throw Error(o(169));n?(e=Ir(e,t,Pr),i.__reactInternalMemoizedMergedChildContext=e,Sr(Cr),Sr(Er),Nr(Er,e)):Sr(Cr),Nr(Cr,n)}var Ar=null,Br=!1,Fr=!1;function Ur(e){null===Ar?Ar=[e]:Ar.push(e)}function Zr(){if(!Fr&&null!==Ar){Fr=!0;var e=0,t=xt;try{var n=Ar;for(xt=1;e<n.length;e++){var i=n[e];do{i=i(!0)}while(null!==i)}Ar=null,Br=!1}catch(r){throw null!==Ar&&(Ar=Ar.slice(e+1)),qe(Xe,Zr),r}finally{xt=t,Fr=!1}}return null}var Hr=[],Wr=0,Vr=null,$r=0,qr=[],Yr=0,Gr=null,Kr=1,Jr="";function Qr(e,t){Hr[Wr++]=$r,Hr[Wr++]=Vr,Vr=e,$r=t}function Xr(e,t,n){qr[Yr++]=Kr,qr[Yr++]=Jr,qr[Yr++]=Gr,Gr=e;var i=Kr;e=Jr;var r=32-at(i)-1;i&=~(1<<r),n+=1;var o=32-at(t)+r;if(30<o){var a=r-r%5;o=(i&(1<<a)-1).toString(32),i>>=a,r-=a,Kr=1<<32-at(t)+r|n<<r|i,Jr=o+e}else Kr=1<<o|n<<r|i,Jr=e}function eo(e){null!==e.return&&(Qr(e,1),Xr(e,1,0))}function to(e){for(;e===Vr;)Vr=Hr[--Wr],Hr[Wr]=null,$r=Hr[--Wr],Hr[Wr]=null;for(;e===Gr;)Gr=qr[--Yr],qr[Yr]=null,Jr=qr[--Yr],qr[Yr]=null,Kr=qr[--Yr],qr[Yr]=null}var no=null,io=null,ro=!1,oo=null;function ao(e,t){var n=Tu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function so(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,io=ur(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,io=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Gr?{id:Kr,overflow:Jr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Tu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,io=null,!0);default:return!1}}function lo(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function uo(e){if(ro){var t=io;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ur(n.nextSibling);var i=no;t&&so(e,t)?ao(i,n):(e.flags=-4097&e.flags|2,ro=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,ro=!1,no=e}}}function co(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function ho(e){if(e!==no)return!1;if(!ro)return co(e),ro=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!nr(e.type,e.memoizedProps)),t&&(t=io)){if(lo(e))throw fo(),Error(o(418));for(;t;)ao(e,t),t=ur(t.nextSibling)}if(co(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){io=ur(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}io=null}}else io=no?ur(e.stateNode.nextSibling):null;return!0}function fo(){for(var e=io;e;)e=ur(e.nextSibling)}function po(){io=no=null,ro=!1}function mo(e){null===oo?oo=[e]:oo.push(e)}var go=_.ReactCurrentBatchConfig;function vo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var i=n.stateNode}if(!i)throw Error(o(147,e));var r=i,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=r.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function yo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xo(e){return(0,e._init)(e._payload)}function _o(e){function t(t,n){if(e){var i=t.deletions;null===i?(t.deletions=[n],t.flags|=16):i.push(n)}}function n(n,i){if(!e)return null;for(;null!==i;)t(n,i),i=i.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function r(e,t){return(e=zu(e,t)).index=0,e.sibling=null,e}function a(t,n,i){return t.index=i,e?null!==(i=t.alternate)?(i=i.index)<n?(t.flags|=2,n):i:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,i){return null===t||6!==t.tag?((t=Du(n,e.mode,i)).return=e,t):((t=r(t,n)).return=e,t)}function u(e,t,n,i){var o=n.type;return o===j?d(e,t,n.props.children,i,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===O&&xo(o)===t.type)?((i=r(t,n.props)).ref=vo(e,t,n),i.return=e,i):((i=Mu(n.type,n.key,n.props,null,e.mode,i)).ref=vo(e,t,n),i.return=e,i)}function c(e,t,n,i){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Au(n,e.mode,i)).return=e,t):((t=r(t,n.children||[])).return=e,t)}function d(e,t,n,i,o){return null===t||7!==t.tag?((t=Iu(n,e.mode,i,o)).return=e,t):((t=r(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Du(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case b:return(n=Mu(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case w:return(t=Au(t,e.mode,n)).return=e,t;case O:return h(e,(0,t._init)(t._payload),n)}if(te(t)||I(t))return(t=Iu(t,e.mode,n,null)).return=e,t;yo(e,t)}return null}function f(e,t,n,i){var r=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==r?null:l(e,t,""+n,i);if("object"===typeof n&&null!==n){switch(n.$$typeof){case b:return n.key===r?u(e,t,n,i):null;case w:return n.key===r?c(e,t,n,i):null;case O:return f(e,t,(r=n._init)(n._payload),i)}if(te(n)||I(n))return null!==r?null:d(e,t,n,i,null);yo(e,n)}return null}function p(e,t,n,i,r){if("string"===typeof i&&""!==i||"number"===typeof i)return l(t,e=e.get(n)||null,""+i,r);if("object"===typeof i&&null!==i){switch(i.$$typeof){case b:return u(t,e=e.get(null===i.key?n:i.key)||null,i,r);case w:return c(t,e=e.get(null===i.key?n:i.key)||null,i,r);case O:return p(e,t,n,(0,i._init)(i._payload),r)}if(te(i)||I(i))return d(t,e=e.get(n)||null,i,r,null);yo(t,i)}return null}function m(r,o,s,l){for(var u=null,c=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(r,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(r,d),o=a(v,o,m),null===c?u=v:c.sibling=v,c=v,d=g}if(m===s.length)return n(r,d),ro&&Qr(r,m),u;if(null===d){for(;m<s.length;m++)null!==(d=h(r,s[m],l))&&(o=a(d,o,m),null===c?u=d:c.sibling=d,c=d);return ro&&Qr(r,m),u}for(d=i(r,d);m<s.length;m++)null!==(g=p(d,r,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach(function(e){return t(r,e)}),ro&&Qr(r,m),u}function g(r,s,l,u){var c=I(l);if("function"!==typeof c)throw Error(o(150));if(null==(l=c.call(l)))throw Error(o(151));for(var d=c=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var x=f(r,m,y.value,u);if(null===x){null===m&&(m=v);break}e&&m&&null===x.alternate&&t(r,m),s=a(x,s,g),null===d?c=x:d.sibling=x,d=x,m=v}if(y.done)return n(r,m),ro&&Qr(r,g),c;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(r,y.value,u))&&(s=a(y,s,g),null===d?c=y:d.sibling=y,d=y);return ro&&Qr(r,g),c}for(m=i(r,m);!y.done;g++,y=l.next())null!==(y=p(m,r,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(r,e)}),ro&&Qr(r,g),c}return function e(i,o,a,l){if("object"===typeof a&&null!==a&&a.type===j&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case b:e:{for(var u=a.key,c=o;null!==c;){if(c.key===u){if((u=a.type)===j){if(7===c.tag){n(i,c.sibling),(o=r(c,a.props.children)).return=i,i=o;break e}}else if(c.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===O&&xo(u)===c.type){n(i,c.sibling),(o=r(c,a.props)).ref=vo(i,c,a),o.return=i,i=o;break e}n(i,c);break}t(i,c),c=c.sibling}a.type===j?((o=Iu(a.props.children,i.mode,l,a.key)).return=i,i=o):((l=Mu(a.type,a.key,a.props,null,i.mode,l)).ref=vo(i,o,a),l.return=i,i=l)}return s(i);case w:e:{for(c=a.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(i,o.sibling),(o=r(o,a.children||[])).return=i,i=o;break e}n(i,o);break}t(i,o),o=o.sibling}(o=Au(a,i.mode,l)).return=i,i=o}return s(i);case O:return e(i,o,(c=a._init)(a._payload),l)}if(te(a))return m(i,o,a,l);if(I(a))return g(i,o,a,l);yo(i,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==o&&6===o.tag?(n(i,o.sibling),(o=r(o,a)).return=i,i=o):(n(i,o),(o=Du(a,i.mode,l)).return=i,i=o),s(i)):n(i,o)}}var bo=_o(!0),wo=_o(!1),jo=kr(null),ko=null,So=null,No=null;function Lo(){No=So=ko=null}function Eo(e){var t=jo.current;Sr(jo),e._currentValue=t}function Co(e,t,n){for(;null!==e;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==i&&(i.childLanes|=t)):null!==i&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Po(e,t){ko=e,No=So=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(xs=!0),e.firstContext=null)}function To(e){var t=e._currentValue;if(No!==e)if(e={context:e,memoizedValue:t,next:null},null===So){if(null===ko)throw Error(o(308));So=e,ko.dependencies={lanes:0,firstContext:e}}else So=So.next=e;return t}var Oo=null;function zo(e){null===Oo?Oo=[e]:Oo.push(e)}function Mo(e,t,n,i){var r=t.interleaved;return null===r?(n.next=n,zo(t)):(n.next=r.next,r.next=n),t.interleaved=n,Io(e,i)}function Io(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ro=!1;function Do(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fo(e,t,n){var i=e.updateQueue;if(null===i)return null;if(i=i.shared,0!==(2&El)){var r=i.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),i.pending=t,Io(e,n)}return null===(r=i.interleaved)?(t.next=t,zo(i)):(t.next=r.next,r.next=t),i.interleaved=t,Io(e,n)}function Uo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Zo(e,t){var n=e.updateQueue,i=e.alternate;if(null!==i&&n===(i=i.updateQueue)){var r=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?r=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?r=o=t:o=o.next=t}else r=o=t;return n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:i.shared,effects:i.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ho(e,t,n,i){var r=e.updateQueue;Ro=!1;var o=r.firstBaseUpdate,a=r.lastBaseUpdate,s=r.shared.pending;if(null!==s){r.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?o=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==o){var d=r.baseState;for(a=0,c=u=l=null,s=o;;){var h=s.lane,f=s.eventTime;if((i&h)===h){null!==c&&(c=c.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(h=t,f=n,m.tag){case 1:if("function"===typeof(p=m.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(h="function"===typeof(p=m.payload)?p.call(f,d,h):p)||void 0===h)break e;d=D({},d,h);break e;case 2:Ro=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=r.effects)?r.effects=[s]:h.push(s))}else f={eventTime:f,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=f,l=d):c=c.next=f,a|=h;if(null===(s=s.next)){if(null===(s=r.shared.pending))break;s=(h=s).next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}if(null===c&&(l=d),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=c,null!==(t=r.shared.interleaved)){r=t;do{a|=r.lane,r=r.next}while(r!==t)}else null===o&&(r.shared.lanes=0);Rl|=a,e.lanes=a,e.memoizedState=d}}function Wo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],r=i.callback;if(null!==r){if(i.callback=null,i=n,"function"!==typeof r)throw Error(o(191,r));r.call(i)}}}var Vo={},$o=kr(Vo),qo=kr(Vo),Yo=kr(Vo);function Go(e){if(e===Vo)throw Error(o(174));return e}function Ko(e,t){switch(Nr(Yo,t),Nr(qo,e),Nr($o,Vo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Sr($o),Nr($o,t)}function Jo(){Sr($o),Sr(qo),Sr(Yo)}function Qo(e){Go(Yo.current);var t=Go($o.current),n=le(t,e.type);t!==n&&(Nr(qo,e),Nr($o,n))}function Xo(e){qo.current===e&&(Sr($o),Sr(qo))}var ea=kr(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var na=[];function ia(){for(var e=0;e<na.length;e++)na[e]._workInProgressVersionPrimary=null;na.length=0}var ra=_.ReactCurrentDispatcher,oa=_.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ua=null,ca=!1,da=!1,ha=0,fa=0;function pa(){throw Error(o(321))}function ma(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!si(e[n],t[n]))return!1;return!0}function ga(e,t,n,i,r,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ra.current=null===e||null===e.memoizedState?Xa:es,e=n(i,r),da){a=0;do{if(da=!1,ha=0,25<=a)throw Error(o(301));a+=1,ua=la=null,t.updateQueue=null,ra.current=ts,e=n(i,r)}while(da)}if(ra.current=Qa,t=null!==la&&null!==la.next,aa=0,ua=la=sa=null,ca=!1,t)throw Error(o(300));return e}function va(){var e=0!==ha;return ha=0,e}function ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ua?sa.memoizedState=ua=e:ua=ua.next=e,ua}function xa(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ua?sa.memoizedState:ua.next;if(null!==t)ua=t,la=e;else{if(null===e)throw Error(o(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ua?sa.memoizedState=ua=e:ua=ua.next=e}return ua}function _a(e,t){return"function"===typeof t?t(e):t}function ba(e){var t=xa(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var i=la,r=i.baseQueue,a=n.pending;if(null!==a){if(null!==r){var s=r.next;r.next=a.next,a.next=s}i.baseQueue=r=a,n.pending=null}if(null!==r){a=r.next,i=i.baseState;var l=s=null,u=null,c=a;do{var d=c.lane;if((aa&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),i=c.hasEagerState?c.eagerState:e(i,c.action);else{var h={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=h,s=i):u=u.next=h,sa.lanes|=d,Rl|=d}c=c.next}while(null!==c&&c!==a);null===u?s=i:u.next=l,si(i,t.memoizedState)||(xs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=u,n.lastRenderedState=i}if(null!==(e=n.interleaved)){r=e;do{a=r.lane,sa.lanes|=a,Rl|=a,r=r.next}while(r!==e)}else null===r&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wa(e){var t=xa(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var i=n.dispatch,r=n.pending,a=t.memoizedState;if(null!==r){n.pending=null;var s=r=r.next;do{a=e(a,s.action),s=s.next}while(s!==r);si(a,t.memoizedState)||(xs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,i]}function ja(){}function ka(e,t){var n=sa,i=xa(),r=t(),a=!si(i.memoizedState,r);if(a&&(i.memoizedState=r,xs=!0),i=i.queue,Ra(La.bind(null,n,i,e),[e]),i.getSnapshot!==t||a||null!==ua&&1&ua.memoizedState.tag){if(n.flags|=2048,Ta(9,Na.bind(null,n,i,r,t),void 0,null),null===Cl)throw Error(o(349));0!==(30&aa)||Sa(n,t,r)}return r}function Sa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Na(e,t,n,i){t.value=n,t.getSnapshot=i,Ea(t)&&Ca(e)}function La(e,t,n){return n(function(){Ea(t)&&Ca(e)})}function Ea(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!si(e,n)}catch(i){return!0}}function Ca(e){var t=Io(e,1);null!==t&&nu(t,e,1,-1)}function Pa(e){var t=ya();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:e},t.queue=e,e=e.dispatch=Ya.bind(null,sa,e),[t.memoizedState,e]}function Ta(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function Oa(){return xa().memoizedState}function za(e,t,n,i){var r=ya();sa.flags|=e,r.memoizedState=Ta(1|t,n,void 0,void 0===i?null:i)}function Ma(e,t,n,i){var r=xa();i=void 0===i?null:i;var o=void 0;if(null!==la){var a=la.memoizedState;if(o=a.destroy,null!==i&&ma(i,a.deps))return void(r.memoizedState=Ta(t,n,o,i))}sa.flags|=e,r.memoizedState=Ta(1|t,n,o,i)}function Ia(e,t){return za(8390656,8,e,t)}function Ra(e,t){return Ma(2048,8,e,t)}function Da(e,t){return Ma(4,2,e,t)}function Aa(e,t){return Ma(4,4,e,t)}function Ba(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Fa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ma(4,4,Ba.bind(null,t,e),n)}function Ua(){}function Za(e,t){var n=xa();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&ma(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Ha(e,t){var n=xa();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&ma(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function Wa(e,t,n){return 0===(21&aa)?(e.baseState&&(e.baseState=!1,xs=!0),e.memoizedState=n):(si(n,t)||(n=mt(),sa.lanes|=n,Rl|=n,e.baseState=!0),t)}function Va(e,t){var n=xt;xt=0!==n&&4>n?n:4,e(!0);var i=oa.transition;oa.transition={};try{e(!1),t()}finally{xt=n,oa.transition=i}}function $a(){return xa().memoizedState}function qa(e,t,n){var i=tu(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Ga(e))Ka(t,n);else if(null!==(n=Mo(e,t,n,i))){nu(n,e,i,eu()),Ja(n,t,i)}}function Ya(e,t,n){var i=tu(e),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ga(e))Ka(t,r);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(r.hasEagerState=!0,r.eagerState=s,si(s,a)){var l=t.interleaved;return null===l?(r.next=r,zo(t)):(r.next=l.next,l.next=r),void(t.interleaved=r)}}catch(u){}null!==(n=Mo(e,t,r,i))&&(nu(n,e,i,r=eu()),Ja(n,t,i))}}function Ga(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ka(e,t){da=ca=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ja(e,t,n){if(0!==(4194240&n)){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Qa={readContext:To,useCallback:pa,useContext:pa,useEffect:pa,useImperativeHandle:pa,useInsertionEffect:pa,useLayoutEffect:pa,useMemo:pa,useReducer:pa,useRef:pa,useState:pa,useDebugValue:pa,useDeferredValue:pa,useTransition:pa,useMutableSource:pa,useSyncExternalStore:pa,useId:pa,unstable_isNewReconciler:!1},Xa={readContext:To,useCallback:function(e,t){return ya().memoizedState=[e,void 0===t?null:t],e},useContext:To,useEffect:Ia,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,za(4194308,4,Ba.bind(null,t,e),n)},useLayoutEffect:function(e,t){return za(4194308,4,e,t)},useInsertionEffect:function(e,t){return za(4,2,e,t)},useMemo:function(e,t){var n=ya();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=ya();return t=void 0!==n?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=qa.bind(null,sa,e),[i.memoizedState,e]},useRef:function(e){return e={current:e},ya().memoizedState=e},useState:Pa,useDebugValue:Ua,useDeferredValue:function(e){return ya().memoizedState=e},useTransition:function(){var e=Pa(!1),t=e[0];return e=Va.bind(null,e[1]),ya().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=sa,r=ya();if(ro){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Cl)throw Error(o(349));0!==(30&aa)||Sa(i,t,n)}r.memoizedState=n;var a={value:n,getSnapshot:t};return r.queue=a,Ia(La.bind(null,i,a,e),[e]),i.flags|=2048,Ta(9,Na.bind(null,i,a,n,t),void 0,null),n},useId:function(){var e=ya(),t=Cl.identifierPrefix;if(ro){var n=Jr;t=":"+t+"R"+(n=(Kr&~(1<<32-at(Kr)-1)).toString(32)+n),0<(n=ha++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:To,useCallback:Za,useContext:To,useEffect:Ra,useImperativeHandle:Fa,useInsertionEffect:Da,useLayoutEffect:Aa,useMemo:Ha,useReducer:ba,useRef:Oa,useState:function(){return ba(_a)},useDebugValue:Ua,useDeferredValue:function(e){return Wa(xa(),la.memoizedState,e)},useTransition:function(){return[ba(_a)[0],xa().memoizedState]},useMutableSource:ja,useSyncExternalStore:ka,useId:$a,unstable_isNewReconciler:!1},ts={readContext:To,useCallback:Za,useContext:To,useEffect:Ra,useImperativeHandle:Fa,useInsertionEffect:Da,useLayoutEffect:Aa,useMemo:Ha,useReducer:wa,useRef:Oa,useState:function(){return wa(_a)},useDebugValue:Ua,useDeferredValue:function(e){var t=xa();return null===la?t.memoizedState=e:Wa(t,la.memoizedState,e)},useTransition:function(){return[wa(_a)[0],xa().memoizedState]},useMutableSource:ja,useSyncExternalStore:ka,useId:$a,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=D({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function is(e,t,n,i){n=null===(n=n(i,t=e.memoizedState))||void 0===n?t:D({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var rs={isMounted:function(e){return!!(e=e._reactInternals)&&Ze(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=eu(),r=tu(e),o=Bo(i,r);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Fo(e,o,r))&&(nu(t,e,r,i),Uo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=eu(),r=tu(e),o=Bo(i,r);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Fo(e,o,r))&&(nu(t,e,r,i),Uo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),i=tu(e),r=Bo(n,i);r.tag=2,void 0!==t&&null!==t&&(r.callback=t),null!==(t=Fo(e,r,i))&&(nu(t,e,i,n),Uo(t,e,i))}};function os(e,t,n,i,r,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(i,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!li(n,i)||!li(r,o))}function as(e,t,n){var i=!1,r=Lr,o=t.contextType;return"object"===typeof o&&null!==o?o=To(o):(r=Or(t)?Pr:Er.current,o=(i=null!==(i=t.contextTypes)&&void 0!==i)?Tr(e,r):Lr),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=rs,e.stateNode=t,t._reactInternals=e,i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,n,i){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,i),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&rs.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,i){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs={},Do(e);var o=t.contextType;"object"===typeof o&&null!==o?r.context=To(o):(o=Or(t)?Pr:Er.current,r.context=Tr(e,o)),r.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(is(e,t,o,n),r.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(t=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),t!==r.state&&rs.enqueueReplaceState(r,r.state,null),Ho(e,n,r,i),r.state=e.memoizedState),"function"===typeof r.componentDidMount&&(e.flags|=4194308)}function us(e,t){try{var n="",i=t;do{n+=U(i),i=i.return}while(i);var r=n}catch(o){r="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:r,digest:null}}function cs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var hs="function"===typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=Bo(-1,n)).tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){Wl||(Wl=!0,Vl=i),ds(0,t)},n}function ps(e,t,n){(n=Bo(-1,n)).tag=3;var i=e.type.getDerivedStateFromError;if("function"===typeof i){var r=t.value;n.payload=function(){return i(r)},n.callback=function(){ds(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!==typeof i&&(null===$l?$l=new Set([this]):$l.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var i=e.pingCache;if(null===i){i=e.pingCache=new hs;var r=new Set;i.set(t,r)}else void 0===(r=i.get(t))&&(r=new Set,i.set(t,r));r.has(n)||(r.add(n),e=Su.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,i,r){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Bo(-1,1)).tag=2,Fo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=r,e)}var ys=_.ReactCurrentOwner,xs=!1;function _s(e,t,n,i){t.child=null===e?wo(t,null,n,i):bo(t,e.child,n,i)}function bs(e,t,n,i,r){n=n.render;var o=t.ref;return Po(t,r),i=ga(e,t,n,i,o,r),n=va(),null===e||xs?(ro&&n&&eo(t),t.flags|=1,_s(e,t,i,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Ws(e,t,r))}function ws(e,t,n,i,r){if(null===e){var o=n.type;return"function"!==typeof o||Ou(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Mu(n.type,null,i,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,js(e,t,o,i,r))}if(o=e.child,0===(e.lanes&r)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:li)(a,i)&&e.ref===t.ref)return Ws(e,t,r)}return t.flags|=1,(e=zu(o,i)).ref=t.ref,e.return=t,t.child=e}function js(e,t,n,i,r){if(null!==e){var o=e.memoizedProps;if(li(o,i)&&e.ref===t.ref){if(xs=!1,t.pendingProps=i=o,0===(e.lanes&r))return t.lanes=e.lanes,Ws(e,t,r);0!==(131072&e.flags)&&(xs=!0)}}return Ns(e,t,n,i,r)}function ks(e,t,n){var i=t.pendingProps,r=i.children,o=null!==e?e.memoizedState:null;if("hidden"===i.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Nr(zl,Ol),Ol|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Nr(zl,Ol),Ol|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=null!==o?o.baseLanes:n,Nr(zl,Ol),Ol|=i}else null!==o?(i=o.baseLanes|n,t.memoizedState=null):i=n,Nr(zl,Ol),Ol|=i;return _s(e,t,r,n),t.child}function Ss(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ns(e,t,n,i,r){var o=Or(n)?Pr:Er.current;return o=Tr(t,o),Po(t,r),n=ga(e,t,n,i,o,r),i=va(),null===e||xs?(ro&&i&&eo(t),t.flags|=1,_s(e,t,n,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Ws(e,t,r))}function Ls(e,t,n,i,r){if(Or(n)){var o=!0;Rr(t)}else o=!1;if(Po(t,r),null===t.stateNode)Hs(e,t),as(t,n,i),ls(t,n,i,r),i=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"===typeof u&&null!==u?u=To(u):u=Tr(t,u=Or(n)?Pr:Er.current);var c=n.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==i||l!==u)&&ss(t,a,i,u),Ro=!1;var h=t.memoizedState;a.state=h,Ho(t,i,a,r),l=t.memoizedState,s!==i||h!==l||Cr.current||Ro?("function"===typeof c&&(is(t,n,c,i),l=t.memoizedState),(s=Ro||os(t,n,s,i,h,l,u))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=l),a.props=i,a.state=l,a.context=u,i=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),i=!1)}else{a=t.stateNode,Ao(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ns(t.type,s),a.props=u,d=t.pendingProps,h=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=To(l):l=Tr(t,l=Or(n)?Pr:Er.current);var f=n.getDerivedStateFromProps;(c="function"===typeof f||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||h!==l)&&ss(t,a,i,l),Ro=!1,h=t.memoizedState,a.state=h,Ho(t,i,a,r);var p=t.memoizedState;s!==d||h!==p||Cr.current||Ro?("function"===typeof f&&(is(t,n,f,i),p=t.memoizedState),(u=Ro||os(t,n,u,i,h,p,l)||!1)?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(i,p,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(i,p,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=p),a.props=i,a.state=p,a.context=l,i=u):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return Es(e,t,n,i,o,r)}function Es(e,t,n,i,r,o){Ss(e,t);var a=0!==(128&t.flags);if(!i&&!a)return r&&Dr(t,n,!1),Ws(e,t,o);i=t.stateNode,ys.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:i.render();return t.flags|=1,null!==e&&a?(t.child=bo(t,e.child,null,o),t.child=bo(t,null,s,o)):_s(e,t,s,o),t.memoizedState=i.state,r&&Dr(t,n,!0),t.child}function Cs(e){var t=e.stateNode;t.pendingContext?Mr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Mr(0,t.context,!1),Ko(e,t.containerInfo)}function Ps(e,t,n,i,r){return po(),mo(r),t.flags|=256,_s(e,t,n,i),t.child}var Ts,Os,zs,Ms,Is={dehydrated:null,treeContext:null,retryLane:0};function Rs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ds(e,t,n){var i,r=t.pendingProps,a=ea.current,s=!1,l=0!==(128&t.flags);if((i=l)||(i=(null===e||null!==e.memoizedState)&&0!==(2&a)),i?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Nr(ea,1&a),null===e)return uo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=r.children,e=r.fallback,s?(r=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&r)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Ru(l,r,0,null),e=Iu(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Rs(n),t.memoizedState=Is,e):As(t,l));if(null!==(a=e.memoizedState)&&null!==(i=a.dehydrated))return function(e,t,n,i,r,a,s){if(n)return 256&t.flags?(t.flags&=-257,Bs(e,t,s,i=cs(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=i.fallback,r=t.mode,i=Ru({mode:"visible",children:i.children},r,0,null),(a=Iu(a,r,s,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,0!==(1&t.mode)&&bo(t,e.child,null,s),t.child.memoizedState=Rs(s),t.memoizedState=Is,a);if(0===(1&t.mode))return Bs(e,t,s,null);if("$!"===r.data){if(i=r.nextSibling&&r.nextSibling.dataset)var l=i.dgst;return i=l,Bs(e,t,s,i=cs(a=Error(o(419)),i,void 0))}if(l=0!==(s&e.childLanes),xs||l){if(null!==(i=Cl)){switch(s&-s){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}0!==(r=0!==(r&(i.suspendedLanes|s))?0:r)&&r!==a.retryLane&&(a.retryLane=r,Io(e,r),nu(i,e,r,-1))}return mu(),Bs(e,t,s,i=cs(Error(o(421))))}return"$?"===r.data?(t.flags|=128,t.child=e.child,t=Lu.bind(null,e),r._reactRetry=t,null):(e=a.treeContext,io=ur(r.nextSibling),no=t,ro=!0,oo=null,null!==e&&(qr[Yr++]=Kr,qr[Yr++]=Jr,qr[Yr++]=Gr,Kr=e.id,Jr=e.overflow,Gr=t),t=As(t,i.children),t.flags|=4096,t)}(e,t,l,r,i,a,n);if(s){s=r.fallback,l=t.mode,i=(a=e.child).sibling;var u={mode:"hidden",children:r.children};return 0===(1&l)&&t.child!==a?((r=t.child).childLanes=0,r.pendingProps=u,t.deletions=null):(r=zu(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==i?s=zu(i,s):(s=Iu(s,l,n,null)).flags|=2,s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,l=null===(l=e.child.memoizedState)?Rs(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Is,r}return e=(s=e.child).sibling,r=zu(s,{mode:"visible",children:r.children}),0===(1&t.mode)&&(r.lanes=n),r.return=t,r.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function As(e,t){return(t=Ru({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bs(e,t,n,i){return null!==i&&mo(i),bo(t,e.child,null,n),(e=As(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,n){e.lanes|=t;var i=e.alternate;null!==i&&(i.lanes|=t),Co(e.return,t,n)}function Us(e,t,n,i,r){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=i,o.tail=n,o.tailMode=r)}function Zs(e,t,n){var i=t.pendingProps,r=i.revealOrder,o=i.tail;if(_s(e,t,i.children,n),0!==(2&(i=ea.current)))i=1&i|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fs(e,n,t);else if(19===e.tag)Fs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(Nr(ea,i),0===(1&t.mode))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Us(t,!1,r,n,o);break;case"backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===ta(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Us(t,!0,n,null,o);break;case"together":Us(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ws(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Rl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=zu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=zu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Vs(e,t){if(!ro)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function $s(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,i=0;if(t)for(var r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=14680064&r.subtreeFlags,i|=14680064&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function qs(e,t,n){var i=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $s(t),null;case 1:case 17:return Or(t.type)&&zr(),$s(t),null;case 3:return i=t.stateNode,Jo(),Sr(Cr),Sr(Er),ia(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(au(oo),oo=null))),Os(e,t),$s(t),null;case 5:Xo(t);var r=Go(Yo.current);if(n=t.type,null!==e&&null!=t.stateNode)zs(e,t,n,i,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(null===t.stateNode)throw Error(o(166));return $s(t),null}if(e=Go($o.current),ho(t)){i=t.stateNode,n=t.type;var a=t.memoizedProps;switch(i[hr]=t,i[fr]=a,e=0!==(1&t.mode),n){case"dialog":Bi("cancel",i),Bi("close",i);break;case"iframe":case"object":case"embed":Bi("load",i);break;case"video":case"audio":for(r=0;r<Ii.length;r++)Bi(Ii[r],i);break;case"source":Bi("error",i);break;case"img":case"image":case"link":Bi("error",i),Bi("load",i);break;case"details":Bi("toggle",i);break;case"input":K(i,a),Bi("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!a.multiple},Bi("invalid",i);break;case"textarea":re(i,a),Bi("invalid",i)}for(var l in ye(n,a),r=null,a)if(a.hasOwnProperty(l)){var u=a[l];"children"===l?"string"===typeof u?i.textContent!==u&&(!0!==a.suppressHydrationWarning&&Qi(i.textContent,u,e),r=["children",u]):"number"===typeof u&&i.textContent!==""+u&&(!0!==a.suppressHydrationWarning&&Qi(i.textContent,u,e),r=["children",""+u]):s.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Bi("scroll",i)}switch(n){case"input":$(i),X(i,a,!0);break;case"textarea":$(i),ae(i);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(i.onclick=Xi)}i=r,t.updateQueue=i,null!==i&&(t.flags|=4)}else{l=9===r.nodeType?r:r.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof i.is?e=l.createElement(n,{is:i.is}):(e=l.createElement(n),"select"===n&&(l=e,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):e=l.createElementNS(e,n),e[hr]=t,e[fr]=i,Ts(e,t,!1,!1),t.stateNode=e;e:{switch(l=xe(n,i),n){case"dialog":Bi("cancel",e),Bi("close",e),r=i;break;case"iframe":case"object":case"embed":Bi("load",e),r=i;break;case"video":case"audio":for(r=0;r<Ii.length;r++)Bi(Ii[r],e);r=i;break;case"source":Bi("error",e),r=i;break;case"img":case"image":case"link":Bi("error",e),Bi("load",e),r=i;break;case"details":Bi("toggle",e),r=i;break;case"input":K(e,i),r=G(e,i),Bi("invalid",e);break;case"option":default:r=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},r=D({},i,{value:void 0}),Bi("invalid",e);break;case"textarea":re(e,i),r=ie(e,i),Bi("invalid",e)}for(a in ye(n,r),u=r)if(u.hasOwnProperty(a)){var c=u[a];"style"===a?ge(e,c):"dangerouslySetInnerHTML"===a?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===a?"string"===typeof c?("textarea"!==n||""!==c)&&he(e,c):"number"===typeof c&&he(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=c&&"onScroll"===a&&Bi("scroll",e):null!=c&&x(e,a,c,l))}switch(n){case"input":$(e),X(e,i,!1);break;case"textarea":$(e),ae(e);break;case"option":null!=i.value&&e.setAttribute("value",""+W(i.value));break;case"select":e.multiple=!!i.multiple,null!=(a=i.value)?ne(e,!!i.multiple,a,!1):null!=i.defaultValue&&ne(e,!!i.multiple,i.defaultValue,!0);break;default:"function"===typeof r.onClick&&(e.onclick=Xi)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return $s(t),null;case 6:if(e&&null!=t.stateNode)Ms(e,t,e.memoizedProps,i);else{if("string"!==typeof i&&null===t.stateNode)throw Error(o(166));if(n=Go(Yo.current),Go($o.current),ho(t)){if(i=t.stateNode,n=t.memoizedProps,i[hr]=t,(a=i.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Qi(i.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qi(i.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(i=(9===n.nodeType?n:n.ownerDocument).createTextNode(i))[hr]=t,t.stateNode=i}return $s(t),null;case 13:if(Sr(ea),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ro&&null!==io&&0!==(1&t.mode)&&0===(128&t.flags))fo(),po(),t.flags|=98560,a=!1;else if(a=ho(t),null!==i&&null!==i.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[hr]=t}else po(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;$s(t),a=!1}else null!==oo&&(au(oo),oo=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((i=null!==i)!==(null!==e&&null!==e.memoizedState)&&i&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ea.current)?0===Ml&&(Ml=3):mu())),null!==t.updateQueue&&(t.flags|=4),$s(t),null);case 4:return Jo(),Os(e,t),null===e&&Zi(t.stateNode.containerInfo),$s(t),null;case 10:return Eo(t.type._context),$s(t),null;case 19:if(Sr(ea),null===(a=t.memoizedState))return $s(t),null;if(i=0!==(128&t.flags),null===(l=a.rendering))if(i)Vs(a,!1);else{if(0!==Ml||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Vs(a,!1),null!==(i=l.updateQueue)&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;null!==n;)e=i,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Nr(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Je()>Zl&&(t.flags|=128,i=!0,Vs(a,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=ta(l))){if(t.flags|=128,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Vs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!ro)return $s(t),null}else 2*Je()-a.renderingStartTime>Zl&&1073741824!==n&&(t.flags|=128,i=!0,Vs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Je(),t.sibling=null,n=ea.current,Nr(ea,i?1&n|2:1&n),t):($s(t),null);case 22:case 23:return du(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&0!==(1&t.mode)?0!==(1073741824&Ol)&&($s(t),6&t.subtreeFlags&&(t.flags|=8192)):$s(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ys(e,t){switch(to(t),t.tag){case 1:return Or(t.type)&&zr(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),Sr(Cr),Sr(Er),ia(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Xo(t),null;case 13:if(Sr(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Sr(ea),null;case 4:return Jo(),null;case 10:return Eo(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Ts=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Os=function(){},zs=function(e,t,n,i){var r=e.memoizedProps;if(r!==i){e=t.stateNode,Go($o.current);var o,a=null;switch(n){case"input":r=G(e,r),i=G(e,i),a=[];break;case"select":r=D({},r,{value:void 0}),i=D({},i,{value:void 0}),a=[];break;case"textarea":r=ie(e,r),i=ie(e,i),a=[];break;default:"function"!==typeof r.onClick&&"function"===typeof i.onClick&&(e.onclick=Xi)}for(c in ye(n,i),n=null,r)if(!i.hasOwnProperty(c)&&r.hasOwnProperty(c)&&null!=r[c])if("style"===c){var l=r[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in i){var u=i[c];if(l=null!=r?r[c]:void 0,i.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(a||(a=[]),a.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(a=a||[]).push(c,u)):"children"===c?"string"!==typeof u&&"number"!==typeof u||(a=a||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Bi("scroll",e),a||l===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Ms=function(e,t,n,i){n!==i&&(t.flags|=4)};var Gs=!1,Ks=!1,Js="function"===typeof WeakSet?WeakSet:Set,Qs=null;function Xs(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(i){ku(e,t,i)}else n.current=null}function el(e,t,n){try{n()}catch(i){ku(e,t,i)}}var tl=!1;function nl(e,t,n){var i=t.updateQueue;if(null!==(i=null!==i?i.lastEffect:null)){var r=i=i.next;do{if((r.tag&e)===e){var o=r.destroy;r.destroy=void 0,void 0!==o&&el(t,n,o)}r=r.next}while(r!==i)}}function il(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function rl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hr],delete t[fr],delete t[mr],delete t[gr],delete t[vr])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Xi));else if(4!==i&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function ul(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==i&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var cl=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(rt,n)}catch(s){}switch(n.tag){case 5:Ks||Xs(n,t);case 6:var i=cl,r=dl;cl=null,hl(e,t,n),dl=r,null!==(cl=i)&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?lr(e.parentNode,n):1===e.nodeType&&lr(e,n),Zt(e)):lr(cl,n.stateNode));break;case 4:i=cl,r=dl,cl=n.stateNode.containerInfo,dl=!0,hl(e,t,n),cl=i,dl=r;break;case 0:case 11:case 14:case 15:if(!Ks&&(null!==(i=n.updateQueue)&&null!==(i=i.lastEffect))){r=i=i.next;do{var o=r,a=o.destroy;o=o.tag,void 0!==a&&(0!==(2&o)||0!==(4&o))&&el(n,t,a),r=r.next}while(r!==i)}hl(e,t,n);break;case 1:if(!Ks&&(Xs(n,t),"function"===typeof(i=n.stateNode).componentWillUnmount))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(s){ku(n,t,s)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Ks=(i=Ks)||null!==n.memoizedState,hl(e,t,n),Ks=i):hl(e,t,n);break;default:hl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Js),t.forEach(function(t){var i=Eu.bind(null,e,t);n.has(t)||(n.add(t),t.then(i,i))})}}function ml(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var r=n[i];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:cl=l.stateNode,dl=!1;break e;case 3:case 4:cl=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===cl)throw Error(o(160));fl(a,s,r),cl=null,dl=!1;var u=r.alternate;null!==u&&(u.return=null),r.return=null}catch(c){ku(r,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),vl(e),4&i){try{nl(3,e,e.return),il(3,e)}catch(g){ku(e,e.return,g)}try{nl(5,e,e.return)}catch(g){ku(e,e.return,g)}}break;case 1:ml(t,e),vl(e),512&i&&null!==n&&Xs(n,n.return);break;case 5:if(ml(t,e),vl(e),512&i&&null!==n&&Xs(n,n.return),32&e.flags){var r=e.stateNode;try{he(r,"")}catch(g){ku(e,e.return,g)}}if(4&i&&null!=(r=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===a.type&&null!=a.name&&J(r,a),xe(l,s);var c=xe(l,a);for(s=0;s<u.length;s+=2){var d=u[s],h=u[s+1];"style"===d?ge(r,h):"dangerouslySetInnerHTML"===d?de(r,h):"children"===d?he(r,h):x(r,d,h,c)}switch(l){case"input":Q(r,a);break;case"textarea":oe(r,a);break;case"select":var f=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ne(r,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?ne(r,!!a.multiple,a.defaultValue,!0):ne(r,!!a.multiple,a.multiple?[]:"",!1))}r[fr]=a}catch(g){ku(e,e.return,g)}}break;case 6:if(ml(t,e),vl(e),4&i){if(null===e.stateNode)throw Error(o(162));r=e.stateNode,a=e.memoizedProps;try{r.nodeValue=a}catch(g){ku(e,e.return,g)}}break;case 3:if(ml(t,e),vl(e),4&i&&null!==n&&n.memoizedState.isDehydrated)try{Zt(t.containerInfo)}catch(g){ku(e,e.return,g)}break;case 4:default:ml(t,e),vl(e);break;case 13:ml(t,e),vl(e),8192&(r=e.child).flags&&(a=null!==r.memoizedState,r.stateNode.isHidden=a,!a||null!==r.alternate&&null!==r.alternate.memoizedState||(Ul=Je())),4&i&&pl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ks=(c=Ks)||d,ml(t,e),Ks=c):ml(t,e),vl(e),8192&i){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&0!==(1&e.mode))for(Qs=e,d=e.child;null!==d;){for(h=Qs=d;null!==Qs;){switch(p=(f=Qs).child,f.tag){case 0:case 11:case 14:case 15:nl(4,f,f.return);break;case 1:Xs(f,f.return);var m=f.stateNode;if("function"===typeof m.componentWillUnmount){i=f,n=f.return;try{t=i,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){ku(i,n,g)}}break;case 5:Xs(f,f.return);break;case 22:if(null!==f.memoizedState){bl(h);continue}}null!==p?(p.return=f,Qs=p):bl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{r=h.stateNode,c?"function"===typeof(a=r.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=void 0!==(u=h.memoizedProps.style)&&null!==u&&u.hasOwnProperty("display")?u.display:null,l.style.display=me("display",s))}catch(g){ku(e,e.return,g)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(g){ku(e,e.return,g)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ml(t,e),vl(e),4&i&&pl(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var i=n;break e}n=n.return}throw Error(o(160))}switch(i.tag){case 5:var r=i.stateNode;32&i.flags&&(he(r,""),i.flags&=-33),ul(e,sl(e),r);break;case 3:case 4:var a=i.stateNode.containerInfo;ll(e,sl(e),a);break;default:throw Error(o(161))}}catch(s){ku(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,n){Qs=e,xl(e,t,n)}function xl(e,t,n){for(var i=0!==(1&e.mode);null!==Qs;){var r=Qs,o=r.child;if(22===r.tag&&i){var a=null!==r.memoizedState||Gs;if(!a){var s=r.alternate,l=null!==s&&null!==s.memoizedState||Ks;s=Gs;var u=Ks;if(Gs=a,(Ks=l)&&!u)for(Qs=r;null!==Qs;)l=(a=Qs).child,22===a.tag&&null!==a.memoizedState?wl(r):null!==l?(l.return=a,Qs=l):wl(r);for(;null!==o;)Qs=o,xl(o,t,n),o=o.sibling;Qs=r,Gs=s,Ks=u}_l(e)}else 0!==(8772&r.subtreeFlags)&&null!==o?(o.return=r,Qs=o):_l(e)}}function _l(e){for(;null!==Qs;){var t=Qs;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ks||il(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Ks)if(null===n)i.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Wo(t,a,i);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Wo(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Zt(h)}}}break;default:throw Error(o(163))}Ks||512&t.flags&&rl(t)}catch(f){ku(t,t.return,f)}}if(t===e){Qs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qs=n;break}Qs=t.return}}function bl(e){for(;null!==Qs;){var t=Qs;if(t===e){Qs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qs=n;break}Qs=t.return}}function wl(e){for(;null!==Qs;){var t=Qs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{il(4,t)}catch(l){ku(t,n,l)}break;case 1:var i=t.stateNode;if("function"===typeof i.componentDidMount){var r=t.return;try{i.componentDidMount()}catch(l){ku(t,r,l)}}var o=t.return;try{rl(t)}catch(l){ku(t,o,l)}break;case 5:var a=t.return;try{rl(t)}catch(l){ku(t,a,l)}}}catch(l){ku(t,t.return,l)}if(t===e){Qs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Qs=s;break}Qs=t.return}}var jl,kl=Math.ceil,Sl=_.ReactCurrentDispatcher,Nl=_.ReactCurrentOwner,Ll=_.ReactCurrentBatchConfig,El=0,Cl=null,Pl=null,Tl=0,Ol=0,zl=kr(0),Ml=0,Il=null,Rl=0,Dl=0,Al=0,Bl=null,Fl=null,Ul=0,Zl=1/0,Hl=null,Wl=!1,Vl=null,$l=null,ql=!1,Yl=null,Gl=0,Kl=0,Jl=null,Ql=-1,Xl=0;function eu(){return 0!==(6&El)?Je():-1!==Ql?Ql:Ql=Je()}function tu(e){return 0===(1&e.mode)?1:0!==(2&El)&&0!==Tl?Tl&-Tl:null!==go.transition?(0===Xl&&(Xl=mt()),Xl):0!==(e=xt)?e:e=void 0===(e=window.event)?16:Kt(e.type)}function nu(e,t,n,i){if(50<Kl)throw Kl=0,Jl=null,Error(o(185));vt(e,n,i),0!==(2&El)&&e===Cl||(e===Cl&&(0===(2&El)&&(Dl|=n),4===Ml&&su(e,Tl)),iu(e,i),1===n&&0===El&&0===(1&t.mode)&&(Zl=Je()+500,Br&&Zr()))}function iu(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,l=r[a];-1===l?0!==(s&n)&&0===(s&i)||(r[a]=ft(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var i=ht(e,e===Cl?Tl:0);if(0===i)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){Br=!0,Ur(e)}(lu.bind(null,e)):Ur(lu.bind(null,e)),ar(function(){0===(6&El)&&Zr()}),n=null;else{switch(_t(i)){case 1:n=Xe;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=it}n=Cu(n,ru.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ru(e,t){if(Ql=-1,Xl=0,0!==(6&El))throw Error(o(327));var n=e.callbackNode;if(wu()&&e.callbackNode!==n)return null;var i=ht(e,e===Cl?Tl:0);if(0===i)return null;if(0!==(30&i)||0!==(i&e.expiredLanes)||t)t=gu(e,i);else{t=i;var r=El;El|=2;var a=pu();for(Cl===e&&Tl===t||(Hl=null,Zl=Je()+500,hu(e,t));;)try{yu();break}catch(l){fu(e,l)}Lo(),Sl.current=a,El=r,null!==Pl?t=0:(Cl=null,Tl=0,t=Ml)}if(0!==t){if(2===t&&(0!==(r=pt(e))&&(i=r,t=ou(e,r))),1===t)throw n=Il,hu(e,0),su(e,i),iu(e,Je()),n;if(6===t)su(e,i);else{if(r=e.current.alternate,0===(30&i)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var r=n[i],o=r.getSnapshot;r=r.value;try{if(!si(o(),r))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(r)&&(2===(t=gu(e,i))&&(0!==(a=pt(e))&&(i=a,t=ou(e,a))),1===t))throw n=Il,hu(e,0),su(e,i),iu(e,Je()),n;switch(e.finishedWork=r,e.finishedLanes=i,t){case 0:case 1:throw Error(o(345));case 2:case 5:bu(e,Fl,Hl);break;case 3:if(su(e,i),(130023424&i)===i&&10<(t=Ul+500-Je())){if(0!==ht(e,0))break;if(((r=e.suspendedLanes)&i)!==i){eu(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=ir(bu.bind(null,e,Fl,Hl),t);break}bu(e,Fl,Hl);break;case 4:if(su(e,i),(4194240&i)===i)break;for(t=e.eventTimes,r=-1;0<i;){var s=31-at(i);a=1<<s,(s=t[s])>r&&(r=s),i&=~a}if(i=r,10<(i=(120>(i=Je()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*kl(i/1960))-i)){e.timeoutHandle=ir(bu.bind(null,e,Fl,Hl),i);break}bu(e,Fl,Hl);break;default:throw Error(o(329))}}}return iu(e,Je()),e.callbackNode===n?ru.bind(null,e):null}function ou(e,t){var n=Bl;return e.current.memoizedState.isDehydrated&&(hu(e,t).flags|=256),2!==(e=gu(e,t))&&(t=Fl,Fl=n,null!==t&&au(t)),e}function au(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function su(e,t){for(t&=~Al,t&=~Dl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),i=1<<n;e[n]=-1,t&=~i}}function lu(e){if(0!==(6&El))throw Error(o(327));wu();var t=ht(e,0);if(0===(1&t))return iu(e,Je()),null;var n=gu(e,t);if(0!==e.tag&&2===n){var i=pt(e);0!==i&&(t=i,n=ou(e,i))}if(1===n)throw n=Il,hu(e,0),su(e,t),iu(e,Je()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bu(e,Fl,Hl),iu(e,Je()),null}function uu(e,t){var n=El;El|=1;try{return e(t)}finally{0===(El=n)&&(Zl=Je()+500,Br&&Zr())}}function cu(e){null!==Yl&&0===Yl.tag&&0===(6&El)&&wu();var t=El;El|=1;var n=Ll.transition,i=xt;try{if(Ll.transition=null,xt=1,e)return e()}finally{xt=i,Ll.transition=n,0===(6&(El=t))&&Zr()}}function du(){Ol=zl.current,Sr(zl)}function hu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,rr(n)),null!==Pl)for(n=Pl.return;null!==n;){var i=n;switch(to(i),i.tag){case 1:null!==(i=i.type.childContextTypes)&&void 0!==i&&zr();break;case 3:Jo(),Sr(Cr),Sr(Er),ia();break;case 5:Xo(i);break;case 4:Jo();break;case 13:case 19:Sr(ea);break;case 10:Eo(i.type._context);break;case 22:case 23:du()}n=n.return}if(Cl=e,Pl=e=zu(e.current,null),Tl=Ol=t,Ml=0,Il=null,Al=Dl=Rl=0,Fl=Bl=null,null!==Oo){for(t=0;t<Oo.length;t++)if(null!==(i=(n=Oo[t]).interleaved)){n.interleaved=null;var r=i.next,o=n.pending;if(null!==o){var a=o.next;o.next=r,i.next=a}n.pending=i}Oo=null}return e}function fu(e,t){for(;;){var n=Pl;try{if(Lo(),ra.current=Qa,ca){for(var i=sa.memoizedState;null!==i;){var r=i.queue;null!==r&&(r.pending=null),i=i.next}ca=!1}if(aa=0,ua=la=sa=null,da=!1,ha=0,Nl.current=null,null===n||null===n.return){Ml=1,Il=t,Pl=null;break}e:{var a=e,s=n.return,l=n,u=t;if(t=Tl,l.flags|=32768,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u,d=l,h=d.tag;if(0===(1&d.mode)&&(0===h||11===h||15===h)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=gs(s);if(null!==p){p.flags&=-257,vs(p,s,l,0,t),1&p.mode&&ms(a,c,t),u=c;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(u),t.updateQueue=g}else m.add(u);break e}if(0===(1&t)){ms(a,c,t),mu();break e}u=Error(o(426))}else if(ro&&1&l.mode){var v=gs(s);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),mo(us(u,l));break e}}a=u=us(u,l),4!==Ml&&(Ml=2),null===Bl?Bl=[a]:Bl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Zo(a,fs(0,u,t));break e;case 1:l=u;var y=a.type,x=a.stateNode;if(0===(128&a.flags)&&("function"===typeof y.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===$l||!$l.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t,Zo(a,ps(a,l,t));break e}}a=a.return}while(null!==a)}_u(n)}catch(_){t=_,Pl===n&&null!==n&&(Pl=n=n.return);continue}break}}function pu(){var e=Sl.current;return Sl.current=Qa,null===e?Qa:e}function mu(){0!==Ml&&3!==Ml&&2!==Ml||(Ml=4),null===Cl||0===(268435455&Rl)&&0===(268435455&Dl)||su(Cl,Tl)}function gu(e,t){var n=El;El|=2;var i=pu();for(Cl===e&&Tl===t||(Hl=null,hu(e,t));;)try{vu();break}catch(r){fu(e,r)}if(Lo(),El=n,Sl.current=i,null!==Pl)throw Error(o(261));return Cl=null,Tl=0,Ml}function vu(){for(;null!==Pl;)xu(Pl)}function yu(){for(;null!==Pl&&!Ge();)xu(Pl)}function xu(e){var t=jl(e.alternate,e,Ol);e.memoizedProps=e.pendingProps,null===t?_u(e):Pl=t,Nl.current=null}function _u(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=qs(n,t,Ol)))return void(Pl=n)}else{if(null!==(n=Ys(n,t)))return n.flags&=32767,void(Pl=n);if(null===e)return Ml=6,void(Pl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Pl=t);Pl=t=e}while(null!==t);0===Ml&&(Ml=5)}function bu(e,t,n){var i=xt,r=Ll.transition;try{Ll.transition=null,xt=1,function(e,t,n,i){do{wu()}while(null!==Yl);if(0!==(6&El))throw Error(o(327));n=e.finishedWork;var r=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-at(n),o=1<<r;t[r]=0,i[r]=-1,e[r]=-1,n&=~o}}(e,a),e===Cl&&(Pl=Cl=null,Tl=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||ql||(ql=!0,Cu(tt,function(){return wu(),null})),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=Ll.transition,Ll.transition=null;var s=xt;xt=1;var l=El;El|=4,Nl.current=null,function(e,t){if(er=Wt,fi(e=hi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var r=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{n.nodeType,a.nodeType}catch(b){n=null;break e}var s=0,l=-1,u=-1,c=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==r&&3!==h.nodeType||(l=s+r),h!==a||0!==i&&3!==h.nodeType||(u=s+i),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++c===r&&(l=s),f===a&&++d===i&&(u=s),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(tr={focusedElem:e,selectionRange:n},Wt=!1,Qs=t;null!==Qs;)if(e=(t=Qs).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Qs=e;else for(;null!==Qs;){t=Qs;try{var m=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var _=t.stateNode.containerInfo;1===_.nodeType?_.textContent="":9===_.nodeType&&_.documentElement&&_.removeChild(_.documentElement);break;default:throw Error(o(163))}}catch(b){ku(t,t.return,b)}if(null!==(e=t.sibling)){e.return=t.return,Qs=e;break}Qs=t.return}m=tl,tl=!1}(e,n),gl(n,e),pi(tr),Wt=!!er,tr=er=null,e.current=n,yl(n,e,r),Ke(),El=l,xt=s,Ll.transition=a}else e.current=n;if(ql&&(ql=!1,Yl=e,Gl=r),a=e.pendingLanes,0===a&&($l=null),function(e){if(ot&&"function"===typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(rt,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),iu(e,Je()),null!==t)for(i=e.onRecoverableError,n=0;n<t.length;n++)r=t[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(Wl)throw Wl=!1,e=Vl,Vl=null,e;0!==(1&Gl)&&0!==e.tag&&wu(),a=e.pendingLanes,0!==(1&a)?e===Jl?Kl++:(Kl=0,Jl=e):Kl=0,Zr()}(e,t,n,i)}finally{Ll.transition=r,xt=i}return null}function wu(){if(null!==Yl){var e=_t(Gl),t=Ll.transition,n=xt;try{if(Ll.transition=null,xt=16>e?16:e,null===Yl)var i=!1;else{if(e=Yl,Yl=null,Gl=0,0!==(6&El))throw Error(o(331));var r=El;for(El|=4,Qs=e.current;null!==Qs;){var a=Qs,s=a.child;if(0!==(16&Qs.flags)){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Qs=c;null!==Qs;){var d=Qs;switch(d.tag){case 0:case 11:case 15:nl(8,d,a)}var h=d.child;if(null!==h)h.return=d,Qs=h;else for(;null!==Qs;){var f=(d=Qs).sibling,p=d.return;if(ol(d),d===c){Qs=null;break}if(null!==f){f.return=p,Qs=f;break}Qs=p}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Qs=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Qs=s;else e:for(;null!==Qs;){if(0!==(2048&(a=Qs).flags))switch(a.tag){case 0:case 11:case 15:nl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Qs=y;break e}Qs=a.return}}var x=e.current;for(Qs=x;null!==Qs;){var _=(s=Qs).child;if(0!==(2064&s.subtreeFlags)&&null!==_)_.return=s,Qs=_;else e:for(s=x;null!==Qs;){if(0!==(2048&(l=Qs).flags))try{switch(l.tag){case 0:case 11:case 15:il(9,l)}}catch(w){ku(l,l.return,w)}if(l===s){Qs=null;break e}var b=l.sibling;if(null!==b){b.return=l.return,Qs=b;break e}Qs=l.return}}if(El=r,Zr(),ot&&"function"===typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(rt,e)}catch(w){}i=!0}return i}finally{xt=n,Ll.transition=t}}return!1}function ju(e,t,n){e=Fo(e,t=fs(0,t=us(n,t),1),1),t=eu(),null!==e&&(vt(e,1,t),iu(e,t))}function ku(e,t,n){if(3===e.tag)ju(e,e,n);else for(;null!==t;){if(3===t.tag){ju(t,e,n);break}if(1===t.tag){var i=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof i.componentDidCatch&&(null===$l||!$l.has(i))){t=Fo(t,e=ps(t,e=us(n,e),1),1),e=eu(),null!==t&&(vt(t,1,e),iu(t,e));break}}t=t.return}}function Su(e,t,n){var i=e.pingCache;null!==i&&i.delete(t),t=eu(),e.pingedLanes|=e.suspendedLanes&n,Cl===e&&(Tl&n)===n&&(4===Ml||3===Ml&&(130023424&Tl)===Tl&&500>Je()-Ul?hu(e,0):Al|=n),iu(e,t)}function Nu(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var n=eu();null!==(e=Io(e,t))&&(vt(e,t,n),iu(e,n))}function Lu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Nu(e,n)}function Eu(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,r=e.memoizedState;null!==r&&(n=r.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(o(314))}null!==i&&i.delete(t),Nu(e,n)}function Cu(e,t){return qe(e,t)}function Pu(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tu(e,t,n,i){return new Pu(e,t,n,i)}function Ou(e){return!(!(e=e.prototype)||!e.isReactComponent)}function zu(e,t){var n=e.alternate;return null===n?((n=Tu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Mu(e,t,n,i,r,a){var s=2;if(i=e,"function"===typeof e)Ou(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case j:return Iu(n.children,r,a,t);case k:s=8,r|=8;break;case S:return(e=Tu(12,n,t,2|r)).elementType=S,e.lanes=a,e;case C:return(e=Tu(13,n,t,r)).elementType=C,e.lanes=a,e;case P:return(e=Tu(19,n,t,r)).elementType=P,e.lanes=a,e;case z:return Ru(n,r,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case N:s=10;break e;case L:s=9;break e;case E:s=11;break e;case T:s=14;break e;case O:s=16,i=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Tu(s,n,t,r)).elementType=e,t.type=i,t.lanes=a,t}function Iu(e,t,n,i){return(e=Tu(7,e,i,t)).lanes=n,e}function Ru(e,t,n,i){return(e=Tu(22,e,i,t)).elementType=z,e.lanes=n,e.stateNode={isHidden:!1},e}function Du(e,t,n){return(e=Tu(6,e,null,t)).lanes=n,e}function Au(e,t,n){return(t=Tu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bu(e,t,n,i,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,i,r,o,a,s,l){return e=new Bu(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Tu(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Do(o),e}function Uu(e){if(!e)return Lr;e:{if(Ze(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Or(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Or(n))return Ir(e,n,t)}return t}function Zu(e,t,n,i,r,o,a,s,l){return(e=Fu(n,i,!0,e,0,o,0,s,l)).context=Uu(null),n=e.current,(o=Bo(i=eu(),r=tu(n))).callback=void 0!==t&&null!==t?t:null,Fo(n,o,r),e.current.lanes=r,vt(e,r,i),iu(e,i),e}function Hu(e,t,n,i){var r=t.current,o=eu(),a=tu(r);return n=Uu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Bo(o,a)).payload={element:e},null!==(i=void 0===i?null:i)&&(t.callback=i),null!==(e=Fo(r,t,a))&&(nu(e,r,a,o),Uo(e,r,a)),a}function Wu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function $u(e,t){Vu(e,t),(e=e.alternate)&&Vu(e,t)}jl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Cr.current)xs=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return xs=!1,function(e,t,n){switch(t.tag){case 3:Cs(t),po();break;case 5:Qo(t);break;case 1:Or(t.type)&&Rr(t);break;case 4:Ko(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,r=t.memoizedProps.value;Nr(jo,i._currentValue),i._currentValue=r;break;case 13:if(null!==(i=t.memoizedState))return null!==i.dehydrated?(Nr(ea,1&ea.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Ds(e,t,n):(Nr(ea,1&ea.current),null!==(e=Ws(e,t,n))?e.sibling:null);Nr(ea,1&ea.current);break;case 19:if(i=0!==(n&t.childLanes),0!==(128&e.flags)){if(i)return Zs(e,t,n);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),Nr(ea,ea.current),i)break;return null;case 22:case 23:return t.lanes=0,ks(e,t,n)}return Ws(e,t,n)}(e,t,n);xs=0!==(131072&e.flags)}else xs=!1,ro&&0!==(1048576&t.flags)&&Xr(t,$r,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Hs(e,t),e=t.pendingProps;var r=Tr(t,Er.current);Po(t,n),r=ga(null,t,i,e,r,n);var a=va();return t.flags|=1,"object"===typeof r&&null!==r&&"function"===typeof r.render&&void 0===r.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Or(i)?(a=!0,Rr(t)):a=!1,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,Do(t),r.updater=rs,t.stateNode=r,r._reactInternals=t,ls(t,i,e,n),t=Es(null,t,i,!0,a,n)):(t.tag=0,ro&&a&&eo(t),_s(null,t,r,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,i=(r=i._init)(i._payload),t.type=i,r=t.tag=function(e){if("function"===typeof e)return Ou(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===E)return 11;if(e===T)return 14}return 2}(i),e=ns(i,e),r){case 0:t=Ns(null,t,i,e,n);break e;case 1:t=Ls(null,t,i,e,n);break e;case 11:t=bs(null,t,i,e,n);break e;case 14:t=ws(null,t,i,ns(i.type,e),n);break e}throw Error(o(306,i,""))}return t;case 0:return i=t.type,r=t.pendingProps,Ns(e,t,i,r=t.elementType===i?r:ns(i,r),n);case 1:return i=t.type,r=t.pendingProps,Ls(e,t,i,r=t.elementType===i?r:ns(i,r),n);case 3:e:{if(Cs(t),null===e)throw Error(o(387));i=t.pendingProps,r=(a=t.memoizedState).element,Ao(e,t),Ho(t,i,null,n);var s=t.memoizedState;if(i=s.element,a.isDehydrated){if(a={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ps(e,t,i,n,r=us(Error(o(423)),t));break e}if(i!==r){t=Ps(e,t,i,n,r=us(Error(o(424)),t));break e}for(io=ur(t.stateNode.containerInfo.firstChild),no=t,ro=!0,oo=null,n=wo(t,null,i,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(po(),i===r){t=Ws(e,t,n);break e}_s(e,t,i,n)}t=t.child}return t;case 5:return Qo(t),null===e&&uo(t),i=t.type,r=t.pendingProps,a=null!==e?e.memoizedProps:null,s=r.children,nr(i,r)?s=null:null!==a&&nr(i,a)&&(t.flags|=32),Ss(e,t),_s(e,t,s,n),t.child;case 6:return null===e&&uo(t),null;case 13:return Ds(e,t,n);case 4:return Ko(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=bo(t,null,i,n):_s(e,t,i,n),t.child;case 11:return i=t.type,r=t.pendingProps,bs(e,t,i,r=t.elementType===i?r:ns(i,r),n);case 7:return _s(e,t,t.pendingProps,n),t.child;case 8:case 12:return _s(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,r=t.pendingProps,a=t.memoizedProps,s=r.value,Nr(jo,i._currentValue),i._currentValue=s,null!==a)if(si(a.value,s)){if(a.children===r.children&&!Cr.current){t=Ws(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var u=l.firstContext;null!==u;){if(u.context===i){if(1===a.tag){(u=Bo(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),Co(a.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Co(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}_s(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,i=t.pendingProps.children,Po(t,n),i=i(r=To(r)),t.flags|=1,_s(e,t,i,n),t.child;case 14:return r=ns(i=t.type,t.pendingProps),ws(e,t,i,r=ns(i.type,r),n);case 15:return js(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:ns(i,r),Hs(e,t),t.tag=1,Or(i)?(e=!0,Rr(t)):e=!1,Po(t,n),as(t,i,r),ls(t,i,r,n),Es(null,t,i,!0,e,n);case 19:return Zs(e,t,n);case 22:return ks(e,t,n)}throw Error(o(156,t.tag))};var qu="function"===typeof reportError?reportError:function(e){console.error(e)};function Yu(e){this._internalRoot=e}function Gu(e){this._internalRoot=e}function Ku(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qu(){}function Xu(e,t,n,i,r){var o=n._reactRootContainer;if(o){var a=o;if("function"===typeof r){var s=r;r=function(){var e=Wu(a);s.call(e)}}Hu(t,a,e,r)}else a=function(e,t,n,i,r){if(r){if("function"===typeof i){var o=i;i=function(){var e=Wu(a);o.call(e)}}var a=Zu(t,i,e,0,null,!1,0,"",Qu);return e._reactRootContainer=a,e[pr]=a.current,Zi(8===e.nodeType?e.parentNode:e),cu(),a}for(;r=e.lastChild;)e.removeChild(r);if("function"===typeof i){var s=i;i=function(){var e=Wu(l);s.call(e)}}var l=Fu(e,0,!1,null,0,!1,0,"",Qu);return e._reactRootContainer=l,e[pr]=l.current,Zi(8===e.nodeType?e.parentNode:e),cu(function(){Hu(t,l,n,i)}),l}(n,t,e,r,i);return Wu(a)}Gu.prototype.render=Yu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Hu(e,t,null,null)},Gu.prototype.unmount=Yu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cu(function(){Hu(null,e,null,null)}),t[pr]=null}},Gu.prototype.unstable_scheduleHydration=function(e){if(e){var t=kt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zt.length&&0!==t&&t<zt[n].priority;n++);zt.splice(n,0,e),0===n&&Dt(e)}},bt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),iu(t,Je()),0===(6&El)&&(Zl=Je()+500,Zr()))}break;case 13:cu(function(){var t=Io(e,1);if(null!==t){var n=eu();nu(t,e,1,n)}}),$u(e,1)}},wt=function(e){if(13===e.tag){var t=Io(e,134217728);if(null!==t)nu(t,e,134217728,eu());$u(e,134217728)}},jt=function(e){if(13===e.tag){var t=tu(e),n=Io(e,t);if(null!==n)nu(n,e,t,eu());$u(e,t)}},kt=function(){return xt},St=function(e,t){var n=xt;try{return xt=e,t()}finally{xt=n}},we=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var r=br(i);if(!r)throw Error(o(90));q(i),Q(i,r)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ee=uu,Ce=cu;var ec={usingClientEntryPoint:!1,Events:[xr,_r,br,Ne,Le,uu]},tc={findFiberByHostInstance:yr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nc={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ic.isDisabled&&ic.supportsFiber)try{rt=ic.inject(nc),ot=ic}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ec,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ku(t))throw Error(o(200));return function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Ku(e))throw Error(o(299));var n=!1,i="",r=qu;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(r=t.onRecoverableError)),t=Fu(e,1,!1,null,0,n,0,i,r),e[pr]=t.current,Zi(8===e.nodeType?e.parentNode:e),new Yu(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return cu(e)},t.hydrate=function(e,t,n){if(!Ju(t))throw Error(o(200));return Xu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Ku(e))throw Error(o(405));var i=null!=n&&n.hydratedSources||null,r=!1,a="",s=qu;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Zu(t,null,e,1,null!=n?n:null,r,0,a,s),e[pr]=t.current,Zi(e),i)for(e=0;e<i.length;e++)r=(r=(n=i[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new Gu(t)},t.render=function(e,t,n){if(!Ju(t))throw Error(o(200));return Xu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ju(e))throw Error(o(40));return!!e._reactRootContainer&&(cu(function(){Xu(null,null,e,!1,function(){e._reactRootContainer=null,e[pr]=null})}),!0)},t.unstable_batchedUpdates=uu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Ju(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Xu(e,t,n,!1,i)},t.version="18.3.1-next-f1338f8080-20240426"},853:(e,t,n)=>{"use strict";e.exports=n(234)},950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(730)}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(i,r){if(1&r&&(i=this(i)),8&r)return i;if("object"===typeof i&&i){if(4&r&&i.__esModule)return i;if(16&r&&"function"===typeof i.then)return i}var o=Object.create(null);n.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&i;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>i[e]);return a.default=()=>i,n.d(o,a),o}})(),n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,i)=>(n.f[i](e,t),t),[])),n.u=e=>"static/js/"+e+".9b7e9b29.chunk.js",n.miniCssF=e=>{},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="solarbank-frontend:";n.l=(i,r,o,a)=>{if(e[i])e[i].push(r);else{var s,l;if(void 0!==o)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var d=u[c];if(d.getAttribute("src")==i||d.getAttribute("data-webpack")==t+o){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+o),s.src=i),e[i]=[r];var h=(t,n)=>{s.onerror=s.onload=null,clearTimeout(f);var r=e[i];if(delete e[i],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach(e=>e(n)),t)return t(n)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",(()=>{var e={792:0};n.f.j=(t,i)=>{var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)i.push(r[2]);else{var o=new Promise((n,i)=>r=e[t]=[n,i]);i.push(r[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,i=>{if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=i&&("load"===i.type?"missing":i.type),a=i&&i.target&&i.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,r[1](s)}},"chunk-"+t,t)}};var t=(t,i)=>{var r,o,a=i[0],s=i[1],l=i[2],u=0;if(a.some(t=>0!==e[t])){for(r in s)n.o(s,r)&&(n.m[r]=s[r]);if(l)l(n)}for(t&&t(i);u<a.length;u++)o=a[u],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},i=self.webpackChunksolarbank_frontend=self.webpackChunksolarbank_frontend||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),(()=>{"use strict";var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>Zt,hasStandardBrowserEnv:()=>Wt,hasStandardBrowserWebWorkerEnv:()=>Vt,navigator:()=>Ht,origin:()=>$t});var t,i=n(43),r=n.t(i,2),o=n(391),a=n(950),s=n.t(a,2);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(t||(t={}));const u="popstate";function c(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function d(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function h(e,t){return{usr:e.state,key:e.key,idx:t}}function f(e,t,n,i){return void 0===n&&(n=null),l({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?m(t):t,{state:n,key:t&&t.key||i||Math.random().toString(36).substr(2,8)})}function p(e){let{pathname:t="/",search:n="",hash:i=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(t+="#"===i.charAt(0)?i:"#"+i),t}function m(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function g(e,n,i,r){void 0===r&&(r={});let{window:o=document.defaultView,v5Compat:a=!1}=r,s=o.history,d=t.Pop,m=null,g=v();function v(){return(s.state||{idx:null}).idx}function y(){d=t.Pop;let e=v(),n=null==e?null:e-g;g=e,m&&m({action:d,location:_.location,delta:n})}function x(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"===typeof e?e:p(e);return n=n.replace(/ $/,"%20"),c(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==g&&(g=0,s.replaceState(l({},s.state,{idx:g}),""));let _={get action(){return d},get location(){return e(o,s)},listen(e){if(m)throw new Error("A history only accepts one active listener");return o.addEventListener(u,y),m=e,()=>{o.removeEventListener(u,y),m=null}},createHref:e=>n(o,e),createURL:x,encodeLocation(e){let t=x(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,n){d=t.Push;let r=f(_.location,e,n);i&&i(r,e),g=v()+1;let l=h(r,g),u=_.createHref(r);try{s.pushState(l,"",u)}catch(c){if(c instanceof DOMException&&"DataCloneError"===c.name)throw c;o.location.assign(u)}a&&m&&m({action:d,location:_.location,delta:1})},replace:function(e,n){d=t.Replace;let r=f(_.location,e,n);i&&i(r,e),g=v();let o=h(r,g),l=_.createHref(r);s.replaceState(o,"",l),a&&m&&m({action:d,location:_.location,delta:0})},go:e=>s.go(e)};return _}var v;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(v||(v={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function y(e,t,n){return void 0===n&&(n="/"),x(e,t,n,!1)}function x(e,t,n,i){let r=z(("string"===typeof t?m(t):t).pathname||"/",n);if(null==r)return null;let o=_(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let a=null;for(let s=0;null==a&&s<o.length;++s){let e=O(r);a=P(o[s],e,i)}return a}function _(e,t,n,i){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===i&&(i="");let r=(e,r,o)=>{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:r,route:e};a.relativePath.startsWith("/")&&(c(a.relativePath.startsWith(i),'Absolute route path "'+a.relativePath+'" nested under path "'+i+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(i.length));let s=A([i,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(c(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),_(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:C(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let i of b(e.path))r(e,t,i);else r(e,t)}),t}function b(e){let t=e.split("/");if(0===t.length)return[];let[n,...i]=t,r=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===i.length)return r?[o,""]:[o];let a=b(i.join("/")),s=[];return s.push(...a.map(e=>""===e?o:[o,e].join("/"))),r&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}const w=/^:[\w-]+$/,j=3,k=2,S=1,N=10,L=-2,E=e=>"*"===e;function C(e,t){let n=e.split("/"),i=n.length;return n.some(E)&&(i+=L),t&&(i+=k),n.filter(e=>!E(e)).reduce((e,t)=>e+(w.test(t)?j:""===t?S:N),i)}function P(e,t,n){void 0===n&&(n=!1);let{routesMeta:i}=e,r={},o="/",a=[];for(let s=0;s<i.length;++s){let e=i[s],l=s===i.length-1,u="/"===o?t:t.slice(o.length)||"/",c=T({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&n&&!i[i.length-1].route.index&&(c=T({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(r,c.params),a.push({params:r,pathname:A([o,c.pathname]),pathnameBase:B(A([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=A([o,c.pathnameBase]))}return a}function T(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);d("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let i=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(i.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));e.endsWith("*")?(i.push({paramName:"*"}),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))");let o=new RegExp(r,t?void 0:"i");return[o,i]}(e.path,e.caseSensitive,e.end),r=t.match(n);if(!r)return null;let o=r[0],a=o.replace(/(.)\/+$/,"$1"),s=r.slice(1);return{params:i.reduce((e,t,n)=>{let{paramName:i,isOptional:r}=t;if("*"===i){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[i]=r&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:a,pattern:e}}function O(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return d(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function z(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&"/"!==i?null:e.slice(n)||"/"}function M(e,t,n,i){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function I(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function R(e,t){let n=I(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function D(e,t,n,i){let r;void 0===i&&(i=!1),"string"===typeof e?r=m(e):(r=l({},e),c(!r.pathname||!r.pathname.includes("?"),M("?","pathname","search",r)),c(!r.pathname||!r.pathname.includes("#"),M("#","pathname","hash",r)),c(!r.search||!r.search.includes("#"),M("#","search","hash",r)));let o,a=""===e||""===r.pathname,s=a?"/":r.pathname;if(null==s)o=n;else{let e=t.length-1;if(!i&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:i="",hash:r=""}="string"===typeof e?m(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:F(i),hash:U(r)}}(r,o),d=s&&"/"!==s&&s.endsWith("/"),h=(a||"."===s)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!h||(u.pathname+="/"),u}const A=e=>e.join("/").replace(/\/\/+/g,"/"),B=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),F=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",U=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Z(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const H=["post","put","patch","delete"],W=(new Set(H),["get",...H]);new Set(W),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},V.apply(this,arguments)}const $=i.createContext(null);const q=i.createContext(null);const Y=i.createContext(null);const G=i.createContext(null);const K=i.createContext({outlet:null,matches:[],isDataRoute:!1});const J=i.createContext(null);function Q(){return null!=i.useContext(G)}function X(){return Q()||c(!1),i.useContext(G).location}function ee(e){i.useContext(Y).static||i.useLayoutEffect(e)}function te(){let{isDataRoute:e}=i.useContext(K);return e?function(){let{router:e}=he(ce.UseNavigateStable),t=pe(de.UseNavigateStable),n=i.useRef(!1);return ee(()=>{n.current=!0}),i.useCallback(function(i,r){void 0===r&&(r={}),n.current&&("number"===typeof i?e.navigate(i):e.navigate(i,V({fromRouteId:t},r)))},[e,t])}():function(){Q()||c(!1);let e=i.useContext($),{basename:t,future:n,navigator:r}=i.useContext(Y),{matches:o}=i.useContext(K),{pathname:a}=X(),s=JSON.stringify(R(o,n.v7_relativeSplatPath)),l=i.useRef(!1);return ee(()=>{l.current=!0}),i.useCallback(function(n,i){if(void 0===i&&(i={}),!l.current)return;if("number"===typeof n)return void r.go(n);let o=D(n,JSON.parse(s),a,"path"===i.relative);null==e&&"/"!==t&&(o.pathname="/"===o.pathname?t:A([t,o.pathname])),(i.replace?r.replace:r.push)(o,i.state,i)},[t,r,s,a,e])}()}const ne=i.createContext(null);function ie(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=i.useContext(Y),{matches:o}=i.useContext(K),{pathname:a}=X(),s=JSON.stringify(R(o,r.v7_relativeSplatPath));return i.useMemo(()=>D(e,JSON.parse(s),a,"path"===n),[e,s,a,n])}function re(e,n,r,o){Q()||c(!1);let{navigator:a}=i.useContext(Y),{matches:s}=i.useContext(K),l=s[s.length-1],u=l?l.params:{},d=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let h,f=X();if(n){var p;let e="string"===typeof n?m(n):n;"/"===d||(null==(p=e.pathname)?void 0:p.startsWith(d))||c(!1),h=e}else h=f;let g=h.pathname||"/",v=g;if("/"!==d){let e=d.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=y(e,{pathname:v});let _=ue(x&&x.map(e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:A([d,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:A([d,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),s,r,o);return n&&_?i.createElement(G.Provider,{value:{location:V({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:t.Pop}},_):_}function oe(){let e=function(){var e;let t=i.useContext(J),n=fe(de.UseRouteError),r=pe(de.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=Z(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r};return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:o},n):null,null)}const ae=i.createElement(oe,null);class se extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?i.createElement(K.Provider,{value:this.props.routeContext},i.createElement(J.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function le(e){let{routeContext:t,match:n,children:r}=e,o=i.useContext($);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),i.createElement(K.Provider,{value:t},r)}function ue(e,t,n,r){var o;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var a;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(a=r)&&a.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let s=e,l=null==(o=n)?void 0:o.errors;if(null!=l){let e=s.findIndex(e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id]));e>=0||c(!1),s=s.slice(0,Math.min(s.length,e+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let i=0;i<s.length;i++){let e=s[i];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(d=i),e.route.id){let{loaderData:t,errors:i}=n,r=e.route.loader&&void 0===t[e.route.id]&&(!i||void 0===i[e.route.id]);if(e.route.lazy||r){u=!0,s=d>=0?s.slice(0,d+1):[s[0]];break}}}return s.reduceRight((e,r,o)=>{let a,c=!1,h=null,f=null;var p;n&&(a=l&&r.route.id?l[r.route.id]:void 0,h=r.route.errorElement||ae,u&&(d<0&&0===o?(p="route-fallback",!1||me[p]||(me[p]=!0),c=!0,f=null):d===o&&(c=!0,f=r.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,o+1)),g=()=>{let t;return t=a?h:c?f:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(le,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(se,{location:n.location,revalidation:n.revalidation,component:h,error:a,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var ce=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ce||{}),de=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(de||{});function he(e){let t=i.useContext($);return t||c(!1),t}function fe(e){let t=i.useContext(q);return t||c(!1),t}function pe(e){let t=function(){let e=i.useContext(K);return e||c(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||c(!1),n.route.id}const me={};function ge(e,t){null==e||e.v7_startTransition,void 0===(null==e?void 0:e.v7_relativeSplatPath)&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}r.startTransition;function ve(e){let{to:t,replace:n,state:r,relative:o}=e;Q()||c(!1);let{future:a,static:s}=i.useContext(Y),{matches:l}=i.useContext(K),{pathname:u}=X(),d=te(),h=D(t,R(l,a.v7_relativeSplatPath),u,"path"===o),f=JSON.stringify(h);return i.useEffect(()=>d(JSON.parse(f),{replace:n,state:r,relative:o}),[d,f,o,n,r]),null}function ye(e){return function(e){let t=i.useContext(K).outlet;return t?i.createElement(ne.Provider,{value:e},t):t}(e.context)}function xe(e){c(!1)}function _e(e){let{basename:n="/",children:r=null,location:o,navigationType:a=t.Pop,navigator:s,static:l=!1,future:u}=e;Q()&&c(!1);let d=n.replace(/^\/*/,"/"),h=i.useMemo(()=>({basename:d,navigator:s,static:l,future:V({v7_relativeSplatPath:!1},u)}),[d,u,s,l]);"string"===typeof o&&(o=m(o));let{pathname:f="/",search:p="",hash:g="",state:v=null,key:y="default"}=o,x=i.useMemo(()=>{let e=z(f,d);return null==e?null:{location:{pathname:e,search:p,hash:g,state:v,key:y},navigationType:a}},[d,f,p,g,v,y,a]);return null==x?null:i.createElement(Y.Provider,{value:h},i.createElement(G.Provider,{children:r,value:x}))}function be(e){let{children:t,location:n}=e;return re(we(t),n)}new Promise(()=>{});i.Component;function we(e,t){void 0===t&&(t=[]);let n=[];return i.Children.forEach(e,(e,r)=>{if(!i.isValidElement(e))return;let o=[...t,r];if(e.type===i.Fragment)return void n.push.apply(n,we(e.props.children,o));e.type!==xe&&c(!1),e.props.index&&e.props.children&&c(!1);let a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=we(e.props.children,o)),n.push(a)}),n}function je(){return je=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},je.apply(this,arguments)}function ke(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Se=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ne=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"];try{window.__reactRouterVersion="6"}catch(Rr){}const Le=i.createContext({isTransitioning:!1});new Map;const Ee=r.startTransition;s.flushSync,r.useId;function Ce(e){let{basename:t,children:n,future:r,window:o}=e,a=i.useRef();var s;null==a.current&&(a.current=(void 0===(s={window:o,v5Compat:!0})&&(s={}),g(function(e,t){let{pathname:n,search:i,hash:r}=e.location;return f("",{pathname:n,search:i,hash:r},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"===typeof t?t:p(t)},null,s)));let l=a.current,[u,c]=i.useState({action:l.action,location:l.location}),{v7_startTransition:d}=r||{},h=i.useCallback(e=>{d&&Ee?Ee(()=>c(e)):c(e)},[c,d]);return i.useLayoutEffect(()=>l.listen(h),[l,h]),i.useEffect(()=>ge(r),[r]),i.createElement(_e,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,future:r})}const Pe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,Te=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oe=i.forwardRef(function(e,t){let n,{onClick:r,relative:o,reloadDocument:a,replace:s,state:l,target:u,to:d,preventScrollReset:h,viewTransition:f}=e,m=ke(e,Se),{basename:g}=i.useContext(Y),v=!1;if("string"===typeof d&&Te.test(d)&&(n=d,Pe))try{let e=new URL(window.location.href),t=d.startsWith("//")?new URL(e.protocol+d):new URL(d),n=z(t.pathname,g);t.origin===e.origin&&null!=n?d=n+t.search+t.hash:v=!0}catch(Rr){}let y=function(e,t){let{relative:n}=void 0===t?{}:t;Q()||c(!1);let{basename:r,navigator:o}=i.useContext(Y),{hash:a,pathname:s,search:l}=ie(e,{relative:n}),u=s;return"/"!==r&&(u="/"===s?r:A([r,s])),o.createHref({pathname:u,search:l,hash:a})}(d,{relative:o}),x=function(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:s,viewTransition:l}=void 0===t?{}:t,u=te(),c=X(),d=ie(e,{relative:s});return i.useCallback(t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==r?r:p(c)===p(d);u(e,{replace:n,state:o,preventScrollReset:a,relative:s,viewTransition:l})}},[c,u,d,r,o,n,e,a,s,l])}(d,{replace:s,state:l,target:u,preventScrollReset:h,relative:o,viewTransition:f});return i.createElement("a",je({},m,{href:n||y,onClick:v||a?r:function(e){r&&r(e),e.defaultPrevented||x(e)},ref:t,target:u}))});const ze=i.forwardRef(function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,className:o="",end:a=!1,style:s,to:l,viewTransition:u,children:d}=e,h=ke(e,Ne),f=ie(l,{relative:h.relative}),p=X(),m=i.useContext(q),{navigator:g,basename:v}=i.useContext(Y),y=null!=m&&function(e,t){void 0===t&&(t={});let n=i.useContext(Le);null==n&&c(!1);let{basename:r}=Re(Me.useViewTransitionState),o=ie(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=z(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=z(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=T(o.pathname,s)||null!=T(o.pathname,a)}(f)&&!0===u,x=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,_=p.pathname,b=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(_=_.toLowerCase(),b=b?b.toLowerCase():null,x=x.toLowerCase()),b&&v&&(b=z(b,v)||b);const w="/"!==x&&x.endsWith("/")?x.length-1:x.length;let j,k=_===x||!a&&_.startsWith(x)&&"/"===_.charAt(w),S=null!=b&&(b===x||!a&&b.startsWith(x)&&"/"===b.charAt(x.length)),N={isActive:k,isPending:S,isTransitioning:y},L=k?n:void 0;j="function"===typeof o?o(N):[o,k?"active":null,S?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let E="function"===typeof s?s(N):s;return i.createElement(Oe,je({},h,{"aria-current":L,className:j,ref:t,style:E,to:l,viewTransition:u}),"function"===typeof d?d(N):d)});var Me,Ie;function Re(e){let t=i.useContext($);return t||c(!1),t}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Me||(Me={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Ie||(Ie={}));function De(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ae}=Object.prototype,{getPrototypeOf:Be}=Object,{iterator:Fe,toStringTag:Ue}=Symbol,Ze=(He=Object.create(null),e=>{const t=Ae.call(e);return He[t]||(He[t]=t.slice(8,-1).toLowerCase())});var He;const We=e=>(e=e.toLowerCase(),t=>Ze(t)===e),Ve=e=>t=>typeof t===e,{isArray:$e}=Array,qe=Ve("undefined");function Ye(e){return null!==e&&!qe(e)&&null!==e.constructor&&!qe(e.constructor)&&Je(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ge=We("ArrayBuffer");const Ke=Ve("string"),Je=Ve("function"),Qe=Ve("number"),Xe=e=>null!==e&&"object"===typeof e,et=e=>{if("object"!==Ze(e))return!1;const t=Be(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Ue in e)&&!(Fe in e)},tt=We("Date"),nt=We("File"),it=We("Blob"),rt=We("FileList"),ot=We("URLSearchParams"),[at,st,lt,ut]=["ReadableStream","Request","Response","Headers"].map(We);function ct(e,t){let n,i,{allOwnKeys:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),$e(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(Ye(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(n=0;n<o;n++)a=i[n],t.call(null,e[a],a,e)}}function dt(e,t){if(Ye(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i,r=n.length;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ht="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,ft=e=>!qe(e)&&e!==ht;const pt=(mt="undefined"!==typeof Uint8Array&&Be(Uint8Array),e=>mt&&e instanceof mt);var mt;const gt=We("HTMLFormElement"),vt=(e=>{let{hasOwnProperty:t}=e;return(e,n)=>t.call(e,n)})(Object.prototype),yt=We("RegExp"),xt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};ct(n,(n,r)=>{let o;!1!==(o=t(n,r,e))&&(i[r]=o||n)}),Object.defineProperties(e,i)};const _t=We("AsyncFunction"),bt=((e,t)=>{return e?setImmediate:t?(n=`axios@${Math.random()}`,i=[],ht.addEventListener("message",e=>{let{source:t,data:r}=e;t===ht&&r===n&&i.length&&i.shift()()},!1),e=>{i.push(e),ht.postMessage(n,"*")}):e=>setTimeout(e);var n,i})("function"===typeof setImmediate,Je(ht.postMessage)),wt="undefined"!==typeof queueMicrotask?queueMicrotask.bind(ht):"undefined"!==typeof process&&process.nextTick||bt,jt={isArray:$e,isArrayBuffer:Ge,isBuffer:Ye,isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||Je(e.append)&&("formdata"===(t=Ze(e))||"object"===t&&Je(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Ge(e.buffer),t},isString:Ke,isNumber:Qe,isBoolean:e=>!0===e||!1===e,isObject:Xe,isPlainObject:et,isEmptyObject:e=>{if(!Xe(e)||Ye(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(Rr){return!1}},isReadableStream:at,isRequest:st,isResponse:lt,isHeaders:ut,isUndefined:qe,isDate:tt,isFile:nt,isBlob:it,isRegExp:yt,isFunction:Je,isStream:e=>Xe(e)&&Je(e.pipe),isURLSearchParams:ot,isTypedArray:pt,isFileList:rt,forEach:ct,merge:function e(){const{caseless:t}=ft(this)&&this||{},n={},i=(i,r)=>{const o=t&&dt(n,r)||r;et(n[o])&&et(i)?n[o]=e(n[o],i):et(i)?n[o]=e({},i):$e(i)?n[o]=i.slice():n[o]=i};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ct(arguments[r],i);return n},extend:function(e,t,n){let{allOwnKeys:i}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return ct(t,(t,i)=>{n&&Je(t)?e[i]=De(t,n):e[i]=t},{allOwnKeys:i}),e},trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let r,o,a;const s={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)a=r[o],i&&!i(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Be(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Ze,kindOfTest:We,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray:e=>{if(!e)return null;if($e(e))return e;let t=e.length;if(!Qe(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Fe]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:gt,hasOwnProperty:vt,hasOwnProp:vt,reduceDescriptors:xt,freezeMethods:e=>{xt(e,(t,n)=>{if(Je(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];Je(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},i=e=>{e.forEach(e=>{n[e]=!0})};return $e(e)?i(e):i(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:dt,global:ht,isContextDefined:ft,isSpecCompliantForm:function(e){return!!(e&&Je(e.append)&&"FormData"===e[Ue]&&e[Fe])},toJSONObject:e=>{const t=new Array(10),n=(e,i)=>{if(Xe(e)){if(t.indexOf(e)>=0)return;if(Ye(e))return e;if(!("toJSON"in e)){t[i]=e;const r=$e(e)?[]:{};return ct(e,(e,t)=>{const o=n(e,i+1);!qe(o)&&(r[t]=o)}),t[i]=void 0,r}}return e};return n(e,0)},isAsyncFn:_t,isThenable:e=>e&&(Xe(e)||Je(e))&&Je(e.then)&&Je(e.catch),setImmediate:bt,asap:wt,isIterable:e=>null!=e&&Je(e[Fe])};function kt(e,t,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}jt.inherits(kt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:jt.toJSONObject(this.config),code:this.code,status:this.status}}});const St=kt.prototype,Nt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Nt[e]={value:e}}),Object.defineProperties(kt,Nt),Object.defineProperty(St,"isAxiosError",{value:!0}),kt.from=(e,t,n,i,r,o)=>{const a=Object.create(St);return jt.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),kt.call(a,e.message,t,n,i,r),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const Lt=kt;function Et(e){return jt.isPlainObject(e)||jt.isArray(e)}function Ct(e){return jt.endsWith(e,"[]")?e.slice(0,-2):e}function Pt(e,t,n){return e?e.concat(t).map(function(e,t){return e=Ct(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Tt=jt.toFlatObject(jt,{},null,function(e){return/^is[A-Z]/.test(e)});const Ot=function(e,t,n){if(!jt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const i=(n=jt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!jt.isUndefined(t[e])})).metaTokens,r=n.visitor||u,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!==typeof Blob&&Blob)&&jt.isSpecCompliantForm(t);if(!jt.isFunction(r))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(jt.isDate(e))return e.toISOString();if(jt.isBoolean(e))return e.toString();if(!s&&jt.isBlob(e))throw new Lt("Blob is not supported. Use a Buffer instead.");return jt.isArrayBuffer(e)||jt.isTypedArray(e)?s&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,r){let s=e;if(e&&!r&&"object"===typeof e)if(jt.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(jt.isArray(e)&&function(e){return jt.isArray(e)&&!e.some(Et)}(e)||(jt.isFileList(e)||jt.endsWith(n,"[]"))&&(s=jt.toArray(e)))return n=Ct(n),s.forEach(function(e,i){!jt.isUndefined(e)&&null!==e&&t.append(!0===a?Pt([n],i,o):null===a?n:n+"[]",l(e))}),!1;return!!Et(e)||(t.append(Pt(r,n,o),l(e)),!1)}const c=[],d=Object.assign(Tt,{defaultVisitor:u,convertValue:l,isVisitable:Et});if(!jt.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!jt.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+i.join("."));c.push(n),jt.forEach(n,function(n,o){!0===(!(jt.isUndefined(n)||null===n)&&r.call(t,n,jt.isString(o)?o.trim():o,i,d))&&e(n,i?i.concat(o):[o])}),c.pop()}}(e),t};function zt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Mt(e,t){this._pairs=[],e&&Ot(e,this,t)}const It=Mt.prototype;It.append=function(e,t){this._pairs.push([e,t])},It.toString=function(e){const t=e?function(t){return e.call(this,t,zt)}:zt;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const Rt=Mt;function Dt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function At(e,t,n){if(!t)return e;const i=n&&n.encode||Dt;jt.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let o;if(o=r?r(t,n):jt.isURLSearchParams(t)?t.toString():new Rt(t,n).toString(i),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const Bt=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){jt.forEach(this.handlers,function(t){null!==t&&e(t)})}},Ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ut={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:Rt,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Zt="undefined"!==typeof window&&"undefined"!==typeof document,Ht="object"===typeof navigator&&navigator||void 0,Wt=Zt&&(!Ht||["ReactNative","NativeScript","NS"].indexOf(Ht.product)<0),Vt="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,$t=Zt&&window.location.href||"http://localhost",qt={...e,...Ut};const Yt=function(e){function t(e,n,i,r){let o=e[r++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=r>=e.length;if(o=!o&&jt.isArray(i)?i.length:o,s)return jt.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a;i[o]&&jt.isObject(i[o])||(i[o]=[]);return t(e,n,i[o],r)&&jt.isArray(i[o])&&(i[o]=function(e){const t={},n=Object.keys(e);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],t[o]=e[o];return t}(i[o])),!a}if(jt.isFormData(e)&&jt.isFunction(e.entries)){const n={};return jt.forEachEntry(e,(e,i)=>{t(function(e){return jt.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),i,n,0)}),n}return null};const Gt={transitional:Ft,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,r=jt.isObject(e);r&&jt.isHTMLForm(e)&&(e=new FormData(e));if(jt.isFormData(e))return i?JSON.stringify(Yt(e)):e;if(jt.isArrayBuffer(e)||jt.isBuffer(e)||jt.isStream(e)||jt.isFile(e)||jt.isBlob(e)||jt.isReadableStream(e))return e;if(jt.isArrayBufferView(e))return e.buffer;if(jt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ot(e,new qt.classes.URLSearchParams,{visitor:function(e,t,n,i){return qt.isNode&&jt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=jt.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Ot(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||i?(t.setContentType("application/json",!1),function(e,t,n){if(jt.isString(e))try{return(t||JSON.parse)(e),jt.trim(e)}catch(Rr){if("SyntaxError"!==Rr.name)throw Rr}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Gt.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(jt.isResponse(e)||jt.isReadableStream(e))return e;if(e&&jt.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(Rr){if(n){if("SyntaxError"===Rr.name)throw Lt.from(Rr,Lt.ERR_BAD_RESPONSE,this,null,this.response);throw Rr}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qt.classes.FormData,Blob:qt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};jt.forEach(["delete","get","head","post","put","patch"],e=>{Gt.headers[e]={}});const Kt=Gt,Jt=jt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qt=Symbol("internals");function Xt(e){return e&&String(e).trim().toLowerCase()}function en(e){return!1===e||null==e?e:jt.isArray(e)?e.map(en):String(e)}function tn(e,t,n,i,r){return jt.isFunction(i)?i.call(this,t,n):(r&&(t=n),jt.isString(t)?jt.isString(i)?-1!==t.indexOf(i):jt.isRegExp(i)?i.test(t):void 0:void 0)}class nn{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function r(e,t,n){const r=Xt(t);if(!r)throw new Error("header name must be a non-empty string");const o=jt.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||t]=en(e))}const o=(e,t)=>jt.forEach(e,(e,n)=>r(e,n,t));if(jt.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(jt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,i,r;return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),i=e.substring(r+1).trim(),!n||t[n]&&Jt[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t})(e),t);else if(jt.isObject(e)&&jt.isIterable(e)){let n,i,r={};for(const t of e){if(!jt.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?jt.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(r,t)}else null!=e&&r(t,e,n);return this}get(e,t){if(e=Xt(e)){const n=jt.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(jt.isFunction(t))return t.call(this,e,n);if(jt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Xt(e)){const n=jt.findKey(this,e);return!(!n||void 0===this[n]||t&&!tn(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function r(e){if(e=Xt(e)){const r=jt.findKey(n,e);!r||t&&!tn(0,n[r],r,t)||(delete n[r],i=!0)}}return jt.isArray(e)?e.forEach(r):r(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];e&&!tn(0,this[r],r,e,!0)||(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return jt.forEach(this,(i,r)=>{const o=jt.findKey(n,r);if(o)return t[o]=en(i),void delete t[r];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(r):String(r).trim();a!==r&&delete t[r],t[a]=en(i),n[a]=!0}),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.constructor.concat(this,...t)}toJSON(e){const t=Object.create(null);return jt.forEach(this,(n,i)=>{null!=n&&!1!==n&&(t[i]=e&&jt.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(e=>{let[t,n]=e;return t+": "+n}).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.forEach(e=>t.set(e)),t}static accessor(e){const t=(this[Qt]=this[Qt]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=Xt(e);t[i]||(!function(e,t){const n=jt.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(e,n,r){return this[i].call(this,t,e,n,r)},configurable:!0})})}(n,e),t[i]=!0)}return jt.isArray(e)?e.forEach(i):i(e),this}}nn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),jt.reduceDescriptors(nn.prototype,(e,t)=>{let{value:n}=e,i=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[i]=e}}}),jt.freezeMethods(nn);const rn=nn;function on(e,t){const n=this||Kt,i=t||n,r=rn.from(i.headers);let o=i.data;return jt.forEach(e,function(e){o=e.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function an(e){return!(!e||!e.__CANCEL__)}function sn(e,t,n){Lt.call(this,null==e?"canceled":e,Lt.ERR_CANCELED,t,n),this.name="CanceledError"}jt.inherits(sn,Lt,{__CANCEL__:!0});const ln=sn;function un(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new Lt("Request failed with status code "+n.status,[Lt.ERR_BAD_REQUEST,Lt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const cn=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let r,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=i[a];r||(r=l),n[o]=s,i[o]=l;let c=a,d=0;for(;c!==o;)d+=n[c++],c%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),l-r<t)return;const h=u&&l-u;return h?Math.round(1e3*d/h):void 0}};const dn=function(e,t){let n,i,r=0,o=1e3/t;const a=function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();r=o,n=null,i&&(clearTimeout(i),i=null),e(...t)};return[function(){const e=Date.now(),t=e-r;for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];t>=o?a(l,e):(n=l,i||(i=setTimeout(()=>{i=null,a(n)},o-t)))},()=>n&&a(n)]},hn=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,i=0;const r=cn(50,250);return dn(n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,s=o-i,l=r(s);i=o;e({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},fn=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},pn=e=>function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return jt.asap(()=>e(...n))},mn=qt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,qt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(qt.origin),qt.navigator&&/(msie|trident)/i.test(qt.navigator.userAgent)):()=>!0,gn=qt.hasStandardBrowserEnv?{write(e,t,n,i,r,o){const a=[e+"="+encodeURIComponent(t)];jt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),jt.isString(i)&&a.push("path="+i),jt.isString(r)&&a.push("domain="+r),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function vn(e,t,n){let i=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(i||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const yn=e=>e instanceof rn?{...e}:e;function xn(e,t){t=t||{};const n={};function i(e,t,n,i){return jt.isPlainObject(e)&&jt.isPlainObject(t)?jt.merge.call({caseless:i},e,t):jt.isPlainObject(t)?jt.merge({},t):jt.isArray(t)?t.slice():t}function r(e,t,n,r){return jt.isUndefined(t)?jt.isUndefined(e)?void 0:i(void 0,e,0,r):i(e,t,0,r)}function o(e,t){if(!jt.isUndefined(t))return i(void 0,t)}function a(e,t){return jt.isUndefined(t)?jt.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function s(n,r,o){return o in t?i(n,r):o in e?i(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>r(yn(e),yn(t),0,!0)};return jt.forEach(Object.keys({...e,...t}),function(i){const o=l[i]||r,a=o(e[i],t[i],i);jt.isUndefined(a)&&o!==s||(n[i]=a)}),n}const _n=e=>{const t=xn({},e);let n,{data:i,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=rn.from(s),t.url=At(vn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),jt.isFormData(i))if(qt.hasStandardBrowserEnv||qt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(qt.hasStandardBrowserEnv&&(r&&jt.isFunction(r)&&(r=r(t)),r||!1!==r&&mn(t.url))){const e=o&&a&&gn.read(a);e&&s.set(o,e)}return t},bn="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const i=_n(e);let r=i.data;const o=rn.from(i.headers).normalize();let a,s,l,u,c,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=i;function p(){u&&u(),c&&c(),i.cancelToken&&i.cancelToken.unsubscribe(a),i.signal&&i.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const i=rn.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());un(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:i,config:e,request:m}),m=null}m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Lt("Request aborted",Lt.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Lt("Network Error",Lt.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||Ft;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new Lt(t,r.clarifyTimeoutError?Lt.ETIMEDOUT:Lt.ECONNABORTED,e,m)),m=null},void 0===r&&o.setContentType(null),"setRequestHeader"in m&&jt.forEach(o.toJSON(),function(e,t){m.setRequestHeader(t,e)}),jt.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),d&&"json"!==d&&(m.responseType=i.responseType),f&&([l,c]=hn(f,!0),m.addEventListener("progress",l)),h&&m.upload&&([s,u]=hn(h),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",u)),(i.cancelToken||i.signal)&&(a=t=>{m&&(n(!t||t.type?new ln(null,e,m):t),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(a),i.signal&&(i.signal.aborted?a():i.signal.addEventListener("abort",a)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(i.url);v&&-1===qt.protocols.indexOf(v)?n(new Lt("Unsupported protocol "+v+":",Lt.ERR_BAD_REQUEST,e)):m.send(r||null)})},wn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const r=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;i.abort(t instanceof Lt?t:new ln(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,r(new Lt(`timeout ${t} of ms exceeded`,Lt.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)}),e=null)};e.forEach(e=>e.addEventListener("abort",r));const{signal:s}=i;return s.unsubscribe=()=>jt.asap(a),s}},jn=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let i,r=0;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},kn=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Sn=(e,t,n,i)=>{const r=async function*(e,t){for await(const n of kn(e))yield*jn(n,t)}(e,t);let o,a=0,s=e=>{o||(o=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await r.next();if(t)return s(),void e.close();let o=i.byteLength;if(n){let e=a+=o;n(e)}e.enqueue(new Uint8Array(i))}catch(t){throw s(t),t}},cancel:e=>(s(e),r.return())},{highWaterMark:2})},Nn="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,Ln=Nn&&"function"===typeof ReadableStream,En=Nn&&("function"===typeof TextEncoder?(Cn=new TextEncoder,e=>Cn.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Cn;const Pn=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return!!e(...n)}catch(Rr){return!1}},Tn=Ln&&Pn(()=>{let e=!1;const t=new Request(qt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),On=Ln&&Pn(()=>jt.isReadableStream(new Response("").body)),zn={stream:On&&(e=>e.body)};var Mn;Nn&&(Mn=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!zn[e]&&(zn[e]=jt.isFunction(Mn[e])?t=>t[e]():(t,n)=>{throw new Lt(`Response type '${e}' is not supported`,Lt.ERR_NOT_SUPPORT,n)})}));const In=async(e,t)=>{const n=jt.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(jt.isBlob(e))return e.size;if(jt.isSpecCompliantForm(e)){const t=new Request(qt.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return jt.isArrayBufferView(e)||jt.isArrayBuffer(e)?e.byteLength:(jt.isURLSearchParams(e)&&(e+=""),jt.isString(e)?(await En(e)).byteLength:void 0)})(t):n},Rn=Nn&&(async e=>{let{url:t,method:n,data:i,signal:r,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:h}=_n(e);u=u?(u+"").toLowerCase():"text";let f,p=wn([r,o&&o.toAbortSignal()],a);const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(l&&Tn&&"get"!==n&&"head"!==n&&0!==(g=await In(c,i))){let e,n=new Request(t,{method:"POST",body:i,duplex:"half"});if(jt.isFormData(i)&&(e=n.headers.get("content-type"))&&c.setContentType(e),n.body){const[e,t]=fn(g,hn(pn(l)));i=Sn(n.body,65536,e,t)}}jt.isString(d)||(d=d?"include":"omit");const r="credentials"in Request.prototype;f=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:i,duplex:"half",credentials:r?d:void 0});let o=await fetch(f,h);const a=On&&("stream"===u||"response"===u);if(On&&(s||a&&m)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=o[t]});const t=jt.toFiniteNumber(o.headers.get("content-length")),[n,i]=s&&fn(t,hn(pn(s),!0))||[];o=new Response(Sn(o.body,65536,n,()=>{i&&i(),m&&m()}),e)}u=u||"text";let v=await zn[jt.findKey(zn,u)||"text"](o,e);return!a&&m&&m(),await new Promise((t,n)=>{un(t,n,{data:v,headers:rn.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:f})})}catch(v){if(m&&m(),v&&"TypeError"===v.name&&/Load failed|fetch/i.test(v.message))throw Object.assign(new Lt("Network Error",Lt.ERR_NETWORK,e,f),{cause:v.cause||v});throw Lt.from(v,v&&v.code,e,f)}}),Dn={http:null,xhr:bn,fetch:Rn};jt.forEach(Dn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(Rr){}Object.defineProperty(e,"adapterName",{value:t})}});const An=e=>`- ${e}`,Bn=e=>jt.isFunction(e)||null===e||!1===e,Fn=e=>{e=jt.isArray(e)?e:[e];const{length:t}=e;let n,i;const r={};for(let o=0;o<t;o++){let t;if(n=e[o],i=n,!Bn(n)&&(i=Dn[(t=String(n)).toLowerCase()],void 0===i))throw new Lt(`Unknown adapter '${t}'`);if(i)break;r[t||"#"+o]=i}if(!i){const e=Object.entries(r).map(e=>{let[t,n]=e;return`adapter ${t} `+(!1===n?"is not supported by the environment":"is not available in the build")});let n=t?e.length>1?"since :\n"+e.map(An).join("\n"):" "+An(e[0]):"as no adapter specified";throw new Lt("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i};function Un(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ln(null,e)}function Zn(e){Un(e),e.headers=rn.from(e.headers),e.data=on.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Fn(e.adapter||Kt.adapter)(e).then(function(t){return Un(e),t.data=on.call(e,e.transformResponse,t),t.headers=rn.from(t.headers),t},function(t){return an(t)||(Un(e),t&&t.response&&(t.response.data=on.call(e,e.transformResponse,t.response),t.response.headers=rn.from(t.response.headers))),Promise.reject(t)})}const Hn="1.11.0",Wn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Wn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Vn={};Wn.transitional=function(e,t,n){function i(e,t){return"[Axios v"+Hn+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,o)=>{if(!1===e)throw new Lt(i(r," has been removed"+(t?" in "+t:"")),Lt.ERR_DEPRECATED);return t&&!Vn[r]&&(Vn[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},Wn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const $n={assertOptions:function(e,t,n){if("object"!==typeof e)throw new Lt("options must be an object",Lt.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const o=i[r],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new Lt("option "+o+" must be "+n,Lt.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Lt("Unknown option "+o,Lt.ERR_BAD_OPTION)}},validators:Wn},qn=$n.validators;class Yn{constructor(e){this.defaults=e||{},this.interceptors={request:new Bt,response:new Bt}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(Rr){}}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=xn(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:r}=t;void 0!==n&&$n.assertOptions(n,{silentJSONParsing:qn.transitional(qn.boolean),forcedJSONParsing:qn.transitional(qn.boolean),clarifyTimeoutError:qn.transitional(qn.boolean)},!1),null!=i&&(jt.isFunction(i)?t.paramsSerializer={serialize:i}:$n.assertOptions(i,{encode:qn.function,serialize:qn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),$n.assertOptions(t,{baseUrl:qn.spelling("baseURL"),withXsrfToken:qn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=r&&jt.merge(r.common,r[t.method]);r&&jt.forEach(["delete","get","head","post","put","patch","common"],e=>{delete r[e]}),t.headers=rn.concat(o,r);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,d=0;if(!s){const e=[Zn.bind(this),void 0];for(e.unshift(...a),e.push(...l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=a.length;let h=t;for(d=0;d<c;){const e=a[d++],t=a[d++];try{h=e(h)}catch(f){t.call(this,f);break}}try{u=Zn.call(this,h)}catch(f){return Promise.reject(f)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return At(vn((e=xn(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}jt.forEach(["delete","get","head","options"],function(e){Yn.prototype[e]=function(t,n){return this.request(xn(n||{},{method:e,url:t,data:(n||{}).data}))}}),jt.forEach(["post","put","patch"],function(e){function t(t){return function(n,i,r){return this.request(xn(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Yn.prototype[e]=t(),Yn.prototype[e+"Form"]=t(!0)});const Gn=Yn;class Kn{constructor(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const i=new Promise(e=>{n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e(function(e,i,r){n.reason||(n.reason=new ln(e,i,r),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Kn(function(t){e=t}),cancel:e}}}const Jn=Kn;const Qn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qn).forEach(e=>{let[t,n]=e;Qn[n]=t});const Xn=Qn;const ei=function e(t){const n=new Gn(t),i=De(Gn.prototype.request,n);return jt.extend(i,Gn.prototype,n,{allOwnKeys:!0}),jt.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(xn(t,n))},i}(Kt);ei.Axios=Gn,ei.CanceledError=ln,ei.CancelToken=Jn,ei.isCancel=an,ei.VERSION=Hn,ei.toFormData=Ot,ei.AxiosError=Lt,ei.Cancel=ei.CanceledError,ei.all=function(e){return Promise.all(e)},ei.spread=function(e){return function(t){return e.apply(null,t)}},ei.isAxiosError=function(e){return jt.isObject(e)&&!0===e.isAxiosError},ei.mergeConfig=xn,ei.AxiosHeaders=rn,ei.formToJSON=e=>Yt(jt.isHTMLForm(e)?new FormData(e):e),ei.getAdapter=Fn,ei.HttpStatusCode=Xn,ei.default=ei;const ti=ei.create({baseURL:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_API_URL||"http://localhost/api",headers:{"Content-Type":"application/json"}});ti.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),ti.interceptors.response.use(e=>e,e=>(e.response&&401===e.response.status&&localStorage.removeItem("token"),Promise.reject(e)));const ni=(e,t)=>ti.put(`/devices/${e}`,t),ii=e=>ti.delete(`/devices/${e}`),ri=ti;var oi=n(579);const ai=(0,i.createContext)(),si=()=>{const e=(0,i.useContext)(ai);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},li=e=>{let{children:t}=e;const[n,r]=(0,i.useState)(null),[o,a]=(0,i.useState)(!0),[s,l]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{const e=localStorage.getItem("token");if(e)try{ri.defaults.headers.common.Authorization=`Bearer ${e}`;const t=await ri.get("/auth/me");r(t.data),l(!0)}catch(t){localStorage.removeItem("token"),delete ri.defaults.headers.common.Authorization,r(null),l(!1)}else l(!1);a(!1)})()},[]);const u={user:n,isAuthenticated:s,loading:o,login:async(e,t)=>{try{const n=await ri.post("/auth/login/json",{username:e,password:t}),{access_token:i}=n.data;localStorage.setItem("token",i),ri.defaults.headers.common.Authorization=`Bearer ${i}`;const o=await ri.get("/auth/me");return r(o.data),l(!0),{success:!0}}catch(o){var n,i;return{success:!1,message:(null===(n=o.response)||void 0===n||null===(i=n.data)||void 0===i?void 0:i.detail)||"Login failed"}}},logout:()=>{localStorage.removeItem("token"),delete ri.defaults.headers.common.Authorization,r(null),l(!1)}};return(0,oi.jsx)(ai.Provider,{value:u,children:t})};var ui={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ci=i.createContext&&i.createContext(ui),di=function(){return di=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},di.apply(this,arguments)},hi=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function fi(e){return e&&e.map(function(e,t){return i.createElement(e.tag,di({key:t},e.attr),fi(e.child))})}function pi(e){return function(t){return i.createElement(mi,di({attr:di({},e.attr)},t),fi(e.child))}}function mi(e){var t=function(t){var n,r=e.attr,o=e.size,a=e.title,s=hi(e,["attr","size","title"]),l=o||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),i.createElement("svg",di({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,s,{className:n,style:di(di({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&i.createElement("title",null,a),e.children)};return void 0!==ci?i.createElement(ci.Consumer,null,function(e){return t(e)}):t(ui)}function gi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"22 12 18 12 15 21 9 3 6 12 2 12"}}]})(e)}function vi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"}},{tag:"polyline",attr:{points:"12 19 5 12 12 5"}}]})(e)}function yi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"1",y:"6",width:"18",height:"12",rx:"2",ry:"2"}},{tag:"line",attr:{x1:"23",y1:"13",x2:"23",y2:"11"}}]})(e)}function xi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}},{tag:"path",attr:{d:"M13.73 21a2 2 0 0 1-3.46 0"}}]})(e)}function _i(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}},{tag:"line",attr:{x1:"16",y1:"2",x2:"16",y2:"6"}},{tag:"line",attr:{x1:"8",y1:"2",x2:"8",y2:"6"}},{tag:"line",attr:{x1:"3",y1:"10",x2:"21",y2:"10"}}]})(e)}function bi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"}}]})(e)}function wi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"}}]})(e)}function ji(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"polyline",attr:{points:"12 6 12 12 16 14"}}]})(e)}function ki(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"16 18 22 12 16 6"}},{tag:"polyline",attr:{points:"8 6 2 12 8 18"}}]})(e)}function Si(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}}]})(e)}function Ni(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}},{tag:"polyline",attr:{points:"7 10 12 15 17 10"}},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"}}]})(e)}function Li(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"}}]})(e)}function Ei(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}},{tag:"path",attr:{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}}]})(e)}function Ci(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"}}]})(e)}function Pi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}},{tag:"polyline",attr:{points:"9 22 9 12 15 12 15 22"}}]})(e)}function Ti(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"12",y1:"16",x2:"12",y2:"12"}},{tag:"line",attr:{x1:"12",y1:"8",x2:"12.01",y2:"8"}}]})(e)}function Oi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"}}]})(e)}function zi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"8",y1:"6",x2:"21",y2:"6"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"21",y2:"12"}},{tag:"line",attr:{x1:"8",y1:"18",x2:"21",y2:"18"}},{tag:"line",attr:{x1:"3",y1:"6",x2:"3.01",y2:"6"}},{tag:"line",attr:{x1:"3",y1:"12",x2:"3.01",y2:"12"}},{tag:"line",attr:{x1:"3",y1:"18",x2:"3.01",y2:"18"}}]})(e)}function Mi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}},{tag:"polyline",attr:{points:"16 17 21 12 16 7"}},{tag:"line",attr:{x1:"21",y1:"12",x2:"9",y2:"12"}}]})(e)}function Ii(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}},{tag:"circle",attr:{cx:"12",cy:"10",r:"3"}}]})(e)}function Ri(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"}},{tag:"line",attr:{x1:"8",y1:"2",x2:"8",y2:"18"}},{tag:"line",attr:{x1:"16",y1:"6",x2:"16",y2:"22"}}]})(e)}function Di(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"}},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"}},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"}}]})(e)}function Ai(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"16"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)}function Bi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"}},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"}}]})(e)}function Fi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"}},{tag:"polyline",attr:{points:"1 20 1 14 7 14"}},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"}}]})(e)}function Ui(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}},{tag:"polyline",attr:{points:"17 21 17 13 7 13 7 21"}},{tag:"polyline",attr:{points:"7 3 7 8 15 8"}}]})(e)}function Zi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"}},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}}]})(e)}function Hi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"2",y:"2",width:"20",height:"8",rx:"2",ry:"2"}},{tag:"rect",attr:{x:"2",y:"14",width:"20",height:"8",rx:"2",ry:"2"}},{tag:"line",attr:{x1:"6",y1:"6",x2:"6.01",y2:"6"}},{tag:"line",attr:{x1:"6",y1:"18",x2:"6.01",y2:"18"}}]})(e)}function Wi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"}},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}}]})(e)}function Vi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"5"}},{tag:"line",attr:{x1:"12",y1:"1",x2:"12",y2:"3"}},{tag:"line",attr:{x1:"12",y1:"21",x2:"12",y2:"23"}},{tag:"line",attr:{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}},{tag:"line",attr:{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}},{tag:"line",attr:{x1:"1",y1:"12",x2:"3",y2:"12"}},{tag:"line",attr:{x1:"21",y1:"12",x2:"23",y2:"12"}},{tag:"line",attr:{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}},{tag:"line",attr:{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"}}]})(e)}function $i(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"}},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"}},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"}}]})(e)}function qi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}},{tag:"polyline",attr:{points:"17 8 12 3 7 8"}},{tag:"line",attr:{x1:"12",y1:"3",x2:"12",y2:"15"}}]})(e)}function Yi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}},{tag:"circle",attr:{cx:"12",cy:"7",r:"4"}}]})(e)}function Gi(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 12.55a11 11 0 0 1 14.08 0"}},{tag:"path",attr:{d:"M1.42 9a16 16 0 0 1 21.16 0"}},{tag:"path",attr:{d:"M8.53 16.11a6 6 0 0 1 6.95 0"}},{tag:"line",attr:{x1:"12",y1:"20",x2:"12.01",y2:"20"}}]})(e)}function Ki(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"}},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"}}]})(e)}function Ji(e){return pi({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}}]})(e)}const Qi=()=>{const[e,t]=(0,i.useState)(!1),[n,r]=(0,i.useState)(!1),{user:o,logout:a}=si(),s=()=>{t(!e)};return(0,oi.jsxs)("div",{className:"flex h-screen bg-gray-50",children:[(0,oi.jsx)("div",{className:"fixed inset-0 z-20 transition-opacity bg-black bg-opacity-50 lg:hidden "+(e?"opacity-100 ease-out duration-300":"opacity-0 ease-in duration-200 pointer-events-none"),onClick:s}),(0,oi.jsxs)("div",{className:"fixed inset-y-0 left-0 z-30 w-64 overflow-y-auto transition duration-300 transform bg-white lg:translate-x-0 lg:static lg:inset-0 "+(e?"translate-x-0 ease-out":"-translate-x-full ease-in"),children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between px-4 py-6",children:[(0,oi.jsx)("div",{className:"flex items-center",children:(0,oi.jsx)("span",{className:"text-2xl font-semibold text-primary-600",children:"SolarBank"})}),(0,oi.jsx)("button",{onClick:s,className:"p-1 text-gray-500 rounded-md lg:hidden hover:text-primary-600 focus:outline-none",children:(0,oi.jsx)(Ki,{className:"w-6 h-6"})})]}),(0,oi.jsxs)("nav",{className:"mt-6 px-2 space-y-1",children:[(0,oi.jsxs)(ze,{to:"/",className:e=>{let{isActive:t}=e;return"sidebar-link "+(t?"active":"")},children:[(0,oi.jsx)(Pi,{className:"w-5 h-5"}),(0,oi.jsx)("span",{children:"Dashboard"})]}),(0,oi.jsxs)(ze,{to:"/devices",className:e=>{let{isActive:t}=e;return"sidebar-link "+(t?"active":"")},children:[(0,oi.jsx)(Hi,{className:"w-5 h-5"}),(0,oi.jsx)("span",{children:"Devices"})]}),(0,oi.jsxs)(ze,{to:"/map",className:e=>{let{isActive:t}=e;return"sidebar-link "+(t?"active":"")},children:[(0,oi.jsx)(Ri,{className:"w-5 h-5"}),(0,oi.jsx)("span",{children:"Map"})]}),(0,oi.jsxs)(ze,{to:"/logs",className:e=>{let{isActive:t}=e;return"sidebar-link "+(t?"active":"")},children:[(0,oi.jsx)(zi,{className:"w-5 h-5"}),(0,oi.jsx)("span",{children:"Logs"})]}),(0,oi.jsxs)(ze,{to:"/settings",className:e=>{let{isActive:t}=e;return"sidebar-link "+(t?"active":"")},children:[(0,oi.jsx)(Wi,{className:"w-5 h-5"}),(0,oi.jsx)("span",{children:"Settings"})]})]})]}),(0,oi.jsxs)("div",{className:"flex flex-col flex-1 overflow-hidden",children:[(0,oi.jsxs)("header",{className:"flex items-center justify-between px-6 py-4 bg-white border-b",children:[(0,oi.jsx)("div",{className:"flex items-center",children:(0,oi.jsx)("button",{onClick:s,className:"p-1 text-gray-500 rounded-md lg:hidden hover:text-primary-600 focus:outline-none",children:(0,oi.jsx)(Di,{className:"w-6 h-6"})})}),(0,oi.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,oi.jsx)("button",{className:"p-1 text-gray-500 rounded-md hover:text-primary-600 focus:outline-none",children:(0,oi.jsx)(xi,{className:"w-6 h-6"})}),(0,oi.jsxs)("div",{className:"relative",children:[(0,oi.jsxs)("button",{onClick:()=>{r(!n)},className:"flex items-center p-1 text-gray-500 rounded-md hover:text-primary-600 focus:outline-none",children:[(0,oi.jsx)(Yi,{className:"w-6 h-6"}),(0,oi.jsx)("span",{className:"ml-2 text-sm font-medium text-gray-700 hidden sm:block",children:(null===o||void 0===o?void 0:o.username)||"User"})]}),n&&(0,oi.jsxs)("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-50",children:[(0,oi.jsxs)("div",{className:"px-4 py-2 border-b",children:[(0,oi.jsx)("p",{className:"text-sm font-medium text-gray-900",children:null===o||void 0===o?void 0:o.username}),(0,oi.jsx)("p",{className:"text-xs text-gray-500",children:null===o||void 0===o?void 0:o.email})]}),(0,oi.jsxs)("button",{onClick:()=>{a(),r(!1)},className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[(0,oi.jsx)(Mi,{className:"w-4 h-4 mr-2"}),"Sign out"]})]})]})]})]}),(0,oi.jsx)("main",{className:"flex-1 overflow-x-hidden overflow-y-auto bg-gray-50 p-6",children:(0,oi.jsx)(ye,{})})]})]})},Xi=()=>{const[e,t]=(0,i.useState)({username:"",password:""}),[n,r]=(0,i.useState)(""),[o,a]=(0,i.useState)(!1),{login:s,isAuthenticated:l}=si(),u=te();(0,i.useEffect)(()=>{l&&u("/",{replace:!0})},[l,u]);const c=n=>{t({...e,[n.target.name]:n.target.value}),r("")};return(0,oi.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8",children:(0,oi.jsxs)("div",{className:"max-w-md w-full space-y-8",children:[(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"mx-auto h-16 w-16 bg-indigo-600 rounded-full flex items-center justify-center",children:(0,oi.jsx)("svg",{className:"h-8 w-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,oi.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),(0,oi.jsx)("h2",{className:"mt-6 text-3xl font-extrabold text-gray-900",children:"SolarBank IoT Dashboard"}),(0,oi.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:"Sign in to access your dashboard"})]}),(0,oi.jsx)("form",{className:"mt-8 space-y-6",onSubmit:async t=>{t.preventDefault(),a(!0),r("");const n=await s(e.username,e.password);n.success||r(n.message),a(!1)},children:(0,oi.jsxs)("div",{className:"bg-white shadow-lg rounded-lg p-6",children:[(0,oi.jsxs)("div",{className:"space-y-4",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"username",className:"block text-sm font-medium text-gray-700",children:"Username"}),(0,oi.jsx)("input",{id:"username",name:"username",type:"text",required:!0,value:e.username,onChange:c,className:"mt-1 appearance-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm",placeholder:"Enter your username"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700",children:"Password"}),(0,oi.jsx)("input",{id:"password",name:"password",type:"password",required:!0,value:e.password,onChange:c,className:"mt-1 appearance-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm",placeholder:"Enter your password"})]})]}),n&&(0,oi.jsx)("div",{className:"mt-4 bg-red-50 border border-red-200 text-red-600 px-4 py-3 rounded-md text-sm",children:n}),(0,oi.jsx)("div",{className:"mt-6",children:(0,oi.jsx)("button",{type:"submit",disabled:o,className:"group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white "+(o?"bg-gray-400 cursor-not-allowed":"bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"),children:o?(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),"Signing in..."]}):"Sign in"})})]})}),(0,oi.jsx)("div",{className:"text-center",children:(0,oi.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-md p-4",children:[(0,oi.jsx)("p",{className:"text-sm text-blue-600 font-medium",children:"Default Login Credentials:"}),(0,oi.jsxs)("p",{className:"text-xs text-blue-500 mt-1",children:["Username: ",(0,oi.jsx)("strong",{children:"admin"})," | Password: ",(0,oi.jsx)("strong",{children:"admin123"})]})]})})]})})},er=e=>{let{children:t}=e;const{isAuthenticated:n,loading:i}=si();return i?(0,oi.jsx)("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600 mx-auto"}),(0,oi.jsx)("p",{className:"mt-4 text-gray-600",children:"Loading..."})]})}):n?t:(0,oi.jsx)(ve,{to:"/login",replace:!0})},tr=[{id:"device-001",name:"LILYGO-001",model:"LILYGO T-A7670G",status:"online",battery:{level:85,status:"good",voltage:3.8},signal:{strength:-65,status:"good"},location:{latitude:47.3769,longitude:8.5417,altitude:408},sensors:{temperature:24.5,humidity:65.2,solar_voltage:12.8},gps_fixed:!0,last_seen:(new Date).toISOString()},{id:"device-002",name:"LILYGO-002",model:"LILYGO T-A7670G",status:"idle",battery:{level:42,status:"low",voltage:3.4},signal:{strength:-85,status:"fair"},location:{latitude:47.378,longitude:8.539,altitude:410},sensors:{temperature:22.1,humidity:58.9,solar_voltage:8.2},gps_fixed:!1,last_seen:new Date(Date.now()-36e5).toISOString()}],nr=()=>{var e,t,n,r,o,a,s,l;const[u,c]=(0,i.useState)([]),[d,h]=(0,i.useState)({}),[f,p]=(0,i.useState)(!0),[m,g]=(0,i.useState)(!1),[v,y]=(0,i.useState)(""),[x,_]=(0,i.useState)(null),{user:b}=si();(0,i.useEffect)(()=>{w()},[]);const w=async()=>{try{p(!0),y("");const e=localStorage.getItem("token"),t=await fetch("/api/devices/",{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw new Error("Failed to fetch devices");{const e=(await t.json()).map(e=>({...e,status:j(e),battery:k(e),signal:S(e),sensors:{temperature:e.temperature||null,humidity:e.humidity||null,solar_voltage:e.solar_voltage||null},location:{latitude:e.latitude||47.3769,longitude:e.longitude||8.5417,altitude:e.altitude||408},gps_fixed:e.gps_fixed||!1}));c(e);const n=N(e);h(n),_(new Date)}}catch(v){console.error("Error fetching dashboard data:",v),y("Failed to load dashboard data");const t=tr.map(e=>({...e}));c(t),h(N(t)),_(new Date)}finally{p(!1)}},j=e=>{if(!e.is_active)return"offline";if(!e.last_seen)return"offline";const t=new Date(e.last_seen),n=(new Date-t)/6e4;return n<5?"online":n<30?"idle":"offline"},k=e=>{const t=e.battery_level||0;let n="good";return t<20?n="critical":t<50&&(n="low"),{level:t,status:n,voltage:e.battery_voltage||null}},S=e=>{const t=e.signal_strength||-100;let n="poor";return t>-70?n="good":t>-85&&(n="fair"),{strength:t,status:n}},N=e=>{const t=new Date,n=e.filter(e=>!1!==e.is_active).length,i=e.filter(e=>"online"===e.status).length,r=e.filter(e=>e.battery.level<20).length,o=e.filter(e=>e.battery.level<50&&e.battery.level>=20).length,a=e.filter(e=>e.gps_fixed).length,s=e.length>0?Math.round(e.reduce((e,t)=>e+t.battery.level,0)/e.length):0,l=e.length>0?Math.round(e.filter(e=>{var t;return null===(t=e.sensors)||void 0===t?void 0:t.temperature}).reduce((e,t)=>e+(t.sensors.temperature||0),0)/e.filter(e=>{var t;return null===(t=e.sensors)||void 0===t?void 0:t.temperature}).length*10)/10:0,u=e.length>0?Math.round(e.filter(e=>{var t;return null===(t=e.sensors)||void 0===t?void 0:t.solar_voltage}).reduce((e,t)=>e+(t.sensors.solar_voltage||0),0)/e.filter(e=>{var t;return null===(t=e.sensors)||void 0===t?void 0:t.solar_voltage}).length*10)/10:0,c=e.reduce((e,t)=>{if(!t.last_seen)return e;const n=new Date(t.last_seen);return n>e?n:e},new Date(0));return{devices:{total:e.length,active:n,online:i,offline:e.length-i,gps_fixed:a},telemetry:{total:24*e.length,latest:c.toISOString(),avgBattery:s,avgTemperature:l,avgSolarVoltage:u},alerts:{critical:r,warning:o,total:r+o},system_time:t.toISOString()}},L=e=>new Date(e).toLocaleString(),E=e=>{switch(e){case"online":return"text-success-500";case"idle":return"text-warning-500";case"offline":return"text-danger-500";default:return"text-gray-500"}},C=e=>{switch(e){case"good":return"text-success-500";case"low":return"text-warning-500";case"critical":return"text-danger-500";default:return"text-gray-500"}},P=e=>{switch(e){case"good":return"text-success-500";case"fair":return"text-warning-500";case"poor":return"text-danger-500";default:return"text-gray-500"}};return f?(0,oi.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary-500 border-t-transparent rounded-full animate-spin mx-auto"}),(0,oi.jsx)("p",{className:"mt-4 text-gray-600",children:"Loading dashboard data..."})]})}):(0,oi.jsxs)("div",{className:"space-y-6",children:[(0,oi.jsxs)("div",{className:"flex justify-between items-start",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("h1",{className:"text-2xl font-semibold text-gray-800",children:"Dashboard"}),(0,oi.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:["Welcome back, ",(null===b||void 0===b?void 0:b.username)||"User","! Here's your LILYGO IoT overview."]})]}),(0,oi.jsxs)("div",{className:"flex items-center gap-4",children:[x&&(0,oi.jsxs)("div",{className:"text-right",children:[(0,oi.jsxs)("p",{className:"text-sm text-gray-500 flex items-center gap-1",children:[(0,oi.jsx)(ji,{size:14}),"Last updated: ",L(x.toISOString())]}),v&&(0,oi.jsx)("p",{className:"text-xs text-red-500 mt-1",children:v})]}),(0,oi.jsxs)("button",{onClick:async()=>{g(!0),await w(),g(!1)},disabled:m,className:"flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors "+(m?"opacity-50 cursor-not-allowed":""),children:[(0,oi.jsx)(Fi,{className:m?"animate-spin":"",size:16}),(0,oi.jsx)("span",{children:m?"Refreshing...":"Refresh"})]})]})]}),(0,oi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("div",{className:"p-3 rounded-full bg-primary-100 text-primary-600",children:(0,oi.jsx)(Hi,{className:"w-6 h-6"})}),(0,oi.jsxs)("div",{className:"ml-4",children:[(0,oi.jsx)("p",{className:"text-sm font-medium text-gray-500",children:"Total Devices"}),(0,oi.jsx)("p",{className:"text-lg font-semibold text-gray-800",children:(null===(e=d.devices)||void 0===e?void 0:e.total)||0})]})]}),(0,oi.jsx)("div",{className:"mt-4",children:(0,oi.jsxs)("div",{className:"flex justify-between items-center",children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"GPS Fixed"}),(0,oi.jsx)("p",{className:"text-sm font-medium text-success-500",children:(null===(t=d.devices)||void 0===t?void 0:t.gps_fixed)||0})]})})]}),(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("div",{className:"p-3 rounded-full bg-secondary-100 text-secondary-600",children:(0,oi.jsx)(gi,{className:"w-6 h-6"})}),(0,oi.jsxs)("div",{className:"ml-4",children:[(0,oi.jsx)("p",{className:"text-sm font-medium text-gray-500",children:"Avg Temperature"}),(0,oi.jsxs)("p",{className:"text-lg font-semibold text-gray-800",children:[(null===(n=d.telemetry)||void 0===n?void 0:n.avgTemperature)||0,"\xb0C"]})]})]}),(0,oi.jsx)("div",{className:"mt-4",children:(0,oi.jsxs)("div",{className:"flex justify-between items-center",children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Avg Battery"}),(0,oi.jsxs)("p",{className:"text-sm font-medium text-gray-600",children:[(null===(r=d.telemetry)||void 0===r?void 0:r.avgBattery)||0,"%"]})]})})]}),(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("div",{className:"p-3 rounded-full bg-warning-100 text-warning-600",children:(0,oi.jsx)(Vi,{className:"w-6 h-6"})}),(0,oi.jsxs)("div",{className:"ml-4",children:[(0,oi.jsx)("p",{className:"text-sm font-medium text-gray-500",children:"Avg Solar"}),(0,oi.jsxs)("p",{className:"text-lg font-semibold text-gray-800",children:[(null===(o=d.telemetry)||void 0===o?void 0:o.avgSolarVoltage)||0,"V"]})]})]}),(0,oi.jsx)("div",{className:"mt-4",children:(0,oi.jsxs)("div",{className:"flex justify-between items-center",children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Battery Alerts"}),(0,oi.jsx)("p",{className:"text-sm font-medium text-danger-500",children:(null===(a=d.alerts)||void 0===a?void 0:a.total)||0})]})})]}),(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("div",{className:"p-3 rounded-full bg-success-100 text-success-600",children:(0,oi.jsx)(Gi,{className:"w-6 h-6"})}),(0,oi.jsxs)("div",{className:"ml-4",children:[(0,oi.jsx)("p",{className:"text-sm font-medium text-gray-500",children:"Online Devices"}),(0,oi.jsx)("p",{className:"text-lg font-semibold text-gray-800",children:(null===(s=d.devices)||void 0===s?void 0:s.online)||0})]})]}),(0,oi.jsx)("div",{className:"mt-4",children:(0,oi.jsxs)("div",{className:"flex justify-between items-center",children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Offline Devices"}),(0,oi.jsx)("p",{className:"text-sm font-medium text-danger-500",children:(null===(l=d.devices)||void 0===l?void 0:l.offline)||0})]})})]})]}),(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800",children:"Device Status"}),(0,oi.jsx)(Oe,{to:"/devices",className:"text-sm text-primary-600 hover:text-primary-700",children:"View All"})]}),(0,oi.jsx)("div",{className:"overflow-x-auto",children:(0,oi.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,oi.jsx)("thead",{className:"bg-gray-50",children:(0,oi.jsxs)("tr",{children:[(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Device"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Battery"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Signal"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Sensors"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Location"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Last Seen"})]})}),(0,oi.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:u.map(e=>{var t,n,i;return(0,oi.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,oi.jsxs)("td",{className:"px-6 py-4 whitespace-nowrap",children:[(0,oi.jsx)(Oe,{to:`/devices/${e.id}`,className:"text-primary-600 hover:text-primary-700",children:e.name}),(0,oi.jsx)("p",{className:"text-xs text-gray-500",children:e.model||"LILYGO T-A7670G"})]}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("div",{className:`h-2.5 w-2.5 rounded-full mr-2 ${E(e.status).replace("text-","bg-")}`}),(0,oi.jsx)("span",{className:`capitalize ${E(e.status)}`,children:e.status})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(yi,{className:`mr-2 ${C(e.battery.status)}`}),(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("span",{className:C(e.battery.status),children:[e.battery.level,"%"]}),e.battery.voltage&&(0,oi.jsxs)("p",{className:"text-xs text-gray-500",children:[e.battery.voltage,"V"]})]})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(Gi,{className:`mr-2 ${P(e.signal.status)}`}),(0,oi.jsxs)("span",{className:P(e.signal.status),children:[e.signal.strength," dBm"]})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"text-sm",children:[(null===(t=e.sensors)||void 0===t?void 0:t.temperature)&&(0,oi.jsxs)("div",{className:"flex items-center text-gray-500",children:[(0,oi.jsx)(gi,{className:"mr-1",size:12}),(0,oi.jsxs)("span",{children:[e.sensors.temperature,"\xb0C"]})]}),(null===(n=e.sensors)||void 0===n?void 0:n.humidity)&&(0,oi.jsxs)("div",{className:"flex items-center text-blue-500",children:[(0,oi.jsx)(Li,{className:"mr-1",size:12}),(0,oi.jsxs)("span",{children:[e.sensors.humidity,"%"]})]}),(null===(i=e.sensors)||void 0===i?void 0:i.solar_voltage)&&(0,oi.jsxs)("div",{className:"flex items-center text-yellow-500",children:[(0,oi.jsx)(Ji,{className:"mr-1",size:12}),(0,oi.jsxs)("span",{children:[e.sensors.solar_voltage,"V"]})]})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(Ii,{className:"mr-2 "+(e.gps_fixed?"text-success-500":"text-gray-400")}),(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("span",{className:"text-gray-500",children:[e.location.latitude.toFixed(4),", ",e.location.longitude.toFixed(4)]}),(0,oi.jsx)("p",{className:"text-xs text-gray-400",children:e.gps_fixed?"GPS Fixed":"No GPS"})]})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-gray-500",children:L(e.last_seen)})]},e.id)})})]})})]})]})},ir=e=>{let{isOpen:t,onClose:n,onDeviceAdded:r}=e;const[o,a]=(0,i.useState)({id:"",name:"",description:"",model:"SIM7000E",firmware_version:""}),[s,l]=(0,i.useState)({}),[u,c]=(0,i.useState)(!1),d=e=>{const{name:t,value:n}=e.target;a(e=>({...e,[t]:n})),s[t]&&l(e=>({...e,[t]:""}))},h=()=>{a({id:"",name:"",description:"",model:"SIM7000E",firmware_version:""}),l({}),n()};return t?(0,oi.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,oi.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-md mx-4",children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between p-6 border-b",children:[(0,oi.jsx)("h2",{className:"text-xl font-semibold text-gray-800",children:"Add New Device"}),(0,oi.jsx)("button",{onClick:h,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,oi.jsx)(Ki,{size:24})})]}),(0,oi.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),(()=>{const e={};return o.id.trim()?/^[a-zA-Z0-9-_]+$/.test(o.id)||(e.id="Device ID can only contain letters, numbers, hyphens, and underscores"):e.id="Device ID is required",o.name.trim()||(e.name="Device name is required"),o.model.trim()||(e.model="Device model is required"),l(e),0===Object.keys(e).length})()){c(!0);try{const e=await fetch("/api/devices/",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("token")}`},body:JSON.stringify(o)});if(e.ok){const t=await e.json();r(t),h()}else{const t=await e.json();if(400===e.status&&t.detail)if("string"===typeof t.detail)l({general:t.detail});else{const e={};t.detail.forEach(t=>{t.loc&&t.loc.length>1&&(e[t.loc[1]]=t.msg)}),l(e)}else l({general:"Failed to create device. Please try again."})}}catch(t){console.error("Error creating device:",t),l({general:"Network error. Please check your connection."})}finally{c(!1)}}},className:"p-6 space-y-4",children:[s.general&&(0,oi.jsx)("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded",children:s.general}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"id",className:"block text-sm font-medium text-gray-700 mb-1",children:"Device ID *"}),(0,oi.jsx)("input",{type:"text",id:"id",name:"id",value:o.id,onChange:d,className:"w-full px-3 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 "+(s.id?"border-red-300 focus:ring-red-500":"border-gray-300"),placeholder:"e.g., SIM7000E-001"}),s.id&&(0,oi.jsx)("p",{className:"mt-1 text-sm text-red-600",children:s.id})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-1",children:"Device Name *"}),(0,oi.jsx)("input",{type:"text",id:"name",name:"name",value:o.name,onChange:d,className:"w-full px-3 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 "+(s.name?"border-red-300 focus:ring-red-500":"border-gray-300"),placeholder:"e.g., Solar Panel Monitor"}),s.name&&(0,oi.jsx)("p",{className:"mt-1 text-sm text-red-600",children:s.name})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),(0,oi.jsx)("textarea",{id:"description",name:"description",value:o.description,onChange:d,rows:3,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500",placeholder:"Optional description of the device"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"model",className:"block text-sm font-medium text-gray-700 mb-1",children:"Model *"}),(0,oi.jsxs)("select",{id:"model",name:"model",value:o.model,onChange:d,className:"w-full px-3 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 "+(s.model?"border-red-300 focus:ring-red-500":"border-gray-300"),children:[(0,oi.jsx)("option",{value:"SIM7000E",children:"SIM7000E"}),(0,oi.jsx)("option",{value:"SIM7000A",children:"SIM7000A"}),(0,oi.jsx)("option",{value:"SIM7000G",children:"SIM7000G"}),(0,oi.jsx)("option",{value:"Custom",children:"Custom"})]}),s.model&&(0,oi.jsx)("p",{className:"mt-1 text-sm text-red-600",children:s.model})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"firmware_version",className:"block text-sm font-medium text-gray-700 mb-1",children:"Firmware Version"}),(0,oi.jsx)("input",{type:"text",id:"firmware_version",name:"firmware_version",value:o.firmware_version,onChange:d,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500",placeholder:"e.g., 1.2.3"})]}),(0,oi.jsxs)("div",{className:"flex justify-end space-x-3 pt-4",children:[(0,oi.jsx)("button",{type:"button",onClick:h,className:"px-4 py-2 text-gray-700 bg-gray-100 rounded-md hover:bg-gray-200 transition-colors",children:"Cancel"}),(0,oi.jsxs)("button",{type:"submit",disabled:u,className:"flex items-center gap-2 px-4 py-2 bg-primary-500 text-white rounded-md hover:bg-primary-600 transition-colors "+(u?"opacity-50 cursor-not-allowed":""),children:[u?(0,oi.jsx)("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}):(0,oi.jsx)(Bi,{size:16}),u?"Creating...":"Add Device"]})]})]})]})}):null},rr=e=>{let{isOpen:t,onClose:n,device:r,onDeviceUpdated:o}=e;const[a,s]=(0,i.useState)(!1),[l,u]=(0,i.useState)(""),[c,d]=(0,i.useState)({name:"",description:"",model:"SIM7000E",firmware_version:"",is_active:!0,latitude:"",longitude:"",altitude:""});(0,i.useEffect)(()=>{var e,t,n;r&&d({name:r.name||"",description:r.description||"",model:r.model||"SIM7000E",firmware_version:r.firmware_version||"",is_active:void 0===r.is_active||r.is_active,latitude:r.latitude||(null===(e=r.location)||void 0===e?void 0:e.latitude)||"",longitude:r.longitude||(null===(t=r.location)||void 0===t?void 0:t.longitude)||"",altitude:r.altitude||(null===(n=r.location)||void 0===n?void 0:n.altitude)||""})},[r]);const h=e=>{const{name:t,value:n,type:i,checked:r}=e.target;d(e=>({...e,[t]:"checkbox"===i?r:n}))};return t?(0,oi.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,oi.jsxs)("div",{className:"bg-white rounded-lg shadow-xl max-w-2xl w-full mx-4 max-h-[90vh] overflow-y-auto",children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[(0,oi.jsx)("h2",{className:"text-xl font-semibold text-gray-800",children:"Edit Device"}),(0,oi.jsx)("button",{onClick:n,className:"p-2 text-gray-400 hover:text-gray-600 transition-colors",children:(0,oi.jsx)(Ki,{className:"w-5 h-5"})})]}),(0,oi.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),r){s(!0),u("");try{const e={};c.name.trim()&&(e.name=c.name.trim()),c.description.trim()&&(e.description=c.description.trim()),c.model&&(e.model=c.model),c.firmware_version.trim()&&(e.firmware_version=c.firmware_version.trim()),e.is_active=c.is_active,c.latitude&&!isNaN(parseFloat(c.latitude))&&(e.latitude=parseFloat(c.latitude)),c.longitude&&!isNaN(parseFloat(c.longitude))&&(e.longitude=parseFloat(c.longitude)),c.altitude&&!isNaN(parseFloat(c.altitude))&&(e.altitude=parseFloat(c.altitude));const t=await ni(r.id,e);o&&o(t.data),n()}catch(l){var t,i;console.error("Error updating device:",l),u((null===(t=l.response)||void 0===t||null===(i=t.data)||void 0===i?void 0:i.detail)||"Failed to update device")}finally{s(!1)}}},className:"p-6",children:[l&&(0,oi.jsx)("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,oi.jsx)("p",{className:"text-red-600 text-sm",children:l})}),(0,oi.jsxs)("div",{className:"space-y-4",children:[(0,oi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-1",children:"Device Name *"}),(0,oi.jsx)("input",{type:"text",id:"name",name:"name",required:!0,value:c.name,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",placeholder:"Enter device name"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"model",className:"block text-sm font-medium text-gray-700 mb-1",children:"Model"}),(0,oi.jsxs)("select",{id:"model",name:"model",value:c.model,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",children:[(0,oi.jsx)("option",{value:"SIM7000E",children:"SIM7000E"}),(0,oi.jsx)("option",{value:"SIM7000A",children:"SIM7000A"}),(0,oi.jsx)("option",{value:"SIM7000G",children:"SIM7000G"}),(0,oi.jsx)("option",{value:"LILYGO T-A7670G",children:"LILYGO T-A7670G"}),(0,oi.jsx)("option",{value:"Custom",children:"Custom"})]})]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),(0,oi.jsx)("textarea",{id:"description",name:"description",rows:"3",value:c.description,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",placeholder:"Enter device description"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"firmware_version",className:"block text-sm font-medium text-gray-700 mb-1",children:"Firmware Version"}),(0,oi.jsx)("input",{type:"text",id:"firmware_version",name:"firmware_version",value:c.firmware_version,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",placeholder:"e.g., 1.2.3"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Location (Optional)"}),(0,oi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"latitude",className:"block text-xs font-medium text-gray-500 mb-1",children:"Latitude"}),(0,oi.jsx)("input",{type:"number",id:"latitude",name:"latitude",step:"any",value:c.latitude,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",placeholder:"47.3769"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"longitude",className:"block text-xs font-medium text-gray-500 mb-1",children:"Longitude"}),(0,oi.jsx)("input",{type:"number",id:"longitude",name:"longitude",step:"any",value:c.longitude,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",placeholder:"8.5417"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"altitude",className:"block text-xs font-medium text-gray-500 mb-1",children:"Altitude (m)"}),(0,oi.jsx)("input",{type:"number",id:"altitude",name:"altitude",step:"any",value:c.altitude,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",placeholder:"408"})]})]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Status"}),(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("input",{type:"checkbox",id:"is_active",name:"is_active",checked:c.is_active,onChange:h,className:"h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded"}),(0,oi.jsx)("label",{htmlFor:"is_active",className:"ml-2 block text-sm text-gray-700",children:"Device is active"})]})]})]}),(0,oi.jsxs)("div",{className:"flex justify-end gap-3 mt-6 pt-6 border-t border-gray-200",children:[(0,oi.jsx)("button",{type:"button",onClick:n,className:"px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors",children:"Cancel"}),(0,oi.jsxs)("button",{type:"submit",disabled:a,className:"flex items-center gap-2 px-4 py-2 bg-primary-500 text-white rounded-md text-sm font-medium hover:bg-primary-600 transition-colors "+(a?"opacity-50 cursor-not-allowed":""),children:[(0,oi.jsx)(Ui,{className:"w-4 h-4"}),a?"Updating...":"Update Device"]})]})]})]})}):null},or=[{id:"device-001",name:"SIM7000E-001",description:"Solar panel monitoring device",model:"SIM7000E",firmware_version:"1.2.3",status:"online",battery:{level:85,status:"good"},signal:{strength:-65,status:"good"},location:{latitude:47.3769,longitude:8.5417,altitude:408},last_seen:(new Date).toISOString()},{id:"device-002",name:"SIM7000E-002",description:"Wind turbine monitoring device",model:"SIM7000E",firmware_version:"1.2.3",status:"idle",battery:{level:42,status:"low"},signal:{strength:-85,status:"fair"},location:{latitude:47.378,longitude:8.539,altitude:410},last_seen:new Date(Date.now()-36e5).toISOString()},{id:"device-003",name:"SIM7000E-003",description:"Battery storage monitoring device",model:"SIM7000E",firmware_version:"1.2.2",status:"offline",battery:{level:12,status:"critical"},signal:{strength:-105,status:"poor"},location:{latitude:47.375,longitude:8.543,altitude:405},last_seen:new Date(Date.now()-864e5).toISOString()},{id:"device-004",name:"SIM7000E-004",description:"Weather station device",model:"SIM7000E",firmware_version:"1.2.3",status:"online",battery:{level:78,status:"good"},signal:{strength:-72,status:"good"},location:{latitude:47.379,longitude:8.545,altitude:412},last_seen:(new Date).toISOString()},{id:"device-005",name:"SIM7000E-005",description:"Inverter monitoring device",model:"SIM7000E",firmware_version:"1.2.1",status:"idle",battery:{level:35,status:"low"},signal:{strength:-90,status:"fair"},location:{latitude:47.373,longitude:8.538,altitude:407},last_seen:new Date(Date.now()-72e5).toISOString()}],ar=()=>{const[e,t]=(0,i.useState)([]),[n,r]=(0,i.useState)(!0),[o,a]=(0,i.useState)(""),[s,l]=(0,i.useState)("all"),[u,c]=(0,i.useState)(!1),[d,h]=(0,i.useState)(!1),[f,p]=(0,i.useState)(!1),[m,g]=(0,i.useState)(null),[v,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{x()},[]);const x=async()=>{try{r(!0);const e=localStorage.getItem("token"),n=await fetch("/api/devices/",{headers:{Authorization:`Bearer ${e}`}});if(n.ok){const e=(await n.json()).map(e=>({...e,status:_(e),battery:b(e),signal:w(e),location:{latitude:e.latitude||0,longitude:e.longitude||0,altitude:e.altitude||0}}));t(e)}else console.error("Failed to fetch devices"),t(or)}catch(e){console.error("Error fetching devices:",e),t(or)}finally{r(!1)}},_=e=>{if(!e.is_active)return"offline";if(!e.last_seen)return"offline";const t=new Date(e.last_seen),n=(new Date-t)/6e4;return n<5?"online":n<30?"idle":"offline"},b=e=>{const t=e.battery_level||0;let n="good";return t<20?n="critical":t<50&&(n="low"),{level:t,status:n}},w=e=>{const t=e.signal_strength||-100;let n="poor";return t>-70?n="good":t>-85&&(n="fair"),{strength:t,status:n}},j=e=>{switch(e){case"online":return"text-success-500";case"idle":return"text-warning-500";case"offline":return"text-danger-500";default:return"text-gray-500"}},k=e=>{switch(e){case"good":return"text-success-500";case"low":return"text-warning-500";case"critical":return"text-danger-500";default:return"text-gray-500"}},S=e=>{switch(e){case"good":return"text-success-500";case"fair":return"text-warning-500";case"poor":return"text-danger-500";default:return"text-gray-500"}},N=e.filter(e=>{const t=e.name.toLowerCase().includes(o.toLowerCase())||e.id.toLowerCase().includes(o.toLowerCase())||e.description&&e.description.toLowerCase().includes(o.toLowerCase()),n="all"===s||e.status===s;return t&&n});return n?(0,oi.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary-500 border-t-transparent rounded-full animate-spin mx-auto"}),(0,oi.jsx)("p",{className:"mt-4 text-gray-600",children:"Loading devices..."})]})}):(0,oi.jsxs)("div",{className:"space-y-6",children:[(0,oi.jsxs)("div",{className:"flex justify-between items-center",children:[(0,oi.jsx)("h1",{className:"text-2xl font-semibold text-gray-800",children:"Devices"}),(0,oi.jsxs)("button",{onClick:()=>{h(!0)},className:"flex items-center gap-2 px-4 py-2 bg-primary-500 text-white rounded-md hover:bg-primary-600 transition-colors",children:[(0,oi.jsx)(Ai,{}),(0,oi.jsx)("span",{children:"Add Device"})]})]}),(0,oi.jsx)("div",{className:"dashboard-card",children:(0,oi.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[(0,oi.jsxs)("div",{className:"relative flex-1",children:[(0,oi.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,oi.jsx)(Zi,{className:"text-gray-400"})}),(0,oi.jsx)("input",{type:"text",placeholder:"Search devices by name or ID...",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:o,onChange:e=>a(e.target.value)})]}),(0,oi.jsxs)("div",{className:"flex items-center gap-4",children:[(0,oi.jsxs)("div",{className:"relative",children:[(0,oi.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,oi.jsx)(Ci,{className:"text-gray-400"})}),(0,oi.jsxs)("select",{className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:s,onChange:e=>l(e.target.value),children:[(0,oi.jsx)("option",{value:"all",children:"All Status"}),(0,oi.jsx)("option",{value:"online",children:"Online"}),(0,oi.jsx)("option",{value:"idle",children:"Idle"}),(0,oi.jsx)("option",{value:"offline",children:"Offline"})]})]}),(0,oi.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors "+(u?"opacity-50 cursor-not-allowed":""),onClick:async()=>{c(!0),await x(),c(!1)},disabled:u,children:[(0,oi.jsx)(Fi,{className:u?"animate-spin":""}),(0,oi.jsx)("span",{children:"Refresh"})]})]})]})}),(0,oi.jsx)("div",{className:"dashboard-card",children:0===N.length?(0,oi.jsx)("div",{className:"text-center py-8",children:(0,oi.jsx)("p",{className:"text-gray-500",children:"No devices found matching your criteria."})}):(0,oi.jsx)("div",{className:"overflow-x-auto",children:(0,oi.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,oi.jsx)("thead",{className:"bg-gray-50",children:(0,oi.jsxs)("tr",{children:[(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Device"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Battery"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Signal"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Location"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Last Seen"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Firmware"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),(0,oi.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:N.map(e=>{return(0,oi.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{children:[(0,oi.jsx)(Oe,{to:`/devices/${e.id}`,className:"text-primary-600 hover:text-primary-700 font-medium",children:e.name}),(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:e.description})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("div",{className:"h-2.5 w-2.5 rounded-full mr-2 "+("online"===e.status?"bg-success-500":"idle"===e.status?"bg-warning-500":"bg-danger-500")}),(0,oi.jsx)("span",{className:`capitalize ${j(e.status)}`,children:e.status})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(yi,{className:`mr-2 ${k(e.battery.status)}`}),(0,oi.jsxs)("span",{className:k(e.battery.status),children:[e.battery.level,"%"]})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(Gi,{className:`mr-2 ${S(e.signal.status)}`}),(0,oi.jsxs)("span",{className:S(e.signal.status),children:[e.signal.strength," dBm"]})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(Ii,{className:"mr-2 text-gray-500"}),(0,oi.jsxs)("span",{className:"text-gray-500",children:[e.location.latitude.toFixed(4),", ",e.location.longitude.toFixed(4)]})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-gray-500",children:(t=e.last_seen,new Date(t).toLocaleString())}),(0,oi.jsxs)("td",{className:"px-6 py-4 whitespace-nowrap text-gray-500",children:["v",e.firmware_version]}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsx)("button",{onClick:()=>(e=>{g(e),p(!0)})(e),className:"flex items-center gap-1 px-2 py-1 text-blue-600 hover:text-blue-800 hover:bg-blue-50 rounded transition-colors",title:"Edit device",children:(0,oi.jsx)(Ei,{className:"w-4 h-4"})}),(0,oi.jsx)("button",{onClick:()=>(e=>{y(e)})(e),className:"flex items-center gap-1 px-2 py-1 text-red-600 hover:text-red-800 hover:bg-red-50 rounded transition-colors",title:"Delete device",children:(0,oi.jsx)($i,{className:"w-4 h-4"})})]})})]},e.id);var t})})]})})}),(0,oi.jsx)(ir,{isOpen:d,onClose:()=>{h(!1)},onDeviceAdded:e=>{const n={...e,status:_(e),battery:b(e),signal:w(e),location:{latitude:e.latitude||0,longitude:e.longitude||0,altitude:e.altitude||0}};t(e=>[...e,n])}}),(0,oi.jsx)(rr,{isOpen:f,onClose:()=>{p(!1),g(null)},device:m,onDeviceUpdated:e=>{const n={...e,status:_(e),battery:b(e),signal:w(e),location:{latitude:e.latitude||0,longitude:e.longitude||0,altitude:e.altitude||0}};t(t=>t.map(t=>t.id===e.id?n:t))}}),v&&(0,oi.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,oi.jsx)("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4",children:(0,oi.jsxs)("div",{className:"p-6",children:[(0,oi.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Delete Device"}),(0,oi.jsxs)("p",{className:"text-gray-600 mb-6",children:['Are you sure you want to delete "',v.name,'"? This action cannot be undone.']}),(0,oi.jsxs)("div",{className:"flex justify-end gap-3",children:[(0,oi.jsx)("button",{onClick:()=>{y(null)},className:"px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors",children:"Cancel"}),(0,oi.jsx)("button",{onClick:async()=>{if(v)try{await ii(v.id),t(e=>e.filter(e=>e.id!==v.id)),y(null)}catch(e){console.error("Error deleting device:",e),alert("Failed to delete device. Please try again.")}},className:"px-4 py-2 bg-red-500 text-white rounded-md text-sm font-medium hover:bg-red-600 transition-colors",children:"Delete"})]})]})})})]})};const sr=(0,i.createContext)(null),lr=sr.Provider;function ur(){const e=(0,i.useContext)(sr);if(null==e)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}var cr=n(228),dr=n.n(cr);function hr(){return hr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},hr.apply(this,arguments)}function fr(e,t){let{bounds:n,boundsOptions:r,center:o,children:a,className:s,id:l,placeholder:u,style:c,whenReady:d,zoom:h,...f}=e;const[p]=(0,i.useState)({className:s,id:l,style:c}),[m,g]=(0,i.useState)(null);(0,i.useImperativeHandle)(t,()=>m?.map??null,[m]);const v=(0,i.useCallback)(e=>{if(null!==e&&null===m){const t=new cr.Map(e,f);null!=o&&null!=h?t.setView(o,h):null!=n&&t.fitBounds(n,r),null!=d&&t.whenReady(d),g(function(e){return Object.freeze({__version:1,map:e})}(t))}},[]);(0,i.useEffect)(()=>()=>{m?.map.remove()},[m]);const y=m?i.createElement(lr,{value:m},a):u??null;return i.createElement("div",hr({},p,{ref:v}),y)}const pr=(0,i.forwardRef)(fr);function mr(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function gr(e,t){return null==t?function(t,n){const r=(0,i.useRef)();return r.current||(r.current=e(t,n)),r}:function(n,r){const o=(0,i.useRef)();o.current||(o.current=e(n,r));const a=(0,i.useRef)(n),{instance:s}=o.current;return(0,i.useEffect)(function(){a.current!==n&&(t(s,n,a.current),a.current=n)},[s,n,r]),o}}function vr(e,t){const n=(0,i.useRef)(t);(0,i.useEffect)(function(){t!==n.current&&null!=e.attributionControl&&(null!=n.current&&e.attributionControl.removeAttribution(n.current),null!=t&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}function yr(e,t){const n=(0,i.useRef)();(0,i.useEffect)(function(){return null!=t&&e.instance.on(t),n.current=t,function(){null!=n.current&&e.instance.off(n.current),n.current=null}},[e,t])}function xr(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function _r(e){return function(t){const n=ur(),r=e(xr(t,n),n);return vr(n.map,t.attribution),yr(r.current,t.eventHandlers),function(e,t){(0,i.useEffect)(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}(r.current,n),r}}const br=function(e){function t(t,n){const{instance:r}=e(t).current;return(0,i.useImperativeHandle)(n,()=>r),null}return(0,i.forwardRef)(t)}(_r(gr(function(e,t){let{url:n,...i}=e;return mr(new cr.TileLayer(n,xr(i,t)),t)},function(e,t,n){!function(e,t,n){const{opacity:i,zIndex:r}=t;null!=i&&i!==n.opacity&&e.setOpacity(i),null!=r&&r!==n.zIndex&&e.setZIndex(r)}(e,t,n);const{url:i}=t;null!=i&&i!==n.url&&e.setUrl(i)})));const wr=function(e,t){return function(e){function t(t,n){const{instance:r,context:o}=e(t).current;return(0,i.useImperativeHandle)(n,()=>r),null==t.children?null:i.createElement(lr,{value:o},t.children)}return(0,i.forwardRef)(t)}(_r(gr(e,t)))}(function(e,t){let{position:n,...i}=e;const r=new cr.Marker(n,i);return mr(r,(o=t,a={overlayContainer:r},Object.freeze({...o,...a})));var o,a},function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),null!=t.icon&&t.icon!==n.icon&&e.setIcon(t.icon),null!=t.zIndexOffset&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),null!=t.opacity&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),null!=e.dragging&&t.draggable!==n.draggable&&(!0===t.draggable?e.dragging.enable():e.dragging.disable())}),jr=function(e,t){const n=function(e,t){return function(n,i){const r=ur(),o=e(xr(n,r),r);return vr(r.map,n.attribution),yr(o.current,n.eventHandlers),t(o.current,r,n,i),o}}(gr(e),t);return function(e){function t(t,n){const[r,o]=(0,i.useState)(!1),{instance:s}=e(t,o).current;(0,i.useImperativeHandle)(n,()=>s),(0,i.useEffect)(function(){r&&s.update()},[s,r,t.children]);const l=s._contentNode;return l?(0,a.createPortal)(t.children,l):null}return(0,i.forwardRef)(t)}(n)}(function(e,t){return mr(new cr.Popup(e,t.overlayContainer),t)},function(e,t,n,r){let{position:o}=n;(0,i.useEffect)(function(){const{instance:n}=e;function i(e){e.popup===n&&(n.update(),r(!0))}function a(e){e.popup===n&&r(!1)}return t.map.on({popupopen:i,popupclose:a}),null==t.overlayContainer?(null!=o&&n.setLatLng(o),n.openOn(t.map)):t.overlayContainer.bindPopup(n),function(){t.map.off({popupopen:i,popupclose:a}),t.overlayContainer?.unbindPopup(),t.map.removeLayer(n)}},[e,t,r,o])});delete dr().Icon.Default.prototype._getIconUrl,dr().Icon.Default.mergeOptions({iconRetinaUrl:"https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon-2x.png",iconUrl:"https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon.png",shadowUrl:"https://unpkg.com/leaflet@1.7.1/dist/images/marker-shadow.png"});const kr=e=>{let t;switch(e){case"online":t="https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-green.png";break;case"idle":t="https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-yellow.png";break;case"offline":t="https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-red.png";break;default:t="https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-blue.png"}return dr().icon({iconUrl:t,shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]})},Sr=[{id:"device-001",name:"SIM7000E-001",status:"online",battery:{level:85,status:"good"},signal:{strength:-65,status:"good"},location:{latitude:47.3769,longitude:8.5417,altitude:408},last_seen:(new Date).toISOString()},{id:"device-002",name:"SIM7000E-002",status:"idle",battery:{level:42,status:"low"},signal:{strength:-85,status:"fair"},location:{latitude:47.378,longitude:8.539,altitude:410},last_seen:new Date(Date.now()-36e5).toISOString()},{id:"device-003",name:"SIM7000E-003",status:"offline",battery:{level:12,status:"critical"},signal:{strength:-105,status:"poor"},location:{latitude:47.375,longitude:8.543,altitude:405},last_seen:new Date(Date.now()-864e5).toISOString()},{id:"device-004",name:"SIM7000E-004",status:"online",battery:{level:78,status:"good"},signal:{strength:-72,status:"good"},location:{latitude:47.379,longitude:8.545,altitude:412},last_seen:(new Date).toISOString()},{id:"device-005",name:"SIM7000E-005",status:"idle",battery:{level:35,status:"low"},signal:{strength:-90,status:"fair"},location:{latitude:47.373,longitude:8.538,altitude:407},last_seen:new Date(Date.now()-72e5).toISOString()}],Nr=()=>{const[e,t]=(0,i.useState)([]),[n,r]=(0,i.useState)(!0),[o,a]=(0,i.useState)("all"),[s,l]=(0,i.useState)([47.3769,8.5417]),[u,c]=(0,i.useState)(13);(0,i.useEffect)(()=>{(async()=>{try{setTimeout(()=>{t(Sr),r(!1)},1e3)}catch(e){console.error("Error fetching data:",e),r(!1)}})()},[]);const d=e=>new Date(e).toLocaleString(),h="all"===o?e:e.filter(e=>e.status===o),f=e=>{switch(e){case"good":return"text-success-500";case"low":return"text-warning-500";case"critical":return"text-danger-500";default:return"text-gray-500"}},p=e=>{switch(e){case"good":return"text-success-500";case"fair":return"text-warning-500";case"poor":return"text-danger-500";default:return"text-gray-500"}};return n?(0,oi.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary-500 border-t-transparent rounded-full animate-spin mx-auto"}),(0,oi.jsx)("p",{className:"mt-4 text-gray-600",children:"Loading map data..."})]})}):(0,oi.jsxs)("div",{className:"space-y-6",children:[(0,oi.jsxs)("div",{className:"flex justify-between items-center",children:[(0,oi.jsx)("h1",{className:"text-2xl font-semibold text-gray-800",children:"Device Map"}),(0,oi.jsxs)("div",{className:"flex space-x-2",children:[(0,oi.jsx)("button",{className:"px-3 py-1 rounded-md text-sm "+("all"===o?"bg-primary-500 text-white":"bg-gray-200 text-gray-700"),onClick:()=>a("all"),children:"All"}),(0,oi.jsx)("button",{className:"px-3 py-1 rounded-md text-sm "+("online"===o?"bg-success-500 text-white":"bg-gray-200 text-gray-700"),onClick:()=>a("online"),children:"Online"}),(0,oi.jsx)("button",{className:"px-3 py-1 rounded-md text-sm "+("idle"===o?"bg-warning-500 text-white":"bg-gray-200 text-gray-700"),onClick:()=>a("idle"),children:"Idle"}),(0,oi.jsx)("button",{className:"px-3 py-1 rounded-md text-sm "+("offline"===o?"bg-danger-500 text-white":"bg-gray-200 text-gray-700"),onClick:()=>a("offline"),children:"Offline"})]})]}),(0,oi.jsx)("div",{className:"dashboard-card h-[600px]",children:(0,oi.jsxs)(pr,{center:s,zoom:u,style:{height:"100%",width:"100%"},children:[(0,oi.jsx)(br,{attribution:'\xa9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),h.map(e=>(0,oi.jsx)(wr,{position:[e.location.latitude,e.location.longitude],icon:kr(e.status),children:(0,oi.jsx)(jr,{children:(0,oi.jsxs)("div",{className:"p-1",children:[(0,oi.jsx)("h3",{className:"font-semibold text-lg mb-2",children:(0,oi.jsx)(Oe,{to:`/devices/${e.id}`,className:"text-primary-600 hover:text-primary-700",children:e.name})}),(0,oi.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(yi,{className:`mr-2 ${f(e.battery.status)}`}),(0,oi.jsxs)("span",{children:["Battery: ",(0,oi.jsxs)("span",{className:f(e.battery.status),children:[e.battery.level,"%"]})]})]}),(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(Gi,{className:`mr-2 ${p(e.signal.status)}`}),(0,oi.jsxs)("span",{children:["Signal: ",(0,oi.jsxs)("span",{className:p(e.signal.status),children:[e.signal.strength," dBm"]})]})]}),(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(ji,{className:"mr-2 text-gray-500"}),(0,oi.jsxs)("span",{children:["Last seen: ",d(e.last_seen)]})]}),(0,oi.jsxs)("div",{className:"text-xs text-gray-500 mt-1",children:["Coordinates: ",e.location.latitude.toFixed(6),", ",e.location.longitude.toFixed(6)]}),(0,oi.jsxs)("div",{className:"text-xs text-gray-500",children:["Altitude: ",e.location.altitude," m"]})]})]})})},e.id))]})}),(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Device List"}),(0,oi.jsx)("div",{className:"overflow-x-auto",children:(0,oi.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,oi.jsx)("thead",{className:"bg-gray-50",children:(0,oi.jsxs)("tr",{children:[(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Device"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Coordinates"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Last Seen"})]})}),(0,oi.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:h.map(e=>(0,oi.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsx)(Oe,{to:`/devices/${e.id}`,className:"text-primary-600 hover:text-primary-700",children:e.name})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("div",{className:"h-2.5 w-2.5 rounded-full mr-2 "+("online"===e.status?"bg-success-500":"idle"===e.status?"bg-warning-500":"bg-danger-500")}),(0,oi.jsx)("span",{className:"capitalize "+("online"===e.status?"text-success-500":"idle"===e.status?"text-warning-500":"text-danger-500"),children:e.status})]})}),(0,oi.jsxs)("td",{className:"px-6 py-4 whitespace-nowrap text-gray-500",children:[e.location.latitude.toFixed(6),", ",e.location.longitude.toFixed(6)]}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-gray-500",children:d(e.last_seen)})]},e.id))})]})})]})]})},Lr=[{id:1,device_id:"device-001",device_name:"SIM7000E-001",level:"info",message:"Device connected to network",source:"connection_manager",timestamp:(new Date).toISOString()},{id:2,device_id:"device-001",device_name:"SIM7000E-001",level:"warning",message:"Battery level below 30%",source:"power_monitor",timestamp:new Date(Date.now()-18e5).toISOString()},{id:3,device_id:"device-002",device_name:"SIM7000E-002",level:"error",message:"Failed to send telemetry data",source:"data_transmitter",timestamp:new Date(Date.now()-36e5).toISOString()},{id:4,device_id:"device-003",device_name:"SIM7000E-003",level:"critical",message:"Device shutdown due to critical battery level",source:"power_manager",timestamp:new Date(Date.now()-864e5).toISOString()},{id:5,device_id:"device-004",device_name:"SIM7000E-004",level:"info",message:"GPS location updated",source:"gps_module",timestamp:new Date(Date.now()-72e5).toISOString()},{id:6,device_id:"device-001",device_name:"SIM7000E-001",level:"debug",message:"Reconnecting to cellular network",source:"connection_manager",timestamp:new Date(Date.now()-9e5).toISOString()},{id:7,device_id:"device-005",device_name:"SIM7000E-005",level:"warning",message:"Weak signal strength detected",source:"signal_monitor",timestamp:new Date(Date.now()-108e5).toISOString()},{id:8,device_id:"device-002",device_name:"SIM7000E-002",level:"info",message:"Firmware update available",source:"update_manager",timestamp:new Date(Date.now()-432e5).toISOString()},{id:9,device_id:"device-004",device_name:"SIM7000E-004",level:"error",message:"Temperature sensor reading out of range",source:"sensor_monitor",timestamp:new Date(Date.now()-144e5).toISOString()},{id:10,device_id:"device-003",device_name:"SIM7000E-003",level:"debug",message:"Device configuration updated",source:"config_manager",timestamp:new Date(Date.now()-1728e5).toISOString()}],Er=()=>{const[e,t]=(0,i.useState)([]),[n,r]=(0,i.useState)(!0),[o,a]=(0,i.useState)(""),[s,l]=(0,i.useState)("all"),[u,c]=(0,i.useState)("all"),[d,h]=(0,i.useState)(!1),[f,p]=(0,i.useState)(""),[m,g]=(0,i.useState)("");(0,i.useEffect)(()=>{(async()=>{try{setTimeout(()=>{t(Lr),r(!1)},1e3)}catch(e){console.error("Error fetching data:",e),r(!1)}})()},[]);const v=e=>{switch(e){case"debug":default:return"text-gray-500 bg-gray-100";case"info":return"text-blue-500 bg-blue-100";case"warning":return"text-yellow-500 bg-yellow-100";case"error":return"text-red-500 bg-red-100";case"critical":return"text-white bg-red-500"}},y=[...new Set(e.map(e=>e.device_id))],x=e.filter(e=>{const t=e.message.toLowerCase().includes(o.toLowerCase())||e.source.toLowerCase().includes(o.toLowerCase())||e.device_id.toLowerCase().includes(o.toLowerCase()),n="all"===s||e.level===s,i="all"===u||e.device_id===u;let r=!0;if(f){r=new Date(e.timestamp)>=new Date(f)}if(m){const t=new Date(e.timestamp),n=new Date(m);n.setHours(23,59,59,999),r=r&&t<=n}return t&&n&&i&&r});return n?(0,oi.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary-500 border-t-transparent rounded-full animate-spin mx-auto"}),(0,oi.jsx)("p",{className:"mt-4 text-gray-600",children:"Loading logs..."})]})}):(0,oi.jsxs)("div",{className:"space-y-6",children:[(0,oi.jsxs)("div",{className:"flex justify-between items-center",children:[(0,oi.jsx)("h1",{className:"text-2xl font-semibold text-gray-800",children:"System Logs"}),(0,oi.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 bg-primary-500 text-white rounded-md hover:bg-primary-600 transition-colors",onClick:()=>{alert("Exporting logs functionality would be implemented here")},children:[(0,oi.jsx)(Ni,{}),(0,oi.jsx)("span",{children:"Export Logs"})]})]}),(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-4",children:[(0,oi.jsxs)("div",{className:"relative",children:[(0,oi.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,oi.jsx)(Zi,{className:"text-gray-400"})}),(0,oi.jsx)("input",{type:"text",placeholder:"Search logs...",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:o,onChange:e=>a(e.target.value)})]}),(0,oi.jsxs)("div",{className:"relative",children:[(0,oi.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,oi.jsx)(Ci,{className:"text-gray-400"})}),(0,oi.jsxs)("select",{className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:s,onChange:e=>l(e.target.value),children:[(0,oi.jsx)("option",{value:"all",children:"All Levels"}),(0,oi.jsx)("option",{value:"debug",children:"Debug"}),(0,oi.jsx)("option",{value:"info",children:"Info"}),(0,oi.jsx)("option",{value:"warning",children:"Warning"}),(0,oi.jsx)("option",{value:"error",children:"Error"}),(0,oi.jsx)("option",{value:"critical",children:"Critical"})]})]}),(0,oi.jsxs)("div",{className:"relative",children:[(0,oi.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,oi.jsx)(Hi,{className:"text-gray-400"})}),(0,oi.jsxs)("select",{className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:u,onChange:e=>c(e.target.value),children:[(0,oi.jsx)("option",{value:"all",children:"All Devices"}),y.map(t=>{var n;return(0,oi.jsx)("option",{value:t,children:(null===(n=e.find(e=>e.device_id===t))||void 0===n?void 0:n.device_name)||t},t)})]})]}),(0,oi.jsxs)("button",{className:"flex items-center justify-center gap-2 px-4 py-2 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors "+(d?"opacity-50 cursor-not-allowed":""),onClick:()=>{h(!0),setTimeout(()=>{t(Lr),h(!1)},1e3)},disabled:d,children:[(0,oi.jsx)(Fi,{className:d?"animate-spin":""}),(0,oi.jsx)("span",{children:"Refresh"})]})]}),(0,oi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,oi.jsxs)("div",{className:"relative",children:[(0,oi.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,oi.jsx)(_i,{className:"text-gray-400"})}),(0,oi.jsx)("input",{type:"date",placeholder:"Start Date",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:f,onChange:e=>p(e.target.value)})]}),(0,oi.jsxs)("div",{className:"relative",children:[(0,oi.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,oi.jsx)(_i,{className:"text-gray-400"})}),(0,oi.jsx)("input",{type:"date",placeholder:"End Date",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:m,onChange:e=>g(e.target.value)})]})]})]}),(0,oi.jsx)("div",{className:"dashboard-card",children:0===x.length?(0,oi.jsx)("div",{className:"text-center py-8",children:(0,oi.jsx)("p",{className:"text-gray-500",children:"No logs found matching your criteria."})}):(0,oi.jsx)("div",{className:"overflow-x-auto",children:(0,oi.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,oi.jsx)("thead",{className:"bg-gray-50",children:(0,oi.jsxs)("tr",{children:[(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Timestamp"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Level"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Device"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Message"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Source"})]})}),(0,oi.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:x.map(e=>{return(0,oi.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:(t=e.timestamp,new Date(t).toLocaleString())}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsx)("span",{className:`px-2 py-1 text-xs font-medium rounded-full ${v(e.level)}`,children:e.level.toUpperCase()})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsx)(Oe,{to:`/devices/${e.device_id}`,className:"text-primary-600 hover:text-primary-700",children:e.device_name})}),(0,oi.jsx)("td",{className:"px-6 py-4 text-sm text-gray-900",children:e.message}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:e.source})]},e.id);var t})})]})})})]})},Cr=()=>{const[e,t]=(0,i.useState)("SolarBank IoT Dashboard"),[n,r]=(0,i.useState)("Europe/Zurich"),[o,a]=(0,i.useState)("DD/MM/YYYY HH:mm:ss"),[s,l]=(0,i.useState)(""),[u,c]=(0,i.useState)(47.3769),[d,h]=(0,i.useState)(8.5417),[f,p]=(0,i.useState)(13),[m,g]=(0,i.useState)(!1),[v,y]=(0,i.useState)(""),[x,_]=(0,i.useState)(30),[b,w]=(0,i.useState)(15),[j,k]=(0,i.useState)(24),[S,N]=(0,i.useState)(60),[L,E]=(0,i.useState)(!1),[C,P]=(0,i.useState)(!1);return(0,oi.jsxs)("div",{className:"space-y-6",children:[(0,oi.jsxs)("div",{className:"flex justify-between items-center",children:[(0,oi.jsx)("h1",{className:"text-2xl font-semibold text-gray-800",children:"Settings"}),(0,oi.jsxs)("div",{className:"flex space-x-2",children:[(0,oi.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors",onClick:()=>{const t={general:{siteName:e,timezone:n,dateFormat:o},map:{mapboxToken:s,defaultLatitude:u,defaultLongitude:d,defaultZoom:f},notifications:{emailNotifications:m,emailAddress:v,lowBatteryThreshold:x,criticalBatteryThreshold:b,offlineAlertTimeout:j},api:{apiRefreshInterval:S}},i=new Blob([JSON.stringify(t,null,2)],{type:"application/json"}),r=URL.createObjectURL(i),a=document.createElement("a");a.href=r,a.download="solarbank-settings.json",document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)},children:[(0,oi.jsx)(Ni,{}),(0,oi.jsx)("span",{children:"Backup"})]}),(0,oi.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors",onClick:e=>{alert("Restore settings functionality would be implemented here")},children:[(0,oi.jsx)(qi,{}),(0,oi.jsx)("span",{children:"Restore"})]})]})]}),C&&(0,oi.jsx)("div",{className:"bg-success-100 border border-success-200 text-success-700 px-4 py-3 rounded relative",role:"alert",children:(0,oi.jsx)("span",{className:"block sm:inline",children:"Settings saved successfully!"})}),(0,oi.jsxs)("form",{onSubmit:e=>{e.preventDefault(),E(!0),setTimeout(()=>{E(!1),P(!0),setTimeout(()=>{P(!1)},3e3)},1e3)},children:[(0,oi.jsxs)("div",{className:"dashboard-card mb-6",children:[(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"General Settings"}),(0,oi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"siteName",className:"block text-sm font-medium text-gray-700 mb-1",children:"Site Name"}),(0,oi.jsx)("input",{type:"text",id:"siteName",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:e,onChange:e=>t(e.target.value)})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"timezone",className:"block text-sm font-medium text-gray-700 mb-1",children:"Timezone"}),(0,oi.jsxs)("select",{id:"timezone",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:n,onChange:e=>r(e.target.value),children:[(0,oi.jsx)("option",{value:"Europe/Zurich",children:"Europe/Zurich"}),(0,oi.jsx)("option",{value:"Europe/London",children:"Europe/London"}),(0,oi.jsx)("option",{value:"America/New_York",children:"America/New_York"}),(0,oi.jsx)("option",{value:"America/Los_Angeles",children:"America/Los_Angeles"}),(0,oi.jsx)("option",{value:"Asia/Tokyo",children:"Asia/Tokyo"}),(0,oi.jsx)("option",{value:"Australia/Sydney",children:"Australia/Sydney"})]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"dateFormat",className:"block text-sm font-medium text-gray-700 mb-1",children:"Date Format"}),(0,oi.jsxs)("select",{id:"dateFormat",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:o,onChange:e=>a(e.target.value),children:[(0,oi.jsx)("option",{value:"DD/MM/YYYY HH:mm:ss",children:"DD/MM/YYYY HH:mm:ss"}),(0,oi.jsx)("option",{value:"MM/DD/YYYY HH:mm:ss",children:"MM/DD/YYYY HH:mm:ss"}),(0,oi.jsx)("option",{value:"YYYY-MM-DD HH:mm:ss",children:"YYYY-MM-DD HH:mm:ss"}),(0,oi.jsx)("option",{value:"DD.MM.YYYY HH:mm:ss",children:"DD.MM.YYYY HH:mm:ss"})]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"apiRefreshInterval",className:"block text-sm font-medium text-gray-700 mb-1",children:"Dashboard Refresh Interval (seconds)"}),(0,oi.jsx)("input",{type:"number",id:"apiRefreshInterval",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:S,onChange:e=>N(parseInt(e.target.value)),min:"10",max:"3600"})]})]})]}),(0,oi.jsxs)("div",{className:"dashboard-card mb-6",children:[(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Map Settings"}),(0,oi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,oi.jsxs)("div",{className:"md:col-span-2",children:[(0,oi.jsx)("label",{htmlFor:"mapboxToken",className:"block text-sm font-medium text-gray-700 mb-1",children:"Mapbox Access Token"}),(0,oi.jsx)("input",{type:"text",id:"mapboxToken",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:s,onChange:e=>l(e.target.value),placeholder:"Enter your Mapbox access token"}),(0,oi.jsxs)("p",{className:"mt-1 text-xs text-gray-500",children:["Leave empty to use OpenStreetMap. Get a token at ",(0,oi.jsx)("a",{href:"https://www.mapbox.com/",className:"text-primary-600 hover:text-primary-700",target:"_blank",rel:"noopener noreferrer",children:"mapbox.com"})]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"defaultLatitude",className:"block text-sm font-medium text-gray-700 mb-1",children:"Default Latitude"}),(0,oi.jsx)("input",{type:"number",id:"defaultLatitude",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:u,onChange:e=>c(parseFloat(e.target.value)),step:"0.000001"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"defaultLongitude",className:"block text-sm font-medium text-gray-700 mb-1",children:"Default Longitude"}),(0,oi.jsx)("input",{type:"number",id:"defaultLongitude",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:d,onChange:e=>h(parseFloat(e.target.value)),step:"0.000001"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"defaultZoom",className:"block text-sm font-medium text-gray-700 mb-1",children:"Default Zoom Level"}),(0,oi.jsx)("input",{type:"number",id:"defaultZoom",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:f,onChange:e=>p(parseInt(e.target.value)),min:"1",max:"18"})]})]})]}),(0,oi.jsxs)("div",{className:"dashboard-card mb-6",children:[(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Notification Settings"}),(0,oi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,oi.jsx)("div",{className:"md:col-span-2",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("input",{type:"checkbox",id:"emailNotifications",className:"h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded",checked:m,onChange:e=>g(e.target.checked)}),(0,oi.jsx)("label",{htmlFor:"emailNotifications",className:"ml-2 block text-sm text-gray-700",children:"Enable Email Notifications"})]})}),m&&(0,oi.jsxs)("div",{className:"md:col-span-2",children:[(0,oi.jsx)("label",{htmlFor:"emailAddress",className:"block text-sm font-medium text-gray-700 mb-1",children:"Email Address"}),(0,oi.jsx)("input",{type:"email",id:"emailAddress",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:v,onChange:e=>y(e.target.value),placeholder:"Enter email address for notifications"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"lowBatteryThreshold",className:"block text-sm font-medium text-gray-700 mb-1",children:"Low Battery Threshold (%)"}),(0,oi.jsx)("input",{type:"number",id:"lowBatteryThreshold",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:x,onChange:e=>_(parseInt(e.target.value)),min:"0",max:"100"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"criticalBatteryThreshold",className:"block text-sm font-medium text-gray-700 mb-1",children:"Critical Battery Threshold (%)"}),(0,oi.jsx)("input",{type:"number",id:"criticalBatteryThreshold",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:b,onChange:e=>w(parseInt(e.target.value)),min:"0",max:"100"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"offlineAlertTimeout",className:"block text-sm font-medium text-gray-700 mb-1",children:"Offline Alert Timeout (hours)"}),(0,oi.jsx)("input",{type:"number",id:"offlineAlertTimeout",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",value:j,onChange:e=>k(parseInt(e.target.value)),min:"1",max:"72"})]})]})]}),(0,oi.jsx)("div",{className:"flex justify-end",children:(0,oi.jsxs)("button",{type:"submit",className:"flex items-center gap-2 px-4 py-2 bg-primary-500 text-white rounded-md hover:bg-primary-600 transition-colors "+(L?"opacity-50 cursor-not-allowed":""),disabled:L,children:[L?(0,oi.jsx)(Fi,{className:"animate-spin"}):(0,oi.jsx)(Ui,{}),(0,oi.jsx)("span",{children:L?"Saving...":"Save Settings"})]})})]})]})};delete dr().Icon.Default.prototype._getIconUrl,dr().Icon.Default.mergeOptions({iconRetinaUrl:"https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon-2x.png",iconUrl:"https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon.png",shadowUrl:"https://unpkg.com/leaflet@1.7.1/dist/images/marker-shadow.png"});const Pr=[{id:"device-001",name:"SIM7000E-001",description:"Solar panel monitoring device",model:"SIM7000E",firmware_version:"1.2.3",status:"online",battery:{level:85,status:"good"},signal:{strength:-65,status:"good"},location:{latitude:47.3769,longitude:8.5417,altitude:408},last_seen:(new Date).toISOString(),created_at:new Date(Date.now()-7776e6).toISOString()},{id:"device-002",name:"SIM7000E-002",description:"Wind turbine monitoring device",model:"SIM7000E",firmware_version:"1.2.3",status:"idle",battery:{level:42,status:"low"},signal:{strength:-85,status:"fair"},location:{latitude:47.378,longitude:8.539,altitude:410},last_seen:new Date(Date.now()-36e5).toISOString(),created_at:new Date(Date.now()-15552e6).toISOString()}],Tr=[{id:1,device_id:"device-001",latitude:47.3769,longitude:8.5417,altitude:408,battery_level:85,signal_strength:-65,temperature:24.5,timestamp:(new Date).toISOString()},{id:2,device_id:"device-001",latitude:47.3769,longitude:8.5417,altitude:408,battery_level:86,signal_strength:-64,temperature:24.2,timestamp:new Date(Date.now()-36e5).toISOString()},{id:3,device_id:"device-001",latitude:47.377,longitude:8.5418,altitude:408,battery_level:87,signal_strength:-63,temperature:23.8,timestamp:new Date(Date.now()-72e5).toISOString()}],Or=[{id:1,device_id:"device-001",level:"info",message:"Device connected to network",source:"connection_manager",timestamp:(new Date).toISOString()},{id:2,device_id:"device-001",level:"warning",message:"Battery level below 90%",source:"power_monitor",timestamp:new Date(Date.now()-18e5).toISOString()},{id:3,device_id:"device-001",level:"info",message:"GPS location updated",source:"gps_module",timestamp:new Date(Date.now()-36e5).toISOString()}],zr=()=>{const{id:e}=function(){let{matches:e}=i.useContext(K),t=e[e.length-1];return t?t.params:{}}(),t=te(),[n,r]=(0,i.useState)(null),[o,a]=(0,i.useState)([]),[s,l]=(0,i.useState)([]),[u,c]=(0,i.useState)(!0),[d,h]=(0,i.useState)("overview"),[f,p]=(0,i.useState)(!1),[m,g]=(0,i.useState)(""),[v,y]=(0,i.useState)(""),[x,_]=(0,i.useState)(!1),[b,w]=(0,i.useState)(!1);(0,i.useEffect)(()=>{j()},[e]);const j=async()=>{try{c(!0);const t=localStorage.getItem("token"),n=await fetch(`/api/devices/${e}`,{headers:{Authorization:`Bearer ${t}`}});if(n.ok){const t=await n.json(),i={...t,status:k(t),battery:S(t),signal:N(t),location:{latitude:t.latitude||47.3769,longitude:t.longitude||8.5417,altitude:t.altitude||408}};r(i);const o=Tr.filter(t=>t.device_id===e),s=Or.filter(t=>t.device_id===e);a(o),l(s)}else if(404===n.status){const t=Pr.find(t=>t.id===e);if(t){r(t);const n=Tr.filter(t=>t.device_id===e),i=Or.filter(t=>t.device_id===e);a(n),l(i)}else r(null)}else console.error("Failed to fetch device:",n.status),r(null)}catch(t){console.error("Error fetching device data:",t);const n=Pr.find(t=>t.id===e);if(n){r(n);const t=Tr.filter(t=>t.device_id===e),i=Or.filter(t=>t.device_id===e);a(t),l(i)}else r(null)}finally{c(!1)}},k=e=>{if(!e.is_active)return"offline";if(!e.last_seen)return"offline";const t=new Date(e.last_seen),n=(new Date-t)/6e4;return n<5?"online":n<30?"idle":"offline"},S=e=>{const t=e.battery_level||0;let n="good";return t<20?n="critical":t<50&&(n="low"),{level:t,status:n}},N=e=>{const t=e.signal_strength||-100;let n="poor";return t>-70?n="good":t>-85&&(n="fair"),{strength:t,status:n}},L=e=>new Date(e).toLocaleString(),E=e=>{switch(e){case"good":return"text-success-500";case"low":return"text-warning-500";case"critical":return"text-danger-500";default:return"text-gray-500"}},C=e=>{switch(e){case"good":return"text-success-500";case"fair":return"text-warning-500";case"poor":return"text-danger-500";default:return"text-gray-500"}},P=e=>{switch(e){case"debug":default:return"text-gray-500 bg-gray-100";case"info":return"text-blue-500 bg-blue-100";case"warning":return"text-yellow-500 bg-yellow-100";case"error":return"text-red-500 bg-red-100";case"critical":return"text-white bg-red-500"}},T=async(e,t)=>{try{await navigator.clipboard.writeText(e),g(t),setTimeout(()=>g(""),2e3)}catch(n){console.error("Failed to copy: ",n)}},O=()=>{const e=window.location.origin;return{telemetry:`${e}/api/data/${null===n||void 0===n?void 0:n.id}`,status:`${e}/api/devices/${null===n||void 0===n?void 0:n.id}`,logs:`${e}/api/logs/${null===n||void 0===n?void 0:n.id}`}},z=e=>{y(v===e?"":e)},M=e=>{const t={...e,status:k(e),battery:S(e),signal:N(e),location:{latitude:e.latitude||0,longitude:e.longitude||0,altitude:e.altitude||0}};r(t)},I=()=>({telemetry:{request:{method:"POST",headers:{"Content-Type":"application/json"},body:{device_id:(null===n||void 0===n?void 0:n.id)||"LILYGO_001",device_name:(null===n||void 0===n?void 0:n.name)||"Zurich_Station_1",firmware:"1.1.0",temp:24.3,hum:65.2,solar_volt:12.8,battery_volt:3.8,signal:-65,gps_fixed:!0,latitude:47.3769,longitude:8.5417,altitude:408,satellites:8,timestamp:Math.floor(Date.now()/1e3)}},response:{status:201,body:{id:123,device_id:(null===n||void 0===n?void 0:n.id)||"LILYGO_001",latitude:47.3769,longitude:8.5417,altitude:408,temperature:24.3,humidity:65.2,solar_voltage:12.8,battery_level:85.5,battery_voltage:3.8,signal_strength:-65,gps_fixed:!0,satellites:8,timestamp:(new Date).toISOString(),device_timestamp:(new Date).toISOString()}}},status:{request:{method:"PUT",headers:{"Content-Type":"application/json",Authorization:"Bearer your-token-here"},body:{name:(null===n||void 0===n?void 0:n.name)||"Your Device Name",firmware_version:"1.1.0",is_active:!0,battery_level:87.2,signal_strength:-62}},response:{status:200,body:{id:(null===n||void 0===n?void 0:n.id)||"your-device-id",name:(null===n||void 0===n?void 0:n.name)||"Your Device Name",model:"LILYGO T-A7670G",firmware_version:"1.1.0",is_active:!0,battery_level:87.2,signal_strength:-62,last_seen:(new Date).toISOString(),created_at:(new Date).toISOString(),updated_at:(new Date).toISOString()}}},logs:{request:{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer your-token-here"},body:{device_id:(null===n||void 0===n?void 0:n.id)||"LILYGO_001",level:"info",message:"Device connected to cellular network",source:"network_manager",timestamp:(new Date).toISOString(),metadata:{network_type:"LTE",signal_quality:"good",operator:"Swisscom",modem_model:"A7670G"}}},response:{status:201,body:{id:456,device_id:(null===n||void 0===n?void 0:n.id)||"LILYGO_001",level:"info",message:"Device connected to cellular network",source:"network_manager",timestamp:(new Date).toISOString(),metadata:{network_type:"LTE",signal_quality:"good",operator:"Swisscom",modem_model:"A7670G"}}}}});return u?(0,oi.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary-500 border-t-transparent rounded-full animate-spin mx-auto"}),(0,oi.jsx)("p",{className:"mt-4 text-gray-600",children:"Loading device data..."})]})}):n?(0,oi.jsxs)("div",{className:"space-y-6",children:[(0,oi.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-4",children:[(0,oi.jsx)(Oe,{to:"/devices",className:"p-2 text-gray-500 rounded-full hover:bg-gray-100",children:(0,oi.jsx)(vi,{className:"w-5 h-5"})}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("h1",{className:"text-2xl font-semibold text-gray-800",children:n.name}),(0,oi.jsx)("p",{className:"text-gray-500",children:n.description||"No description"})]})]}),(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors "+(f?"opacity-50 cursor-not-allowed":""),onClick:async()=>{p(!0),await j(),p(!1)},disabled:f,children:[(0,oi.jsx)(Fi,{className:f?"animate-spin":""}),(0,oi.jsx)("span",{children:"Refresh"})]}),(0,oi.jsxs)("button",{onClick:()=>{_(!0)},className:"flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors",children:[(0,oi.jsx)(Ei,{}),(0,oi.jsx)("span",{children:"Edit"})]}),(0,oi.jsxs)("button",{onClick:()=>{w(!0)},className:"flex items-center gap-2 px-4 py-2 bg-danger-500 text-white rounded-md hover:bg-danger-600 transition-colors",children:[(0,oi.jsx)($i,{}),(0,oi.jsx)("span",{children:"Delete"})]})]})]}),(0,oi.jsx)("div",{className:"dashboard-card",children:(0,oi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[(0,oi.jsxs)("div",{className:"flex items-center p-4 bg-gray-50 rounded-lg",children:[(0,oi.jsx)("div",{className:"h-3 w-3 rounded-full mr-2 "+("online"===n.status?"bg-success-500":"idle"===n.status?"bg-warning-500":"bg-danger-500")}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Status"}),(0,oi.jsx)("p",{className:`text-lg font-semibold capitalize ${(e=>{switch(e){case"online":return"text-success-500";case"idle":return"text-warning-500";case"offline":return"text-danger-500";default:return"text-gray-500"}})(n.status)}`,children:n.status})]})]}),(0,oi.jsxs)("div",{className:"flex items-center p-4 bg-gray-50 rounded-lg",children:[(0,oi.jsx)(yi,{className:`w-6 h-6 mr-2 ${E(n.battery.status)}`}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Battery"}),(0,oi.jsxs)("p",{className:`text-lg font-semibold ${E(n.battery.status)}`,children:[n.battery.level,"%"]})]})]}),(0,oi.jsxs)("div",{className:"flex items-center p-4 bg-gray-50 rounded-lg",children:[(0,oi.jsx)(Gi,{className:`w-6 h-6 mr-2 ${C(n.signal.status)}`}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Signal"}),(0,oi.jsxs)("p",{className:`text-lg font-semibold ${C(n.signal.status)}`,children:[n.signal.strength," dBm"]})]})]}),(0,oi.jsxs)("div",{className:"flex items-center p-4 bg-gray-50 rounded-lg",children:[(0,oi.jsx)(ji,{className:"w-6 h-6 mr-2 text-gray-500"}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Last Seen"}),(0,oi.jsx)("p",{className:"text-lg font-semibold text-gray-800",children:L(n.last_seen)})]})]})]})}),(0,oi.jsx)("div",{className:"border-b border-gray-200",children:(0,oi.jsxs)("nav",{className:"-mb-px flex space-x-8",children:[(0,oi.jsx)("button",{className:"py-4 px-1 border-b-2 font-medium text-sm "+("overview"===d?"border-primary-500 text-primary-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"),onClick:()=>h("overview"),children:"Overview"}),(0,oi.jsx)("button",{className:"py-4 px-1 border-b-2 font-medium text-sm "+("telemetry"===d?"border-primary-500 text-primary-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"),onClick:()=>h("telemetry"),children:"Telemetry"}),(0,oi.jsx)("button",{className:"py-4 px-1 border-b-2 font-medium text-sm "+("logs"===d?"border-primary-500 text-primary-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"),onClick:()=>h("logs"),children:"Logs"}),(0,oi.jsx)("button",{className:"py-4 px-1 border-b-2 font-medium text-sm "+("settings"===d?"border-primary-500 text-primary-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"),onClick:()=>h("settings"),children:"Settings"})]})}),(0,oi.jsxs)("div",{children:["overview"===d&&(0,oi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Device Information"}),(0,oi.jsxs)("div",{className:"space-y-4",children:[(0,oi.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Device ID"}),(0,oi.jsx)("p",{className:"font-medium",children:n.id})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Model"}),(0,oi.jsx)("p",{className:"font-medium",children:n.model})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Firmware Version"}),(0,oi.jsxs)("p",{className:"font-medium",children:["v",n.firmware_version]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Created At"}),(0,oi.jsx)("p",{className:"font-medium",children:L(n.created_at)})]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-sm text-gray-500",children:"Description"}),(0,oi.jsx)("p",{className:"font-medium",children:n.description||"No description"})]})]})]}),(0,oi.jsxs)("div",{className:"dashboard-card h-[300px]",children:[(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Location"}),(0,oi.jsxs)(pr,{center:[n.location.latitude,n.location.longitude],zoom:15,style:{height:"calc(100% - 2rem)",width:"100%"},children:[(0,oi.jsx)(br,{attribution:'\xa9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,oi.jsx)(wr,{position:[n.location.latitude,n.location.longitude],children:(0,oi.jsx)(jr,{children:(0,oi.jsxs)("div",{className:"p-1",children:[(0,oi.jsx)("h3",{className:"font-semibold",children:n.name}),(0,oi.jsxs)("p",{className:"text-xs text-gray-500",children:[n.location.latitude.toFixed(6),", ",n.location.longitude.toFixed(6)]}),(0,oi.jsxs)("p",{className:"text-xs text-gray-500",children:["Altitude: ",n.location.altitude," m"]})]})})})]})]}),(0,oi.jsxs)("div",{className:"dashboard-card md:col-span-2",children:[(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Recent Activity"}),(0,oi.jsxs)("div",{className:"space-y-4",children:[s.slice(0,5).map(e=>(0,oi.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-gray-50 rounded-lg",children:[(0,oi.jsx)("div",{className:"p-2 rounded-full "+("info"===e.level?"bg-blue-100 text-blue-500":"warning"===e.level?"bg-yellow-100 text-yellow-500":"error"===e.level?"bg-red-100 text-red-500":"critical"===e.level?"bg-red-500 text-white":"bg-gray-100 text-gray-500"),children:(0,oi.jsx)(Ti,{className:"w-5 h-5"})}),(0,oi.jsxs)("div",{className:"flex-1",children:[(0,oi.jsxs)("div",{className:"flex justify-between",children:[(0,oi.jsx)("p",{className:"font-medium text-gray-800",children:e.message}),(0,oi.jsx)("span",{className:"text-sm text-gray-500",children:L(e.timestamp)})]}),(0,oi.jsxs)("p",{className:"text-sm text-gray-500",children:["Source: ",e.source]})]})]},e.id)),0===s.length&&(0,oi.jsx)("p",{className:"text-center py-4 text-gray-500",children:"No recent activity"})]})]})]}),"telemetry"===d&&(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Telemetry Data"}),0===o.length?(0,oi.jsx)("p",{className:"text-center py-4 text-gray-500",children:"No telemetry data available"}):(0,oi.jsx)("div",{className:"overflow-x-auto",children:(0,oi.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,oi.jsx)("thead",{className:"bg-gray-50",children:(0,oi.jsxs)("tr",{children:[(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Timestamp"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Location"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Battery"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Signal"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Temperature"})]})}),(0,oi.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:o.map(e=>(0,oi.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:L(e.timestamp)}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(Ii,{className:"mr-2 text-gray-500"}),(0,oi.jsxs)("span",{className:"text-gray-800",children:[e.latitude.toFixed(6),", ",e.longitude.toFixed(6)]})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(yi,{className:"mr-2 text-gray-500"}),(0,oi.jsxs)("span",{className:"text-gray-800",children:[e.battery_level,"%"]})]})}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)(Gi,{className:"mr-2 text-gray-500"}),(0,oi.jsxs)("span",{className:"text-gray-800",children:[e.signal_strength," dBm"]})]})}),(0,oi.jsxs)("td",{className:"px-6 py-4 whitespace-nowrap text-gray-800",children:[e.temperature,"\xb0C"]})]},e.id))})]})})]}),"logs"===d&&(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Device Logs"}),0===s.length?(0,oi.jsx)("p",{className:"text-center py-4 text-gray-500",children:"No logs available"}):(0,oi.jsx)("div",{className:"overflow-x-auto",children:(0,oi.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,oi.jsx)("thead",{className:"bg-gray-50",children:(0,oi.jsxs)("tr",{children:[(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Timestamp"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Level"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Message"}),(0,oi.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Source"})]})}),(0,oi.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map(e=>(0,oi.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:L(e.timestamp)}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,oi.jsx)("span",{className:`px-2 py-1 text-xs font-medium rounded-full ${P(e.level)}`,children:e.level.toUpperCase()})}),(0,oi.jsx)("td",{className:"px-6 py-4 text-sm text-gray-900",children:e.message}),(0,oi.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:e.source})]},e.id))})]})})]}),"settings"===d&&(0,oi.jsxs)("div",{className:"space-y-6",children:[(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,oi.jsx)(Hi,{className:"w-5 h-5 text-primary-500"}),(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800",children:"API Configuration"})]}),(0,oi.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:"Configure your device to send data to these endpoints. Copy the URLs below and configure them in your IoT device."}),(0,oi.jsxs)("div",{className:"space-y-4",children:[(0,oi.jsxs)("div",{className:"p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,oi.jsx)("h3",{className:"font-medium text-blue-900",children:"IoT Device Data Endpoint (LILYGO Format)"}),(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsx)("span",{className:"text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded",children:"POST"}),(0,oi.jsxs)("button",{onClick:()=>z("telemetry"),className:"flex items-center gap-1 px-2 py-1 text-blue-600 hover:text-blue-800 transition-colors",children:[(0,oi.jsx)(ki,{size:14}),"telemetry"===v?(0,oi.jsx)(wi,{size:14}):(0,oi.jsx)(bi,{size:14})]})]})]}),(0,oi.jsx)("p",{className:"text-sm text-blue-700 mb-3",children:"Send LILYGO T-A7670G device data including temperature, humidity, solar voltage, GPS and battery info"}),(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,oi.jsxs)("code",{className:"flex-1 p-2 bg-white border border-blue-300 rounded text-sm font-mono text-gray-800 overflow-x-auto",children:[O().telemetry,"/iot"]}),(0,oi.jsxs)("button",{onClick:()=>T(O().telemetry,"telemetry"),className:"flex items-center gap-1 px-3 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:[(0,oi.jsx)(Si,{size:14}),"telemetry"===m?"Copied!":"Copy"]})]}),"telemetry"===v&&(0,oi.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,oi.jsxs)("div",{className:"bg-white border border-blue-300 rounded-lg p-4",children:[(0,oi.jsxs)("h4",{className:"font-medium text-gray-800 mb-2 flex items-center gap-2",children:[(0,oi.jsx)("span",{className:"w-2 h-2 bg-green-500 rounded-full"}),"Request Example"]}),(0,oi.jsxs)("div",{className:"space-y-3",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:"Headers:"}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:JSON.stringify(I().telemetry.request.headers,null,2)})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:"Body (JSON):"}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:JSON.stringify(I().telemetry.request.body,null,2)})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:"cURL Example:"}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:`curl -X POST "${O().telemetry}/iot" \\\n -H "Content-Type: application/json" \\\n -d '${JSON.stringify(I().telemetry.request.body)}'`})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:"Arduino/ESP32 Example:"}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:`String json = "{";\njson += "\\"device_id\\":\\"${(null===n||void 0===n?void 0:n.id)||"LILYGO_001"}\\",";\njson += "\\"temp\\":" + String(temperature) + ",";\njson += "\\"hum\\":" + String(humidity) + ",";\njson += "\\"solar_volt\\":" + String(solarVoltage) + ",";\njson += "\\"battery_volt\\":" + String(batteryVoltage) + ",";\njson += "\\"signal\\":" + String(signalStrength) + ",";\njson += "\\"gps_fixed\\":" + (gpsFixed ? "true" : "false") + ",";\njson += "\\"latitude\\":" + String(latitude, 6) + ",";\njson += "\\"longitude\\":" + String(longitude, 6) + ",";\njson += "\\"timestamp\\":" + String(millis() / 1000);\njson += "}";\n\n// Send via HTTP POST to ${O().telemetry}/iot`})]})]})]}),(0,oi.jsxs)("div",{className:"bg-white border border-blue-300 rounded-lg p-4",children:[(0,oi.jsxs)("h4",{className:"font-medium text-gray-800 mb-2 flex items-center gap-2",children:[(0,oi.jsx)("span",{className:"w-2 h-2 bg-blue-500 rounded-full"}),"Response Example"]}),(0,oi.jsx)("div",{className:"space-y-3",children:(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:["Status: ",I().telemetry.response.status]}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:JSON.stringify(I().telemetry.response.body,null,2)})]})})]}),(0,oi.jsxs)("div",{className:"bg-white border border-blue-300 rounded-lg p-4",children:[(0,oi.jsx)("h4",{className:"font-medium text-gray-800 mb-2",children:"LILYGO Field Descriptions"}),(0,oi.jsxs)("div",{className:"text-xs space-y-1",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"device_id:"})," Unique device identifier (required)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"device_name:"})," Human-readable device name (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"firmware:"})," Device firmware version (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"temp:"})," Temperature in Celsius (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"hum:"})," Humidity percentage (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"solar_volt:"})," Solar panel voltage (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"battery_volt:"})," Battery voltage (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"signal:"})," Cellular signal in dBm (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"gps_fixed:"})," GPS fix status boolean (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"latitude/longitude:"})," GPS coordinates (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"altitude:"})," Elevation in meters (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"satellites:"})," Number of GPS satellites (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"timestamp:"})," Unix timestamp from device (optional)"]})]}),(0,oi.jsxs)("div",{className:"mt-3 p-2 bg-blue-50 rounded text-xs",children:[(0,oi.jsx)("strong",{children:"Note:"})," This endpoint automatically converts battery voltage to percentage, updates device information, and handles the LILYGO device data format."]})]})]})]}),(0,oi.jsxs)("div",{className:"p-4 bg-green-50 border border-green-200 rounded-lg",children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,oi.jsx)("h3",{className:"font-medium text-green-900",children:"Device Status Endpoint"}),(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsx)("span",{className:"text-xs bg-green-100 text-green-800 px-2 py-1 rounded",children:"PUT"}),(0,oi.jsxs)("button",{onClick:()=>z("status"),className:"flex items-center gap-1 px-2 py-1 text-green-600 hover:text-green-800 transition-colors",children:[(0,oi.jsx)(ki,{size:14}),"status"===v?(0,oi.jsx)(wi,{size:14}):(0,oi.jsx)(bi,{size:14})]})]})]}),(0,oi.jsx)("p",{className:"text-sm text-green-700 mb-3",children:"Update device configuration and status information"}),(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,oi.jsx)("code",{className:"flex-1 p-2 bg-white border border-green-300 rounded text-sm font-mono text-gray-800 overflow-x-auto",children:O().status}),(0,oi.jsxs)("button",{onClick:()=>T(O().status,"status"),className:"flex items-center gap-1 px-3 py-2 bg-green-600 text-white rounded hover:bg-green-700 transition-colors",children:[(0,oi.jsx)(Si,{size:14}),"status"===m?"Copied!":"Copy"]})]}),"status"===v&&(0,oi.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,oi.jsxs)("div",{className:"bg-white border border-green-300 rounded-lg p-4",children:[(0,oi.jsxs)("h4",{className:"font-medium text-gray-800 mb-2 flex items-center gap-2",children:[(0,oi.jsx)("span",{className:"w-2 h-2 bg-green-500 rounded-full"}),"Request Example"]}),(0,oi.jsxs)("div",{className:"space-y-3",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:"Headers:"}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:JSON.stringify(I().status.request.headers,null,2)})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:"Body (JSON):"}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:JSON.stringify(I().status.request.body,null,2)})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:"cURL Example:"}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:`curl -X PUT "${O().status}" \\\n -H "Content-Type: application/json" \\\n -H "Device-ID: ${(null===n||void 0===n?void 0:n.id)||"your-device-id"}" \\\n -d '${JSON.stringify(I().status.request.body)}'`})]})]})]}),(0,oi.jsxs)("div",{className:"bg-white border border-green-300 rounded-lg p-4",children:[(0,oi.jsxs)("h4",{className:"font-medium text-gray-800 mb-2 flex items-center gap-2",children:[(0,oi.jsx)("span",{className:"w-2 h-2 bg-blue-500 rounded-full"}),"Response Example"]}),(0,oi.jsx)("div",{className:"space-y-3",children:(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:["Status: ",I().status.response.status]}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:JSON.stringify(I().status.response.body,null,2)})]})})]}),(0,oi.jsxs)("div",{className:"bg-white border border-green-300 rounded-lg p-4",children:[(0,oi.jsx)("h4",{className:"font-medium text-gray-800 mb-2",children:"Field Descriptions"}),(0,oi.jsxs)("div",{className:"text-xs space-y-1",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"battery_level:"})," Current battery percentage (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"signal_strength:"})," Cellular signal strength in dBm (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"firmware_version:"})," Current firmware version string (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"is_active:"})," Device active status boolean (optional)"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"last_seen:"})," Last communication timestamp (optional)"]})]})]})]})]}),(0,oi.jsxs)("div",{className:"p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,oi.jsx)("h3",{className:"font-medium text-yellow-900",children:"Device Logs Endpoint"}),(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsx)("span",{className:"text-xs bg-yellow-100 text-yellow-800 px-2 py-1 rounded",children:"POST"}),(0,oi.jsxs)("button",{onClick:()=>z("logs"),className:"flex items-center gap-1 px-2 py-1 text-yellow-600 hover:text-yellow-800 transition-colors",children:[(0,oi.jsx)(ki,{size:14}),"logs"===v?(0,oi.jsx)(wi,{size:14}):(0,oi.jsx)(bi,{size:14})]})]})]}),(0,oi.jsx)("p",{className:"text-sm text-yellow-700 mb-3",children:"Send device logs, errors, and diagnostic information"}),(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,oi.jsx)("code",{className:"flex-1 p-2 bg-white border border-yellow-300 rounded text-sm font-mono text-gray-800 overflow-x-auto",children:O().logs}),(0,oi.jsxs)("button",{onClick:()=>T(O().logs,"logs"),className:"flex items-center gap-1 px-3 py-2 bg-yellow-600 text-white rounded hover:bg-yellow-700 transition-colors",children:[(0,oi.jsx)(Si,{size:14}),"logs"===m?"Copied!":"Copy"]})]}),"logs"===v&&(0,oi.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,oi.jsxs)("div",{className:"bg-white border border-yellow-300 rounded-lg p-4",children:[(0,oi.jsxs)("h4",{className:"font-medium text-gray-800 mb-2 flex items-center gap-2",children:[(0,oi.jsx)("span",{className:"w-2 h-2 bg-green-500 rounded-full"}),"Request Example"]}),(0,oi.jsxs)("div",{className:"space-y-3",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:"Headers:"}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:JSON.stringify(I().logs.request.headers,null,2)})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:"Body (JSON):"}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:JSON.stringify(I().logs.request.body,null,2)})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:"cURL Example:"}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:`curl -X POST "${O().logs}" \\\n -H "Content-Type: application/json" \\\n -H "Device-ID: ${(null===n||void 0===n?void 0:n.id)||"your-device-id"}" \\\n -d '${JSON.stringify(I().logs.request.body)}'`})]})]})]}),(0,oi.jsxs)("div",{className:"bg-white border border-yellow-300 rounded-lg p-4",children:[(0,oi.jsxs)("h4",{className:"font-medium text-gray-800 mb-2 flex items-center gap-2",children:[(0,oi.jsx)("span",{className:"w-2 h-2 bg-blue-500 rounded-full"}),"Response Example"]}),(0,oi.jsx)("div",{className:"space-y-3",children:(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("p",{className:"text-xs font-medium text-gray-600 mb-1",children:["Status: ",I().logs.response.status]}),(0,oi.jsx)("pre",{className:"text-xs bg-gray-50 p-2 rounded border overflow-x-auto",children:JSON.stringify(I().logs.response.body,null,2)})]})})]}),(0,oi.jsxs)("div",{className:"bg-white border border-yellow-300 rounded-lg p-4",children:[(0,oi.jsx)("h4",{className:"font-medium text-gray-800 mb-2",children:"Field Descriptions"}),(0,oi.jsxs)("div",{className:"text-xs space-y-1",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"level:"})," Log level (debug, info, warning, error, critical) - required"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"message:"})," Log message content - required"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"source:"})," Component/module that generated the log - required"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"timestamp:"})," ISO 8601 datetime string - required"]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("strong",{children:"metadata:"})," Additional structured data object - optional"]})]})]})]})]}),(0,oi.jsxs)("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,oi.jsx)(Oi,{className:"w-4 h-4 text-gray-600"}),(0,oi.jsx)("h3",{className:"font-medium text-gray-900",children:"Authentication"})]}),(0,oi.jsx)("p",{className:"text-sm text-gray-600 mb-3",children:"Include this device ID in your requests for authentication"}),(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsxs)("code",{className:"flex-1 p-2 bg-white border border-gray-300 rounded text-sm font-mono text-gray-800",children:["Device-ID: ",null===n||void 0===n?void 0:n.id]}),(0,oi.jsxs)("button",{onClick:()=>T(null===n||void 0===n?void 0:n.id,"deviceId"),className:"flex items-center gap-1 px-3 py-2 bg-gray-600 text-white rounded hover:bg-gray-700 transition-colors",children:[(0,oi.jsx)(Si,{size:14}),"deviceId"===m?"Copied!":"Copy"]})]})]})]})]}),(0,oi.jsxs)("div",{className:"dashboard-card",children:[(0,oi.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Device Settings"}),(0,oi.jsxs)("form",{onSubmit:e=>{e.preventDefault();const t=new FormData(e.target),i={name:t.get("deviceName"),description:t.get("deviceDescription"),firmware_version:t.get("firmwareVersion"),model:t.get("deviceModel"),is_active:"active"===t.get("status")};ni(n.id,i).then(e=>{M(e.data),alert("Device settings updated successfully!")}).catch(e=>{console.error("Error updating device:",e),alert("Failed to update device settings. Please try again.")})},className:"space-y-4",children:[(0,oi.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"deviceName",className:"block text-sm font-medium text-gray-700 mb-1",children:"Device Name"}),(0,oi.jsx)("input",{type:"text",id:"deviceName",name:"deviceName",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",defaultValue:n.name})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"deviceDescription",className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),(0,oi.jsx)("input",{type:"text",id:"deviceDescription",name:"deviceDescription",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",defaultValue:n.description||""})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"firmwareVersion",className:"block text-sm font-medium text-gray-700 mb-1",children:"Firmware Version"}),(0,oi.jsx)("input",{type:"text",id:"firmwareVersion",name:"firmwareVersion",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",defaultValue:n.firmware_version||""})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{htmlFor:"deviceModel",className:"block text-sm font-medium text-gray-700 mb-1",children:"Model"}),(0,oi.jsxs)("select",{id:"deviceModel",name:"deviceModel",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 sm:text-sm",defaultValue:n.model,children:[(0,oi.jsx)("option",{value:"SIM7000E",children:"SIM7000E"}),(0,oi.jsx)("option",{value:"SIM7000A",children:"SIM7000A"}),(0,oi.jsx)("option",{value:"SIM7000G",children:"SIM7000G"}),(0,oi.jsx)("option",{value:"Custom",children:"Custom"})]})]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Device Status"}),(0,oi.jsxs)("div",{className:"flex space-x-4",children:[(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("input",{id:"status-active",name:"status",type:"radio",value:"active",defaultChecked:n.is_active,className:"h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300"}),(0,oi.jsx)("label",{htmlFor:"status-active",className:"ml-2 block text-sm text-gray-700",children:"Active"})]}),(0,oi.jsxs)("div",{className:"flex items-center",children:[(0,oi.jsx)("input",{id:"status-inactive",name:"status",type:"radio",value:"inactive",defaultChecked:!n.is_active,className:"h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300"}),(0,oi.jsx)("label",{htmlFor:"status-inactive",className:"ml-2 block text-sm text-gray-700",children:"Inactive"})]})]})]}),(0,oi.jsx)("div",{className:"pt-4",children:(0,oi.jsxs)("button",{type:"submit",className:"flex items-center gap-2 px-4 py-2 bg-primary-500 text-white rounded-md hover:bg-primary-600 transition-colors",children:[(0,oi.jsx)(Ui,{}),(0,oi.jsx)("span",{children:"Save Changes"})]})})]})]})]})]}),(0,oi.jsx)(rr,{isOpen:x,onClose:()=>{_(!1)},device:n,onDeviceUpdated:M}),b&&(0,oi.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,oi.jsx)("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4",children:(0,oi.jsxs)("div",{className:"p-6",children:[(0,oi.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Delete Device"}),(0,oi.jsxs)("p",{className:"text-gray-600 mb-6",children:['Are you sure you want to delete "',null===n||void 0===n?void 0:n.name,'"? This action cannot be undone and will remove all associated telemetry data and logs.']}),(0,oi.jsxs)("div",{className:"flex justify-end gap-3",children:[(0,oi.jsx)("button",{onClick:()=>{w(!1)},className:"px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors",children:"Cancel"}),(0,oi.jsx)("button",{onClick:async()=>{try{await ii(n.id),t("/devices")}catch(e){console.error("Error deleting device:",e),alert("Failed to delete device. Please try again."),w(!1)}},className:"px-4 py-2 bg-red-500 text-white rounded-md text-sm font-medium hover:bg-red-600 transition-colors",children:"Delete Device"})]})]})})})]}):(0,oi.jsxs)("div",{className:"text-center py-10",children:[(0,oi.jsx)("h2",{className:"text-2xl font-semibold text-gray-800 mb-4",children:"Device Not Found"}),(0,oi.jsx)("p",{className:"text-gray-600 mb-6",children:"The device you are looking for does not exist or has been removed."}),(0,oi.jsx)(Oe,{to:"/devices",className:"px-4 py-2 bg-primary-500 text-white rounded-md hover:bg-primary-600 transition-colors",children:"Back to Devices"})]})};const Mr=function(){return(0,oi.jsx)(li,{children:(0,oi.jsx)(Ce,{children:(0,oi.jsxs)(be,{children:[(0,oi.jsx)(xe,{path:"/login",element:(0,oi.jsx)(Xi,{})}),(0,oi.jsxs)(xe,{path:"/",element:(0,oi.jsx)(er,{children:(0,oi.jsx)(Qi,{})}),children:[(0,oi.jsx)(xe,{index:!0,element:(0,oi.jsx)(nr,{})}),(0,oi.jsx)(xe,{path:"devices",element:(0,oi.jsx)(ar,{})}),(0,oi.jsx)(xe,{path:"devices/:id",element:(0,oi.jsx)(zr,{})}),(0,oi.jsx)(xe,{path:"map",element:(0,oi.jsx)(Nr,{})}),(0,oi.jsx)(xe,{path:"logs",element:(0,oi.jsx)(Er,{})}),(0,oi.jsx)(xe,{path:"settings",element:(0,oi.jsx)(Cr,{})})]}),(0,oi.jsx)(xe,{path:"*",element:(0,oi.jsx)(ve,{to:"/",replace:!0})})]})})})},Ir=e=>{e&&e instanceof Function&&n.e(453).then(n.bind(n,453)).then(t=>{let{getCLS:n,getFID:i,getFCP:r,getLCP:o,getTTFB:a}=t;n(e),i(e),r(e),o(e),a(e)})};o.createRoot(document.getElementById("root")).render((0,oi.jsx)(i.StrictMode,{children:(0,oi.jsx)(Mr,{})})),Ir()})()})();
|
|
//# sourceMappingURL=main.97b260f1.js.map
|