diff --git a/10/assets/index-d5065cb2.js b/10/assets/index-cfe88941.js similarity index 77% rename from 10/assets/index-d5065cb2.js rename to 10/assets/index-cfe88941.js index 102c15d..b00018e 100644 --- a/10/assets/index-d5065cb2.js +++ b/10/assets/index-cfe88941.js @@ -6,7 +6,7 @@ var I0=Object.defineProperty;var A0=(e,t,r)=>t in e?I0(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Wo=Symbol.for("react.element"),j0=Symbol.for("react.portal"),D0=Symbol.for("react.fragment"),b0=Symbol.for("react.strict_mode"),B0=Symbol.for("react.profiler"),$0=Symbol.for("react.provider"),F0=Symbol.for("react.context"),U0=Symbol.for("react.forward_ref"),Z0=Symbol.for("react.suspense"),H0=Symbol.for("react.memo"),W0=Symbol.for("react.lazy"),Xh=Symbol.iterator;function V0(e){return e===null||typeof e!="object"?null:(e=Xh&&e[Xh]||e["@@iterator"],typeof e=="function"?e:null)}var qm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Gm=Object.assign,Ym={};function Ni(e,t,r){this.props=e,this.context=t,this.refs=Ym,this.updater=r||qm}Ni.prototype.isReactComponent={};Ni.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)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")};Ni.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qm(){}Qm.prototype=Ni.prototype;function Mf(e,t,r){this.props=e,this.context=t,this.refs=Ym,this.updater=r||qm}var Rf=Mf.prototype=new Qm;Rf.constructor=Mf;Gm(Rf,Ni.prototype);Rf.isPureReactComponent=!0;var Jh=Array.isArray,Xm=Object.prototype.hasOwnProperty,zf={current:null},Jm={key:!0,ref:!0,__self:!0,__source:!0};function e_(e,t,r){var i,s={},a=null,u=null;if(t!=null)for(i in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(a=""+t.key),t)Xm.call(t,i)&&!Jm.hasOwnProperty(i)&&(s[i]=t[i]);var f=arguments.length-2;if(f===1)s.children=r;else if(1t in e?I0(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var X0=M,J0=Symbol.for("react.element"),ew=Symbol.for("react.fragment"),tw=Object.prototype.hasOwnProperty,nw=X0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,rw={key:!0,ref:!0,__self:!0,__source:!0};function t_(e,t,r){var i,s={},a=null,u=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(u=t.ref);for(i in t)tw.call(t,i)&&!rw.hasOwnProperty(i)&&(s[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)s[i]===void 0&&(s[i]=t[i]);return{$$typeof:J0,type:e,key:a,ref:u,props:s,_owner:nw.current}}Xa.Fragment=ew;Xa.jsx=t_;Xa.jsxs=t_;Vm.exports=Xa;var x=Vm.exports,gc={},n_={exports:{}},xt={},r_={exports:{}},i_={};/** + */var X0=M,J0=Symbol.for("react.element"),ew=Symbol.for("react.fragment"),tw=Object.prototype.hasOwnProperty,nw=X0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,rw={key:!0,ref:!0,__self:!0,__source:!0};function t_(e,t,r){var i,s={},a=null,u=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(u=t.ref);for(i in t)tw.call(t,i)&&!rw.hasOwnProperty(i)&&(s[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)s[i]===void 0&&(s[i]=t[i]);return{$$typeof:J0,type:e,key:a,ref:u,props:s,_owner:nw.current}}Xa.Fragment=ew;Xa.jsx=t_;Xa.jsxs=t_;Vm.exports=Xa;var x=Vm.exports,gc={},n_={exports:{}},wt={},r_={exports:{}},i_={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var I0=Object.defineProperty;var A0=(e,t,r)=>t in e?I0(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(T,U){var A=T.length;T.push(U);e:for(;0>>1,J=T[H];if(0>>1;Hs(te,A))ies(ve,te)?(T[H]=ve,T[ie]=A,H=ie):(T[H]=te,T[ee]=A,H=ee);else if(ies(ve,A))T[H]=ve,T[ie]=A,H=ie;else break e}}return U}function s(T,U){var A=T.sortIndex-U.sortIndex;return A!==0?A:T.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],p=[],v=1,_=null,S=3,k=!1,P=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(T){for(var U=r(p);U!==null;){if(U.callback===null)i(p);else if(U.startTime<=T)i(p),U.sortIndex=U.expirationTime,t(d,U);else break;U=r(p)}}function N(T){if(E=!1,y(T),!P)if(r(d)!==null)P=!0,F(j);else{var U=r(p);U!==null&&K(N,U.startTime-T)}}function j(T,U){P=!1,E&&(E=!1,w(I),I=-1),k=!0;var A=S;try{for(y(U),_=r(d);_!==null&&(!(_.expirationTime>U)||T&&!G());){var H=_.callback;if(typeof H=="function"){_.callback=null,S=_.priorityLevel;var J=H(_.expirationTime<=U);U=e.unstable_now(),typeof J=="function"?_.callback=J:_===r(d)&&i(d),y(U)}else i(d);_=r(d)}if(_!==null)var re=!0;else{var ee=r(p);ee!==null&&K(N,ee.startTime-U),re=!1}return re}finally{_=null,S=A,k=!1}}var b=!1,B=null,I=-1,X=5,V=-1;function G(){return!(e.unstable_now()-VT||125H?(T.sortIndex=A,t(p,T),r(d)===null&&T===r(p)&&(E?(w(I),I=-1):E=!0,K(N,A-H))):(T.sortIndex=J,t(d,T),P||k||(P=!0,F(j))),T},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(T){var U=S;return function(){var A=S;S=U;try{return T.apply(this,arguments)}finally{S=A}}}})(i_);r_.exports=i_;var iw=r_.exports;/** + */(function(e){function t(T,U){var A=T.length;T.push(U);e:for(;0>>1,J=T[H];if(0>>1;Hs(te,A))ies(ve,te)?(T[H]=ve,T[ie]=A,H=ie):(T[H]=te,T[ee]=A,H=ee);else if(ies(ve,A))T[H]=ve,T[ie]=A,H=ie;else break e}}return U}function s(T,U){var A=T.sortIndex-U.sortIndex;return A!==0?A:T.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],p=[],v=1,_=null,S=3,k=!1,P=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(T){for(var U=r(p);U!==null;){if(U.callback===null)i(p);else if(U.startTime<=T)i(p),U.sortIndex=U.expirationTime,t(d,U);else break;U=r(p)}}function N(T){if(E=!1,y(T),!P)if(r(d)!==null)P=!0,F(j);else{var U=r(p);U!==null&&K(N,U.startTime-T)}}function j(T,U){P=!1,E&&(E=!1,w(I),I=-1),k=!0;var A=S;try{for(y(U),_=r(d);_!==null&&(!(_.expirationTime>U)||T&&!q());){var H=_.callback;if(typeof H=="function"){_.callback=null,S=_.priorityLevel;var J=H(_.expirationTime<=U);U=e.unstable_now(),typeof J=="function"?_.callback=J:_===r(d)&&i(d),y(U)}else i(d);_=r(d)}if(_!==null)var re=!0;else{var ee=r(p);ee!==null&&K(N,ee.startTime-U),re=!1}return re}finally{_=null,S=A,k=!1}}var b=!1,B=null,I=-1,X=5,V=-1;function q(){return!(e.unstable_now()-VT||125H?(T.sortIndex=A,t(p,T),r(d)===null&&T===r(p)&&(E?(w(I),I=-1):E=!0,K(N,A-H))):(T.sortIndex=J,t(d,T),P||k||(P=!0,F(j))),T},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(T){var U=S;return function(){var A=S;S=U;try{return T.apply(this,arguments)}finally{S=A}}}})(i_);r_.exports=i_;var iw=r_.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var I0=Object.defineProperty;var A0=(e,t,r)=>t in e?I0(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var o_=M,gt=iw;function Z(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yc=Object.prototype.hasOwnProperty,ow=/^[: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]*$/,tp={},np={};function sw(e){return yc.call(np,e)?!0:yc.call(tp,e)?!1:ow.test(e)?np[e]=!0:(tp[e]=!0,!1)}function aw(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function lw(e,t,r,i){if(t===null||typeof t>"u"||aw(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ot(e,t,r,i,s,a,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=u}var qe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){qe[e]=new ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];qe[t]=new ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){qe[e]=new ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){qe[e]=new ot(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){qe[e]=new ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){qe[e]=new ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){qe[e]=new ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){qe[e]=new ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){qe[e]=new ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var Af=/[\-:]([a-z])/g;function jf(e){return e[1].toUpperCase()}"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(Af,jf);qe[t]=new ot(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(Af,jf);qe[t]=new ot(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(Af,jf);qe[t]=new ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){qe[e]=new ot(e,1,!1,e.toLowerCase(),null,!1,!1)});qe.xlinkHref=new ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){qe[e]=new ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function Df(e,t,r,i){var s=qe.hasOwnProperty(t)?qe[t]:null;(s!==null?s.type!==0:i||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yc=Object.prototype.hasOwnProperty,ow=/^[: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]*$/,tp={},np={};function sw(e){return yc.call(np,e)?!0:yc.call(tp,e)?!1:ow.test(e)?np[e]=!0:(tp[e]=!0,!1)}function aw(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function lw(e,t,r,i){if(t===null||typeof t>"u"||aw(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ot(e,t,r,i,s,a,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=u}var Ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ge[e]=new ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ge[t]=new ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ge[e]=new ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ge[e]=new ot(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){Ge[e]=new ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ge[e]=new ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ge[e]=new ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ge[e]=new ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ge[e]=new ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var Af=/[\-:]([a-z])/g;function jf(e){return e[1].toUpperCase()}"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(Af,jf);Ge[t]=new ot(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(Af,jf);Ge[t]=new ot(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(Af,jf);Ge[t]=new ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ge[e]=new ot(e,1,!1,e.toLowerCase(),null,!1,!1)});Ge.xlinkHref=new ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ge[e]=new ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function Df(e,t,r,i){var s=Ge.hasOwnProperty(t)?Ge[t]:null;(s!==null?s.type!==0:i||!(2f||s[u]!==a[f]){var d=` -`+s[u].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=u&&0<=f);break}}}finally{Du=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?oo(e):""}function uw(e){switch(e.tag){case 5:return oo(e.type);case 16:return oo("Lazy");case 13:return oo("Suspense");case 19:return oo("SuspenseList");case 0:case 2:case 15:return e=bu(e.type,!1),e;case 11:return e=bu(e.type.render,!1),e;case 1:return e=bu(e.type,!0),e;default:return""}}function Ec(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Jr:return"Fragment";case Xr:return"Portal";case wc:return"Profiler";case bf:return"StrictMode";case xc:return"Suspense";case Sc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case l_:return(e.displayName||"Context")+".Consumer";case a_:return(e._context.displayName||"Context")+".Provider";case Bf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $f:return t=e.displayName||null,t!==null?t:Ec(e.type)||"Memo";case bn:t=e._payload,e=e._init;try{return Ec(e(t))}catch{}}return null}function cw(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=t.render,e=e.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 Ec(t);case 8:return t===bf?"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(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function c_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fw(e){var t=c_(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){i=""+u,a.call(this,u)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(u){i=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ts(e){e._valueTracker||(e._valueTracker=fw(e))}function f_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=c_(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function fa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Pc(e,t){var r=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function ip(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=nr(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function d_(e,t){t=t.checked,t!=null&&Df(e,"checked",t,!1)}function Cc(e,t){d_(e,t);var r=nr(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tc(e,t.type,r):t.hasOwnProperty("defaultValue")&&Tc(e,t.type,nr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function op(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Tc(e,t,r){(t!=="number"||fa(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var so=Array.isArray;function fi(e,t,r,i){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=ks.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function So(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var co={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},dw=["Webkit","ms","Moz","O"];Object.keys(co).forEach(function(e){dw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),co[t]=co[e]})});function __(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||co.hasOwnProperty(e)&&co[e]?(""+t).trim():t+"px"}function v_(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,s=__(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,s):e[r]=s}}var hw=Le({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 Nc(e,t){if(t){if(hw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Z(62))}}function Oc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Mc=null;function Ff(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rc=null,di=null,hi=null;function lp(e){if(e=qo(e)){if(typeof Rc!="function")throw Error(Z(280));var t=e.stateNode;t&&(t=rl(t),Rc(e.stateNode,e.type,t))}}function g_(e){di?hi?hi.push(e):hi=[e]:di=e}function y_(){if(di){var e=di,t=hi;if(hi=di=null,lp(e),t)for(e=0;e>>=0,e===0?32:31-(Pw(e)/Cw|0)|0}var Ls=64,Ns=4194304;function ao(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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ma(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,s=e.suspendedLanes,a=e.pingedLanes,u=r&268435455;if(u!==0){var f=u&~s;f!==0?i=ao(f):(a&=u,a!==0&&(i=ao(a)))}else u=r&~s,u!==0?i=ao(u):a!==0&&(i=ao(a));if(i===0)return 0;if(t!==0&&t!==i&&!(t&s)&&(s=i&-i,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(i&4&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0r;r++)t.push(e);return t}function Vo(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wt(t),e[t]=r}function Nw(e,t){var r=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=ho),vp=String.fromCharCode(32),gp=!1;function B_(e,t){switch(e){case"keyup":return r1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ei=!1;function o1(e,t){switch(e){case"compositionend":return $_(t);case"keypress":return t.which!==32?null:(gp=!0,vp);case"textInput":return e=t.data,e===vp&&gp?null:e;default:return null}}function s1(e,t){if(ei)return e==="compositionend"||!Gf&&B_(e,t)?(e=D_(),qs=Vf=Un=null,ei=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Sp(r)}}function H_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?H_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function W_(){for(var e=window,t=fa();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=fa(e.document)}return t}function Yf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function m1(e){var t=W_(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&H_(r.ownerDocument.documentElement,r)){if(i!==null&&Yf(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,a=Math.min(i.start,s);i=i.end===void 0?a:Math.min(i.end,s),!e.extend&&a>i&&(s=i,i=a,a=s),s=Ep(r,a);var u=Ep(r,i);s&&u&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>i?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,ti=null,bc=null,mo=null,Bc=!1;function Pp(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Bc||ti==null||ti!==fa(i)||(i=ti,"selectionStart"in i&&Yf(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),mo&&Lo(mo,i)||(mo=i,i=ga(bc,"onSelect"),0ii||(e.current=Wc[ii],Wc[ii]=null,ii--)}function xe(e,t){ii++,Wc[ii]=e.current,e.current=t}var rr={},Je=ar(rr),lt=ar(!1),Cr=rr;function gi(e,t){var r=e.type.contextTypes;if(!r)return rr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in r)s[a]=t[a];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ut(e){return e=e.childContextTypes,e!=null}function wa(){Ee(lt),Ee(Je)}function Mp(e,t,r){if(Je.current!==rr)throw Error(Z(168));xe(Je,t),xe(lt,r)}function ev(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var s in i)if(!(s in t))throw Error(Z(108,cw(e)||"Unknown",s));return Le({},r,i)}function xa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rr,Cr=Je.current,xe(Je,e),xe(lt,lt.current),!0}function Rp(e,t,r){var i=e.stateNode;if(!i)throw Error(Z(169));r?(e=ev(e,t,Cr),i.__reactInternalMemoizedMergedChildContext=e,Ee(lt),Ee(Je),xe(Je,e)):Ee(lt),xe(lt,r)}var mn=null,il=!1,Xu=!1;function tv(e){mn===null?mn=[e]:mn.push(e)}function k1(e){il=!0,tv(e)}function lr(){if(!Xu&&mn!==null){Xu=!0;var e=0,t=me;try{var r=mn;for(me=1;e>=u,s-=u,_n=1<<32-Wt(t)+s|r<I?(X=B,B=null):X=B.sibling;var V=S(w,B,y[I],N);if(V===null){B===null&&(B=X);break}e&&B&&V.alternate===null&&t(w,B),g=a(V,g,I),b===null?j=V:b.sibling=V,b=V,B=X}if(I===y.length)return r(w,B),Pe&&mr(w,I),j;if(B===null){for(;II?(X=B,B=null):X=B.sibling;var G=S(w,B,V.value,N);if(G===null){B===null&&(B=X);break}e&&B&&G.alternate===null&&t(w,B),g=a(G,g,I),b===null?j=G:b.sibling=G,b=G,B=X}if(V.done)return r(w,B),Pe&&mr(w,I),j;if(B===null){for(;!V.done;I++,V=y.next())V=_(w,V.value,N),V!==null&&(g=a(V,g,I),b===null?j=V:b.sibling=V,b=V);return Pe&&mr(w,I),j}for(B=i(w,B);!V.done;I++,V=y.next())V=k(B,w,I,V.value,N),V!==null&&(e&&V.alternate!==null&&B.delete(V.key===null?I:V.key),g=a(V,g,I),b===null?j=V:b.sibling=V,b=V);return e&&B.forEach(function(le){return t(w,le)}),Pe&&mr(w,I),j}function R(w,g,y,N){if(typeof y=="object"&&y!==null&&y.type===Jr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Cs:e:{for(var j=y.key,b=g;b!==null;){if(b.key===j){if(j=y.type,j===Jr){if(b.tag===7){r(w,b.sibling),g=s(b,y.props.children),g.return=w,w=g;break e}}else if(b.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===bn&&Bp(j)===b.type){r(w,b.sibling),g=s(b,y.props),g.ref=to(w,b,y),g.return=w,w=g;break e}r(w,b);break}else t(w,b);b=b.sibling}y.type===Jr?(g=Er(y.props.children,w.mode,N,y.key),g.return=w,w=g):(N=na(y.type,y.key,y.props,null,w.mode,N),N.ref=to(w,g,y),N.return=w,w=N)}return u(w);case Xr:e:{for(b=y.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){r(w,g.sibling),g=s(g,y.children||[]),g.return=w,w=g;break e}else{r(w,g);break}else t(w,g);g=g.sibling}g=sc(y,w.mode,N),g.return=w,w=g}return u(w);case bn:return b=y._init,R(w,g,b(y._payload),N)}if(so(y))return P(w,g,y,N);if(Yi(y))return E(w,g,y,N);js(w,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(r(w,g.sibling),g=s(g,y),g.return=w,w=g):(r(w,g),g=oc(y,w.mode,N),g.return=w,w=g),u(w)):r(w,g)}return R}var wi=uv(!0),cv=uv(!1),Go={},sn=ar(Go),Ro=ar(Go),zo=ar(Go);function xr(e){if(e===Go)throw Error(Z(174));return e}function od(e,t){switch(xe(zo,t),xe(Ro,e),xe(sn,Go),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Lc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Lc(t,e)}Ee(sn),xe(sn,t)}function xi(){Ee(sn),Ee(Ro),Ee(zo)}function fv(e){xr(zo.current);var t=xr(sn.current),r=Lc(t,e.type);t!==r&&(xe(Ro,e),xe(sn,r))}function sd(e){Ro.current===e&&(Ee(sn),Ee(Ro))}var Te=ar(0);function ka(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ju=[];function ad(){for(var e=0;er?r:4,e(!0);var i=ec.transition;ec.transition={};try{e(!1),t()}finally{me=r,ec.transition=i}}function kv(){return It().memoizedState}function M1(e,t,r){var i=Xn(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},Lv(e))Nv(t,r);else if(r=ov(e,t,r,i),r!==null){var s=rt();Vt(r,e,i,s),Ov(r,t,i)}}function R1(e,t,r){var i=Xn(e),s={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(Lv(e))Nv(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var u=t.lastRenderedState,f=a(u,r);if(s.hasEagerState=!0,s.eagerState=f,Kt(f,u)){var d=t.interleaved;d===null?(s.next=s,rd(t)):(s.next=d.next,d.next=s),t.interleaved=s;return}}catch{}finally{}r=ov(e,t,s,i),r!==null&&(s=rt(),Vt(r,e,i,s),Ov(r,t,i))}}function Lv(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function Nv(e,t){_o=La=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ov(e,t,r){if(r&4194240){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Zf(e,r)}}var Na={readContext:zt,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useInsertionEffect:Ye,useLayoutEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useMutableSource:Ye,useSyncExternalStore:Ye,useId:Ye,unstable_isNewReconciler:!1},z1={readContext:zt,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Fp,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Xs(4194308,4,Sv.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Xs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xs(4,2,e,t)},useMemo:function(e,t){var r=tn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=tn();return t=r!==void 0?r(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=M1.bind(null,ke,e),[i.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:$p,useDebugValue:dd,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=$p(!1),t=e[0];return e=O1.bind(null,e[1]),tn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ke,s=tn();if(Pe){if(r===void 0)throw Error(Z(407));r=r()}else{if(r=t(),Ze===null)throw Error(Z(349));kr&30||pv(i,t,r)}s.memoizedState=r;var a={value:r,getSnapshot:t};return s.queue=a,Fp(_v.bind(null,i,a,e),[e]),i.flags|=2048,jo(9,mv.bind(null,i,a,r,t),void 0,null),r},useId:function(){var e=tn(),t=Ze.identifierPrefix;if(Pe){var r=vn,i=_n;r=(i&~(1<<32-Wt(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Io++,0")&&(d=d.replace("",e.displayName)),d}while(1<=u&&0<=f);break}}}finally{Du=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?io(e):""}function uw(e){switch(e.tag){case 5:return io(e.type);case 16:return io("Lazy");case 13:return io("Suspense");case 19:return io("SuspenseList");case 0:case 2:case 15:return e=bu(e.type,!1),e;case 11:return e=bu(e.type.render,!1),e;case 1:return e=bu(e.type,!0),e;default:return""}}function Ec(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Jr:return"Fragment";case Xr:return"Portal";case wc:return"Profiler";case bf:return"StrictMode";case xc:return"Suspense";case Sc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case l_:return(e.displayName||"Context")+".Consumer";case a_:return(e._context.displayName||"Context")+".Provider";case Bf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $f:return t=e.displayName||null,t!==null?t:Ec(e.type)||"Memo";case bn:t=e._payload,e=e._init;try{return Ec(e(t))}catch{}}return null}function cw(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=t.render,e=e.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 Ec(t);case 8:return t===bf?"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(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function c_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fw(e){var t=c_(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){i=""+u,a.call(this,u)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(u){i=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ts(e){e._valueTracker||(e._valueTracker=fw(e))}function f_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=c_(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function fa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Pc(e,t){var r=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function ip(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=nr(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function d_(e,t){t=t.checked,t!=null&&Df(e,"checked",t,!1)}function Cc(e,t){d_(e,t);var r=nr(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tc(e,t.type,r):t.hasOwnProperty("defaultValue")&&Tc(e,t.type,nr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function op(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Tc(e,t,r){(t!=="number"||fa(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var oo=Array.isArray;function fi(e,t,r,i){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=ks.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xo(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var uo={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},dw=["Webkit","ms","Moz","O"];Object.keys(uo).forEach(function(e){dw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),uo[t]=uo[e]})});function __(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||uo.hasOwnProperty(e)&&uo[e]?(""+t).trim():t+"px"}function v_(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,s=__(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,s):e[r]=s}}var hw=Le({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 Nc(e,t){if(t){if(hw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Z(62))}}function Oc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Mc=null;function Ff(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rc=null,di=null,hi=null;function lp(e){if(e=Go(e)){if(typeof Rc!="function")throw Error(Z(280));var t=e.stateNode;t&&(t=rl(t),Rc(e.stateNode,e.type,t))}}function g_(e){di?hi?hi.push(e):hi=[e]:di=e}function y_(){if(di){var e=di,t=hi;if(hi=di=null,lp(e),t)for(e=0;e>>=0,e===0?32:31-(Pw(e)/Cw|0)|0}var Ls=64,Ns=4194304;function so(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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ma(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,s=e.suspendedLanes,a=e.pingedLanes,u=r&268435455;if(u!==0){var f=u&~s;f!==0?i=so(f):(a&=u,a!==0&&(i=so(a)))}else u=r&~s,u!==0?i=so(u):a!==0&&(i=so(a));if(i===0)return 0;if(t!==0&&t!==i&&!(t&s)&&(s=i&-i,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(i&4&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0r;r++)t.push(e);return t}function Vo(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wt(t),e[t]=r}function Nw(e,t){var r=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=fo),vp=String.fromCharCode(32),gp=!1;function B_(e,t){switch(e){case"keyup":return r1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ei=!1;function o1(e,t){switch(e){case"compositionend":return $_(t);case"keypress":return t.which!==32?null:(gp=!0,vp);case"textInput":return e=t.data,e===vp&&gp?null:e;default:return null}}function s1(e,t){if(ei)return e==="compositionend"||!qf&&B_(e,t)?(e=D_(),Gs=Vf=Un=null,ei=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Sp(r)}}function H_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?H_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function W_(){for(var e=window,t=fa();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=fa(e.document)}return t}function Yf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function m1(e){var t=W_(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&H_(r.ownerDocument.documentElement,r)){if(i!==null&&Yf(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,a=Math.min(i.start,s);i=i.end===void 0?a:Math.min(i.end,s),!e.extend&&a>i&&(s=i,i=a,a=s),s=Ep(r,a);var u=Ep(r,i);s&&u&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>i?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,ti=null,bc=null,po=null,Bc=!1;function Pp(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Bc||ti==null||ti!==fa(i)||(i=ti,"selectionStart"in i&&Yf(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),po&&ko(po,i)||(po=i,i=ga(bc,"onSelect"),0ii||(e.current=Wc[ii],Wc[ii]=null,ii--)}function xe(e,t){ii++,Wc[ii]=e.current,e.current=t}var rr={},Je=ar(rr),lt=ar(!1),Cr=rr;function gi(e,t){var r=e.type.contextTypes;if(!r)return rr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in r)s[a]=t[a];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ut(e){return e=e.childContextTypes,e!=null}function wa(){Ee(lt),Ee(Je)}function Mp(e,t,r){if(Je.current!==rr)throw Error(Z(168));xe(Je,t),xe(lt,r)}function ev(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var s in i)if(!(s in t))throw Error(Z(108,cw(e)||"Unknown",s));return Le({},r,i)}function xa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rr,Cr=Je.current,xe(Je,e),xe(lt,lt.current),!0}function Rp(e,t,r){var i=e.stateNode;if(!i)throw Error(Z(169));r?(e=ev(e,t,Cr),i.__reactInternalMemoizedMergedChildContext=e,Ee(lt),Ee(Je),xe(Je,e)):Ee(lt),xe(lt,r)}var mn=null,il=!1,Xu=!1;function tv(e){mn===null?mn=[e]:mn.push(e)}function k1(e){il=!0,tv(e)}function lr(){if(!Xu&&mn!==null){Xu=!0;var e=0,t=me;try{var r=mn;for(me=1;e>=u,s-=u,_n=1<<32-Wt(t)+s|r<I?(X=B,B=null):X=B.sibling;var V=S(w,B,y[I],N);if(V===null){B===null&&(B=X);break}e&&B&&V.alternate===null&&t(w,B),g=a(V,g,I),b===null?j=V:b.sibling=V,b=V,B=X}if(I===y.length)return r(w,B),Pe&&mr(w,I),j;if(B===null){for(;II?(X=B,B=null):X=B.sibling;var q=S(w,B,V.value,N);if(q===null){B===null&&(B=X);break}e&&B&&q.alternate===null&&t(w,B),g=a(q,g,I),b===null?j=q:b.sibling=q,b=q,B=X}if(V.done)return r(w,B),Pe&&mr(w,I),j;if(B===null){for(;!V.done;I++,V=y.next())V=_(w,V.value,N),V!==null&&(g=a(V,g,I),b===null?j=V:b.sibling=V,b=V);return Pe&&mr(w,I),j}for(B=i(w,B);!V.done;I++,V=y.next())V=k(B,w,I,V.value,N),V!==null&&(e&&V.alternate!==null&&B.delete(V.key===null?I:V.key),g=a(V,g,I),b===null?j=V:b.sibling=V,b=V);return e&&B.forEach(function(le){return t(w,le)}),Pe&&mr(w,I),j}function R(w,g,y,N){if(typeof y=="object"&&y!==null&&y.type===Jr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Cs:e:{for(var j=y.key,b=g;b!==null;){if(b.key===j){if(j=y.type,j===Jr){if(b.tag===7){r(w,b.sibling),g=s(b,y.props.children),g.return=w,w=g;break e}}else if(b.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===bn&&Bp(j)===b.type){r(w,b.sibling),g=s(b,y.props),g.ref=eo(w,b,y),g.return=w,w=g;break e}r(w,b);break}else t(w,b);b=b.sibling}y.type===Jr?(g=Er(y.props.children,w.mode,N,y.key),g.return=w,w=g):(N=na(y.type,y.key,y.props,null,w.mode,N),N.ref=eo(w,g,y),N.return=w,w=N)}return u(w);case Xr:e:{for(b=y.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){r(w,g.sibling),g=s(g,y.children||[]),g.return=w,w=g;break e}else{r(w,g);break}else t(w,g);g=g.sibling}g=sc(y,w.mode,N),g.return=w,w=g}return u(w);case bn:return b=y._init,R(w,g,b(y._payload),N)}if(oo(y))return P(w,g,y,N);if(qi(y))return E(w,g,y,N);js(w,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(r(w,g.sibling),g=s(g,y),g.return=w,w=g):(r(w,g),g=oc(y,w.mode,N),g.return=w,w=g),u(w)):r(w,g)}return R}var wi=uv(!0),cv=uv(!1),qo={},sn=ar(qo),Mo=ar(qo),Ro=ar(qo);function xr(e){if(e===qo)throw Error(Z(174));return e}function od(e,t){switch(xe(Ro,t),xe(Mo,e),xe(sn,qo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Lc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Lc(t,e)}Ee(sn),xe(sn,t)}function xi(){Ee(sn),Ee(Mo),Ee(Ro)}function fv(e){xr(Ro.current);var t=xr(sn.current),r=Lc(t,e.type);t!==r&&(xe(Mo,e),xe(sn,r))}function sd(e){Mo.current===e&&(Ee(sn),Ee(Mo))}var Te=ar(0);function ka(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ju=[];function ad(){for(var e=0;er?r:4,e(!0);var i=ec.transition;ec.transition={};try{e(!1),t()}finally{me=r,ec.transition=i}}function kv(){return It().memoizedState}function M1(e,t,r){var i=Xn(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},Lv(e))Nv(t,r);else if(r=ov(e,t,r,i),r!==null){var s=rt();Vt(r,e,i,s),Ov(r,t,i)}}function R1(e,t,r){var i=Xn(e),s={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(Lv(e))Nv(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var u=t.lastRenderedState,f=a(u,r);if(s.hasEagerState=!0,s.eagerState=f,Kt(f,u)){var d=t.interleaved;d===null?(s.next=s,rd(t)):(s.next=d.next,d.next=s),t.interleaved=s;return}}catch{}finally{}r=ov(e,t,s,i),r!==null&&(s=rt(),Vt(r,e,i,s),Ov(r,t,i))}}function Lv(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function Nv(e,t){mo=La=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ov(e,t,r){if(r&4194240){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Zf(e,r)}}var Na={readContext:zt,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useInsertionEffect:Ye,useLayoutEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useMutableSource:Ye,useSyncExternalStore:Ye,useId:Ye,unstable_isNewReconciler:!1},z1={readContext:zt,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Fp,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Xs(4194308,4,Sv.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Xs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xs(4,2,e,t)},useMemo:function(e,t){var r=tn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=tn();return t=r!==void 0?r(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=M1.bind(null,ke,e),[i.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:$p,useDebugValue:dd,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=$p(!1),t=e[0];return e=O1.bind(null,e[1]),tn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ke,s=tn();if(Pe){if(r===void 0)throw Error(Z(407));r=r()}else{if(r=t(),Ze===null)throw Error(Z(349));kr&30||pv(i,t,r)}s.memoizedState=r;var a={value:r,getSnapshot:t};return s.queue=a,Fp(_v.bind(null,i,a,e),[e]),i.flags|=2048,Ao(9,mv.bind(null,i,a,r,t),void 0,null),r},useId:function(){var e=tn(),t=Ze.identifierPrefix;if(Pe){var r=vn,i=_n;r=(i&~(1<<32-Wt(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=zo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=u.createElement(r,{is:i.is}):(e=u.createElement(r),r==="select"&&(u=e,i.multiple?u.multiple=!0:i.size&&(u.size=i.size))):e=u.createElementNS(e,r),e[nn]=t,e[Mo]=i,Bv(e,t,!1,!1),t.stateNode=e;e:{switch(u=Oc(r,i),r){case"dialog":Se("cancel",e),Se("close",e),s=i;break;case"iframe":case"object":case"embed":Se("load",e),s=i;break;case"video":case"audio":for(s=0;sEi&&(t.flags|=128,i=!0,no(a,!1),t.lanes=4194304)}else{if(!i)if(e=ka(u),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),no(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Pe)return Qe(t),null}else 2*Re()-a.renderingStartTime>Ei&&r!==1073741824&&(t.flags|=128,i=!0,no(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(r=a.last,r!==null?r.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Re(),t.sibling=null,r=Te.current,xe(Te,i?r&1|2:r&1),t):(Qe(t),null);case 22:case 23:return gd(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?dt&1073741824&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(Z(156,t.tag))}function F1(e,t){switch(Xf(t),t.tag){case 1:return ut(t.type)&&wa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xi(),Ee(lt),Ee(Je),ad(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sd(t),null;case 13:if(Ee(Te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(Te),null;case 4:return xi(),null;case 10:return nd(t.type._context),null;case 22:case 23:return gd(),null;case 24:return null;default:return null}}var bs=!1,Xe=!1,U1=typeof WeakSet=="function"?WeakSet:Set,Q=null;function li(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Oe(e,t,i)}else r.current=null}function rf(e,t,r){try{r()}catch(i){Oe(e,t,i)}}var Yp=!1;function Z1(e,t){if($c=_a,e=W_(),Yf(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var s=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var u=0,f=-1,d=-1,p=0,v=0,_=e,S=null;t:for(;;){for(var k;_!==r||s!==0&&_.nodeType!==3||(f=u+s),_!==a||i!==0&&_.nodeType!==3||(d=u+i),_.nodeType===3&&(u+=_.nodeValue.length),(k=_.firstChild)!==null;)S=_,_=k;for(;;){if(_===e)break t;if(S===r&&++p===s&&(f=u),S===a&&++v===i&&(d=u),(k=_.nextSibling)!==null)break;_=S,S=_.parentNode}_=k}r=f===-1||d===-1?null:{start:f,end:d}}else r=null}r=r||{start:0,end:0}}else r=null;for(Fc={focusedElem:e,selectionRange:r},_a=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var P=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(P!==null){var E=P.memoizedProps,R=P.memoizedState,w=t.stateNode,g=w.getSnapshotBeforeUpdate(t.elementType===t.type?E:Ft(t.type,E),R);w.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(163))}}catch(N){Oe(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return P=Yp,Yp=!1,P}function vo(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var s=i=i.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&rf(t,r,a)}s=s.next}while(s!==i)}}function al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function of(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Uv(e){var t=e.alternate;t!==null&&(e.alternate=null,Uv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nn],delete t[Mo],delete t[Hc],delete t[C1],delete t[T1])),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 Zv(e){return e.tag===5||e.tag===3||e.tag===4}function Qp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function sf(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ya));else if(i!==4&&(e=e.child,e!==null))for(sf(e,t,r),e=e.sibling;e!==null;)sf(e,t,r),e=e.sibling}function af(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(af(e,t,r),e=e.sibling;e!==null;)af(e,t,r),e=e.sibling}var Ve=null,Ut=!1;function jn(e,t,r){for(r=r.child;r!==null;)Hv(e,t,r),r=r.sibling}function Hv(e,t,r){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(Ja,r)}catch{}switch(r.tag){case 5:Xe||li(r,t);case 6:var i=Ve,s=Ut;Ve=null,jn(e,t,r),Ve=i,Ut=s,Ve!==null&&(Ut?(e=Ve,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ve.removeChild(r.stateNode));break;case 18:Ve!==null&&(Ut?(e=Ve,r=r.stateNode,e.nodeType===8?Qu(e.parentNode,r):e.nodeType===1&&Qu(e,r),To(e)):Qu(Ve,r.stateNode));break;case 4:i=Ve,s=Ut,Ve=r.stateNode.containerInfo,Ut=!0,jn(e,t,r),Ve=i,Ut=s;break;case 0:case 11:case 14:case 15:if(!Xe&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){s=i=i.next;do{var a=s,u=a.destroy;a=a.tag,u!==void 0&&(a&2||a&4)&&rf(r,t,u),s=s.next}while(s!==i)}jn(e,t,r);break;case 1:if(!Xe&&(li(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(f){Oe(r,t,f)}jn(e,t,r);break;case 21:jn(e,t,r);break;case 22:r.mode&1?(Xe=(i=Xe)||r.memoizedState!==null,jn(e,t,r),Xe=i):jn(e,t,r);break;default:jn(e,t,r)}}function Xp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new U1),t.forEach(function(i){var s=X1.bind(null,e,i);r.has(i)||(r.add(i),i.then(s,s))})}}function $t(e,t){var r=t.deletions;if(r!==null)for(var i=0;is&&(s=u),i&=~a}if(i=s,i=Re()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*W1(i/1960))-i,10e?16:e,Zn===null)var i=!1;else{if(e=Zn,Zn=null,Ra=0,fe&6)throw Error(Z(331));var s=fe;for(fe|=4,Q=e.current;Q!==null;){var a=Q,u=a.child;if(Q.flags&16){var f=a.deletions;if(f!==null){for(var d=0;dRe()-_d?Sr(e,0):md|=r),ct(e,t)}function Xv(e,t){t===0&&(e.mode&1?(t=Ns,Ns<<=1,!(Ns&130023424)&&(Ns=4194304)):t=1);var r=rt();e=Pn(e,t),e!==null&&(Vo(e,t,r),ct(e,r))}function Q1(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Xv(e,r)}function X1(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(Z(314))}i!==null&&i.delete(t),Xv(e,r)}var Jv;Jv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||lt.current)at=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return at=!1,B1(e,t,r);at=!!(e.flags&131072)}else at=!1,Pe&&t.flags&1048576&&nv(t,Ea,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Js(e,t),e=t.pendingProps;var s=gi(t,Je.current);mi(t,r),s=ud(null,t,i,e,s,r);var a=cd();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ut(i)?(a=!0,xa(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,id(t),s.updater=ol,t.stateNode=s,s._reactInternals=t,Yc(t,i,e,r),t=Jc(null,t,i,!0,a,r)):(t.tag=0,Pe&&a&&Qf(t),et(null,t,s,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Js(e,t),e=t.pendingProps,s=i._init,i=s(i._payload),t.type=i,s=t.tag=ex(i),e=Ft(i,e),s){case 0:t=Xc(null,t,i,e,r);break e;case 1:t=Kp(null,t,i,e,r);break e;case 11:t=Wp(null,t,i,e,r);break e;case 14:t=Vp(null,t,i,Ft(i.type,e),r);break e}throw Error(Z(306,i,""))}return t;case 0:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Ft(i,s),Xc(e,t,i,s,r);case 1:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Ft(i,s),Kp(e,t,i,s,r);case 3:e:{if(jv(t),e===null)throw Error(Z(387));i=t.pendingProps,a=t.memoizedState,s=a.element,sv(e,t),Ta(t,i,null,r);var u=t.memoizedState;if(i=u.element,a.isDehydrated)if(a={element:i,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=Si(Error(Z(423)),t),t=qp(e,t,i,r,s);break e}else if(i!==s){s=Si(Error(Z(424)),t),t=qp(e,t,i,r,s);break e}else for(pt=Gn(t.stateNode.containerInfo.firstChild),_t=t,Pe=!0,Zt=null,r=cv(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(yi(),i===s){t=Cn(e,t,r);break e}et(e,t,i,r)}t=t.child}return t;case 5:return fv(t),e===null&&Kc(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,u=s.children,Uc(i,s)?u=null:a!==null&&Uc(i,a)&&(t.flags|=32),Av(e,t),et(e,t,u,r),t.child;case 6:return e===null&&Kc(t),null;case 13:return Dv(e,t,r);case 4:return od(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=wi(t,null,i,r):et(e,t,i,r),t.child;case 11:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Ft(i,s),Wp(e,t,i,s,r);case 7:return et(e,t,t.pendingProps,r),t.child;case 8:return et(e,t,t.pendingProps.children,r),t.child;case 12:return et(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,s=t.pendingProps,a=t.memoizedProps,u=s.value,xe(Pa,i._currentValue),i._currentValue=u,a!==null)if(Kt(a.value,u)){if(a.children===s.children&&!lt.current){t=Cn(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var f=a.dependencies;if(f!==null){u=a.child;for(var d=f.firstContext;d!==null;){if(d.context===i){if(a.tag===1){d=yn(-1,r&-r),d.tag=2;var p=a.updateQueue;if(p!==null){p=p.shared;var v=p.pending;v===null?d.next=d:(d.next=v.next,v.next=d),p.pending=d}}a.lanes|=r,d=a.alternate,d!==null&&(d.lanes|=r),qc(a.return,r,t),f.lanes|=r;break}d=d.next}}else if(a.tag===10)u=a.type===t.type?null:a.child;else if(a.tag===18){if(u=a.return,u===null)throw Error(Z(341));u.lanes|=r,f=u.alternate,f!==null&&(f.lanes|=r),qc(u,r,t),u=a.sibling}else u=a.child;if(u!==null)u.return=a;else for(u=a;u!==null;){if(u===t){u=null;break}if(a=u.sibling,a!==null){a.return=u.return,u=a;break}u=u.return}a=u}et(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,mi(t,r),s=zt(s),i=i(s),t.flags|=1,et(e,t,i,r),t.child;case 14:return i=t.type,s=Ft(i,t.pendingProps),s=Ft(i.type,s),Vp(e,t,i,s,r);case 15:return zv(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Ft(i,s),Js(e,t),t.tag=1,ut(i)?(e=!0,xa(t)):e=!1,mi(t,r),lv(t,i,s),Yc(t,i,s,r),Jc(null,t,i,!0,e,r);case 19:return bv(e,t,r);case 22:return Iv(e,t,r)}throw Error(Z(156,t.tag))};function eg(e,t){return T_(e,t)}function J1(e,t,r,i){this.tag=e,this.key=r,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 Ot(e,t,r,i){return new J1(e,t,r,i)}function wd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ex(e){if(typeof e=="function")return wd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bf)return 11;if(e===$f)return 14}return 2}function Jn(e,t){var r=e.alternate;return r===null?(r=Ot(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function na(e,t,r,i,s,a){var u=2;if(i=e,typeof e=="function")wd(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case Jr:return Er(r.children,s,a,t);case bf:u=8,s|=8;break;case wc:return e=Ot(12,r,t,s|2),e.elementType=wc,e.lanes=a,e;case xc:return e=Ot(13,r,t,s),e.elementType=xc,e.lanes=a,e;case Sc:return e=Ot(19,r,t,s),e.elementType=Sc,e.lanes=a,e;case u_:return ul(r,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case a_:u=10;break e;case l_:u=9;break e;case Bf:u=11;break e;case $f:u=14;break e;case bn:u=16,i=null;break e}throw Error(Z(130,e==null?e:typeof e,""))}return t=Ot(u,r,t,s),t.elementType=e,t.type=i,t.lanes=a,t}function Er(e,t,r,i){return e=Ot(7,e,i,t),e.lanes=r,e}function ul(e,t,r,i){return e=Ot(22,e,i,t),e.elementType=u_,e.lanes=r,e.stateNode={isHidden:!1},e}function oc(e,t,r){return e=Ot(6,e,null,t),e.lanes=r,e}function sc(e,t,r){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tx(e,t,r,i,s){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=$u(0),this.expirationTimes=$u(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$u(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function xd(e,t,r,i,s,a,u,f,d){return e=new tx(e,t,r,f,d),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Ot(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},id(a),e}function nx(e,t,r){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ig)}catch(e){console.error(e)}}ig(),n_.exports=xt;var og=n_.exports,sm=og;gc.createRoot=sm.createRoot,gc.hydrateRoot=sm.hydrateRoot;/** +`+a.stack}return{value:e,source:t,stack:s,digest:null}}function rc(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Qc(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var j1=typeof WeakMap=="function"?WeakMap:Map;function Mv(e,t,r){r=yn(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Ma||(Ma=!0,lf=i),Qc(e,t)},r}function Rv(e,t,r){r=yn(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var s=t.value;r.payload=function(){return i(s)},r.callback=function(){Qc(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Qc(e,t),typeof i!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this));var u=t.stack;this.componentDidCatch(t.value,{componentStack:u!==null?u:""})}),r}function Up(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new j1;var s=new Set;i.set(t,s)}else s=i.get(t),s===void 0&&(s=new Set,i.set(t,s));s.has(r)||(s.add(r),e=Y1.bind(null,e,t,r),t.then(e,e))}function Zp(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Hp(e,t,r,i,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=yn(-1,1),t.tag=2,Yn(r,t,1))),r.lanes|=1),e)}var D1=Ln.ReactCurrentOwner,at=!1;function et(e,t,r,i){t.child=e===null?cv(t,null,r,i):wi(t,e.child,r,i)}function Wp(e,t,r,i,s){r=r.render;var a=t.ref;return mi(t,s),i=ud(e,t,r,i,a,s),r=cd(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Cn(e,t,s)):(Pe&&r&&Qf(t),t.flags|=1,et(e,t,i,s),t.child)}function Vp(e,t,r,i,s){if(e===null){var a=r.type;return typeof a=="function"&&!wd(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,zv(e,t,a,i,s)):(e=na(r.type,null,i,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&s)){var u=a.memoizedProps;if(r=r.compare,r=r!==null?r:ko,r(u,i)&&e.ref===t.ref)return Cn(e,t,s)}return t.flags|=1,e=Jn(a,i),e.ref=t.ref,e.return=t,t.child=e}function zv(e,t,r,i,s){if(e!==null){var a=e.memoizedProps;if(ko(a,i)&&e.ref===t.ref)if(at=!1,t.pendingProps=i=a,(e.lanes&s)!==0)e.flags&131072&&(at=!0);else return t.lanes=e.lanes,Cn(e,t,s)}return Xc(e,t,r,i,s)}function Iv(e,t,r){var i=t.pendingProps,s=i.children,a=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xe(ui,dt),dt|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xe(ui,dt),dt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=a!==null?a.baseLanes:r,xe(ui,dt),dt|=i}else a!==null?(i=a.baseLanes|r,t.memoizedState=null):i=r,xe(ui,dt),dt|=i;return et(e,t,s,r),t.child}function Av(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Xc(e,t,r,i,s){var a=ut(r)?Cr:Je.current;return a=gi(t,a),mi(t,s),r=ud(e,t,r,i,a,s),i=cd(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Cn(e,t,s)):(Pe&&i&&Qf(t),t.flags|=1,et(e,t,r,s),t.child)}function Kp(e,t,r,i,s){if(ut(r)){var a=!0;xa(t)}else a=!1;if(mi(t,s),t.stateNode===null)Js(e,t),lv(t,r,i),Yc(t,r,i,s),i=!0;else if(e===null){var u=t.stateNode,f=t.memoizedProps;u.props=f;var d=u.context,p=r.contextType;typeof p=="object"&&p!==null?p=zt(p):(p=ut(r)?Cr:Je.current,p=gi(t,p));var v=r.getDerivedStateFromProps,_=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function";_||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(f!==i||d!==p)&&bp(t,u,i,p),Bn=!1;var S=t.memoizedState;u.state=S,Ta(t,i,u,s),d=t.memoizedState,f!==i||S!==d||lt.current||Bn?(typeof v=="function"&&(qc(t,r,v,i),d=t.memoizedState),(f=Bn||Dp(t,r,f,i,S,d,p))?(_||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=d),u.props=i,u.state=d,u.context=p,i=f):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{u=t.stateNode,sv(e,t),f=t.memoizedProps,p=t.type===t.elementType?f:Ft(t.type,f),u.props=p,_=t.pendingProps,S=u.context,d=r.contextType,typeof d=="object"&&d!==null?d=zt(d):(d=ut(r)?Cr:Je.current,d=gi(t,d));var k=r.getDerivedStateFromProps;(v=typeof k=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(f!==_||S!==d)&&bp(t,u,i,d),Bn=!1,S=t.memoizedState,u.state=S,Ta(t,i,u,s);var P=t.memoizedState;f!==_||S!==P||lt.current||Bn?(typeof k=="function"&&(qc(t,r,k,i),P=t.memoizedState),(p=Bn||Dp(t,r,p,i,S,P,d)||!1)?(v||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(i,P,d),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(i,P,d)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&S===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&S===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=P),u.props=i,u.state=P,u.context=d,i=p):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&S===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&S===e.memoizedState||(t.flags|=1024),i=!1)}return Jc(e,t,r,i,a,s)}function Jc(e,t,r,i,s,a){Av(e,t);var u=(t.flags&128)!==0;if(!i&&!u)return s&&Rp(t,r,!1),Cn(e,t,a);i=t.stateNode,D1.current=t;var f=u&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&u?(t.child=wi(t,e.child,null,a),t.child=wi(t,null,f,a)):et(e,t,f,a),t.memoizedState=i.state,s&&Rp(t,r,!0),t.child}function jv(e){var t=e.stateNode;t.pendingContext?Mp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mp(e,t.context,!1),od(e,t.containerInfo)}function Gp(e,t,r,i,s){return yi(),Jf(s),t.flags|=256,et(e,t,r,i),t.child}var ef={dehydrated:null,treeContext:null,retryLane:0};function tf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Dv(e,t,r){var i=t.pendingProps,s=Te.current,a=!1,u=(t.flags&128)!==0,f;if((f=u)||(f=e!==null&&e.memoizedState===null?!1:(s&2)!==0),f?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),xe(Te,s&1),e===null)return Kc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(u=i.children,e=i.fallback,a?(i=t.mode,a=t.child,u={mode:"hidden",children:u},!(i&1)&&a!==null?(a.childLanes=0,a.pendingProps=u):a=ul(u,i,0,null),e=Er(e,i,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=tf(r),t.memoizedState=ef,e):hd(t,u));if(s=e.memoizedState,s!==null&&(f=s.dehydrated,f!==null))return b1(e,t,u,i,f,s,r);if(a){a=i.fallback,u=t.mode,s=e.child,f=s.sibling;var d={mode:"hidden",children:i.children};return!(u&1)&&t.child!==s?(i=t.child,i.childLanes=0,i.pendingProps=d,t.deletions=null):(i=Jn(s,d),i.subtreeFlags=s.subtreeFlags&14680064),f!==null?a=Jn(f,a):(a=Er(a,u,r,null),a.flags|=2),a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,u=e.child.memoizedState,u=u===null?tf(r):{baseLanes:u.baseLanes|r,cachePool:null,transitions:u.transitions},a.memoizedState=u,a.childLanes=e.childLanes&~r,t.memoizedState=ef,i}return a=e.child,e=a.sibling,i=Jn(a,{mode:"visible",children:i.children}),!(t.mode&1)&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function hd(e,t){return t=ul({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ds(e,t,r,i){return i!==null&&Jf(i),wi(t,e.child,null,r),e=hd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function b1(e,t,r,i,s,a,u){if(r)return t.flags&256?(t.flags&=-257,i=rc(Error(Z(422))),Ds(e,t,u,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=i.fallback,s=t.mode,i=ul({mode:"visible",children:i.children},s,0,null),a=Er(a,s,u,null),a.flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,t.mode&1&&wi(t,e.child,null,u),t.child.memoizedState=tf(u),t.memoizedState=ef,a);if(!(t.mode&1))return Ds(e,t,u,null);if(s.data==="$!"){if(i=s.nextSibling&&s.nextSibling.dataset,i)var f=i.dgst;return i=f,a=Error(Z(419)),i=rc(a,i,void 0),Ds(e,t,u,i)}if(f=(u&e.childLanes)!==0,at||f){if(i=Ze,i!==null){switch(u&-u){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(i.suspendedLanes|u)?0:s,s!==0&&s!==a.retryLane&&(a.retryLane=s,Pn(e,s),Vt(i,e,s,-1))}return yd(),i=rc(Error(Z(421))),Ds(e,t,u,i)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Q1.bind(null,e),s._reactRetry=t,null):(e=a.treeContext,pt=qn(s.nextSibling),_t=t,Pe=!0,Zt=null,e!==null&&(kt[Lt++]=_n,kt[Lt++]=vn,kt[Lt++]=Tr,_n=e.id,vn=e.overflow,Tr=t),t=hd(t,i.children),t.flags|=4096,t)}function qp(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Gc(e.return,t,r)}function ic(e,t,r,i,s){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:s}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=i,a.tail=r,a.tailMode=s)}function bv(e,t,r){var i=t.pendingProps,s=i.revealOrder,a=i.tail;if(et(e,t,i.children,r),i=Te.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qp(e,r,t);else if(e.tag===19)qp(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(xe(Te,i),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&ka(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),ic(t,!1,s,r,a);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ka(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}ic(t,!0,r,null,a);break;case"together":ic(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Js(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Cn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Lr|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Z(153));if(t.child!==null){for(e=t.child,r=Jn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Jn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function B1(e,t,r){switch(t.tag){case 3:jv(t),yi();break;case 5:fv(t);break;case 1:ut(t.type)&&xa(t);break;case 4:od(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,s=t.memoizedProps.value;xe(Pa,i._currentValue),i._currentValue=s;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(xe(Te,Te.current&1),t.flags|=128,null):r&t.child.childLanes?Dv(e,t,r):(xe(Te,Te.current&1),e=Cn(e,t,r),e!==null?e.sibling:null);xe(Te,Te.current&1);break;case 19:if(i=(r&t.childLanes)!==0,e.flags&128){if(i)return bv(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),xe(Te,Te.current),i)break;return null;case 22:case 23:return t.lanes=0,Iv(e,t,r)}return Cn(e,t,r)}var Bv,nf,$v,Fv;Bv=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};nf=function(){};$v=function(e,t,r,i){var s=e.memoizedProps;if(s!==i){e=t.stateNode,xr(sn.current);var a=null;switch(r){case"input":s=Pc(e,s),i=Pc(e,i),a=[];break;case"select":s=Le({},s,{value:void 0}),i=Le({},i,{value:void 0}),a=[];break;case"textarea":s=kc(e,s),i=kc(e,i),a=[];break;default:typeof s.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=ya)}Nc(r,i);var u;r=null;for(p in s)if(!i.hasOwnProperty(p)&&s.hasOwnProperty(p)&&s[p]!=null)if(p==="style"){var f=s[p];for(u in f)f.hasOwnProperty(u)&&(r||(r={}),r[u]="")}else p!=="dangerouslySetInnerHTML"&&p!=="children"&&p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(wo.hasOwnProperty(p)?a||(a=[]):(a=a||[]).push(p,null));for(p in i){var d=i[p];if(f=s!=null?s[p]:void 0,i.hasOwnProperty(p)&&d!==f&&(d!=null||f!=null))if(p==="style")if(f){for(u in f)!f.hasOwnProperty(u)||d&&d.hasOwnProperty(u)||(r||(r={}),r[u]="");for(u in d)d.hasOwnProperty(u)&&f[u]!==d[u]&&(r||(r={}),r[u]=d[u])}else r||(a||(a=[]),a.push(p,r)),r=d;else p==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,f=f?f.__html:void 0,d!=null&&f!==d&&(a=a||[]).push(p,d)):p==="children"?typeof d!="string"&&typeof d!="number"||(a=a||[]).push(p,""+d):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&(wo.hasOwnProperty(p)?(d!=null&&p==="onScroll"&&Se("scroll",e),a||f===d||(a=[])):(a=a||[]).push(p,d))}r&&(a=a||[]).push("style",r);var p=a;(t.updateQueue=p)&&(t.flags|=4)}};Fv=function(e,t,r,i){r!==i&&(t.flags|=4)};function to(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,i|=s.subtreeFlags&14680064,i|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,i|=s.subtreeFlags,i|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function $1(e,t,r){var i=t.pendingProps;switch(Xf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return ut(t.type)&&wa(),Qe(t),null;case 3:return i=t.stateNode,xi(),Ee(lt),Ee(Je),ad(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(As(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Zt!==null&&(ff(Zt),Zt=null))),nf(e,t),Qe(t),null;case 5:sd(t);var s=xr(Ro.current);if(r=t.type,e!==null&&t.stateNode!=null)$v(e,t,r,i,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(Z(166));return Qe(t),null}if(e=xr(sn.current),As(t)){i=t.stateNode,r=t.type;var a=t.memoizedProps;switch(i[nn]=t,i[Oo]=a,e=(t.mode&1)!==0,r){case"dialog":Se("cancel",i),Se("close",i);break;case"iframe":case"object":case"embed":Se("load",i);break;case"video":case"audio":for(s=0;s<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=u.createElement(r,{is:i.is}):(e=u.createElement(r),r==="select"&&(u=e,i.multiple?u.multiple=!0:i.size&&(u.size=i.size))):e=u.createElementNS(e,r),e[nn]=t,e[Oo]=i,Bv(e,t,!1,!1),t.stateNode=e;e:{switch(u=Oc(r,i),r){case"dialog":Se("cancel",e),Se("close",e),s=i;break;case"iframe":case"object":case"embed":Se("load",e),s=i;break;case"video":case"audio":for(s=0;sEi&&(t.flags|=128,i=!0,to(a,!1),t.lanes=4194304)}else{if(!i)if(e=ka(u),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),to(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Pe)return Qe(t),null}else 2*Re()-a.renderingStartTime>Ei&&r!==1073741824&&(t.flags|=128,i=!0,to(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(r=a.last,r!==null?r.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Re(),t.sibling=null,r=Te.current,xe(Te,i?r&1|2:r&1),t):(Qe(t),null);case 22:case 23:return gd(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?dt&1073741824&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(Z(156,t.tag))}function F1(e,t){switch(Xf(t),t.tag){case 1:return ut(t.type)&&wa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xi(),Ee(lt),Ee(Je),ad(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sd(t),null;case 13:if(Ee(Te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(Te),null;case 4:return xi(),null;case 10:return nd(t.type._context),null;case 22:case 23:return gd(),null;case 24:return null;default:return null}}var bs=!1,Xe=!1,U1=typeof WeakSet=="function"?WeakSet:Set,Q=null;function li(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Oe(e,t,i)}else r.current=null}function rf(e,t,r){try{r()}catch(i){Oe(e,t,i)}}var Yp=!1;function Z1(e,t){if($c=_a,e=W_(),Yf(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var s=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var u=0,f=-1,d=-1,p=0,v=0,_=e,S=null;t:for(;;){for(var k;_!==r||s!==0&&_.nodeType!==3||(f=u+s),_!==a||i!==0&&_.nodeType!==3||(d=u+i),_.nodeType===3&&(u+=_.nodeValue.length),(k=_.firstChild)!==null;)S=_,_=k;for(;;){if(_===e)break t;if(S===r&&++p===s&&(f=u),S===a&&++v===i&&(d=u),(k=_.nextSibling)!==null)break;_=S,S=_.parentNode}_=k}r=f===-1||d===-1?null:{start:f,end:d}}else r=null}r=r||{start:0,end:0}}else r=null;for(Fc={focusedElem:e,selectionRange:r},_a=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var P=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(P!==null){var E=P.memoizedProps,R=P.memoizedState,w=t.stateNode,g=w.getSnapshotBeforeUpdate(t.elementType===t.type?E:Ft(t.type,E),R);w.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(163))}}catch(N){Oe(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return P=Yp,Yp=!1,P}function _o(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var s=i=i.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&rf(t,r,a)}s=s.next}while(s!==i)}}function al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function of(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Uv(e){var t=e.alternate;t!==null&&(e.alternate=null,Uv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nn],delete t[Oo],delete t[Hc],delete t[C1],delete t[T1])),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 Zv(e){return e.tag===5||e.tag===3||e.tag===4}function Qp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function sf(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ya));else if(i!==4&&(e=e.child,e!==null))for(sf(e,t,r),e=e.sibling;e!==null;)sf(e,t,r),e=e.sibling}function af(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(af(e,t,r),e=e.sibling;e!==null;)af(e,t,r),e=e.sibling}var Ve=null,Ut=!1;function jn(e,t,r){for(r=r.child;r!==null;)Hv(e,t,r),r=r.sibling}function Hv(e,t,r){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(Ja,r)}catch{}switch(r.tag){case 5:Xe||li(r,t);case 6:var i=Ve,s=Ut;Ve=null,jn(e,t,r),Ve=i,Ut=s,Ve!==null&&(Ut?(e=Ve,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ve.removeChild(r.stateNode));break;case 18:Ve!==null&&(Ut?(e=Ve,r=r.stateNode,e.nodeType===8?Qu(e.parentNode,r):e.nodeType===1&&Qu(e,r),Co(e)):Qu(Ve,r.stateNode));break;case 4:i=Ve,s=Ut,Ve=r.stateNode.containerInfo,Ut=!0,jn(e,t,r),Ve=i,Ut=s;break;case 0:case 11:case 14:case 15:if(!Xe&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){s=i=i.next;do{var a=s,u=a.destroy;a=a.tag,u!==void 0&&(a&2||a&4)&&rf(r,t,u),s=s.next}while(s!==i)}jn(e,t,r);break;case 1:if(!Xe&&(li(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(f){Oe(r,t,f)}jn(e,t,r);break;case 21:jn(e,t,r);break;case 22:r.mode&1?(Xe=(i=Xe)||r.memoizedState!==null,jn(e,t,r),Xe=i):jn(e,t,r);break;default:jn(e,t,r)}}function Xp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new U1),t.forEach(function(i){var s=X1.bind(null,e,i);r.has(i)||(r.add(i),i.then(s,s))})}}function $t(e,t){var r=t.deletions;if(r!==null)for(var i=0;is&&(s=u),i&=~a}if(i=s,i=Re()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*W1(i/1960))-i,10e?16:e,Zn===null)var i=!1;else{if(e=Zn,Zn=null,Ra=0,fe&6)throw Error(Z(331));var s=fe;for(fe|=4,Q=e.current;Q!==null;){var a=Q,u=a.child;if(Q.flags&16){var f=a.deletions;if(f!==null){for(var d=0;dRe()-_d?Sr(e,0):md|=r),ct(e,t)}function Xv(e,t){t===0&&(e.mode&1?(t=Ns,Ns<<=1,!(Ns&130023424)&&(Ns=4194304)):t=1);var r=rt();e=Pn(e,t),e!==null&&(Vo(e,t,r),ct(e,r))}function Q1(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Xv(e,r)}function X1(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(Z(314))}i!==null&&i.delete(t),Xv(e,r)}var Jv;Jv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||lt.current)at=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return at=!1,B1(e,t,r);at=!!(e.flags&131072)}else at=!1,Pe&&t.flags&1048576&&nv(t,Ea,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Js(e,t),e=t.pendingProps;var s=gi(t,Je.current);mi(t,r),s=ud(null,t,i,e,s,r);var a=cd();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ut(i)?(a=!0,xa(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,id(t),s.updater=ol,t.stateNode=s,s._reactInternals=t,Yc(t,i,e,r),t=Jc(null,t,i,!0,a,r)):(t.tag=0,Pe&&a&&Qf(t),et(null,t,s,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Js(e,t),e=t.pendingProps,s=i._init,i=s(i._payload),t.type=i,s=t.tag=ex(i),e=Ft(i,e),s){case 0:t=Xc(null,t,i,e,r);break e;case 1:t=Kp(null,t,i,e,r);break e;case 11:t=Wp(null,t,i,e,r);break e;case 14:t=Vp(null,t,i,Ft(i.type,e),r);break e}throw Error(Z(306,i,""))}return t;case 0:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Ft(i,s),Xc(e,t,i,s,r);case 1:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Ft(i,s),Kp(e,t,i,s,r);case 3:e:{if(jv(t),e===null)throw Error(Z(387));i=t.pendingProps,a=t.memoizedState,s=a.element,sv(e,t),Ta(t,i,null,r);var u=t.memoizedState;if(i=u.element,a.isDehydrated)if(a={element:i,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=Si(Error(Z(423)),t),t=Gp(e,t,i,r,s);break e}else if(i!==s){s=Si(Error(Z(424)),t),t=Gp(e,t,i,r,s);break e}else for(pt=qn(t.stateNode.containerInfo.firstChild),_t=t,Pe=!0,Zt=null,r=cv(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(yi(),i===s){t=Cn(e,t,r);break e}et(e,t,i,r)}t=t.child}return t;case 5:return fv(t),e===null&&Kc(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,u=s.children,Uc(i,s)?u=null:a!==null&&Uc(i,a)&&(t.flags|=32),Av(e,t),et(e,t,u,r),t.child;case 6:return e===null&&Kc(t),null;case 13:return Dv(e,t,r);case 4:return od(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=wi(t,null,i,r):et(e,t,i,r),t.child;case 11:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Ft(i,s),Wp(e,t,i,s,r);case 7:return et(e,t,t.pendingProps,r),t.child;case 8:return et(e,t,t.pendingProps.children,r),t.child;case 12:return et(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,s=t.pendingProps,a=t.memoizedProps,u=s.value,xe(Pa,i._currentValue),i._currentValue=u,a!==null)if(Kt(a.value,u)){if(a.children===s.children&&!lt.current){t=Cn(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var f=a.dependencies;if(f!==null){u=a.child;for(var d=f.firstContext;d!==null;){if(d.context===i){if(a.tag===1){d=yn(-1,r&-r),d.tag=2;var p=a.updateQueue;if(p!==null){p=p.shared;var v=p.pending;v===null?d.next=d:(d.next=v.next,v.next=d),p.pending=d}}a.lanes|=r,d=a.alternate,d!==null&&(d.lanes|=r),Gc(a.return,r,t),f.lanes|=r;break}d=d.next}}else if(a.tag===10)u=a.type===t.type?null:a.child;else if(a.tag===18){if(u=a.return,u===null)throw Error(Z(341));u.lanes|=r,f=u.alternate,f!==null&&(f.lanes|=r),Gc(u,r,t),u=a.sibling}else u=a.child;if(u!==null)u.return=a;else for(u=a;u!==null;){if(u===t){u=null;break}if(a=u.sibling,a!==null){a.return=u.return,u=a;break}u=u.return}a=u}et(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,mi(t,r),s=zt(s),i=i(s),t.flags|=1,et(e,t,i,r),t.child;case 14:return i=t.type,s=Ft(i,t.pendingProps),s=Ft(i.type,s),Vp(e,t,i,s,r);case 15:return zv(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:Ft(i,s),Js(e,t),t.tag=1,ut(i)?(e=!0,xa(t)):e=!1,mi(t,r),lv(t,i,s),Yc(t,i,s,r),Jc(null,t,i,!0,e,r);case 19:return bv(e,t,r);case 22:return Iv(e,t,r)}throw Error(Z(156,t.tag))};function eg(e,t){return T_(e,t)}function J1(e,t,r,i){this.tag=e,this.key=r,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 Nt(e,t,r,i){return new J1(e,t,r,i)}function wd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ex(e){if(typeof e=="function")return wd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bf)return 11;if(e===$f)return 14}return 2}function Jn(e,t){var r=e.alternate;return r===null?(r=Nt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function na(e,t,r,i,s,a){var u=2;if(i=e,typeof e=="function")wd(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case Jr:return Er(r.children,s,a,t);case bf:u=8,s|=8;break;case wc:return e=Nt(12,r,t,s|2),e.elementType=wc,e.lanes=a,e;case xc:return e=Nt(13,r,t,s),e.elementType=xc,e.lanes=a,e;case Sc:return e=Nt(19,r,t,s),e.elementType=Sc,e.lanes=a,e;case u_:return ul(r,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case a_:u=10;break e;case l_:u=9;break e;case Bf:u=11;break e;case $f:u=14;break e;case bn:u=16,i=null;break e}throw Error(Z(130,e==null?e:typeof e,""))}return t=Nt(u,r,t,s),t.elementType=e,t.type=i,t.lanes=a,t}function Er(e,t,r,i){return e=Nt(7,e,i,t),e.lanes=r,e}function ul(e,t,r,i){return e=Nt(22,e,i,t),e.elementType=u_,e.lanes=r,e.stateNode={isHidden:!1},e}function oc(e,t,r){return e=Nt(6,e,null,t),e.lanes=r,e}function sc(e,t,r){return t=Nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tx(e,t,r,i,s){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=$u(0),this.expirationTimes=$u(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$u(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function xd(e,t,r,i,s,a,u,f,d){return e=new tx(e,t,r,f,d),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Nt(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},id(a),e}function nx(e,t,r){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ig)}catch(e){console.error(e)}}ig(),n_.exports=wt;var og=n_.exports,sm=og;gc.createRoot=sm.createRoot,gc.hydrateRoot=sm.hydrateRoot;/** * @remix-run/router v1.9.0 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function bo(){return bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Cd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function lx(){return Math.random().toString(36).substr(2,8)}function lm(e,t){return{usr:e.state,key:e.key,idx:t}}function df(e,t,r,i){return r===void 0&&(r=null),bo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ri(t):t,{state:r,key:t&&t.key||i||lx()})}function Aa(e){let{pathname:t="/",search:r="",hash:i=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Ri(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function ux(e,t,r,i){i===void 0&&(i={});let{window:s=document.defaultView,v5Compat:a=!1}=i,u=s.history,f=Hn.Pop,d=null,p=v();p==null&&(p=0,u.replaceState(bo({},u.state,{idx:p}),""));function v(){return(u.state||{idx:null}).idx}function _(){f=Hn.Pop;let R=v(),w=R==null?null:R-p;p=R,d&&d({action:f,location:E.location,delta:w})}function S(R,w){f=Hn.Push;let g=df(E.location,R,w);r&&r(g,R),p=v()+1;let y=lm(g,p),N=E.createHref(g);try{u.pushState(y,"",N)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(N)}a&&d&&d({action:f,location:E.location,delta:1})}function k(R,w){f=Hn.Replace;let g=df(E.location,R,w);r&&r(g,R),p=v();let y=lm(g,p),N=E.createHref(g);u.replaceState(y,"",N),a&&d&&d({action:f,location:E.location,delta:0})}function P(R){let w=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof R=="string"?R:Aa(R);return ze(w,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,w)}let E={get action(){return f},get location(){return e(s,u)},listen(R){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(am,_),d=R,()=>{s.removeEventListener(am,_),d=null}},createHref(R){return t(s,R)},createURL:P,encodeLocation(R){let w=P(R);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:S,replace:k,go(R){return u.go(R)}};return E}var um;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(um||(um={}));function cx(e,t,r){r===void 0&&(r="/");let i=typeof t=="string"?Ri(t):t,s=Td(i.pathname||"/",r);if(s==null)return null;let a=sg(e);fx(a);let u=null;for(let f=0;u==null&&f{let d={relativePath:f===void 0?a.path||"":f,caseSensitive:a.caseSensitive===!0,childrenIndex:u,route:a};d.relativePath.startsWith("/")&&(ze(d.relativePath.startsWith(i),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(i.length));let p=er([i,d.relativePath]),v=r.concat(d);a.children&&a.children.length>0&&(ze(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),sg(a.children,t,v,p)),!(a.path==null&&!a.index)&&t.push({path:p,score:gx(p,a.index),routesMeta:v})};return e.forEach((a,u)=>{var f;if(a.path===""||!((f=a.path)!=null&&f.includes("?")))s(a,u);else for(let d of ag(a.path))s(a,u,d)}),t}function ag(e){let t=e.split("/");if(t.length===0)return[];let[r,...i]=t,s=r.endsWith("?"),a=r.replace(/\?$/,"");if(i.length===0)return s?[a,""]:[a];let u=ag(i.join("/")),f=[];return f.push(...u.map(d=>d===""?a:[a,d].join("/"))),s&&f.push(...u),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function fx(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:yx(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}const dx=/^:\w+$/,hx=3,px=2,mx=1,_x=10,vx=-2,cm=e=>e==="*";function gx(e,t){let r=e.split("/"),i=r.length;return r.some(cm)&&(i+=vx),t&&(i+=px),r.filter(s=>!cm(s)).reduce((s,a)=>s+(dx.test(a)?hx:a===""?mx:_x),i)}function yx(e,t){return e.length===t.length&&e.slice(0,-1).every((i,s)=>i===t[s])?e[e.length-1]-t[t.length-1]:0}function wx(e,t){let{routesMeta:r}=e,i={},s="/",a=[];for(let u=0;u{if(v==="*"){let S=f[_]||"";u=a.slice(0,a.length-S.length).replace(/(.)\/+$/,"$1")}return p[v]=Px(f[_]||"",v),p},{}),pathname:a,pathnameBase:u,pattern:e}}function Sx(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Cd(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(u,f)=>(i.push(f),"/([^\\/]+)"));return e.endsWith("*")?(i.push("*"),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),i]}function Ex(e){try{return decodeURI(e)}catch(t){return Cd(!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 Px(e,t){try{return decodeURIComponent(e)}catch(r){return Cd(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function Td(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function Cx(e,t){t===void 0&&(t="/");let{pathname:r,search:i="",hash:s=""}=typeof e=="string"?Ri(e):e;return{pathname:r?r.startsWith("/")?r:Tx(r,t):t,search:Lx(i),hash:Nx(s)}}function Tx(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function ac(e,t,r,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function kd(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ld(e,t,r,i){i===void 0&&(i=!1);let s;typeof e=="string"?s=Ri(e):(s=bo({},e),ze(!s.pathname||!s.pathname.includes("?"),ac("?","pathname","search",s)),ze(!s.pathname||!s.pathname.includes("#"),ac("#","pathname","hash",s)),ze(!s.search||!s.search.includes("#"),ac("#","search","hash",s)));let a=e===""||s.pathname==="",u=a?"/":s.pathname,f;if(i||u==null)f=r;else{let _=t.length-1;if(u.startsWith("..")){let S=u.split("/");for(;S[0]==="..";)S.shift(),_-=1;s.pathname=S.join("/")}f=_>=0?t[_]:"/"}let d=Cx(s,f),p=u&&u!=="/"&&u.endsWith("/"),v=(a||u===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(p||v)&&(d.pathname+="/"),d}const er=e=>e.join("/").replace(/\/\/+/g,"/"),kx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Nx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ox(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const lg=["post","put","patch","delete"];new Set(lg);const Mx=["get",...lg];new Set(Mx);/** + */function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Cd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function lx(){return Math.random().toString(36).substr(2,8)}function lm(e,t){return{usr:e.state,key:e.key,idx:t}}function df(e,t,r,i){return r===void 0&&(r=null),Do({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Mi(t):t,{state:r,key:t&&t.key||i||lx()})}function Aa(e){let{pathname:t="/",search:r="",hash:i=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Mi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function ux(e,t,r,i){i===void 0&&(i={});let{window:s=document.defaultView,v5Compat:a=!1}=i,u=s.history,f=Hn.Pop,d=null,p=v();p==null&&(p=0,u.replaceState(Do({},u.state,{idx:p}),""));function v(){return(u.state||{idx:null}).idx}function _(){f=Hn.Pop;let R=v(),w=R==null?null:R-p;p=R,d&&d({action:f,location:E.location,delta:w})}function S(R,w){f=Hn.Push;let g=df(E.location,R,w);r&&r(g,R),p=v()+1;let y=lm(g,p),N=E.createHref(g);try{u.pushState(y,"",N)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(N)}a&&d&&d({action:f,location:E.location,delta:1})}function k(R,w){f=Hn.Replace;let g=df(E.location,R,w);r&&r(g,R),p=v();let y=lm(g,p),N=E.createHref(g);u.replaceState(y,"",N),a&&d&&d({action:f,location:E.location,delta:0})}function P(R){let w=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof R=="string"?R:Aa(R);return ze(w,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,w)}let E={get action(){return f},get location(){return e(s,u)},listen(R){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(am,_),d=R,()=>{s.removeEventListener(am,_),d=null}},createHref(R){return t(s,R)},createURL:P,encodeLocation(R){let w=P(R);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:S,replace:k,go(R){return u.go(R)}};return E}var um;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(um||(um={}));function cx(e,t,r){r===void 0&&(r="/");let i=typeof t=="string"?Mi(t):t,s=Td(i.pathname||"/",r);if(s==null)return null;let a=sg(e);fx(a);let u=null;for(let f=0;u==null&&f{let d={relativePath:f===void 0?a.path||"":f,caseSensitive:a.caseSensitive===!0,childrenIndex:u,route:a};d.relativePath.startsWith("/")&&(ze(d.relativePath.startsWith(i),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(i.length));let p=er([i,d.relativePath]),v=r.concat(d);a.children&&a.children.length>0&&(ze(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),sg(a.children,t,v,p)),!(a.path==null&&!a.index)&&t.push({path:p,score:gx(p,a.index),routesMeta:v})};return e.forEach((a,u)=>{var f;if(a.path===""||!((f=a.path)!=null&&f.includes("?")))s(a,u);else for(let d of ag(a.path))s(a,u,d)}),t}function ag(e){let t=e.split("/");if(t.length===0)return[];let[r,...i]=t,s=r.endsWith("?"),a=r.replace(/\?$/,"");if(i.length===0)return s?[a,""]:[a];let u=ag(i.join("/")),f=[];return f.push(...u.map(d=>d===""?a:[a,d].join("/"))),s&&f.push(...u),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function fx(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:yx(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}const dx=/^:\w+$/,hx=3,px=2,mx=1,_x=10,vx=-2,cm=e=>e==="*";function gx(e,t){let r=e.split("/"),i=r.length;return r.some(cm)&&(i+=vx),t&&(i+=px),r.filter(s=>!cm(s)).reduce((s,a)=>s+(dx.test(a)?hx:a===""?mx:_x),i)}function yx(e,t){return e.length===t.length&&e.slice(0,-1).every((i,s)=>i===t[s])?e[e.length-1]-t[t.length-1]:0}function wx(e,t){let{routesMeta:r}=e,i={},s="/",a=[];for(let u=0;u{if(v==="*"){let S=f[_]||"";u=a.slice(0,a.length-S.length).replace(/(.)\/+$/,"$1")}return p[v]=Px(f[_]||"",v),p},{}),pathname:a,pathnameBase:u,pattern:e}}function Sx(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Cd(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(u,f)=>(i.push(f),"/([^\\/]+)"));return e.endsWith("*")?(i.push("*"),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),i]}function Ex(e){try{return decodeURI(e)}catch(t){return Cd(!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 Px(e,t){try{return decodeURIComponent(e)}catch(r){return Cd(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function Td(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function Cx(e,t){t===void 0&&(t="/");let{pathname:r,search:i="",hash:s=""}=typeof e=="string"?Mi(e):e;return{pathname:r?r.startsWith("/")?r:Tx(r,t):t,search:Lx(i),hash:Nx(s)}}function Tx(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function ac(e,t,r,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function kd(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ld(e,t,r,i){i===void 0&&(i=!1);let s;typeof e=="string"?s=Mi(e):(s=Do({},e),ze(!s.pathname||!s.pathname.includes("?"),ac("?","pathname","search",s)),ze(!s.pathname||!s.pathname.includes("#"),ac("#","pathname","hash",s)),ze(!s.search||!s.search.includes("#"),ac("#","search","hash",s)));let a=e===""||s.pathname==="",u=a?"/":s.pathname,f;if(i||u==null)f=r;else{let _=t.length-1;if(u.startsWith("..")){let S=u.split("/");for(;S[0]==="..";)S.shift(),_-=1;s.pathname=S.join("/")}f=_>=0?t[_]:"/"}let d=Cx(s,f),p=u&&u!=="/"&&u.endsWith("/"),v=(a||u===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(p||v)&&(d.pathname+="/"),d}const er=e=>e.join("/").replace(/\/\/+/g,"/"),kx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Nx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ox(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const lg=["post","put","patch","delete"];new Set(lg);const Mx=["get",...lg];new Set(Mx);/** * React Router v6.16.0 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ja(){return ja=Object.assign?Object.assign.bind():function(e){for(var t=1;td.pathnameBase)),u=M.useRef(!1);return fg(()=>{u.current=!0}),M.useCallback(function(d,p){if(p===void 0&&(p={}),!u.current)return;if(typeof d=="number"){r.go(d);return}let v=Ld(d,JSON.parse(a),s,p.relative==="path");e==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:er([t,v.pathname])),(p.replace?r.replace:r.push)(v,p.state,p)},[t,r,a,s,e])}function Ix(){let{matches:e}=M.useContext(Nn),t=e[e.length-1];return t?t.params:{}}function Od(e,t){let{relative:r}=t===void 0?{}:t,{matches:i}=M.useContext(Nn),{pathname:s}=Ir(),a=JSON.stringify(kd(i).map(u=>u.pathnameBase));return M.useMemo(()=>Ld(e,JSON.parse(a),s,r==="path"),[e,a,s,r])}function Ax(e,t){return jx(e,t)}function jx(e,t,r){zi()||ze(!1);let{navigator:i}=M.useContext(zr),{matches:s}=M.useContext(Nn),a=s[s.length-1],u=a?a.params:{};a&&a.pathname;let f=a?a.pathnameBase:"/";a&&a.route;let d=Ir(),p;if(t){var v;let E=typeof t=="string"?Ri(t):t;f==="/"||(v=E.pathname)!=null&&v.startsWith(f)||ze(!1),p=E}else p=d;let _=p.pathname||"/",S=f==="/"?_:_.slice(f.length)||"/",k=cx(e,{pathname:S}),P=Fx(k&&k.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:er([f,i.encodeLocation?i.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:er([f,i.encodeLocation?i.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),s,r);return t&&P?M.createElement(pl.Provider,{value:{location:ja({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Hn.Pop}},P):P}function Dx(){let e=Wx(),t=Ox(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),r?M.createElement("pre",{style:s},r):null,a)}const bx=M.createElement(Dx,null);class Bx extends M.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?M.createElement(Nn.Provider,{value:this.props.routeContext},M.createElement(cg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $x(e){let{routeContext:t,match:r,children:i}=e,s=M.useContext(Nd);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),M.createElement(Nn.Provider,{value:t},i)}function Fx(e,t,r){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var s;if((s=r)!=null&&s.errors)e=r.matches;else return null}let a=e,u=(i=r)==null?void 0:i.errors;if(u!=null){let f=a.findIndex(d=>d.route.id&&(u==null?void 0:u[d.route.id]));f>=0||ze(!1),a=a.slice(0,Math.min(a.length,f+1))}return a.reduceRight((f,d,p)=>{let v=d.route.id?u==null?void 0:u[d.route.id]:null,_=null;r&&(_=d.route.errorElement||bx);let S=t.concat(a.slice(0,p+1)),k=()=>{let P;return v?P=_:d.route.Component?P=M.createElement(d.route.Component,null):d.route.element?P=d.route.element:P=f,M.createElement($x,{match:d,routeContext:{outlet:f,matches:S,isDataRoute:r!=null},children:P})};return r&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?M.createElement(Bx,{location:r.location,revalidation:r.revalidation,component:_,error:v,children:k(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):k()},null)}var hg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(hg||{}),Da=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}(Da||{});function Ux(e){let t=M.useContext(Nd);return t||ze(!1),t}function Zx(e){let t=M.useContext(ug);return t||ze(!1),t}function Hx(e){let t=M.useContext(Nn);return t||ze(!1),t}function pg(e){let t=Hx(),r=t.matches[t.matches.length-1];return r.route.id||ze(!1),r.route.id}function Wx(){var e;let t=M.useContext(cg),r=Zx(Da.UseRouteError),i=pg(Da.UseRouteError);return t||((e=r.errors)==null?void 0:e[i])}function Vx(){let{router:e}=Ux(hg.UseNavigateStable),t=pg(Da.UseNavigateStable),r=M.useRef(!1);return fg(()=>{r.current=!0}),M.useCallback(function(s,a){a===void 0&&(a={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ja({fromRouteId:t},a)))},[e,t])}function Md(e){let{to:t,replace:r,state:i,relative:s}=e;zi()||ze(!1);let{matches:a}=M.useContext(Nn),{pathname:u}=Ir(),f=dg(),d=Ld(t,kd(a).map(v=>v.pathnameBase),u,s==="path"),p=JSON.stringify(d);return M.useEffect(()=>f(JSON.parse(p),{replace:r,state:i,relative:s}),[f,p,s,r,i]),null}function vr(e){ze(!1)}function Kx(e){let{basename:t="/",children:r=null,location:i,navigationType:s=Hn.Pop,navigator:a,static:u=!1}=e;zi()&&ze(!1);let f=t.replace(/^\/*/,"/"),d=M.useMemo(()=>({basename:f,navigator:a,static:u}),[f,a,u]);typeof i=="string"&&(i=Ri(i));let{pathname:p="/",search:v="",hash:_="",state:S=null,key:k="default"}=i,P=M.useMemo(()=>{let E=Td(p,f);return E==null?null:{location:{pathname:E,search:v,hash:_,state:S,key:k},navigationType:s}},[f,p,v,_,S,k,s]);return P==null?null:M.createElement(zr.Provider,{value:d},M.createElement(pl.Provider,{children:r,value:P}))}function qx(e){let{children:t,location:r}=e;return Ax(hf(t),r)}new Promise(()=>{});function hf(e,t){t===void 0&&(t=[]);let r=[];return M.Children.forEach(e,(i,s)=>{if(!M.isValidElement(i))return;let a=[...t,s];if(i.type===M.Fragment){r.push.apply(r,hf(i.props.children,a));return}i.type!==vr&&ze(!1),!i.props.index||!i.props.children||ze(!1);let u={id:i.props.id||a.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=hf(i.props.children,a)),r.push(u)}),r}/** + */function ja(){return ja=Object.assign?Object.assign.bind():function(e){for(var t=1;td.pathnameBase)),u=M.useRef(!1);return fg(()=>{u.current=!0}),M.useCallback(function(d,p){if(p===void 0&&(p={}),!u.current)return;if(typeof d=="number"){r.go(d);return}let v=Ld(d,JSON.parse(a),s,p.relative==="path");e==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:er([t,v.pathname])),(p.replace?r.replace:r.push)(v,p.state,p)},[t,r,a,s,e])}function Ix(){let{matches:e}=M.useContext(Nn),t=e[e.length-1];return t?t.params:{}}function Od(e,t){let{relative:r}=t===void 0?{}:t,{matches:i}=M.useContext(Nn),{pathname:s}=Ir(),a=JSON.stringify(kd(i).map(u=>u.pathnameBase));return M.useMemo(()=>Ld(e,JSON.parse(a),s,r==="path"),[e,a,s,r])}function Ax(e,t){return jx(e,t)}function jx(e,t,r){Ri()||ze(!1);let{navigator:i}=M.useContext(zr),{matches:s}=M.useContext(Nn),a=s[s.length-1],u=a?a.params:{};a&&a.pathname;let f=a?a.pathnameBase:"/";a&&a.route;let d=Ir(),p;if(t){var v;let E=typeof t=="string"?Mi(t):t;f==="/"||(v=E.pathname)!=null&&v.startsWith(f)||ze(!1),p=E}else p=d;let _=p.pathname||"/",S=f==="/"?_:_.slice(f.length)||"/",k=cx(e,{pathname:S}),P=Fx(k&&k.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:er([f,i.encodeLocation?i.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:er([f,i.encodeLocation?i.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),s,r);return t&&P?M.createElement(pl.Provider,{value:{location:ja({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Hn.Pop}},P):P}function Dx(){let e=Wx(),t=Ox(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),r?M.createElement("pre",{style:s},r):null,a)}const bx=M.createElement(Dx,null);class Bx extends M.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?M.createElement(Nn.Provider,{value:this.props.routeContext},M.createElement(cg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $x(e){let{routeContext:t,match:r,children:i}=e,s=M.useContext(Nd);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),M.createElement(Nn.Provider,{value:t},i)}function Fx(e,t,r){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var s;if((s=r)!=null&&s.errors)e=r.matches;else return null}let a=e,u=(i=r)==null?void 0:i.errors;if(u!=null){let f=a.findIndex(d=>d.route.id&&(u==null?void 0:u[d.route.id]));f>=0||ze(!1),a=a.slice(0,Math.min(a.length,f+1))}return a.reduceRight((f,d,p)=>{let v=d.route.id?u==null?void 0:u[d.route.id]:null,_=null;r&&(_=d.route.errorElement||bx);let S=t.concat(a.slice(0,p+1)),k=()=>{let P;return v?P=_:d.route.Component?P=M.createElement(d.route.Component,null):d.route.element?P=d.route.element:P=f,M.createElement($x,{match:d,routeContext:{outlet:f,matches:S,isDataRoute:r!=null},children:P})};return r&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?M.createElement(Bx,{location:r.location,revalidation:r.revalidation,component:_,error:v,children:k(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):k()},null)}var hg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(hg||{}),Da=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}(Da||{});function Ux(e){let t=M.useContext(Nd);return t||ze(!1),t}function Zx(e){let t=M.useContext(ug);return t||ze(!1),t}function Hx(e){let t=M.useContext(Nn);return t||ze(!1),t}function pg(e){let t=Hx(),r=t.matches[t.matches.length-1];return r.route.id||ze(!1),r.route.id}function Wx(){var e;let t=M.useContext(cg),r=Zx(Da.UseRouteError),i=pg(Da.UseRouteError);return t||((e=r.errors)==null?void 0:e[i])}function Vx(){let{router:e}=Ux(hg.UseNavigateStable),t=pg(Da.UseNavigateStable),r=M.useRef(!1);return fg(()=>{r.current=!0}),M.useCallback(function(s,a){a===void 0&&(a={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ja({fromRouteId:t},a)))},[e,t])}function Md(e){let{to:t,replace:r,state:i,relative:s}=e;Ri()||ze(!1);let{matches:a}=M.useContext(Nn),{pathname:u}=Ir(),f=dg(),d=Ld(t,kd(a).map(v=>v.pathnameBase),u,s==="path"),p=JSON.stringify(d);return M.useEffect(()=>f(JSON.parse(p),{replace:r,state:i,relative:s}),[f,p,s,r,i]),null}function vr(e){ze(!1)}function Kx(e){let{basename:t="/",children:r=null,location:i,navigationType:s=Hn.Pop,navigator:a,static:u=!1}=e;Ri()&&ze(!1);let f=t.replace(/^\/*/,"/"),d=M.useMemo(()=>({basename:f,navigator:a,static:u}),[f,a,u]);typeof i=="string"&&(i=Mi(i));let{pathname:p="/",search:v="",hash:_="",state:S=null,key:k="default"}=i,P=M.useMemo(()=>{let E=Td(p,f);return E==null?null:{location:{pathname:E,search:v,hash:_,state:S,key:k},navigationType:s}},[f,p,v,_,S,k,s]);return P==null?null:M.createElement(zr.Provider,{value:d},M.createElement(pl.Provider,{children:r,value:P}))}function Gx(e){let{children:t,location:r}=e;return Ax(hf(t),r)}new Promise(()=>{});function hf(e,t){t===void 0&&(t=[]);let r=[];return M.Children.forEach(e,(i,s)=>{if(!M.isValidElement(i))return;let a=[...t,s];if(i.type===M.Fragment){r.push.apply(r,hf(i.props.children,a));return}i.type!==vr&&ze(!1),!i.props.index||!i.props.children||ze(!1);let u={id:i.props.id||a.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=hf(i.props.children,a)),r.push(u)}),r}/** * React Router DOM v6.16.0 * * Copyright (c) Remix Software Inc. @@ -64,7 +64,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[s]=e[s]);return r}function Gx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yx(e,t){return e.button===0&&(!t||t==="_self")&&!Gx(e)}const Qx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Xx=["aria-current","caseSensitive","className","end","style","to","children"],Jx="startTransition",fm=Q0[Jx];function eS(e){let{basename:t,children:r,future:i,window:s}=e,a=M.useRef();a.current==null&&(a.current=ax({window:s,v5Compat:!0}));let u=a.current,[f,d]=M.useState({action:u.action,location:u.location}),{v7_startTransition:p}=i||{},v=M.useCallback(_=>{p&&fm?fm(()=>d(_)):d(_)},[d,p]);return M.useLayoutEffect(()=>u.listen(v),[u,v]),M.createElement(Kx,{basename:t,children:r,location:f.location,navigationType:f.action,navigator:u})}const tS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tn=M.forwardRef(function(t,r){let{onClick:i,relative:s,reloadDocument:a,replace:u,state:f,target:d,to:p,preventScrollReset:v}=t,_=mg(t,Qx),{basename:S}=M.useContext(zr),k,P=!1;if(typeof p=="string"&&nS.test(p)&&(k=p,tS))try{let g=new URL(window.location.href),y=p.startsWith("//")?new URL(g.protocol+p):new URL(p),N=Td(y.pathname,S);y.origin===g.origin&&N!=null?p=N+y.search+y.hash:P=!0}catch{}let E=Rx(p,{relative:s}),R=iS(p,{replace:u,state:f,target:d,preventScrollReset:v,relative:s});function w(g){i&&i(g),g.defaultPrevented||R(g)}return M.createElement("a",ba({},_,{href:k||E,onClick:P||a?i:w,ref:r,target:d}))}),rS=M.forwardRef(function(t,r){let{"aria-current":i="page",caseSensitive:s=!1,className:a="",end:u=!1,style:f,to:d,children:p}=t,v=mg(t,Xx),_=Od(d,{relative:v.relative}),S=Ir(),k=M.useContext(ug),{navigator:P}=M.useContext(zr),E=P.encodeLocation?P.encodeLocation(_).pathname:_.pathname,R=S.pathname,w=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;s||(R=R.toLowerCase(),w=w?w.toLowerCase():null,E=E.toLowerCase());let g=R===E||!u&&R.startsWith(E)&&R.charAt(E.length)==="/",y=w!=null&&(w===E||!u&&w.startsWith(E)&&w.charAt(E.length)==="/"),N=g?i:void 0,j;typeof a=="function"?j=a({isActive:g,isPending:y}):j=[a,g?"active":null,y?"pending":null].filter(Boolean).join(" ");let b=typeof f=="function"?f({isActive:g,isPending:y}):f;return M.createElement(Tn,ba({},v,{"aria-current":N,className:j,ref:r,style:b,to:d}),typeof p=="function"?p({isActive:g,isPending:y}):p)});var dm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(dm||(dm={}));var hm;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(hm||(hm={}));function iS(e,t){let{target:r,replace:i,state:s,preventScrollReset:a,relative:u}=t===void 0?{}:t,f=dg(),d=Ir(),p=Od(e,{relative:u});return M.useCallback(v=>{if(Yx(v,r)){v.preventDefault();let _=i!==void 0?i:Aa(d)===Aa(p);f(e,{replace:_,state:s,preventScrollReset:a,relative:u})}},[d,f,p,i,s,r,e,a,u])}const oS="https://15.design.htmlacademy.pro/six-cities",sS=5e3,aS=4,lS=2e3,uS={perfect:5,good:4,"not bad":3,badly:2,terribly:1},cS=50,fS=1,Ii=[{name:"Paris",location:{latitude:48.85661,longitude:2.351499,zoom:13},slug:"paris"},{name:"Cologne",location:{latitude:50.938361,longitude:6.959974,zoom:13},slug:"cologne"},{name:"Brussels",location:{latitude:50.846557,longitude:4.351697,zoom:13},slug:"brussels"},{name:"Amsterdam",location:{latitude:52.37454,longitude:4.897976,zoom:13},slug:"amsterdam"},{name:"Hamburg",location:{latitude:53.550341,longitude:10.000654,zoom:13},slug:"hamburg"},{name:"Dusseldorf",location:{latitude:51.225402,longitude:6.776314,zoom:13},slug:"dusseldorf"}],dS=Ii[0].slug;var tt=(e=>(e.Root="/",e.Login="/login",e.Favorites="/favorites",e.Offer="/offer",e))(tt||{}),ur=(e=>(e.Offers="/offers",e.Comments="/comments",e.Login="/login",e.Logout="/logout",e))(ur||{}),ht=(e=>(e.Auth="AUTH",e.NoAuth="NO_AUTH",e.Unknown="UNKNOWN",e))(ht||{});const hS="MMMM YYYY",pS="YYYY-MM-DD",mS={iconUrl:"./img/pin.svg",iconSize:[27,39],iconAnchor:[13,39]},_S={iconUrl:"./img/pin-active.svg",iconSize:[27,39],iconAnchor:[13,39]};var we=(e=>(e[e.Idle=0]="Idle",e[e.Loading=1]="Loading",e[e.Succeed=2]="Succeed",e[e.Failed=3]="Failed",e))(we||{});function Rd(){const e=Ir(),t=x.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"});return Ii.map(i=>i.slug).includes(e.pathname.split("/").join(""))?x.jsx("span",{className:"header__logo-link header__logo-link--active",children:t}):x.jsx(Tn,{to:tt.Root,className:"header__logo-link",children:t})}var _g={exports:{}},vg={};/** + */function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[s]=e[s]);return r}function qx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yx(e,t){return e.button===0&&(!t||t==="_self")&&!qx(e)}const Qx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Xx=["aria-current","caseSensitive","className","end","style","to","children"],Jx="startTransition",fm=Q0[Jx];function eS(e){let{basename:t,children:r,future:i,window:s}=e,a=M.useRef();a.current==null&&(a.current=ax({window:s,v5Compat:!0}));let u=a.current,[f,d]=M.useState({action:u.action,location:u.location}),{v7_startTransition:p}=i||{},v=M.useCallback(_=>{p&&fm?fm(()=>d(_)):d(_)},[d,p]);return M.useLayoutEffect(()=>u.listen(v),[u,v]),M.createElement(Kx,{basename:t,children:r,location:f.location,navigationType:f.action,navigator:u})}const tS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tn=M.forwardRef(function(t,r){let{onClick:i,relative:s,reloadDocument:a,replace:u,state:f,target:d,to:p,preventScrollReset:v}=t,_=mg(t,Qx),{basename:S}=M.useContext(zr),k,P=!1;if(typeof p=="string"&&nS.test(p)&&(k=p,tS))try{let g=new URL(window.location.href),y=p.startsWith("//")?new URL(g.protocol+p):new URL(p),N=Td(y.pathname,S);y.origin===g.origin&&N!=null?p=N+y.search+y.hash:P=!0}catch{}let E=Rx(p,{relative:s}),R=iS(p,{replace:u,state:f,target:d,preventScrollReset:v,relative:s});function w(g){i&&i(g),g.defaultPrevented||R(g)}return M.createElement("a",ba({},_,{href:k||E,onClick:P||a?i:w,ref:r,target:d}))}),rS=M.forwardRef(function(t,r){let{"aria-current":i="page",caseSensitive:s=!1,className:a="",end:u=!1,style:f,to:d,children:p}=t,v=mg(t,Xx),_=Od(d,{relative:v.relative}),S=Ir(),k=M.useContext(ug),{navigator:P}=M.useContext(zr),E=P.encodeLocation?P.encodeLocation(_).pathname:_.pathname,R=S.pathname,w=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;s||(R=R.toLowerCase(),w=w?w.toLowerCase():null,E=E.toLowerCase());let g=R===E||!u&&R.startsWith(E)&&R.charAt(E.length)==="/",y=w!=null&&(w===E||!u&&w.startsWith(E)&&w.charAt(E.length)==="/"),N=g?i:void 0,j;typeof a=="function"?j=a({isActive:g,isPending:y}):j=[a,g?"active":null,y?"pending":null].filter(Boolean).join(" ");let b=typeof f=="function"?f({isActive:g,isPending:y}):f;return M.createElement(Tn,ba({},v,{"aria-current":N,className:j,ref:r,style:b,to:d}),typeof p=="function"?p({isActive:g,isPending:y}):p)});var dm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(dm||(dm={}));var hm;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(hm||(hm={}));function iS(e,t){let{target:r,replace:i,state:s,preventScrollReset:a,relative:u}=t===void 0?{}:t,f=dg(),d=Ir(),p=Od(e,{relative:u});return M.useCallback(v=>{if(Yx(v,r)){v.preventDefault();let _=i!==void 0?i:Aa(d)===Aa(p);f(e,{replace:_,state:s,preventScrollReset:a,relative:u})}},[d,f,p,i,s,r,e,a,u])}const oS="https://15.design.htmlacademy.pro/six-cities",sS=5e3,aS=4,lS=2e3,uS={perfect:5,good:4,"not bad":3,badly:2,terribly:1},cS=50,fS=1,zi=[{name:"Paris",location:{latitude:48.85661,longitude:2.351499,zoom:13},slug:"paris"},{name:"Cologne",location:{latitude:50.938361,longitude:6.959974,zoom:13},slug:"cologne"},{name:"Brussels",location:{latitude:50.846557,longitude:4.351697,zoom:13},slug:"brussels"},{name:"Amsterdam",location:{latitude:52.37454,longitude:4.897976,zoom:13},slug:"amsterdam"},{name:"Hamburg",location:{latitude:53.550341,longitude:10.000654,zoom:13},slug:"hamburg"},{name:"Dusseldorf",location:{latitude:51.225402,longitude:6.776314,zoom:13},slug:"dusseldorf"}],dS=zi[0].slug;var tt=(e=>(e.Root="/",e.Login="/login",e.Favorites="/favorites",e.Offer="/offer",e))(tt||{}),ur=(e=>(e.Offers="/offers",e.Comments="/comments",e.Login="/login",e.Logout="/logout",e))(ur||{}),ht=(e=>(e.Auth="AUTH",e.NoAuth="NO_AUTH",e.Unknown="UNKNOWN",e))(ht||{});const hS="MMMM YYYY",pS="YYYY-MM-DD",mS={iconUrl:"./img/pin.svg",iconSize:[27,39],iconAnchor:[13,39]},_S={iconUrl:"./img/pin-active.svg",iconSize:[27,39],iconAnchor:[13,39]};var we=(e=>(e[e.Idle=0]="Idle",e[e.Loading=1]="Loading",e[e.Succeed=2]="Succeed",e[e.Failed=3]="Failed",e))(we||{});function Rd(){const e=Ir(),t=x.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"});return zi.map(i=>i.slug).includes(e.pathname.split("/").join(""))?x.jsx("span",{className:"header__logo-link header__logo-link--active",children:t}):x.jsx(Tn,{to:tt.Root,className:"header__logo-link",children:t})}var _g={exports:{}},vg={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -87,7 +87,7 @@ Error generating stack: `+a.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var He=typeof Symbol=="function"&&Symbol.for,Id=He?Symbol.for("react.element"):60103,Ad=He?Symbol.for("react.portal"):60106,_l=He?Symbol.for("react.fragment"):60107,vl=He?Symbol.for("react.strict_mode"):60108,gl=He?Symbol.for("react.profiler"):60114,yl=He?Symbol.for("react.provider"):60109,wl=He?Symbol.for("react.context"):60110,jd=He?Symbol.for("react.async_mode"):60111,xl=He?Symbol.for("react.concurrent_mode"):60111,Sl=He?Symbol.for("react.forward_ref"):60112,El=He?Symbol.for("react.suspense"):60113,WS=He?Symbol.for("react.suspense_list"):60120,Pl=He?Symbol.for("react.memo"):60115,Cl=He?Symbol.for("react.lazy"):60116,VS=He?Symbol.for("react.block"):60121,KS=He?Symbol.for("react.fundamental"):60117,qS=He?Symbol.for("react.responder"):60118,GS=He?Symbol.for("react.scope"):60119;function Et(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Id:switch(e=e.type,e){case jd:case xl:case _l:case gl:case vl:case El:return e;default:switch(e=e&&e.$$typeof,e){case wl:case Sl:case Cl:case Pl:case yl:return e;default:return t}}case Ad:return t}}}function Pg(e){return Et(e)===xl}_e.AsyncMode=jd;_e.ConcurrentMode=xl;_e.ContextConsumer=wl;_e.ContextProvider=yl;_e.Element=Id;_e.ForwardRef=Sl;_e.Fragment=_l;_e.Lazy=Cl;_e.Memo=Pl;_e.Portal=Ad;_e.Profiler=gl;_e.StrictMode=vl;_e.Suspense=El;_e.isAsyncMode=function(e){return Pg(e)||Et(e)===jd};_e.isConcurrentMode=Pg;_e.isContextConsumer=function(e){return Et(e)===wl};_e.isContextProvider=function(e){return Et(e)===yl};_e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Id};_e.isForwardRef=function(e){return Et(e)===Sl};_e.isFragment=function(e){return Et(e)===_l};_e.isLazy=function(e){return Et(e)===Cl};_e.isMemo=function(e){return Et(e)===Pl};_e.isPortal=function(e){return Et(e)===Ad};_e.isProfiler=function(e){return Et(e)===gl};_e.isStrictMode=function(e){return Et(e)===vl};_e.isSuspense=function(e){return Et(e)===El};_e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===_l||e===xl||e===gl||e===vl||e===El||e===WS||typeof e=="object"&&e!==null&&(e.$$typeof===Cl||e.$$typeof===Pl||e.$$typeof===yl||e.$$typeof===wl||e.$$typeof===Sl||e.$$typeof===KS||e.$$typeof===qS||e.$$typeof===GS||e.$$typeof===VS)};_e.typeOf=Et;Eg.exports=_e;var YS=Eg.exports,Cg=YS,QS={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},XS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Tg={};Tg[Cg.ForwardRef]=QS;Tg[Cg.Memo]=XS;var ge={};/** + */var He=typeof Symbol=="function"&&Symbol.for,Id=He?Symbol.for("react.element"):60103,Ad=He?Symbol.for("react.portal"):60106,_l=He?Symbol.for("react.fragment"):60107,vl=He?Symbol.for("react.strict_mode"):60108,gl=He?Symbol.for("react.profiler"):60114,yl=He?Symbol.for("react.provider"):60109,wl=He?Symbol.for("react.context"):60110,jd=He?Symbol.for("react.async_mode"):60111,xl=He?Symbol.for("react.concurrent_mode"):60111,Sl=He?Symbol.for("react.forward_ref"):60112,El=He?Symbol.for("react.suspense"):60113,WS=He?Symbol.for("react.suspense_list"):60120,Pl=He?Symbol.for("react.memo"):60115,Cl=He?Symbol.for("react.lazy"):60116,VS=He?Symbol.for("react.block"):60121,KS=He?Symbol.for("react.fundamental"):60117,GS=He?Symbol.for("react.responder"):60118,qS=He?Symbol.for("react.scope"):60119;function St(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Id:switch(e=e.type,e){case jd:case xl:case _l:case gl:case vl:case El:return e;default:switch(e=e&&e.$$typeof,e){case wl:case Sl:case Cl:case Pl:case yl:return e;default:return t}}case Ad:return t}}}function Pg(e){return St(e)===xl}_e.AsyncMode=jd;_e.ConcurrentMode=xl;_e.ContextConsumer=wl;_e.ContextProvider=yl;_e.Element=Id;_e.ForwardRef=Sl;_e.Fragment=_l;_e.Lazy=Cl;_e.Memo=Pl;_e.Portal=Ad;_e.Profiler=gl;_e.StrictMode=vl;_e.Suspense=El;_e.isAsyncMode=function(e){return Pg(e)||St(e)===jd};_e.isConcurrentMode=Pg;_e.isContextConsumer=function(e){return St(e)===wl};_e.isContextProvider=function(e){return St(e)===yl};_e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Id};_e.isForwardRef=function(e){return St(e)===Sl};_e.isFragment=function(e){return St(e)===_l};_e.isLazy=function(e){return St(e)===Cl};_e.isMemo=function(e){return St(e)===Pl};_e.isPortal=function(e){return St(e)===Ad};_e.isProfiler=function(e){return St(e)===gl};_e.isStrictMode=function(e){return St(e)===vl};_e.isSuspense=function(e){return St(e)===El};_e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===_l||e===xl||e===gl||e===vl||e===El||e===WS||typeof e=="object"&&e!==null&&(e.$$typeof===Cl||e.$$typeof===Pl||e.$$typeof===yl||e.$$typeof===wl||e.$$typeof===Sl||e.$$typeof===KS||e.$$typeof===GS||e.$$typeof===qS||e.$$typeof===VS)};_e.typeOf=St;Eg.exports=_e;var YS=Eg.exports,Cg=YS,QS={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},XS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Tg={};Tg[Cg.ForwardRef]=QS;Tg[Cg.Memo]=XS;var ye={};/** * @license React * react-is.production.min.js * @@ -95,11 +95,11 @@ Error generating stack: `+a.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Dd=Symbol.for("react.element"),bd=Symbol.for("react.portal"),Tl=Symbol.for("react.fragment"),kl=Symbol.for("react.strict_mode"),Ll=Symbol.for("react.profiler"),Nl=Symbol.for("react.provider"),Ol=Symbol.for("react.context"),JS=Symbol.for("react.server_context"),Ml=Symbol.for("react.forward_ref"),Rl=Symbol.for("react.suspense"),zl=Symbol.for("react.suspense_list"),Il=Symbol.for("react.memo"),Al=Symbol.for("react.lazy"),eE=Symbol.for("react.offscreen"),kg;kg=Symbol.for("react.module.reference");function At(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Dd:switch(e=e.type,e){case Tl:case Ll:case kl:case Rl:case zl:return e;default:switch(e=e&&e.$$typeof,e){case JS:case Ol:case Ml:case Al:case Il:case Nl:return e;default:return t}}case bd:return t}}}ge.ContextConsumer=Ol;ge.ContextProvider=Nl;ge.Element=Dd;ge.ForwardRef=Ml;ge.Fragment=Tl;ge.Lazy=Al;ge.Memo=Il;ge.Portal=bd;ge.Profiler=Ll;ge.StrictMode=kl;ge.Suspense=Rl;ge.SuspenseList=zl;ge.isAsyncMode=function(){return!1};ge.isConcurrentMode=function(){return!1};ge.isContextConsumer=function(e){return At(e)===Ol};ge.isContextProvider=function(e){return At(e)===Nl};ge.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Dd};ge.isForwardRef=function(e){return At(e)===Ml};ge.isFragment=function(e){return At(e)===Tl};ge.isLazy=function(e){return At(e)===Al};ge.isMemo=function(e){return At(e)===Il};ge.isPortal=function(e){return At(e)===bd};ge.isProfiler=function(e){return At(e)===Ll};ge.isStrictMode=function(e){return At(e)===kl};ge.isSuspense=function(e){return At(e)===Rl};ge.isSuspenseList=function(e){return At(e)===zl};ge.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Tl||e===Ll||e===kl||e===Rl||e===zl||e===eE||typeof e=="object"&&e!==null&&(e.$$typeof===Al||e.$$typeof===Il||e.$$typeof===Nl||e.$$typeof===Ol||e.$$typeof===Ml||e.$$typeof===kg||e.getModuleId!==void 0)};ge.typeOf=At;function tE(){const e=bS();let t=null,r=null;return{clear(){t=null,r=null},notify(){e(()=>{let i=t;for(;i;)i.callback(),i=i.next})},get(){let i=[],s=t;for(;s;)i.push(s),s=s.next;return i},subscribe(i){let s=!0,a=r={callback:i,next:null,prev:r};return a.prev?a.prev.next=a:t=a,function(){!s||t===null||(s=!1,a.next?a.next.prev=a.prev:r=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}const _m={notify(){},get:()=>[]};function nE(e,t){let r,i=_m,s=0,a=!1;function u(E){v();const R=i.subscribe(E);let w=!1;return()=>{w||(w=!0,R(),_())}}function f(){i.notify()}function d(){P.onStateChange&&P.onStateChange()}function p(){return a}function v(){s++,r||(r=t?t.addNestedSub(d):e.subscribe(d),i=tE())}function _(){s--,r&&s===0&&(r(),r=void 0,i.clear(),i=_m)}function S(){a||(a=!0,v())}function k(){a&&(a=!1,_())}const P={addNestedSub:u,notifyNestedSubs:f,handleChangeWrapper:d,isSubscribed:p,trySubscribe:S,tryUnsubscribe:k,getListeners:()=>i};return P}const rE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iE=rE?M.useLayoutEffect:M.useEffect;function oE({store:e,context:t,children:r,serverState:i,stabilityCheck:s="once",noopCheck:a="once"}){const u=M.useMemo(()=>{const p=nE(e);return{store:e,subscription:p,getServerState:i?()=>i:void 0,stabilityCheck:s,noopCheck:a}},[e,i,s,a]),f=M.useMemo(()=>e.getState(),[e]);iE(()=>{const{subscription:p}=u;return p.onStateChange=p.notifyNestedSubs,p.trySubscribe(),f!==e.getState()&&p.notifyNestedSubs(),()=>{p.tryUnsubscribe(),p.onStateChange=void 0}},[u,f]);const d=t||ir;return M.createElement(d.Provider,{value:u},r)}function Lg(e=ir){const t=e===ir?xg:zd(e);return function(){const{store:i}=t();return i}}const sE=Lg();function aE(e=ir){const t=e===ir?sE:Lg(e);return function(){return t().dispatch}}const lE=aE();FS(AS.useSyncExternalStoreWithSelector);DS(og.unstable_batchedUpdates);function Fe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var uE=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")(),vm=uE,uc=()=>Math.random().toString(36).substring(7).split("").join("."),cE={INIT:`@@redux/INIT${uc()}`,REPLACE:`@@redux/REPLACE${uc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${uc()}`},Ba=cE;function Bd(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ng(e,t,r){if(typeof e!="function")throw new Error(Fe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Fe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Fe(1));return r(Ng)(e,t)}let i=e,s=t,a=new Map,u=a,f=0,d=!1;function p(){u===a&&(u=new Map,a.forEach((R,w)=>{u.set(w,R)}))}function v(){if(d)throw new Error(Fe(3));return s}function _(R){if(typeof R!="function")throw new Error(Fe(4));if(d)throw new Error(Fe(5));let w=!0;p();const g=f++;return u.set(g,R),function(){if(w){if(d)throw new Error(Fe(6));w=!1,p(),u.delete(g),a=null}}}function S(R){if(!Bd(R))throw new Error(Fe(7));if(typeof R.type>"u")throw new Error(Fe(8));if(typeof R.type!="string")throw new Error(Fe(17));if(d)throw new Error(Fe(9));try{d=!0,s=i(s,R)}finally{d=!1}return(a=u).forEach(g=>{g()}),R}function k(R){if(typeof R!="function")throw new Error(Fe(10));i=R,S({type:Ba.REPLACE})}function P(){const R=_;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(Fe(11));function g(){const N=w;N.next&&N.next(v())}return g(),{unsubscribe:R(g)}},[vm](){return this}}}return S({type:Ba.INIT}),{dispatch:S,subscribe:_,getState:v,replaceReducer:k,[vm]:P}}function fE(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Ba.INIT})>"u")throw new Error(Fe(12));if(typeof r(void 0,{type:Ba.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Fe(13))})}function Og(e){const t=Object.keys(e),r={};for(let a=0;a"u")throw f&&f.type,new Error(Fe(14));p[_]=P,d=d||P!==k}return d=d||i.length!==Object.keys(u).length,d?p:u}}function gm(e,t){return function(...r){return t(e.apply(this,r))}}function dE(e,t){if(typeof e=="function")return gm(e,t);if(typeof e!="object"||e===null)throw new Error(Fe(16));const r={};for(const i in e){const s=e[i];typeof s=="function"&&(r[i]=gm(s,t))}return r}function $a(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...i)=>t(r(...i)))}function hE(...e){return t=>(r,i)=>{const s=t(r,i);let a=()=>{throw new Error(Fe(15))};const u={getState:s.getState,dispatch:(d,...p)=>a(d,...p)},f=e.map(d=>d(u));return a=$a(...f)(s.dispatch),{...s,dispatch:a}}}function pE(e){return Bd(e)&&"type"in e&&typeof e.type=="string"}var Mg=Symbol.for("immer-nothing"),ym=Symbol.for("immer-draftable"),yt=Symbol.for("immer-state");function Ht(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ci=Object.getPrototypeOf;function or(e){return!!e&&!!e[yt]}function kn(e){var t;return e?Rg(e)||Array.isArray(e)||!!e[ym]||!!((t=e.constructor)!=null&&t[ym])||Dl(e)||bl(e):!1}var mE=Object.prototype.constructor.toString();function Rg(e){if(!e||typeof e!="object")return!1;const t=Ci(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===mE}function Fa(e,t){jl(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,i)=>t(i,r,e))}function jl(e){const t=e[yt];return t?t.type_:Array.isArray(e)?1:Dl(e)?2:bl(e)?3:0}function pf(e,t){return jl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function zg(e,t,r){const i=jl(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function _E(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Dl(e){return e instanceof Map}function bl(e){return e instanceof Set}function gr(e){return e.copy_||e.base_}function mf(e,t){if(Dl(e))return new Map(e);if(bl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Rg(e))return Ci(e)?{...e}:Object.assign(Object.create(null),e);const r=Object.getOwnPropertyDescriptors(e);delete r[yt];let i=Reflect.ownKeys(r);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=vE),Object.freeze(e),t&&Object.entries(e).forEach(([r,i])=>$d(i,!0))),e}function vE(){Ht(2)}function Bl(e){return Object.isFrozen(e)}var gE={};function Or(e){const t=gE[e];return t||Ht(0,e),t}var Bo;function Ig(){return Bo}function yE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function wm(e,t){t&&(Or("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function _f(e){vf(e),e.drafts_.forEach(wE),e.drafts_=null}function vf(e){e===Bo&&(Bo=e.parent_)}function xm(e){return Bo=yE(Bo,e)}function wE(e){const t=e[yt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Sm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[yt].modified_&&(_f(t),Ht(4)),kn(e)&&(e=Ua(t,e),t.parent_||Za(t,e)),t.patches_&&Or("Patches").generateReplacementPatches_(r[yt].base_,e,t.patches_,t.inversePatches_)):e=Ua(t,r,[]),_f(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Mg?e:void 0}function Ua(e,t,r){if(Bl(t))return t;const i=t[yt];if(!i)return Fa(t,(s,a)=>Em(e,i,t,s,a,r)),t;if(i.scope_!==e)return t;if(!i.modified_)return Za(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const s=i.copy_;let a=s,u=!1;i.type_===3&&(a=new Set(s),s.clear(),u=!0),Fa(a,(f,d)=>Em(e,i,s,f,d,r,u)),Za(e,s,!1),r&&e.patches_&&Or("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function Em(e,t,r,i,s,a,u){if(or(s)){const f=a&&t&&t.type_!==3&&!pf(t.assigned_,i)?a.concat(i):void 0,d=Ua(e,s,f);if(zg(r,i,d),or(d))e.canAutoFreeze_=!1;else return}else u&&r.add(s);if(kn(s)&&!Bl(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ua(e,s),(!t||!t.scope_.parent_)&&typeof i!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,i)&&Za(e,s)}}function Za(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$d(t,r)}function xE(e,t){const r=Array.isArray(e),i={type_:r?1:0,scope_:t?t.scope_:Ig(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=i,a=Fd;r&&(s=[i],a=$o);const{revoke:u,proxy:f}=Proxy.revocable(s,a);return i.draft_=f,i.revoke_=u,f}var Fd={get(e,t){if(t===yt)return e;const r=gr(e);if(!pf(r,t))return SE(e,r,t);const i=r[t];return e.finalized_||!kn(i)?i:i===cc(e.base_,t)?(fc(e),e.copy_[t]=yf(i,e)):i},has(e,t){return t in gr(e)},ownKeys(e){return Reflect.ownKeys(gr(e))},set(e,t,r){const i=Ag(gr(e),t);if(i!=null&&i.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){const s=cc(gr(e),t),a=s==null?void 0:s[yt];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(_E(r,s)&&(r!==void 0||pf(e.base_,t)))return!0;fc(e),gf(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return cc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fc(e),gf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=gr(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty(){Ht(11)},getPrototypeOf(e){return Ci(e.base_)},setPrototypeOf(){Ht(12)}},$o={};Fa(Fd,(e,t)=>{$o[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$o.deleteProperty=function(e,t){return $o.set.call(this,e,t,void 0)};$o.set=function(e,t,r){return Fd.set.call(this,e[0],t,r,e[0])};function cc(e,t){const r=e[yt];return(r?gr(r):e)[t]}function SE(e,t,r){var s;const i=Ag(t,r);return i?"value"in i?i.value:(s=i.get)==null?void 0:s.call(e.draft_):void 0}function Ag(e,t){if(!(t in e))return;let r=Ci(e);for(;r;){const i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Ci(r)}}function gf(e){e.modified_||(e.modified_=!0,e.parent_&&gf(e.parent_))}function fc(e){e.copy_||(e.copy_=mf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var EE=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,i)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const u=this;return function(d=a,...p){return u.produce(d,v=>r.call(this,v,...p))}}typeof r!="function"&&Ht(6),i!==void 0&&typeof i!="function"&&Ht(7);let s;if(kn(t)){const a=xm(this),u=yf(t,void 0);let f=!0;try{s=r(u),f=!1}finally{f?_f(a):vf(a)}return wm(a,i),Sm(s,a)}else if(!t||typeof t!="object"){if(s=r(t),s===void 0&&(s=t),s===Mg&&(s=void 0),this.autoFreeze_&&$d(s,!0),i){const a=[],u=[];Or("Patches").generateReplacementPatches_(t,s,a,u),i(a,u)}return s}else Ht(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...f)=>this.produceWithPatches(u,d=>t(d,...f));let i,s;return[this.produce(t,r,(u,f)=>{i=u,s=f}),i,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){kn(e)||Ht(8),or(e)&&(e=jg(e));const t=xm(this),r=yf(e,void 0);return r[yt].isManual_=!0,vf(t),r}finishDraft(e,t){const r=e&&e[yt];(!r||!r.isManual_)&&Ht(9);const{scope_:i}=r;return wm(i,t),Sm(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));const i=Or("Patches").applyPatches_;return or(e)?i(e,t):this.produce(e,s=>i(s,t))}};function yf(e,t){const r=Dl(e)?Or("MapSet").proxyMap_(e,t):bl(e)?Or("MapSet").proxySet_(e,t):xE(e,t);return(t?t.scope_:Ig()).drafts_.push(r),r}function jg(e){return or(e)||Ht(10,e),Dg(e)}function Dg(e){if(!kn(e)||Bl(e))return e;const t=e[yt];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=mf(e,t.scope_.immer_.useStrictShallowCopy_)}else r=mf(e,!0);return Fa(r,(i,s)=>{zg(r,i,Dg(s))}),t&&(t.finalized_=!1),r}var wt=new EE,bg=wt.produce;wt.produceWithPatches.bind(wt);wt.setAutoFreeze.bind(wt);wt.setUseStrictShallowCopy.bind(wt);wt.applyPatches.bind(wt);wt.createDraft.bind(wt);wt.finishDraft.bind(wt);function PE(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function CE(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function TE(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(i=>typeof i=="function"?`function ${i.name||"unnamed"}()`:typeof i).join(", ");throw new TypeError(`${t}[${r}]`)}}var Pm=e=>Array.isArray(e)?e:[e];function kE(e){const t=Array.isArray(e[0])?e[0]:e;return TE(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function LE(e,t){const r=[],{length:i}=e;for(let s=0;s{r=Fs(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}function Bg(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...s)=>{let a=0,u=0,f,d={},p=s.pop();typeof p=="object"&&(d=p,p=s.pop()),PE(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);const v={...r,...d},{memoize:_,memoizeOptions:S=[],argsMemoize:k=Ud,argsMemoizeOptions:P=[],devModeChecks:E={}}=v,R=Pm(S),w=Pm(P),g=kE(s),y=_(function(){return a++,p.apply(null,arguments)},...R),N=k(function(){u++;const b=LE(g,arguments);return f=y.apply(null,b),f},...w);return Object.assign(N,{resultFunc:p,memoizedResultFunc:y,dependencies:g,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>f,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:_,argsMemoize:k})};return Object.assign(i,{withTypes:()=>i}),i}var RE=Bg(Ud),zE=Object.assign((e,t=RE)=>{CE(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),i=r.map(a=>e[a]);return t(i,(...a)=>a.reduce((u,f,d)=>(u[r[d]]=f,u),{}))},{withTypes:()=>zE});function $g(e){return({dispatch:r,getState:i})=>s=>a=>typeof a=="function"?a(r,i,e):s(a)}var IE=$g(),AE=$g,jE=(...e)=>{const t=Bg(...e),r=Object.assign((...i)=>{const s=t(...i),a=(u,...f)=>s(or(u)?jg(u):u,...f);return Object.assign(a,s),a},{withTypes:()=>r});return r};jE(Ud);var DE=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$a:$a.apply(null,arguments)},bE=e=>e&&typeof e.match=="function";function wn(e,t){function r(...i){if(t){let s=t(...i);if(!s)throw new Error(ft(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:i[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=i=>pE(i)&&i.type===e,r}var Fg=class uo extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,uo.prototype)}static get[Symbol.species](){return uo}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new uo(...t[0].concat(this)):new uo(...t.concat(this))}};function Tm(e){return kn(e)?bg(e,()=>{}):e}function km(e,t,r){if(e.has(t)){let s=e.get(t);return r.update&&(s=r.update(s,t,e),e.set(t,s)),s}if(!r.insert)throw new Error(ft(10));const i=r.insert(t,e);return e.set(t,i),i}function BE(e){return typeof e=="boolean"}var $E=()=>function(t){const{thunk:r=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:a=!0}=t??{};let u=new Fg;return r&&(BE(r)?u.push(IE):u.push(AE(r.extraArgument))),u},FE="RTK_autoBatch",Ug=e=>t=>{setTimeout(t,e)},UE=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ug(10),ZE=(e={type:"raf"})=>t=>(...r)=>{const i=t(...r);let s=!0,a=!1,u=!1;const f=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?UE:e.type==="callback"?e.queueNotification:Ug(e.timeout),p=()=>{u=!1,a&&(a=!1,f.forEach(v=>v()))};return Object.assign({},i,{subscribe(v){const _=()=>s&&v(),S=i.subscribe(_);return f.add(v),()=>{S(),f.delete(v)}},dispatch(v){var _;try{return s=!((_=v==null?void 0:v.meta)!=null&&_[FE]),a=!s,a&&(u||(u=!0,d(p))),i.dispatch(v)}finally{s=!0}}})},HE=e=>function(r){const{autoBatch:i=!0}=r??{};let s=new Fg(e);return i&&s.push(ZE(typeof i=="object"?i:void 0)),s},WE=!0;function VE(e){const t=$E(),{reducer:r=void 0,middleware:i,devTools:s=!0,preloadedState:a=void 0,enhancers:u=void 0}=e||{};let f;if(typeof r=="function")f=r;else if(Bd(r))f=Og(r);else throw new Error(ft(1));let d;typeof i=="function"?d=i(t):d=t();let p=$a;s&&(p=DE({trace:!WE,...typeof s=="object"&&s}));const v=hE(...d),_=HE(v);let S=typeof u=="function"?u(_):_();const k=p(...S);return Ng(f,a,k)}function Zg(e){const t={},r=[];let i;const s={addCase(a,u){const f=typeof a=="string"?a:a.type;if(!f)throw new Error(ft(28));if(f in t)throw new Error(ft(29));return t[f]=u,s},addMatcher(a,u){return r.push({matcher:a,reducer:u}),s},addDefaultCase(a){return i=a,s}};return e(s),[t,r,i]}function KE(e){return typeof e=="function"}function qE(e,t){let[r,i,s]=Zg(t),a;if(KE(e))a=()=>Tm(e());else{const f=Tm(e);a=()=>f}function u(f=a(),d){let p=[r[d.type],...i.filter(({matcher:v})=>v(d)).map(({reducer:v})=>v)];return p.filter(v=>!!v).length===0&&(p=[s]),p.reduce((v,_)=>{if(_)if(or(v)){const k=_(v,d);return k===void 0?v:k}else{if(kn(v))return bg(v,S=>_(S,d));{const S=_(v,d);if(S===void 0){if(v===null)return v;throw new Error(ft(9))}return S}}return v},f)}return u.getInitialState=a,u}var GE="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Hg=(e=21)=>{let t="",r=e;for(;r--;)t+=GE[Math.random()*64|0];return t},YE=(e,t)=>bE(e)?e.match(t):e(t);function QE(...e){return t=>e.some(r=>YE(r,t))}var XE=["name","message","stack","code"],dc=class{constructor(e,t){Iu(this,"_type");this.payload=e,this.meta=t}},Lm=class{constructor(e,t){Iu(this,"_type");this.payload=e,this.meta=t}},JE=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of XE)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Ar=(()=>{function e(t,r,i){const s=wn(t+"/fulfilled",(d,p,v,_)=>({payload:d,meta:{..._||{},arg:v,requestId:p,requestStatus:"fulfilled"}})),a=wn(t+"/pending",(d,p,v)=>({payload:void 0,meta:{...v||{},arg:p,requestId:d,requestStatus:"pending"}})),u=wn(t+"/rejected",(d,p,v,_,S)=>({payload:_,error:(i&&i.serializeError||JE)(d||"Rejected"),meta:{...S||{},arg:v,requestId:p,rejectedWithValue:!!_,requestStatus:"rejected",aborted:(d==null?void 0:d.name)==="AbortError",condition:(d==null?void 0:d.name)==="ConditionError"}}));function f(d){return(p,v,_)=>{const S=i!=null&&i.idGenerator?i.idGenerator(d):Hg(),k=new AbortController;let P,E;function R(g){E=g,k.abort()}const w=async function(){var N,j;let g;try{let b=(N=i==null?void 0:i.condition)==null?void 0:N.call(i,d,{getState:v,extra:_});if(tP(b)&&(b=await b),b===!1||k.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const B=new Promise((I,X)=>{P=()=>{X({name:"AbortError",message:E||"Aborted"})},k.signal.addEventListener("abort",P)});p(a(S,d,(j=i==null?void 0:i.getPendingMeta)==null?void 0:j.call(i,{requestId:S,arg:d},{getState:v,extra:_}))),g=await Promise.race([B,Promise.resolve(r(d,{dispatch:p,getState:v,extra:_,requestId:S,signal:k.signal,abort:R,rejectWithValue:(I,X)=>new dc(I,X),fulfillWithValue:(I,X)=>new Lm(I,X)})).then(I=>{if(I instanceof dc)throw I;return I instanceof Lm?s(I.payload,S,d,I.meta):s(I,S,d)})])}catch(b){g=b instanceof dc?u(null,S,d,b.payload,b.meta):u(b,S,d)}finally{P&&k.signal.removeEventListener("abort",P)}return i&&!i.dispatchConditionRejection&&u.match(g)&&g.meta.condition||p(g),g}();return Object.assign(w,{abort:R,requestId:S,arg:d,unwrap(){return w.then(eP)}})}}return Object.assign(f,{pending:a,rejected:u,fulfilled:s,settled:QE(u,s),typePrefix:t})}return e.withTypes=()=>e,e})();function eP(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function tP(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var nP=Symbol.for("rtk-slice-createasyncthunk");function rP(e,t){return`${e}/${t}`}function iP({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[nP];return function(s){const{name:a,reducerPath:u=a}=s;if(!a)throw new Error(ft(11));typeof process<"u";const f=(typeof s.reducers=="function"?s.reducers(sP()):s.reducers)||{},d=Object.keys(f),p={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},v={addCase(y,N){const j=typeof y=="string"?y:y.type;if(!j)throw new Error(ft(12));if(j in p.sliceCaseReducersByType)throw new Error(ft(13));return p.sliceCaseReducersByType[j]=N,v},addMatcher(y,N){return p.sliceMatchers.push({matcher:y,reducer:N}),v},exposeAction(y,N){return p.actionCreators[y]=N,v},exposeCaseReducer(y,N){return p.sliceCaseReducersByName[y]=N,v}};d.forEach(y=>{const N=f[y],j={reducerName:y,type:rP(a,y),createNotation:typeof s.reducers=="function"};lP(N)?cP(j,N,v,t):aP(j,N,v)});function _(){const[y={},N=[],j=void 0]=typeof s.extraReducers=="function"?Zg(s.extraReducers):[s.extraReducers],b={...y,...p.sliceCaseReducersByType};return qE(s.initialState,B=>{for(let I in b)B.addCase(I,b[I]);for(let I of p.sliceMatchers)B.addMatcher(I.matcher,I.reducer);for(let I of N)B.addMatcher(I.matcher,I.reducer);j&&B.addDefaultCase(j)})}const S=y=>y,k=new Map;let P;function E(y,N){return P||(P=_()),P(y,N)}function R(){return P||(P=_()),P.getInitialState()}function w(y,N=!1){function j(B){let I=B[y];return typeof I>"u"&&N&&(I=R()),I}function b(B=S){const I=km(k,N,{insert:()=>new WeakMap});return km(I,B,{insert:()=>{const X={};for(const[V,G]of Object.entries(s.selectors??{}))X[V]=oP(G,B,R,N);return X}})}return{reducerPath:y,getSelectors:b,get selectors(){return b(j)},selectSlice:j}}const g={name:a,reducer:E,actions:p.actionCreators,caseReducers:p.sliceCaseReducersByName,getInitialState:R,...w(u),injectInto(y,{reducerPath:N,...j}={}){const b=N??u;return y.inject({reducerPath:b,reducer:E},j),{...g,...w(b,!0)}}};return g}}function oP(e,t,r,i){function s(a,...u){let f=t(a);return typeof f>"u"&&i&&(f=r()),e(f,...u)}return s.unwrapped=e,s}var Yo=iP();function sP(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function aP({type:e,reducerName:t,createNotation:r},i,s){let a,u;if("reducer"in i){if(r&&!uP(i))throw new Error(ft(17));a=i.reducer,u=i.prepare}else a=i;s.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,u?wn(e,u):wn(e))}function lP(e){return e._reducerDefinitionType==="asyncThunk"}function uP(e){return e._reducerDefinitionType==="reducerWithPrepare"}function cP({type:e,reducerName:t},r,i,s){if(!s)throw new Error(ft(18));const{payloadCreator:a,fulfilled:u,pending:f,rejected:d,settled:p,options:v}=r,_=s(e,a,v);i.exposeAction(t,_),u&&i.addCase(_.fulfilled,u),f&&i.addCase(_.pending,f),d&&i.addCase(_.rejected,d),p&&i.addMatcher(_.settled,p),i.exposeCaseReducer(t,{fulfilled:u||Us,pending:f||Us,rejected:d||Us,settled:p||Us})}function Us(){}var fP=(e,t)=>{if(typeof e!="function")throw new Error(ft(32))},Zd="listenerMiddleware",dP=e=>{let{type:t,actionCreator:r,matcher:i,predicate:s,effect:a}=e;if(t)s=wn(t).match;else if(r)t=r.type,s=r.match;else if(i)s=i;else if(!s)throw new Error(ft(21));return fP(a),{predicate:s,type:t,effect:a}},hP=Object.assign(e=>{const{type:t,predicate:r,effect:i}=dP(e);return{id:Hg(),effect:i,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(ft(22))}}},{withTypes:()=>hP}),pP=Object.assign(wn(`${Zd}/add`),{withTypes:()=>pP});wn(`${Zd}/removeAll`);var mP=Object.assign(wn(`${Zd}/remove`),{withTypes:()=>mP});function ft(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const _P=lE,vt=HS,gn=e=>{const t=_P();return M.useMemo(()=>dE(e,t),[])},wf=Ar("user/checkAuth",async(e,{extra:t})=>{const{data:r}=await t.get(ur.Login);return r}),xf=Ar("user/login",async(e,{extra:t})=>{const{data:r}=await t.post(ur.Login,e);return r}),Sf=Ar("user/logout",async(e,{extra:t})=>{await t.delete(ur.Logout)}),Hd="six-cities-token",vP=()=>localStorage.getItem(Hd)??"",gP=e=>{localStorage.setItem(Hd,e)},yP=()=>{localStorage.removeItem(Hd)},wP={authStatus:ht.Unknown,requestStatus:we.Idle,userInfo:null,userAuthData:null},Ha=Yo({name:"user",initialState:wP,reducers:{},extraReducers:e=>{e.addCase(wf.fulfilled,(t,r)=>{t.userInfo=r.payload,t.authStatus=ht.Auth,t.requestStatus=we.Succeed}),e.addCase(wf.rejected,t=>{t.authStatus=ht.NoAuth,t.requestStatus=we.Failed}),e.addCase(xf.fulfilled,(t,r)=>{t.userInfo=r.payload,gP(t.userInfo.token),t.authStatus=ht.Auth,t.requestStatus=we.Succeed}),e.addCase(xf.rejected,t=>{t.authStatus=ht.NoAuth,t.requestStatus=we.Failed}),e.addCase(Sf.fulfilled,t=>{yP(),t.userInfo=null,t.authStatus=ht.NoAuth,t.requestStatus=we.Succeed}),e.addCase(Sf.rejected,t=>{t.userInfo=null,t.authStatus=ht.NoAuth,t.requestStatus=we.Failed})},selectors:{authStatus:e=>e.authStatus,requestStatus:e=>e.requestStatus,userInfo:e=>e.userInfo,userAuthData:e=>e.userAuthData}}),Wd={...Ha.actions,checkAuth:wf,login:xf,logout:Sf},Ti=Ha.selectors;function $l(){const e=vt(Ti.authStatus),t=vt(Ti.userInfo),{logout:r}=gn(Wd),i=async u=>{u.preventDefault(),await r()},s=x.jsxs(x.Fragment,{children:[x.jsx("li",{className:"header__nav-item user",children:x.jsxs(Tn,{to:tt.Favorites,className:"header__nav-link header__nav-link--profile",children:[x.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper",children:(t==null?void 0:t.avatarUrl)&&x.jsx("img",{src:t.avatarUrl,alt:"avatar"})}),(t==null?void 0:t.name)&&x.jsx("span",{className:"header__user-name user__name",children:t.name}),x.jsx("span",{className:"header__favorite-count",children:"3"})]})}),x.jsx("li",{className:"header__nav-item",children:x.jsx("a",{className:"header__nav-link",href:"#",onClick:u=>i(u),children:x.jsx("span",{className:"header__signout",children:"Sign out"})})})]}),a=x.jsx("li",{className:"header__nav-item user",children:x.jsxs(Tn,{to:tt.Login,className:"header__nav-link header__nav-link--profile",children:[x.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),x.jsx("span",{className:"header__login",children:"Sign in"})]})});return x.jsx("header",{className:"header",children:x.jsx("div",{className:"container",children:x.jsxs("div",{className:"header__wrapper",children:[x.jsx("div",{className:"header__left",children:x.jsx(Rd,{})}),x.jsx("nav",{className:"header__nav",children:x.jsx("ul",{className:"header__nav-list",children:e===ht.Auth?s:a})})]})})})}const Fo=(...e)=>e.filter(Boolean).join(" ");function xP({cities:e=Ii}){return e.map(t=>x.jsx(rS,{to:tt.Root+t.slug,className:({isActive:r})=>Fo("locations__item-link tabs__item",r&&"tabs__item--active"),children:x.jsx("span",{children:t.name})},t.slug))}const SP=()=>{const e=document.title;return()=>{document.title=e}};function Qo(e){M.useEffect(SP,[]),M.useEffect(()=>{document.title=`${e} | 6 cities`},[e])}var Ef={exports:{}};/* @preserve + */var Dd=Symbol.for("react.element"),bd=Symbol.for("react.portal"),Tl=Symbol.for("react.fragment"),kl=Symbol.for("react.strict_mode"),Ll=Symbol.for("react.profiler"),Nl=Symbol.for("react.provider"),Ol=Symbol.for("react.context"),JS=Symbol.for("react.server_context"),Ml=Symbol.for("react.forward_ref"),Rl=Symbol.for("react.suspense"),zl=Symbol.for("react.suspense_list"),Il=Symbol.for("react.memo"),Al=Symbol.for("react.lazy"),eE=Symbol.for("react.offscreen"),kg;kg=Symbol.for("react.module.reference");function At(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Dd:switch(e=e.type,e){case Tl:case Ll:case kl:case Rl:case zl:return e;default:switch(e=e&&e.$$typeof,e){case JS:case Ol:case Ml:case Al:case Il:case Nl:return e;default:return t}}case bd:return t}}}ye.ContextConsumer=Ol;ye.ContextProvider=Nl;ye.Element=Dd;ye.ForwardRef=Ml;ye.Fragment=Tl;ye.Lazy=Al;ye.Memo=Il;ye.Portal=bd;ye.Profiler=Ll;ye.StrictMode=kl;ye.Suspense=Rl;ye.SuspenseList=zl;ye.isAsyncMode=function(){return!1};ye.isConcurrentMode=function(){return!1};ye.isContextConsumer=function(e){return At(e)===Ol};ye.isContextProvider=function(e){return At(e)===Nl};ye.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Dd};ye.isForwardRef=function(e){return At(e)===Ml};ye.isFragment=function(e){return At(e)===Tl};ye.isLazy=function(e){return At(e)===Al};ye.isMemo=function(e){return At(e)===Il};ye.isPortal=function(e){return At(e)===bd};ye.isProfiler=function(e){return At(e)===Ll};ye.isStrictMode=function(e){return At(e)===kl};ye.isSuspense=function(e){return At(e)===Rl};ye.isSuspenseList=function(e){return At(e)===zl};ye.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Tl||e===Ll||e===kl||e===Rl||e===zl||e===eE||typeof e=="object"&&e!==null&&(e.$$typeof===Al||e.$$typeof===Il||e.$$typeof===Nl||e.$$typeof===Ol||e.$$typeof===Ml||e.$$typeof===kg||e.getModuleId!==void 0)};ye.typeOf=At;function tE(){const e=bS();let t=null,r=null;return{clear(){t=null,r=null},notify(){e(()=>{let i=t;for(;i;)i.callback(),i=i.next})},get(){let i=[],s=t;for(;s;)i.push(s),s=s.next;return i},subscribe(i){let s=!0,a=r={callback:i,next:null,prev:r};return a.prev?a.prev.next=a:t=a,function(){!s||t===null||(s=!1,a.next?a.next.prev=a.prev:r=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}const _m={notify(){},get:()=>[]};function nE(e,t){let r,i=_m,s=0,a=!1;function u(E){v();const R=i.subscribe(E);let w=!1;return()=>{w||(w=!0,R(),_())}}function f(){i.notify()}function d(){P.onStateChange&&P.onStateChange()}function p(){return a}function v(){s++,r||(r=t?t.addNestedSub(d):e.subscribe(d),i=tE())}function _(){s--,r&&s===0&&(r(),r=void 0,i.clear(),i=_m)}function S(){a||(a=!0,v())}function k(){a&&(a=!1,_())}const P={addNestedSub:u,notifyNestedSubs:f,handleChangeWrapper:d,isSubscribed:p,trySubscribe:S,tryUnsubscribe:k,getListeners:()=>i};return P}const rE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iE=rE?M.useLayoutEffect:M.useEffect;function oE({store:e,context:t,children:r,serverState:i,stabilityCheck:s="once",noopCheck:a="once"}){const u=M.useMemo(()=>{const p=nE(e);return{store:e,subscription:p,getServerState:i?()=>i:void 0,stabilityCheck:s,noopCheck:a}},[e,i,s,a]),f=M.useMemo(()=>e.getState(),[e]);iE(()=>{const{subscription:p}=u;return p.onStateChange=p.notifyNestedSubs,p.trySubscribe(),f!==e.getState()&&p.notifyNestedSubs(),()=>{p.tryUnsubscribe(),p.onStateChange=void 0}},[u,f]);const d=t||ir;return M.createElement(d.Provider,{value:u},r)}function Lg(e=ir){const t=e===ir?xg:zd(e);return function(){const{store:i}=t();return i}}const sE=Lg();function aE(e=ir){const t=e===ir?sE:Lg(e);return function(){return t().dispatch}}const lE=aE();FS(AS.useSyncExternalStoreWithSelector);DS(og.unstable_batchedUpdates);function Fe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var uE=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")(),vm=uE,uc=()=>Math.random().toString(36).substring(7).split("").join("."),cE={INIT:`@@redux/INIT${uc()}`,REPLACE:`@@redux/REPLACE${uc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${uc()}`},Ba=cE;function Bd(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ng(e,t,r){if(typeof e!="function")throw new Error(Fe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Fe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Fe(1));return r(Ng)(e,t)}let i=e,s=t,a=new Map,u=a,f=0,d=!1;function p(){u===a&&(u=new Map,a.forEach((R,w)=>{u.set(w,R)}))}function v(){if(d)throw new Error(Fe(3));return s}function _(R){if(typeof R!="function")throw new Error(Fe(4));if(d)throw new Error(Fe(5));let w=!0;p();const g=f++;return u.set(g,R),function(){if(w){if(d)throw new Error(Fe(6));w=!1,p(),u.delete(g),a=null}}}function S(R){if(!Bd(R))throw new Error(Fe(7));if(typeof R.type>"u")throw new Error(Fe(8));if(typeof R.type!="string")throw new Error(Fe(17));if(d)throw new Error(Fe(9));try{d=!0,s=i(s,R)}finally{d=!1}return(a=u).forEach(g=>{g()}),R}function k(R){if(typeof R!="function")throw new Error(Fe(10));i=R,S({type:Ba.REPLACE})}function P(){const R=_;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(Fe(11));function g(){const N=w;N.next&&N.next(v())}return g(),{unsubscribe:R(g)}},[vm](){return this}}}return S({type:Ba.INIT}),{dispatch:S,subscribe:_,getState:v,replaceReducer:k,[vm]:P}}function fE(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Ba.INIT})>"u")throw new Error(Fe(12));if(typeof r(void 0,{type:Ba.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Fe(13))})}function Og(e){const t=Object.keys(e),r={};for(let a=0;a"u")throw f&&f.type,new Error(Fe(14));p[_]=P,d=d||P!==k}return d=d||i.length!==Object.keys(u).length,d?p:u}}function gm(e,t){return function(...r){return t(e.apply(this,r))}}function dE(e,t){if(typeof e=="function")return gm(e,t);if(typeof e!="object"||e===null)throw new Error(Fe(16));const r={};for(const i in e){const s=e[i];typeof s=="function"&&(r[i]=gm(s,t))}return r}function $a(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...i)=>t(r(...i)))}function hE(...e){return t=>(r,i)=>{const s=t(r,i);let a=()=>{throw new Error(Fe(15))};const u={getState:s.getState,dispatch:(d,...p)=>a(d,...p)},f=e.map(d=>d(u));return a=$a(...f)(s.dispatch),{...s,dispatch:a}}}function pE(e){return Bd(e)&&"type"in e&&typeof e.type=="string"}var Mg=Symbol.for("immer-nothing"),ym=Symbol.for("immer-draftable"),gt=Symbol.for("immer-state");function Ht(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ci=Object.getPrototypeOf;function or(e){return!!e&&!!e[gt]}function kn(e){var t;return e?Rg(e)||Array.isArray(e)||!!e[ym]||!!((t=e.constructor)!=null&&t[ym])||Dl(e)||bl(e):!1}var mE=Object.prototype.constructor.toString();function Rg(e){if(!e||typeof e!="object")return!1;const t=Ci(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===mE}function Fa(e,t){jl(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,i)=>t(i,r,e))}function jl(e){const t=e[gt];return t?t.type_:Array.isArray(e)?1:Dl(e)?2:bl(e)?3:0}function pf(e,t){return jl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function zg(e,t,r){const i=jl(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function _E(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Dl(e){return e instanceof Map}function bl(e){return e instanceof Set}function gr(e){return e.copy_||e.base_}function mf(e,t){if(Dl(e))return new Map(e);if(bl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Rg(e))return Ci(e)?{...e}:Object.assign(Object.create(null),e);const r=Object.getOwnPropertyDescriptors(e);delete r[gt];let i=Reflect.ownKeys(r);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=vE),Object.freeze(e),t&&Object.entries(e).forEach(([r,i])=>$d(i,!0))),e}function vE(){Ht(2)}function Bl(e){return Object.isFrozen(e)}var gE={};function Or(e){const t=gE[e];return t||Ht(0,e),t}var bo;function Ig(){return bo}function yE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function wm(e,t){t&&(Or("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function _f(e){vf(e),e.drafts_.forEach(wE),e.drafts_=null}function vf(e){e===bo&&(bo=e.parent_)}function xm(e){return bo=yE(bo,e)}function wE(e){const t=e[gt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Sm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[gt].modified_&&(_f(t),Ht(4)),kn(e)&&(e=Ua(t,e),t.parent_||Za(t,e)),t.patches_&&Or("Patches").generateReplacementPatches_(r[gt].base_,e,t.patches_,t.inversePatches_)):e=Ua(t,r,[]),_f(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Mg?e:void 0}function Ua(e,t,r){if(Bl(t))return t;const i=t[gt];if(!i)return Fa(t,(s,a)=>Em(e,i,t,s,a,r)),t;if(i.scope_!==e)return t;if(!i.modified_)return Za(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const s=i.copy_;let a=s,u=!1;i.type_===3&&(a=new Set(s),s.clear(),u=!0),Fa(a,(f,d)=>Em(e,i,s,f,d,r,u)),Za(e,s,!1),r&&e.patches_&&Or("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function Em(e,t,r,i,s,a,u){if(or(s)){const f=a&&t&&t.type_!==3&&!pf(t.assigned_,i)?a.concat(i):void 0,d=Ua(e,s,f);if(zg(r,i,d),or(d))e.canAutoFreeze_=!1;else return}else u&&r.add(s);if(kn(s)&&!Bl(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ua(e,s),(!t||!t.scope_.parent_)&&typeof i!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,i)&&Za(e,s)}}function Za(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$d(t,r)}function xE(e,t){const r=Array.isArray(e),i={type_:r?1:0,scope_:t?t.scope_:Ig(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=i,a=Fd;r&&(s=[i],a=Bo);const{revoke:u,proxy:f}=Proxy.revocable(s,a);return i.draft_=f,i.revoke_=u,f}var Fd={get(e,t){if(t===gt)return e;const r=gr(e);if(!pf(r,t))return SE(e,r,t);const i=r[t];return e.finalized_||!kn(i)?i:i===cc(e.base_,t)?(fc(e),e.copy_[t]=yf(i,e)):i},has(e,t){return t in gr(e)},ownKeys(e){return Reflect.ownKeys(gr(e))},set(e,t,r){const i=Ag(gr(e),t);if(i!=null&&i.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){const s=cc(gr(e),t),a=s==null?void 0:s[gt];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(_E(r,s)&&(r!==void 0||pf(e.base_,t)))return!0;fc(e),gf(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return cc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fc(e),gf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=gr(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty(){Ht(11)},getPrototypeOf(e){return Ci(e.base_)},setPrototypeOf(){Ht(12)}},Bo={};Fa(Fd,(e,t)=>{Bo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Bo.deleteProperty=function(e,t){return Bo.set.call(this,e,t,void 0)};Bo.set=function(e,t,r){return Fd.set.call(this,e[0],t,r,e[0])};function cc(e,t){const r=e[gt];return(r?gr(r):e)[t]}function SE(e,t,r){var s;const i=Ag(t,r);return i?"value"in i?i.value:(s=i.get)==null?void 0:s.call(e.draft_):void 0}function Ag(e,t){if(!(t in e))return;let r=Ci(e);for(;r;){const i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Ci(r)}}function gf(e){e.modified_||(e.modified_=!0,e.parent_&&gf(e.parent_))}function fc(e){e.copy_||(e.copy_=mf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var EE=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,i)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const u=this;return function(d=a,...p){return u.produce(d,v=>r.call(this,v,...p))}}typeof r!="function"&&Ht(6),i!==void 0&&typeof i!="function"&&Ht(7);let s;if(kn(t)){const a=xm(this),u=yf(t,void 0);let f=!0;try{s=r(u),f=!1}finally{f?_f(a):vf(a)}return wm(a,i),Sm(s,a)}else if(!t||typeof t!="object"){if(s=r(t),s===void 0&&(s=t),s===Mg&&(s=void 0),this.autoFreeze_&&$d(s,!0),i){const a=[],u=[];Or("Patches").generateReplacementPatches_(t,s,a,u),i(a,u)}return s}else Ht(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...f)=>this.produceWithPatches(u,d=>t(d,...f));let i,s;return[this.produce(t,r,(u,f)=>{i=u,s=f}),i,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){kn(e)||Ht(8),or(e)&&(e=jg(e));const t=xm(this),r=yf(e,void 0);return r[gt].isManual_=!0,vf(t),r}finishDraft(e,t){const r=e&&e[gt];(!r||!r.isManual_)&&Ht(9);const{scope_:i}=r;return wm(i,t),Sm(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));const i=Or("Patches").applyPatches_;return or(e)?i(e,t):this.produce(e,s=>i(s,t))}};function yf(e,t){const r=Dl(e)?Or("MapSet").proxyMap_(e,t):bl(e)?Or("MapSet").proxySet_(e,t):xE(e,t);return(t?t.scope_:Ig()).drafts_.push(r),r}function jg(e){return or(e)||Ht(10,e),Dg(e)}function Dg(e){if(!kn(e)||Bl(e))return e;const t=e[gt];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=mf(e,t.scope_.immer_.useStrictShallowCopy_)}else r=mf(e,!0);return Fa(r,(i,s)=>{zg(r,i,Dg(s))}),t&&(t.finalized_=!1),r}var yt=new EE,bg=yt.produce;yt.produceWithPatches.bind(yt);yt.setAutoFreeze.bind(yt);yt.setUseStrictShallowCopy.bind(yt);yt.applyPatches.bind(yt);yt.createDraft.bind(yt);yt.finishDraft.bind(yt);function PE(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function CE(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function TE(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(i=>typeof i=="function"?`function ${i.name||"unnamed"}()`:typeof i).join(", ");throw new TypeError(`${t}[${r}]`)}}var Pm=e=>Array.isArray(e)?e:[e];function kE(e){const t=Array.isArray(e[0])?e[0]:e;return TE(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function LE(e,t){const r=[],{length:i}=e;for(let s=0;s{r=Fs(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}function Bg(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...s)=>{let a=0,u=0,f,d={},p=s.pop();typeof p=="object"&&(d=p,p=s.pop()),PE(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);const v={...r,...d},{memoize:_,memoizeOptions:S=[],argsMemoize:k=Ud,argsMemoizeOptions:P=[],devModeChecks:E={}}=v,R=Pm(S),w=Pm(P),g=kE(s),y=_(function(){return a++,p.apply(null,arguments)},...R),N=k(function(){u++;const b=LE(g,arguments);return f=y.apply(null,b),f},...w);return Object.assign(N,{resultFunc:p,memoizedResultFunc:y,dependencies:g,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>f,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:_,argsMemoize:k})};return Object.assign(i,{withTypes:()=>i}),i}var RE=Bg(Ud),zE=Object.assign((e,t=RE)=>{CE(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),i=r.map(a=>e[a]);return t(i,(...a)=>a.reduce((u,f,d)=>(u[r[d]]=f,u),{}))},{withTypes:()=>zE});function $g(e){return({dispatch:r,getState:i})=>s=>a=>typeof a=="function"?a(r,i,e):s(a)}var IE=$g(),AE=$g,jE=(...e)=>{const t=Bg(...e),r=Object.assign((...i)=>{const s=t(...i),a=(u,...f)=>s(or(u)?jg(u):u,...f);return Object.assign(a,s),a},{withTypes:()=>r});return r};jE(Ud);var DE=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$a:$a.apply(null,arguments)},bE=e=>e&&typeof e.match=="function";function wn(e,t){function r(...i){if(t){let s=t(...i);if(!s)throw new Error(ft(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:i[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=i=>pE(i)&&i.type===e,r}var Fg=class lo extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,lo.prototype)}static get[Symbol.species](){return lo}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new lo(...t[0].concat(this)):new lo(...t.concat(this))}};function Tm(e){return kn(e)?bg(e,()=>{}):e}function km(e,t,r){if(e.has(t)){let s=e.get(t);return r.update&&(s=r.update(s,t,e),e.set(t,s)),s}if(!r.insert)throw new Error(ft(10));const i=r.insert(t,e);return e.set(t,i),i}function BE(e){return typeof e=="boolean"}var $E=()=>function(t){const{thunk:r=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:a=!0}=t??{};let u=new Fg;return r&&(BE(r)?u.push(IE):u.push(AE(r.extraArgument))),u},FE="RTK_autoBatch",Ug=e=>t=>{setTimeout(t,e)},UE=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ug(10),ZE=(e={type:"raf"})=>t=>(...r)=>{const i=t(...r);let s=!0,a=!1,u=!1;const f=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?UE:e.type==="callback"?e.queueNotification:Ug(e.timeout),p=()=>{u=!1,a&&(a=!1,f.forEach(v=>v()))};return Object.assign({},i,{subscribe(v){const _=()=>s&&v(),S=i.subscribe(_);return f.add(v),()=>{S(),f.delete(v)}},dispatch(v){var _;try{return s=!((_=v==null?void 0:v.meta)!=null&&_[FE]),a=!s,a&&(u||(u=!0,d(p))),i.dispatch(v)}finally{s=!0}}})},HE=e=>function(r){const{autoBatch:i=!0}=r??{};let s=new Fg(e);return i&&s.push(ZE(typeof i=="object"?i:void 0)),s},WE=!0;function VE(e){const t=$E(),{reducer:r=void 0,middleware:i,devTools:s=!0,preloadedState:a=void 0,enhancers:u=void 0}=e||{};let f;if(typeof r=="function")f=r;else if(Bd(r))f=Og(r);else throw new Error(ft(1));let d;typeof i=="function"?d=i(t):d=t();let p=$a;s&&(p=DE({trace:!WE,...typeof s=="object"&&s}));const v=hE(...d),_=HE(v);let S=typeof u=="function"?u(_):_();const k=p(...S);return Ng(f,a,k)}function Zg(e){const t={},r=[];let i;const s={addCase(a,u){const f=typeof a=="string"?a:a.type;if(!f)throw new Error(ft(28));if(f in t)throw new Error(ft(29));return t[f]=u,s},addMatcher(a,u){return r.push({matcher:a,reducer:u}),s},addDefaultCase(a){return i=a,s}};return e(s),[t,r,i]}function KE(e){return typeof e=="function"}function GE(e,t){let[r,i,s]=Zg(t),a;if(KE(e))a=()=>Tm(e());else{const f=Tm(e);a=()=>f}function u(f=a(),d){let p=[r[d.type],...i.filter(({matcher:v})=>v(d)).map(({reducer:v})=>v)];return p.filter(v=>!!v).length===0&&(p=[s]),p.reduce((v,_)=>{if(_)if(or(v)){const k=_(v,d);return k===void 0?v:k}else{if(kn(v))return bg(v,S=>_(S,d));{const S=_(v,d);if(S===void 0){if(v===null)return v;throw new Error(ft(9))}return S}}return v},f)}return u.getInitialState=a,u}var qE="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Hg=(e=21)=>{let t="",r=e;for(;r--;)t+=qE[Math.random()*64|0];return t},YE=(e,t)=>bE(e)?e.match(t):e(t);function QE(...e){return t=>e.some(r=>YE(r,t))}var XE=["name","message","stack","code"],dc=class{constructor(e,t){Iu(this,"_type");this.payload=e,this.meta=t}},Lm=class{constructor(e,t){Iu(this,"_type");this.payload=e,this.meta=t}},JE=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of XE)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Ar=(()=>{function e(t,r,i){const s=wn(t+"/fulfilled",(d,p,v,_)=>({payload:d,meta:{..._||{},arg:v,requestId:p,requestStatus:"fulfilled"}})),a=wn(t+"/pending",(d,p,v)=>({payload:void 0,meta:{...v||{},arg:p,requestId:d,requestStatus:"pending"}})),u=wn(t+"/rejected",(d,p,v,_,S)=>({payload:_,error:(i&&i.serializeError||JE)(d||"Rejected"),meta:{...S||{},arg:v,requestId:p,rejectedWithValue:!!_,requestStatus:"rejected",aborted:(d==null?void 0:d.name)==="AbortError",condition:(d==null?void 0:d.name)==="ConditionError"}}));function f(d){return(p,v,_)=>{const S=i!=null&&i.idGenerator?i.idGenerator(d):Hg(),k=new AbortController;let P,E;function R(g){E=g,k.abort()}const w=async function(){var N,j;let g;try{let b=(N=i==null?void 0:i.condition)==null?void 0:N.call(i,d,{getState:v,extra:_});if(tP(b)&&(b=await b),b===!1||k.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const B=new Promise((I,X)=>{P=()=>{X({name:"AbortError",message:E||"Aborted"})},k.signal.addEventListener("abort",P)});p(a(S,d,(j=i==null?void 0:i.getPendingMeta)==null?void 0:j.call(i,{requestId:S,arg:d},{getState:v,extra:_}))),g=await Promise.race([B,Promise.resolve(r(d,{dispatch:p,getState:v,extra:_,requestId:S,signal:k.signal,abort:R,rejectWithValue:(I,X)=>new dc(I,X),fulfillWithValue:(I,X)=>new Lm(I,X)})).then(I=>{if(I instanceof dc)throw I;return I instanceof Lm?s(I.payload,S,d,I.meta):s(I,S,d)})])}catch(b){g=b instanceof dc?u(null,S,d,b.payload,b.meta):u(b,S,d)}finally{P&&k.signal.removeEventListener("abort",P)}return i&&!i.dispatchConditionRejection&&u.match(g)&&g.meta.condition||p(g),g}();return Object.assign(w,{abort:R,requestId:S,arg:d,unwrap(){return w.then(eP)}})}}return Object.assign(f,{pending:a,rejected:u,fulfilled:s,settled:QE(u,s),typePrefix:t})}return e.withTypes=()=>e,e})();function eP(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function tP(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var nP=Symbol.for("rtk-slice-createasyncthunk");function rP(e,t){return`${e}/${t}`}function iP({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[nP];return function(s){const{name:a,reducerPath:u=a}=s;if(!a)throw new Error(ft(11));typeof process<"u";const f=(typeof s.reducers=="function"?s.reducers(sP()):s.reducers)||{},d=Object.keys(f),p={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},v={addCase(y,N){const j=typeof y=="string"?y:y.type;if(!j)throw new Error(ft(12));if(j in p.sliceCaseReducersByType)throw new Error(ft(13));return p.sliceCaseReducersByType[j]=N,v},addMatcher(y,N){return p.sliceMatchers.push({matcher:y,reducer:N}),v},exposeAction(y,N){return p.actionCreators[y]=N,v},exposeCaseReducer(y,N){return p.sliceCaseReducersByName[y]=N,v}};d.forEach(y=>{const N=f[y],j={reducerName:y,type:rP(a,y),createNotation:typeof s.reducers=="function"};lP(N)?cP(j,N,v,t):aP(j,N,v)});function _(){const[y={},N=[],j=void 0]=typeof s.extraReducers=="function"?Zg(s.extraReducers):[s.extraReducers],b={...y,...p.sliceCaseReducersByType};return GE(s.initialState,B=>{for(let I in b)B.addCase(I,b[I]);for(let I of p.sliceMatchers)B.addMatcher(I.matcher,I.reducer);for(let I of N)B.addMatcher(I.matcher,I.reducer);j&&B.addDefaultCase(j)})}const S=y=>y,k=new Map;let P;function E(y,N){return P||(P=_()),P(y,N)}function R(){return P||(P=_()),P.getInitialState()}function w(y,N=!1){function j(B){let I=B[y];return typeof I>"u"&&N&&(I=R()),I}function b(B=S){const I=km(k,N,{insert:()=>new WeakMap});return km(I,B,{insert:()=>{const X={};for(const[V,q]of Object.entries(s.selectors??{}))X[V]=oP(q,B,R,N);return X}})}return{reducerPath:y,getSelectors:b,get selectors(){return b(j)},selectSlice:j}}const g={name:a,reducer:E,actions:p.actionCreators,caseReducers:p.sliceCaseReducersByName,getInitialState:R,...w(u),injectInto(y,{reducerPath:N,...j}={}){const b=N??u;return y.inject({reducerPath:b,reducer:E},j),{...g,...w(b,!0)}}};return g}}function oP(e,t,r,i){function s(a,...u){let f=t(a);return typeof f>"u"&&i&&(f=r()),e(f,...u)}return s.unwrapped=e,s}var Yo=iP();function sP(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function aP({type:e,reducerName:t,createNotation:r},i,s){let a,u;if("reducer"in i){if(r&&!uP(i))throw new Error(ft(17));a=i.reducer,u=i.prepare}else a=i;s.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,u?wn(e,u):wn(e))}function lP(e){return e._reducerDefinitionType==="asyncThunk"}function uP(e){return e._reducerDefinitionType==="reducerWithPrepare"}function cP({type:e,reducerName:t},r,i,s){if(!s)throw new Error(ft(18));const{payloadCreator:a,fulfilled:u,pending:f,rejected:d,settled:p,options:v}=r,_=s(e,a,v);i.exposeAction(t,_),u&&i.addCase(_.fulfilled,u),f&&i.addCase(_.pending,f),d&&i.addCase(_.rejected,d),p&&i.addMatcher(_.settled,p),i.exposeCaseReducer(t,{fulfilled:u||Us,pending:f||Us,rejected:d||Us,settled:p||Us})}function Us(){}var fP=(e,t)=>{if(typeof e!="function")throw new Error(ft(32))},Zd="listenerMiddleware",dP=e=>{let{type:t,actionCreator:r,matcher:i,predicate:s,effect:a}=e;if(t)s=wn(t).match;else if(r)t=r.type,s=r.match;else if(i)s=i;else if(!s)throw new Error(ft(21));return fP(a),{predicate:s,type:t,effect:a}},hP=Object.assign(e=>{const{type:t,predicate:r,effect:i}=dP(e);return{id:Hg(),effect:i,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(ft(22))}}},{withTypes:()=>hP}),pP=Object.assign(wn(`${Zd}/add`),{withTypes:()=>pP});wn(`${Zd}/removeAll`);var mP=Object.assign(wn(`${Zd}/remove`),{withTypes:()=>mP});function ft(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const _P=lE,Mt=HS,gn=e=>{const t=_P();return M.useMemo(()=>dE(e,t),[])},wf=Ar("user/checkAuth",async(e,{extra:t})=>{const{data:r}=await t.get(ur.Login);return r}),xf=Ar("user/login",async(e,{extra:t})=>{const{data:r}=await t.post(ur.Login,e);return r}),Sf=Ar("user/logout",async(e,{extra:t})=>{await t.delete(ur.Logout)}),Hd="six-cities-token",vP=()=>localStorage.getItem(Hd)??"",gP=e=>{localStorage.setItem(Hd,e)},yP=()=>{localStorage.removeItem(Hd)},wP={authStatus:ht.Unknown,requestStatus:we.Idle,userInfo:null,userAuthData:null},Ha=Yo({name:"user",initialState:wP,reducers:{},extraReducers:e=>{e.addCase(wf.fulfilled,(t,r)=>{t.userInfo=r.payload,t.authStatus=ht.Auth,t.requestStatus=we.Succeed}),e.addCase(wf.rejected,t=>{t.authStatus=ht.NoAuth,t.requestStatus=we.Failed}),e.addCase(xf.fulfilled,(t,r)=>{t.userInfo=r.payload,gP(t.userInfo.token),t.authStatus=ht.Auth,t.requestStatus=we.Succeed}),e.addCase(xf.rejected,t=>{t.authStatus=ht.NoAuth,t.requestStatus=we.Failed}),e.addCase(Sf.fulfilled,t=>{yP(),t.userInfo=null,t.authStatus=ht.NoAuth,t.requestStatus=we.Succeed}),e.addCase(Sf.rejected,t=>{t.userInfo=null,t.authStatus=ht.NoAuth,t.requestStatus=we.Failed})},selectors:{authStatus:e=>e.authStatus,requestStatus:e=>e.requestStatus,userInfo:e=>e.userInfo,userAuthData:e=>e.userAuthData}}),Wd={...Ha.actions,checkAuth:wf,login:xf,logout:Sf},$o=Ha.selectors;function Wg(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;ttypeof e=="number"&&!isNaN(e),Pr=e=>typeof e=="string",mt=e=>typeof e=="function",ra=e=>Pr(e)||mt(e)?e:null,Ef=e=>M.isValidElement(e)||Pr(e)||mt(e)||Fo(e);function xP(e,t,r){r===void 0&&(r=300);const{scrollHeight:i,style:s}=e;requestAnimationFrame(()=>{s.minHeight="initial",s.height=i+"px",s.transition=`all ${r}ms`,requestAnimationFrame(()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(t,r)})})}function $l(e){let{enter:t,exit:r,appendPosition:i=!1,collapse:s=!0,collapseDuration:a=300}=e;return function(u){let{children:f,position:d,preventExitTransition:p,done:v,nodeRef:_,isIn:S,playToast:k}=u;const P=i?`${t}--${d}`:t,E=i?`${r}--${d}`:r,R=M.useRef(0);return M.useLayoutEffect(()=>{const w=_.current,g=P.split(" "),y=N=>{N.target===_.current&&(k(),w.removeEventListener("animationend",y),w.removeEventListener("animationcancel",y),R.current===0&&N.type!=="animationcancel"&&w.classList.remove(...g))};w.classList.add(...g),w.addEventListener("animationend",y),w.addEventListener("animationcancel",y)},[]),M.useEffect(()=>{const w=_.current,g=()=>{w.removeEventListener("animationend",g),s?xP(w,v,a):v()};S||(p?g():(R.current=1,w.className+=` ${E}`,w.addEventListener("animationend",g)))},[S]),pe.createElement(pe.Fragment,null,f)}}function Nm(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const nt=new Map;let Uo=[];const Pf=new Set,SP=e=>Pf.forEach(t=>t(e)),Vg=()=>nt.size>0;function Kg(e,t){var r;if(t)return!((r=nt.get(t))==null||!r.isToastActive(e));let i=!1;return nt.forEach(s=>{s.isToastActive(e)&&(i=!0)}),i}function Gg(e,t){Ef(e)&&(Vg()||Uo.push({content:e,options:t}),nt.forEach(r=>{r.buildToast(e,t)}))}function Om(e,t){nt.forEach(r=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===r.id&&r.toggle(e,t==null?void 0:t.id):r.toggle(e,t==null?void 0:t.id)})}function EP(e){const{subscribe:t,getSnapshot:r,setProps:i}=M.useRef(function(a){const u=a.containerId||1;return{subscribe(f){const d=function(v,_,S){let k=1,P=0,E=[],R=[],w=[],g=_;const y=new Map,N=new Set,j=()=>{w=Array.from(y.values()),N.forEach(I=>I())},b=I=>{R=I==null?[]:R.filter(X=>X!==I),j()},B=I=>{const{toastId:X,onOpen:V,updateId:q,children:le}=I.props,We=q==null;I.staleId&&y.delete(I.staleId),y.set(X,I),R=[...R,I.props.toastId].filter(Y=>Y!==I.staleId),j(),S(Nm(I,We?"added":"updated")),We&&mt(V)&&V(M.isValidElement(le)&&le.props)};return{id:v,props:g,observe:I=>(N.add(I),()=>N.delete(I)),toggle:(I,X)=>{y.forEach(V=>{X!=null&&X!==V.props.toastId||mt(V.toggle)&&V.toggle(I)})},removeToast:b,toasts:y,clearQueue:()=>{P-=E.length,E=[]},buildToast:(I,X)=>{if((J=>{let{containerId:re,toastId:ee,updateId:te}=J;const ie=re?re!==v:v!==1,ve=y.has(ee)&&te==null;return ie||ve})(X))return;const{toastId:V,updateId:q,data:le,staleId:We,delay:Y}=X,W=()=>{b(V)},F=q==null;F&&P++;const K={...g,style:g.toastStyle,key:k++,...Object.fromEntries(Object.entries(X).filter(J=>{let[re,ee]=J;return ee!=null})),toastId:V,updateId:q,data:le,closeToast:W,isIn:!1,className:ra(X.className||g.toastClassName),bodyClassName:ra(X.bodyClassName||g.bodyClassName),progressClassName:ra(X.progressClassName||g.progressClassName),autoClose:!X.isLoading&&(T=X.autoClose,U=g.autoClose,T===!1||Fo(T)&&T>0?T:U),deleteToast(){const J=y.get(V),{onClose:re,children:ee}=J.props;mt(re)&&re(M.isValidElement(ee)&&ee.props),S(Nm(J,"removed")),y.delete(V),P--,P<0&&(P=0),E.length>0?B(E.shift()):j()}};var T,U;K.closeButton=g.closeButton,X.closeButton===!1||Ef(X.closeButton)?K.closeButton=X.closeButton:X.closeButton===!0&&(K.closeButton=!Ef(g.closeButton)||g.closeButton);let A=I;M.isValidElement(I)&&!Pr(I.type)?A=M.cloneElement(I,{closeToast:W,toastProps:K,data:le}):mt(I)&&(A=I({closeToast:W,toastProps:K,data:le}));const H={content:A,props:K,staleId:We};g.limit&&g.limit>0&&P>g.limit&&F?E.push(H):Fo(Y)?setTimeout(()=>{B(H)},Y):B(H)},setProps(I){g=I},setToggle:(I,X)=>{y.get(I).toggle=X},isToastActive:I=>R.some(X=>X===I),getSnapshot:()=>g.newestOnTop?w.reverse():w}}(u,a,SP);nt.set(u,d);const p=d.observe(f);return Uo.forEach(v=>Gg(v.content,v.options)),Uo=[],()=>{p(),nt.delete(u)}},setProps(f){var d;(d=nt.get(u))==null||d.setProps(f)},getSnapshot(){var f;return(f=nt.get(u))==null?void 0:f.getSnapshot()}}}(e)).current;i(e);const s=M.useSyncExternalStore(t,r,r);return{getToastToRender:function(a){if(!s)return[];const u=new Map;return s.forEach(f=>{const{position:d}=f.props;u.has(d)||u.set(d,[]),u.get(d).push(f)}),Array.from(u,f=>a(f[0],f[1]))},isToastActive:Kg,count:s==null?void 0:s.length}}function PP(e){const[t,r]=M.useState(!1),[i,s]=M.useState(!1),a=M.useRef(null),u=M.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:f,pauseOnHover:d,closeToast:p,onClick:v,closeOnClick:_}=e;var S,k;function P(){r(!0)}function E(){r(!1)}function R(y){const N=a.current;u.canDrag&&N&&(u.didMove=!0,t&&E(),u.delta=e.draggableDirection==="x"?y.clientX-u.start:y.clientY-u.start,u.start!==y.clientX&&(u.canCloseOnClick=!1),N.style.transform=`translate3d(${e.draggableDirection==="x"?`${u.delta}px, var(--y)`:`0, calc(${u.delta}px + var(--y))`},0)`,N.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance)))}function w(){document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",w);const y=a.current;if(u.canDrag&&u.didMove&&y){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),e.closeToast(),void e.collapseAll();y.style.transition="transform 0.2s, opacity 0.2s",y.style.removeProperty("transform"),y.style.removeProperty("opacity")}}(k=nt.get((S={id:e.toastId,containerId:e.containerId,fn:r}).containerId||1))==null||k.setToggle(S.id,S.fn),M.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||E(),window.addEventListener("focus",P),window.addEventListener("blur",E),()=>{window.removeEventListener("focus",P),window.removeEventListener("blur",E)}},[e.pauseOnFocusLoss]);const g={onPointerDown:function(y){if(e.draggable===!0||e.draggable===y.pointerType){u.didMove=!1,document.addEventListener("pointermove",R),document.addEventListener("pointerup",w);const N=a.current;u.canCloseOnClick=!0,u.canDrag=!0,N.style.transition="none",e.draggableDirection==="x"?(u.start=y.clientX,u.removalDistance=N.offsetWidth*(e.draggablePercent/100)):(u.start=y.clientY,u.removalDistance=N.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(y){const{top:N,bottom:j,left:b,right:B}=a.current.getBoundingClientRect();y.nativeEvent.type!=="touchend"&&e.pauseOnHover&&y.clientX>=b&&y.clientX<=B&&y.clientY>=N&&y.clientY<=j?E():P()}};return f&&d&&(g.onMouseEnter=E,e.stacked||(g.onMouseLeave=P)),_&&(g.onClick=y=>{v&&v(y),u.canCloseOnClick&&p()}),{playToast:P,pauseToast:E,isRunning:t,preventExitTransition:i,toastRef:a,eventHandlers:g}}function CP(e){let{delay:t,isRunning:r,closeToast:i,type:s="default",hide:a,className:u,style:f,controlledProgress:d,progress:p,rtl:v,isIn:_,theme:S}=e;const k=a||d&&p===0,P={...f,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused"};d&&(P.transform=`scaleX(${p})`);const E=Wn("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${S}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":v}),R=mt(u)?u({rtl:v,type:s,defaultClassName:E}):Wn(E,u),w={[d&&p>=1?"onTransitionEnd":"onAnimationEnd"]:d&&p<1?null:()=>{_&&i()}};return pe.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":k},pe.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${S} Toastify__progress-bar--${s}`}),pe.createElement("div",{role:"progressbar","aria-hidden":k?"true":"false","aria-label":"notification timer",className:R,style:P,...w}))}let TP=1;const qg=()=>""+TP++;function kP(e){return e&&(Pr(e.toastId)||Fo(e.toastId))?e.toastId:qg()}function yo(e,t){return Gg(e,t),t.toastId}function Wa(e,t){return{...t,type:t&&t.type||e,toastId:kP(t)}}function Zs(e){return(t,r)=>yo(t,Wa(e,r))}function ge(e,t){return yo(e,Wa("default",t))}ge.loading=(e,t)=>yo(e,Wa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ge.promise=function(e,t,r){let i,{pending:s,error:a,success:u}=t;s&&(i=Pr(s)?ge.loading(s,r):ge.loading(s.render,{...r,...s}));const f={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(v,_,S)=>{if(_==null)return void ge.dismiss(i);const k={type:v,...f,...r,data:S},P=Pr(_)?{render:_}:_;return i?ge.update(i,{...k,...P}):ge(P.render,{...k,...P}),S},p=mt(e)?e():e;return p.then(v=>d("success",u,v)).catch(v=>d("error",a,v)),p},ge.success=Zs("success"),ge.info=Zs("info"),ge.error=Zs("error"),ge.warning=Zs("warning"),ge.warn=ge.warning,ge.dark=(e,t)=>yo(e,Wa("default",{theme:"dark",...t})),ge.dismiss=function(e){(function(t){var r;if(Vg()){if(t==null||Pr(r=t)||Fo(r))nt.forEach(i=>{i.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const i=nt.get(t.containerId);i?i.removeToast(t.id):nt.forEach(s=>{s.removeToast(t.id)})}}else Uo=Uo.filter(i=>t!=null&&i.options.toastId!==t)})(e)},ge.clearWaitingQueue=function(e){e===void 0&&(e={}),nt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},ge.isActive=Kg,ge.update=function(e,t){t===void 0&&(t={});const r=((i,s)=>{var a;let{containerId:u}=s;return(a=nt.get(u||1))==null?void 0:a.toasts.get(i)})(e,t);if(r){const{props:i,content:s}=r,a={delay:100,...i,...t,toastId:t.toastId||e,updateId:qg()};a.toastId!==e&&(a.staleId=e);const u=a.render||s;delete a.render,yo(u,a)}},ge.done=e=>{ge.update(e,{progress:1})},ge.onChange=function(e){return Pf.add(e),()=>{Pf.delete(e)}},ge.play=e=>Om(!0,e),ge.pause=e=>Om(!1,e);const LP=typeof window<"u"?M.useLayoutEffect:M.useEffect,Hs=e=>{let{theme:t,type:r,isLoading:i,...s}=e;return pe.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${r})`,...s})},hc={info:function(e){return pe.createElement(Hs,{...e},pe.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return pe.createElement(Hs,{...e},pe.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return pe.createElement(Hs,{...e},pe.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return pe.createElement(Hs,{...e},pe.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return pe.createElement("div",{className:"Toastify__spinner"})}},NP=e=>{const{isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:s,playToast:a}=PP(e),{closeButton:u,children:f,autoClose:d,onClick:p,type:v,hideProgressBar:_,closeToast:S,transition:k,position:P,className:E,style:R,bodyClassName:w,bodyStyle:g,progressClassName:y,progressStyle:N,updateId:j,role:b,progress:B,rtl:I,toastId:X,deleteToast:V,isIn:q,isLoading:le,closeOnClick:We,theme:Y}=e,W=Wn("Toastify__toast",`Toastify__toast-theme--${Y}`,`Toastify__toast--${v}`,{"Toastify__toast--rtl":I},{"Toastify__toast--close-on-click":We}),F=mt(E)?E({rtl:I,position:P,type:v,defaultClassName:W}):Wn(W,E),K=function(H){let{theme:J,type:re,isLoading:ee,icon:te}=H,ie=null;const ve={theme:J,type:re};return te===!1||(mt(te)?ie=te({...ve,isLoading:ee}):M.isValidElement(te)?ie=M.cloneElement(te,ve):ee?ie=hc.spinner():(qe=>qe in hc)(re)&&(ie=hc[re](ve))),ie}(e),T=!!B||!d,U={closeToast:S,type:v,theme:Y};let A=null;return u===!1||(A=mt(u)?u(U):M.isValidElement(u)?M.cloneElement(u,U):function(H){let{closeToast:J,theme:re,ariaLabel:ee="close"}=H;return pe.createElement("button",{className:`Toastify__close-button Toastify__close-button--${re}`,type:"button",onClick:te=>{te.stopPropagation(),J(te)},"aria-label":ee},pe.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},pe.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(U)),pe.createElement(k,{isIn:q,done:V,position:P,preventExitTransition:r,nodeRef:i,playToast:a},pe.createElement("div",{id:X,onClick:p,"data-in":q,className:F,...s,style:R,ref:i},pe.createElement("div",{...q&&{role:b},className:mt(w)?w({type:v}):Wn("Toastify__toast-body",w),style:g},K!=null&&pe.createElement("div",{className:Wn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!le})},K),pe.createElement("div",null,f)),A,pe.createElement(CP,{...j&&!T?{key:`pb-${j}`}:{},rtl:I,theme:Y,delay:d,isRunning:t,isIn:q,closeToast:S,hide:_,type:v,style:N,className:y,controlledProgress:T,progress:B||0})))},Fl=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},OP=$l(Fl("bounce",!0));$l(Fl("slide",!0));$l(Fl("zoom"));$l(Fl("flip"));const MP={position:"top-right",transition:OP,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function RP(e){let t={...MP,...e};const r=e.stacked,[i,s]=M.useState(!0),a=M.useRef(null),{getToastToRender:u,isToastActive:f,count:d}=EP(t),{className:p,style:v,rtl:_,containerId:S}=t;function k(E){const R=Wn("Toastify__toast-container",`Toastify__toast-container--${E}`,{"Toastify__toast-container--rtl":_});return mt(p)?p({position:E,rtl:_,defaultClassName:R}):Wn(R,ra(p))}function P(){r&&(s(!0),ge.play())}return LP(()=>{if(r){var E;const R=a.current.querySelectorAll('[data-in="true"]'),w=12,g=(E=t.position)==null?void 0:E.includes("top");let y=0,N=0;Array.from(R).reverse().forEach((j,b)=>{const B=j;B.classList.add("Toastify__toast--stacked"),b>0&&(B.dataset.collapsed=`${i}`),B.dataset.pos||(B.dataset.pos=g?"top":"bot");const I=y*(i?.2:1)+(i?0:w*b);B.style.setProperty("--y",`${g?I:-1*I}px`),B.style.setProperty("--g",`${w}`),B.style.setProperty("--s",""+(1-(i?N:0))),y+=B.offsetHeight,N+=.025})}},[i,d,r]),pe.createElement("div",{ref:a,className:"Toastify",id:S,onMouseEnter:()=>{r&&(s(!1),ge.pause())},onMouseLeave:P},u((E,R)=>{const w=R.length?{...v}:{...v,pointerEvents:"none"};return pe.createElement("div",{className:k(E),style:w,key:`container-${E}`},R.map(g=>{let{content:y,props:N}=g;return pe.createElement(NP,{...N,stacked:r,collapseAll:P,isIn:f(N.toastId,N.containerId),style:N.style,key:`toast-${N.key}`},y)}))}))}function Ul(){const e=Mt($o.authStatus),t=Mt($o.userInfo),{logout:r}=gn(Wd),i=async u=>{u.preventDefault(),await r().unwrap().catch(f=>{ge.warning(f)})},s=x.jsxs(x.Fragment,{children:[x.jsx("li",{className:"header__nav-item user",children:x.jsxs(Tn,{to:tt.Favorites,className:"header__nav-link header__nav-link--profile",children:[x.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper",children:(t==null?void 0:t.avatarUrl)&&x.jsx("img",{src:t.avatarUrl,alt:"avatar"})}),(t==null?void 0:t.name)&&x.jsx("span",{className:"header__user-name user__name",children:t.name}),x.jsx("span",{className:"header__favorite-count",children:"3"})]})}),x.jsx("li",{className:"header__nav-item",children:x.jsx("a",{className:"header__nav-link",href:"#",onClick:u=>i(u),children:x.jsx("span",{className:"header__signout",children:"Sign out"})})})]}),a=x.jsx("li",{className:"header__nav-item user",children:x.jsxs(Tn,{to:tt.Login,className:"header__nav-link header__nav-link--profile",children:[x.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),x.jsx("span",{className:"header__login",children:"Sign in"})]})});return x.jsx("header",{className:"header",children:x.jsx("div",{className:"container",children:x.jsxs("div",{className:"header__wrapper",children:[x.jsx("div",{className:"header__left",children:x.jsx(Rd,{})}),x.jsx("nav",{className:"header__nav",children:x.jsx("ul",{className:"header__nav-list",children:e===ht.Auth?s:a})})]})})})}const Zo=(...e)=>e.filter(Boolean).join(" ");function zP({cities:e=zi}){return e.map(t=>x.jsx(rS,{to:tt.Root+t.slug,className:({isActive:r})=>Zo("locations__item-link tabs__item",r&&"tabs__item--active"),children:x.jsx("span",{children:t.name})},t.slug))}const IP=()=>{const e=document.title;return()=>{document.title=e}};function Qo(e){M.useEffect(IP,[]),M.useEffect(()=>{document.title=`${e} | 6 cities`},[e])}var Cf={exports:{}};/* @preserve * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(r,i){i(t)})(Hm,function(r){var i="1.7.1";function s(n){var o,l,c,h;for(l=1,c=arguments.length;l"u"||!L||!L.Mixin)){n=y(n)?n:[n];for(var o=0;o0?Math.floor(n):Math.ceil(n)};T.prototype={clone:function(){return new T(this.x,this.y)},add:function(n){return this.clone()._add(A(n))},_add:function(n){return this.x+=n.x,this.y+=n.y,this},subtract:function(n){return this.clone()._subtract(A(n))},_subtract:function(n){return this.x-=n.x,this.y-=n.y,this},divideBy:function(n){return this.clone()._divideBy(n)},_divideBy:function(n){return this.x/=n,this.y/=n,this},multiplyBy:function(n){return this.clone()._multiplyBy(n)},_multiplyBy:function(n){return this.x*=n,this.y*=n,this},scaleBy:function(n){return new T(this.x*n.x,this.y*n.y)},unscaleBy:function(n){return new T(this.x/n.x,this.y/n.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=U(this.x),this.y=U(this.y),this},distanceTo:function(n){n=A(n);var o=n.x-this.x,l=n.y-this.y;return Math.sqrt(o*o+l*l)},equals:function(n){return n=A(n),n.x===this.x&&n.y===this.y},contains:function(n){return n=A(n),Math.abs(n.x)<=Math.abs(this.x)&&Math.abs(n.y)<=Math.abs(this.y)},toString:function(){return"Point("+S(this.x)+", "+S(this.y)+")"}};function A(n,o,l){return n instanceof T?n:y(n)?new T(n[0],n[1]):n==null?n:typeof n=="object"&&"x"in n&&"y"in n?new T(n.x,n.y):new T(n,o,l)}function H(n,o){if(n)for(var l=o?[n,o]:n,c=0,h=l.length;c=this.min.x&&l.x<=this.max.x&&o.y>=this.min.y&&l.y<=this.max.y},intersects:function(n){n=J(n);var o=this.min,l=this.max,c=n.min,h=n.max,m=h.x>=o.x&&c.x<=l.x,C=h.y>=o.y&&c.y<=l.y;return m&&C},overlaps:function(n){n=J(n);var o=this.min,l=this.max,c=n.min,h=n.max,m=h.x>o.x&&c.xo.y&&c.y=o.lat&&h.lat<=l.lat&&c.lng>=o.lng&&h.lng<=l.lng},intersects:function(n){n=ee(n);var o=this._southWest,l=this._northEast,c=n.getSouthWest(),h=n.getNorthEast(),m=h.lat>=o.lat&&c.lat<=l.lat,C=h.lng>=o.lng&&c.lng<=l.lng;return m&&C},overlaps:function(n){n=ee(n);var o=this._southWest,l=this._northEast,c=n.getSouthWest(),h=n.getNorthEast(),m=h.lat>o.lat&&c.lato.lng&&c.lng1,br=function(){var n=!1;try{var o=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("testPassiveEventSupport",_,o),window.removeEventListener("testPassiveEventSupport",_,o)}catch{}return n}(),uh=function(){return!!document.createElement("canvas").getContext}(),rs=!!(document.createElementNS&&th("svg").createSVGRect),is=!rs&&function(){try{var n=document.createElement("div");n.innerHTML='';var o=n.firstChild;return o.style.behavior="url(#default#VML)",o&&typeof o.adj=="object"}catch{return!1}}();function Qt(n){return navigator.userAgent.toLowerCase().indexOf(n)>=0}var My={ie:es,ielt9:jr,edge:ts,webkit:Gl,android:ji,android23:Di,androidStock:rh,opera:Yl,chrome:Ql,gecko:Xl,safari:ns,phantom:ih,opera12:oh,win:sh,ie3d:Jl,webkit3d:eu,gecko3d:ah,any3d:Ct,mobile:Dr,mobileWebkit:Ly,mobileWebkit3d:Ny,msPointer:Mn,pointer:Gt,touch:Yt,mobileOpera:lh,mobileGecko:Oy,retina:Rn,passiveEvents:br,canvas:uh,svg:rs,vml:is},tu=Mn?"MSPointerDown":"pointerdown",nu=Mn?"MSPointerMove":"pointermove",ru=Mn?"MSPointerUp":"pointerup",iu=Mn?"MSPointerCancel":"pointercancel",Br={},ch=!1;function Ry(n,o,l,c){return o==="touchstart"?Iy(n,l,c):o==="touchmove"?Dy(n,l,c):o==="touchend"&&by(n,l,c),this}function zy(n,o,l){var c=n["_leaflet_"+o+l];return o==="touchstart"?n.removeEventListener(tu,c,!1):o==="touchmove"?n.removeEventListener(nu,c,!1):o==="touchend"&&(n.removeEventListener(ru,c,!1),n.removeEventListener(iu,c,!1)),this}function Iy(n,o,l){var c=u(function(h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&kt(h),ou(h,o)});n["_leaflet_touchstart"+l]=c,n.addEventListener(tu,c,!1),ch||(document.addEventListener(tu,Ay,!0),document.addEventListener(nu,jy,!0),document.addEventListener(ru,fh,!0),document.addEventListener(iu,fh,!0),ch=!0)}function Ay(n){Br[n.pointerId]=n}function jy(n){Br[n.pointerId]&&(Br[n.pointerId]=n)}function fh(n){delete Br[n.pointerId]}function ou(n,o){n.touches=[];for(var l in Br)n.touches.push(Br[l]);n.changedTouches=[n],o(n)}function Dy(n,o,l){var c=function(h){h.pointerType===(h.MSPOINTER_TYPE_MOUSE||"mouse")&&h.buttons===0||ou(h,o)};n["_leaflet_touchmove"+l]=c,n.addEventListener(nu,c,!1)}function by(n,o,l){var c=function(h){ou(h,o)};n["_leaflet_touchend"+l]=c,n.addEventListener(ru,c,!1),n.addEventListener(iu,c,!1)}var os=Mn?"MSPointerDown":Gt?"pointerdown":"touchstart",ss=Mn?"MSPointerUp":Gt?"pointerup":"touchend",$r="_leaflet_";function By(n,o,l){var c,h,m=!1,C=250;function O($){if(Gt){if(!$.isPrimary||$.pointerType==="mouse")return}else if($.touches.length>1)return;var q=Date.now(),ne=q-(c||q);h=$.touches?$.touches[0]:$,m=ne>0&&ne<=C,c=q}function z($){if(m&&!h.cancelBubble){if(Gt){if($.pointerType==="mouse")return;var q={},ne,he;for(he in h)ne=h[he],q[he]=ne&&ne.bind?ne.bind(h):ne;h=q}h.type="dblclick",h.button=0,o(h),c=null}}return n[$r+os+l]=O,n[$r+ss+l]=z,n[$r+"dblclick"+l]=o,n.addEventListener(os,O,br?{passive:!1}:!1),n.addEventListener(ss,z,br?{passive:!1}:!1),n.addEventListener("dblclick",o,!1),this}function $y(n,o){var l=n[$r+os+o],c=n[$r+ss+o],h=n[$r+"dblclick"+o];return n.removeEventListener(os,l,br?{passive:!1}:!1),n.removeEventListener(ss,c,br?{passive:!1}:!1),n.removeEventListener("dblclick",h,!1),this}var su=us(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),bi=us(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),dh=bi==="webkitTransition"||bi==="OTransition"?bi+"End":"transitionend";function hh(n){return typeof n=="string"?document.getElementById(n):n}function Bi(n,o){var l=n.style[o]||n.currentStyle&&n.currentStyle[o];if((!l||l==="auto")&&document.defaultView){var c=document.defaultView.getComputedStyle(n,null);l=c?c[o]:null}return l==="auto"?null:l}function de(n,o,l){var c=document.createElement(n);return c.className=o||"",l&&l.appendChild(c),c}function Ce(n){var o=n.parentNode;o&&o.removeChild(n)}function as(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Fr(n){var o=n.parentNode;o&&o.lastChild!==n&&o.appendChild(n)}function Ur(n){var o=n.parentNode;o&&o.firstChild!==n&&o.insertBefore(n,o.firstChild)}function au(n,o){if(n.classList!==void 0)return n.classList.contains(o);var l=ls(n);return l.length>0&&new RegExp("(^|\\s)"+o+"(\\s|$)").test(l)}function oe(n,o){if(n.classList!==void 0)for(var l=P(o),c=0,h=l.length;cthis.options.maxZoom)?this.setZoom(n):this},panInsideBounds:function(n,o){this._enforcingBounds=!0;var l=this.getCenter(),c=this._limitCenter(l,this._zoom,ee(n));return l.equals(c)||this.panTo(c,o),this._enforcingBounds=!1,this},panInside:function(n,o){o=o||{};var l=A(o.paddingTopLeft||o.padding||[0,0]),c=A(o.paddingBottomRight||o.padding||[0,0]),h=this.getCenter(),m=this.project(h),C=this.project(n),O=this.getPixelBounds(),z=O.getSize().divideBy(2),$=J([O.min.add(l),O.max.subtract(c)]);if(!$.contains(C)){this._enforcingBounds=!0;var q=m.subtract(C),ne=A(C.x+q.x,C.y+q.y);(C.x<$.min.x||C.x>$.max.x)&&(ne.x=m.x-q.x,q.x>0?ne.x+=z.x-l.x:ne.x-=z.x-c.x),(C.y<$.min.y||C.y>$.max.y)&&(ne.y=m.y-q.y,q.y>0?ne.y+=z.y-l.y:ne.y-=z.y-c.y),this.panTo(this.unproject(ne),o),this._enforcingBounds=!1}return this},invalidateSize:function(n){if(!this._loaded)return this;n=s({animate:!1,pan:!0},n===!0?{animate:!0}:n);var o=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var l=this.getSize(),c=o.divideBy(2).round(),h=l.divideBy(2).round(),m=c.subtract(h);return!m.x&&!m.y?this:(n.animate&&n.pan?this.panBy(m):(n.pan&&this._rawPanBy(m),this.fire("move"),n.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(u(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:o,newSize:l}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(n){if(n=this._locateOptions=s({timeout:1e4,watch:!1},n),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var o=u(this._handleGeolocationResponse,this),l=u(this._handleGeolocationError,this);return n.watch?this._locationWatchId=navigator.geolocation.watchPosition(o,l,n):navigator.geolocation.getCurrentPosition(o,l,n),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(n){var o=n.code,l=n.message||(o===1?"permission denied":o===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:o,message:"Geolocation error: "+l+"."})},_handleGeolocationResponse:function(n){var o=n.coords.latitude,l=n.coords.longitude,c=new te(o,l),h=c.toBounds(n.coords.accuracy*2),m=this._locateOptions;if(m.setView){var C=this.getBoundsZoom(h);this.setView(c,m.maxZoom?Math.min(C,m.maxZoom):C)}var O={latlng:c,bounds:h,timestamp:n.timestamp};for(var z in n.coords)typeof n.coords[z]=="number"&&(O[z]=n.coords[z]);this.fire("locationfound",O)},addHandler:function(n,o){if(!o)return this;var l=this[n]=new o(this);return this._handlers.push(l),this.options[n]&&l.enable(),this},remove:function(){if(this._initEvents(!0),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{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Ce(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(le(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var n;for(n in this._layers)this._layers[n].remove();for(n in this._panes)Ce(this._panes[n]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(n,o){var l="leaflet-pane"+(n?" leaflet-"+n.replace("Pane","")+"-pane":""),c=de("div",l,o||this._mapPane);return n&&(this._panes[n]=c),c},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var n=this.getPixelBounds(),o=this.unproject(n.getBottomLeft()),l=this.unproject(n.getTopRight());return new re(o,l)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(n,o,l){n=ee(n),l=A(l||[0,0]);var c=this.getZoom()||0,h=this.getMinZoom(),m=this.getMaxZoom(),C=n.getNorthWest(),O=n.getSouthEast(),z=this.getSize().subtract(l),$=J(this.project(O,c),this.project(C,c)).getSize(),q=Ct?this.options.zoomSnap:1,ne=z.x/$.x,he=z.y/$.y,hn=o?Math.max(ne,he):Math.min(ne,he);return c=this.getScaleZoom(hn,c),q&&(c=Math.round(c/(q/100))*(q/100),c=o?Math.ceil(c/q)*q:Math.floor(c/q)*q),Math.max(h,Math.min(m,c))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new T(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(n,o){var l=this._getTopLeftPoint(n,o);return new H(l,l.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(n){return this.options.crs.getProjectedBounds(n===void 0?this.getZoom():n)},getPane:function(n){return typeof n=="string"?this._panes[n]:n},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(n,o){var l=this.options.crs;return o=o===void 0?this._zoom:o,l.scale(n)/l.scale(o)},getScaleZoom:function(n,o){var l=this.options.crs;o=o===void 0?this._zoom:o;var c=l.zoom(n*l.scale(o));return isNaN(c)?1/0:c},project:function(n,o){return o=o===void 0?this._zoom:o,this.options.crs.latLngToPoint(ie(n),o)},unproject:function(n,o){return o=o===void 0?this._zoom:o,this.options.crs.pointToLatLng(A(n),o)},layerPointToLatLng:function(n){var o=A(n).add(this.getPixelOrigin());return this.unproject(o)},latLngToLayerPoint:function(n){var o=this.project(ie(n))._round();return o._subtract(this.getPixelOrigin())},wrapLatLng:function(n){return this.options.crs.wrapLatLng(ie(n))},wrapLatLngBounds:function(n){return this.options.crs.wrapLatLngBounds(ee(n))},distance:function(n,o){return this.options.crs.distance(ie(n),ie(o))},containerPointToLayerPoint:function(n){return A(n).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(n){return A(n).add(this._getMapPanePos())},containerPointToLatLng:function(n){var o=this.containerPointToLayerPoint(A(n));return this.layerPointToLatLng(o)},latLngToContainerPoint:function(n){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ie(n)))},mouseEventToContainerPoint:function(n){return _h(n,this._container)},mouseEventToLayerPoint:function(n){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(n))},mouseEventToLatLng:function(n){return this.layerPointToLatLng(this.mouseEventToLayerPoint(n))},_initContainer:function(n){var o=this._container=hh(n);if(o){if(o._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");se(o,"scroll",this._onScroll,this),this._containerId=d(o)},_initLayout:function(){var n=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ct,oe(n,"leaflet-container"+(Yt?" leaflet-touch":"")+(Rn?" leaflet-retina":"")+(jr?" leaflet-oldie":"")+(ns?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var o=Bi(n,"position");o!=="absolute"&&o!=="relative"&&o!=="fixed"&&(n.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var n=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Ie(this._mapPane,new T(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(oe(n.markerPane,"leaflet-zoom-hide"),oe(n.shadowPane,"leaflet-zoom-hide"))},_resetView:function(n,o){Ie(this._mapPane,new T(0,0));var l=!this._loaded;this._loaded=!0,o=this._limitZoom(o),this.fire("viewprereset");var c=this._zoom!==o;this._moveStart(c,!1)._move(n,o)._moveEnd(c),this.fire("viewreset"),l&&this.fire("load")},_moveStart:function(n,o){return n&&this.fire("zoomstart"),o||this.fire("movestart"),this},_move:function(n,o,l){o===void 0&&(o=this._zoom);var c=this._zoom!==o;return this._zoom=o,this._lastCenter=n,this._pixelOrigin=this._getNewPixelOrigin(n),(c||l&&l.pinch)&&this.fire("zoom",l),this.fire("move",l)},_moveEnd:function(n){return n&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return le(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(n){Ie(this._mapPane,this._getMapPanePos().subtract(n))},_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(n){this._targets={},this._targets[d(this._container)]=this;var o=n?Me:se;o(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&o(window,"resize",this._onResize,this),Ct&&this.options.transform3DLimit&&(n?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){le(this._resizeRequest),this._resizeRequest=G(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var n=this._getMapPanePos();Math.max(Math.abs(n.x),Math.abs(n.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(n,o){for(var l=[],c,h=o==="mouseout"||o==="mouseover",m=n.target||n.srcElement,C=!1;m;){if(c=this._targets[d(m)],c&&(o==="click"||o==="preclick")&&!n._simulated&&this._draggableMoved(c)){C=!0;break}if(c&&c.listens(o,!0)&&(h&&!hs(m,n)||(l.push(c),h))||m===this._container)break;m=m.parentNode}return!l.length&&!C&&!h&&hs(m,n)&&(l=[this]),l},_handleDOMEvent:function(n){if(!(!this._loaded||wu(n))){var o=n.type;(o==="mousedown"||o==="keypress"||o==="keyup"||o==="keydown")&&hu(n.target||n.srcElement),this._fireDOMEvent(n,o)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(n,o,l){if(n.type==="click"){var c=s({},n);c.type="preclick",this._fireDOMEvent(c,c.type,l)}if(!n._stopped&&(l=(l||[]).concat(this._findEventTargets(n,o)),!!l.length)){var h=l[0];o==="contextmenu"&&h.listens(o,!0)&&kt(n);var m={originalEvent:n};if(n.type!=="keypress"&&n.type!=="keydown"&&n.type!=="keyup"){var C=h.getLatLng&&(!h._radius||h._radius<=10);m.containerPoint=C?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(n),m.layerPoint=this.containerPointToLayerPoint(m.containerPoint),m.latlng=C?h.getLatLng():this.layerPointToLatLng(m.layerPoint)}for(var O=0;O0?Math.round(n-o)/2:Math.max(0,Math.ceil(n))-Math.max(0,Math.floor(o))},_limitZoom:function(n){var o=this.getMinZoom(),l=this.getMaxZoom(),c=Ct?this.options.zoomSnap:1;return c&&(n=Math.round(n/c)*c),Math.max(o,Math.min(l,n))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ne(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(n,o){var l=this._getCenterOffset(n)._trunc();return(o&&o.animate)!==!0&&!this.getSize().contains(l)?!1:(this.panBy(l,o),!0)},_createAnimProxy:function(){var n=this._proxy=de("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(n),this.on("zoomanim",function(o){var l=su,c=this._proxy.style[l];cr(this._proxy,this.project(o.center,o.zoom),this.getZoomScale(o.zoom,1)),c===this._proxy.style[l]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Ce(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var n=this.getCenter(),o=this.getZoom();cr(this._proxy,this.project(n,o),this.getZoomScale(o,1))},_catchTransitionEnd:function(n){this._animatingZoom&&n.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(n,o,l){if(this._animatingZoom)return!0;if(l=l||{},!this._zoomAnimated||l.animate===!1||this._nothingToAnimate()||Math.abs(o-this._zoom)>this.options.zoomAnimationThreshold)return!1;var c=this.getZoomScale(o),h=this._getCenterOffset(n)._divideBy(1-1/c);return l.animate!==!0&&!this.getSize().contains(h)?!1:(G(function(){this._moveStart(!0,!1)._animateZoom(n,o,!0)},this),!0)},_animateZoom:function(n,o,l,c){this._mapPane&&(l&&(this._animatingZoom=!0,this._animateToCenter=n,this._animateToZoom=o,oe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:n,zoom:o,noUpdate:c}),setTimeout(u(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ne(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),G(function(){this._moveEnd(!0)},this))}});function Wy(n,o){return new ce(n,o)}var bt=Y.extend({options:{position:"topright"},initialize:function(n){E(this,n)},getPosition:function(){return this.options.position},setPosition:function(n){var o=this._map;return o&&o.removeControl(this),this.options.position=n,o&&o.addControl(this),this},getContainer:function(){return this._container},addTo:function(n){this.remove(),this._map=n;var o=this._container=this.onAdd(n),l=this.getPosition(),c=n._controlCorners[l];return oe(o,"leaflet-control"),l.indexOf("bottom")!==-1?c.insertBefore(o,c.firstChild):c.appendChild(o),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ce(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(n){this._map&&n&&n.screenX>0&&n.screenY>0&&this._map.getContainer().focus()}}),Hi=function(n){return new bt(n)};ce.include({addControl:function(n){return n.addTo(this),this},removeControl:function(n){return n.remove(),this},_initControlPos:function(){var n=this._controlCorners={},o="leaflet-",l=this._controlContainer=de("div",o+"control-container",this._container);function c(h,m){var C=o+h+" "+o+m;n[h+m]=de("div",C,l)}c("top","left"),c("top","right"),c("bottom","left"),c("bottom","right")},_clearControlPos:function(){for(var n in this._controlCorners)Ce(this._controlCorners[n]);Ce(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var yh=bt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(n,o,l,c){return l1,this._baseLayersList.style.display=n?"":"none"),this._separator.style.display=o&&n?"":"none",this},_onLayerChange:function(n){this._handlingClick||this._update();var o=this._getLayer(d(n.target)),l=o.overlay?n.type==="add"?"overlayadd":"overlayremove":n.type==="add"?"baselayerchange":null;l&&this._map.fire(l,o)},_createRadioElement:function(n,o){var l='",c=document.createElement("div");return c.innerHTML=l,c.firstChild},_addItem:function(n){var o=document.createElement("label"),l=this._map.hasLayer(n.layer),c;n.overlay?(c=document.createElement("input"),c.type="checkbox",c.className="leaflet-control-layers-selector",c.defaultChecked=l):c=this._createRadioElement("leaflet-base-layers_"+d(this),l),this._layerControlInputs.push(c),c.layerId=d(n.layer),se(c,"click",this._onInputClick,this);var h=document.createElement("span");h.innerHTML=" "+n.name;var m=document.createElement("div");o.appendChild(m),m.appendChild(c),m.appendChild(h);var C=n.overlay?this._overlaysList:this._baseLayersList;return C.appendChild(o),this._checkDisabledLayers(),o},_onInputClick:function(){var n=this._layerControlInputs,o,l,c=[],h=[];this._handlingClick=!0;for(var m=n.length-1;m>=0;m--)o=n[m],l=this._getLayer(o.layerId).layer,o.checked?c.push(l):o.checked||h.push(l);for(m=0;m=0;h--)o=n[h],l=this._getLayer(o.layerId).layer,o.disabled=l.options.minZoom!==void 0&&cl.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Vy=function(n,o,l){return new yh(n,o,l)},xu=bt.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(n){var o="leaflet-control-zoom",l=de("div",o+" leaflet-bar"),c=this.options;return this._zoomInButton=this._createButton(c.zoomInText,c.zoomInTitle,o+"-in",l,this._zoomIn),this._zoomOutButton=this._createButton(c.zoomOutText,c.zoomOutTitle,o+"-out",l,this._zoomOut),this._updateDisabled(),n.on("zoomend zoomlevelschange",this._updateDisabled,this),l},onRemove:function(n){n.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(n){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(n.shiftKey?3:1))},_createButton:function(n,o,l,c,h){var m=de("a",l,c);return m.innerHTML=n,m.href="#",m.title=o,m.setAttribute("role","button"),m.setAttribute("aria-label",o),Zi(m),se(m,"click",ln),se(m,"click",h,this),se(m,"click",this._refocusOnMap,this),m},_updateDisabled:function(){var n=this._map,o="leaflet-disabled";Ne(this._zoomInButton,o),Ne(this._zoomOutButton,o),(this._disabled||n._zoom===n.getMinZoom())&&oe(this._zoomOutButton,o),(this._disabled||n._zoom===n.getMaxZoom())&&oe(this._zoomInButton,o)}});ce.mergeOptions({zoomControl:!0}),ce.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new xu,this.addControl(this.zoomControl))});var Ky=function(n){return new xu(n)},wh=bt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(n){var o="leaflet-control-scale",l=de("div",o),c=this.options;return this._addScales(c,o+"-line",l),n.on(c.updateWhenIdle?"moveend":"move",this._update,this),n.whenReady(this._update,this),l},onRemove:function(n){n.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(n,o,l){n.metric&&(this._mScale=de("div",o,l)),n.imperial&&(this._iScale=de("div",o,l))},_update:function(){var n=this._map,o=n.getSize().y/2,l=n.distance(n.containerPointToLatLng([0,o]),n.containerPointToLatLng([this.options.maxWidth,o]));this._updateScales(l)},_updateScales:function(n){this.options.metric&&n&&this._updateMetric(n),this.options.imperial&&n&&this._updateImperial(n)},_updateMetric:function(n){var o=this._getRoundNum(n),l=o<1e3?o+" m":o/1e3+" km";this._updateScale(this._mScale,l,o/n)},_updateImperial:function(n){var o=n*3.2808399,l,c,h;o>5280?(l=o/5280,c=this._getRoundNum(l),this._updateScale(this._iScale,c+" mi",c/l)):(h=this._getRoundNum(o),this._updateScale(this._iScale,h+" ft",h/o))},_updateScale:function(n,o,l){n.style.width=Math.round(this.options.maxWidth*l)+"px",n.innerHTML=o},_getRoundNum:function(n){var o=Math.pow(10,(Math.floor(n)+"").length-1),l=n/o;return l=l>=10?10:l>=5?5:l>=3?3:l>=2?2:1,o*l}}),qy=function(n){return new wh(n)},Su=bt.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(n){E(this,n),this._attributions={}},onAdd:function(n){n.attributionControl=this,this._container=de("div","leaflet-control-attribution"),Zi(this._container);for(var o in n._layers)n._layers[o].getAttribution&&this.addAttribution(n._layers[o].getAttribution());return this._update(),this._container},setPrefix:function(n){return this.options.prefix=n,this._update(),this},addAttribution:function(n){return n?(this._attributions[n]||(this._attributions[n]=0),this._attributions[n]++,this._update(),this):this},removeAttribution:function(n){return n?(this._attributions[n]&&(this._attributions[n]--,this._update()),this):this},_update:function(){if(this._map){var n=[];for(var o in this._attributions)this._attributions[o]&&n.push(o);var l=[];this.options.prefix&&l.push(this.options.prefix),n.length&&l.push(n.join(", ")),this._container.innerHTML=l.join(" | ")}}});ce.mergeOptions({attributionControl:!0}),ce.addInitHook(function(){this.options.attributionControl&&new Su().addTo(this)});var Gy=function(n){return new Su(n)};bt.Layers=yh,bt.Zoom=xu,bt.Scale=wh,bt.Attribution=Su,Hi.layers=Vy,Hi.zoom=Ky,Hi.scale=qy,Hi.attribution=Gy;var Xt=Y.extend({initialize:function(n){this._map=n},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Xt.addTo=function(n,o){return n.addHandler(o,this),this};var Yy={Events:F},xh=Yt?"touchstart mousedown":"mousedown",Sh={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Eu={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},dr=K.extend({options:{clickTolerance:3},initialize:function(n,o,l,c){E(this,c),this._element=n,this._dragStartTarget=o||n,this._preventOutline=l},enable:function(){this._enabled||(se(this._dragStartTarget,xh,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(dr._dragging===this&&this.finishDrag(),Me(this._dragStartTarget,xh,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(n){if(!(n._simulated||!this._enabled)&&(this._moved=!1,!au(this._element,"leaflet-zoom-anim")&&!(dr._dragging||n.shiftKey||n.which!==1&&n.button!==1&&!n.touches)&&(dr._dragging=this,this._preventOutline&&hu(this._element),cu(),$i(),!this._moving))){this.fire("down");var o=n.touches?n.touches[0]:n,l=ph(this._element);this._startPoint=new T(o.clientX,o.clientY),this._parentScale=pu(l),se(document,Eu[n.type],this._onMove,this),se(document,Sh[n.type],this._onUp,this)}},_onMove:function(n){if(!(n._simulated||!this._enabled)){if(n.touches&&n.touches.length>1){this._moved=!0;return}var o=n.touches&&n.touches.length===1?n.touches[0]:n,l=new T(o.clientX,o.clientY)._subtract(this._startPoint);!l.x&&!l.y||Math.abs(l.x)+Math.abs(l.y)m&&(C=O,m=z);m>l&&(o[C]=1,Pu(n,o,l,c,C),Pu(n,o,l,C,h))}function Jy(n,o){for(var l=[n[0]],c=1,h=0,m=n.length;co&&(l.push(n[c]),h=c);return ho.max.x&&(l|=2),n.yo.max.y&&(l|=8),l}function e0(n,o){var l=o.x-n.x,c=o.y-n.y;return l*l+c*c}function Wi(n,o,l,c){var h=o.x,m=o.y,C=l.x-h,O=l.y-m,z=C*C+O*O,$;return z>0&&($=((n.x-h)*C+(n.y-m)*O)/z,$>1?(h=l.x,m=l.y):$>0&&(h+=C*$,m+=O*$)),C=n.x-h,O=n.y-m,c?C*C+O*O:new T(h,m)}function un(n){return!y(n[0])||typeof n[0][0]!="object"&&typeof n[0][0]<"u"}function kh(n){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),un(n)}var t0={simplify:Eh,pointToSegmentDistance:Ph,closestPointOnSegment:Qy,clipSegment:Th,_getEdgeIntersection:ps,_getBitCode:hr,_sqClosestPointOnSegment:Wi,isFlat:un,_flat:kh};function Lh(n,o,l){var c,h=[1,4,2,8],m,C,O,z,$,q,ne,he;for(m=0,q=n.length;m1e-7;O++)$=h*Math.sin(C),$=Math.pow((1-$)/(1+$),h/2),z=Math.PI/2-2*Math.atan(m*$)-C,C+=z;return new te(C*o,n.x*o/l)}},r0={LonLat:Cu,Mercator:Tu,SphericalMercator:$e},i0=s({},Ge,{code:"EPSG:3395",projection:Tu,transformation:function(){var n=.5/(Math.PI*Tu.R);return jt(n,.5,-n,.5)}()}),Nh=s({},Ge,{code:"EPSG:4326",projection:Cu,transformation:jt(1/180,1,-1/180,.5)}),o0=s({},ve,{projection:Cu,transformation:jt(1,0,-1,0),scale:function(n){return Math.pow(2,n)},zoom:function(n){return Math.log(n)/Math.LN2},distance:function(n,o){var l=o.lng-n.lng,c=o.lat-n.lat;return Math.sqrt(l*l+c*c)},infinite:!0});ve.Earth=Ge,ve.EPSG3395=i0,ve.EPSG3857=On,ve.EPSG900913=Ty,ve.EPSG4326=Nh,ve.Simple=o0;var Bt=K.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(n){return n.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(n){return n&&n.removeLayer(this),this},getPane:function(n){return this._map.getPane(n?this.options[n]||n:this.options.pane)},addInteractiveTarget:function(n){return this._map._targets[d(n)]=this,this},removeInteractiveTarget:function(n){return delete this._map._targets[d(n)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(n){var o=n.target;if(o.hasLayer(this)){if(this._map=o,this._zoomAnimated=o._zoomAnimated,this.getEvents){var l=this.getEvents();o.on(l,this),this.once("remove",function(){o.off(l,this)},this)}this.onAdd(o),this.getAttribution&&o.attributionControl&&o.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),o.fire("layeradd",{layer:this})}}});ce.include({addLayer:function(n){if(!n._layerAdd)throw new Error("The provided object is not a Layer.");var o=d(n);return this._layers[o]?this:(this._layers[o]=n,n._mapToAdd=this,n.beforeAdd&&n.beforeAdd(this),this.whenReady(n._layerAdd,n),this)},removeLayer:function(n){var o=d(n);return this._layers[o]?(this._loaded&&n.onRemove(this),n.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(n.getAttribution()),delete this._layers[o],this._loaded&&(this.fire("layerremove",{layer:n}),n.fire("remove")),n._map=n._mapToAdd=null,this):this},hasLayer:function(n){return!!n&&d(n)in this._layers},eachLayer:function(n,o){for(var l in this._layers)n.call(o,this._layers[l]);return this},_addLayers:function(n){n=n?y(n)?n:[n]:[];for(var o=0,l=n.length;othis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()o)return C=(c-o)/l,this._map.layerPointToLatLng([m.x-C*(m.x-h.x),m.y-C*(m.y-h.y)])},getBounds:function(){return this._bounds},addLatLng:function(n,o){return o=o||this._defaultShape(),n=ie(n),o.push(n),this._bounds.extend(n),this.redraw()},_setLatLngs:function(n){this._bounds=new re,this._latlngs=this._convertLatLngs(n)},_defaultShape:function(){return un(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(n){for(var o=[],l=un(n),c=0,h=n.length;c=2&&o[0]instanceof te&&o[0].equals(o[l-1])&&o.pop(),o},_setLatLngs:function(n){cn.prototype._setLatLngs.call(this,n),un(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return un(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var n=this._renderer._bounds,o=this.options.weight,l=new T(o,o);if(n=new H(n.min.subtract(l),n.max.add(l)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(n))){if(this.options.noClip){this._parts=this._rings;return}for(var c=0,h=this._rings.length,m;cn.y!=h.y>n.y&&n.x<(h.x-c.x)*(n.y-c.y)/(h.y-c.y)+c.x&&(o=!o);return o||cn.prototype._containsPoint.call(this,n,!0)}});function h0(n,o){return new Vr(n,o)}var fn=Hr.extend({initialize:function(n,o){E(this,o),this._layers={},n&&this.addData(n)},addData:function(n){var o=y(n)?n:n.features,l,c,h;if(o){for(l=0,c=o.length;l0?c:[o.src];return}y(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(o.style,"objectFit")&&(o.style.objectFit="fill"),o.autoplay=!!this.options.autoplay,o.loop=!!this.options.loop,o.muted=!!this.options.muted;for(var m=0;mh?(o.height=h+"px",oe(n,m)):Ne(n,m),this._containerWidth=this._container.offsetWidth},_animateZoom:function(n){var o=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center),l=this._getAnchor();Ie(this._container,o.add(l))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var n=this._map,o=parseInt(Bi(this._container,"marginBottom"),10)||0,l=this._container.offsetHeight+o,c=this._containerWidth,h=new T(this._containerLeft,-l-this._containerBottom);h._add(zn(this._container));var m=n.layerPointToContainerPoint(h),C=A(this.options.autoPanPadding),O=A(this.options.autoPanPaddingTopLeft||C),z=A(this.options.autoPanPaddingBottomRight||C),$=n.getSize(),q=0,ne=0;m.x+c+z.x>$.x&&(q=m.x+c-$.x+z.x),m.x-q-O.x<0&&(q=m.x-O.x),m.y+l+z.y>$.y&&(ne=m.y+l-$.y+z.y),m.y-ne-O.y<0&&(ne=m.y-O.y),(q||ne)&&n.fire("autopanstart").panBy([q,ne])}},_onCloseButtonClick:function(n){this._close(),ln(n)},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),g0=function(n,o){return new qr(n,o)};ce.mergeOptions({closePopupOnClick:!0}),ce.include({openPopup:function(n,o,l){return n instanceof qr||(n=new qr(l).setContent(n)),o&&n.setLatLng(o),this.hasLayer(n)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=n,this.addLayer(n))},closePopup:function(n){return(!n||n===this._popup)&&(n=this._popup,this._popup=null),n&&this.removeLayer(n),this}}),Bt.include({bindPopup:function(n,o){return n instanceof qr?(E(n,o),this._popup=n,n._source=this):((!this._popup||o)&&(this._popup=new qr(o,this)),this._popup.setContent(n)),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(n,o){return this._popup&&this._map&&(o=this._popup._prepareOpen(this,n,o),this._map.openPopup(this._popup,o)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(n){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(n)),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(n){return this._popup&&this._popup.setContent(n),this},getPopup:function(){return this._popup},_openPopup:function(n){var o=n.layer||n.target;if(this._popup&&this._map){if(ln(n),o instanceof In){this.openPopup(n.layer||n.target,n.latlng);return}this._map.hasLayer(this._popup)&&this._popup._source===o?this.closePopup():this.openPopup(o,n.latlng)}},_movePopup:function(n){this._popup.setLatLng(n.latlng)},_onKeyPress:function(n){n.originalEvent.keyCode===13&&this._openPopup(n)}});var Gr=dn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(n){dn.prototype.onAdd.call(this,n),this.setOpacity(this.options.opacity),n.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(n){dn.prototype.onRemove.call(this,n),n.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var n=dn.prototype.getEvents.call(this);return Yt&&!this.options.permanent&&(n.preclick=this._close),n},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var n="leaflet-tooltip",o=n+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=de("div",o)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(n){var o,l,c=this._map,h=this._container,m=c.latLngToContainerPoint(c.getCenter()),C=c.layerPointToContainerPoint(n),O=this.options.direction,z=h.offsetWidth,$=h.offsetHeight,q=A(this.options.offset),ne=this._getAnchor();O==="top"?(o=z/2,l=$):O==="bottom"?(o=z/2,l=0):O==="center"?(o=z/2,l=$/2):O==="right"?(o=0,l=$/2):O==="left"?(o=z,l=$/2):C.xthis.options.maxZoom||lc?this._retainParent(h,m,C,c):!1)},_retainChildren:function(n,o,l,c){for(var h=2*n;h<2*n+2;h++)for(var m=2*o;m<2*o+2;m++){var C=new T(h,m);C.z=l+1;var O=this._tileCoordsToKey(C),z=this._tiles[O];if(z&&z.active){z.retain=!0;continue}else z&&z.loaded&&(z.retain=!0);l+1this.options.maxZoom||this.options.minZoom!==void 0&&h1){this._setView(n,l);return}for(var ne=h.min.y;ne<=h.max.y;ne++)for(var he=h.min.x;he<=h.max.x;he++){var hn=new T(he,ne);if(hn.z=this._tileZoom,!!this._isValidTile(hn)){var pr=this._tiles[this._tileCoordsToKey(hn)];pr?pr.current=!0:C.push(hn)}}if(C.sort(function(An,Ru){return An.distanceTo(m)-Ru.distanceTo(m)}),C.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ss=document.createDocumentFragment();for(he=0;hel.max.x)||!o.wrapLat&&(n.yl.max.y))return!1}if(!this.options.bounds)return!0;var c=this._tileCoordsToBounds(n);return ee(this.options.bounds).overlaps(c)},_keyToBounds:function(n){return this._tileCoordsToBounds(this._keyToTileCoords(n))},_tileCoordsToNwSe:function(n){var o=this._map,l=this.getTileSize(),c=n.scaleBy(l),h=c.add(l),m=o.unproject(c,n.z),C=o.unproject(h,n.z);return[m,C]},_tileCoordsToBounds:function(n){var o=this._tileCoordsToNwSe(n),l=new re(o[0],o[1]);return this.options.noWrap||(l=this._map.wrapLatLngBounds(l)),l},_tileCoordsToKey:function(n){return n.x+":"+n.y+":"+n.z},_keyToTileCoords:function(n){var o=n.split(":"),l=new T(+o[0],+o[1]);return l.z=+o[2],l},_removeTile:function(n){var o=this._tiles[n];o&&(Ce(o.el),delete this._tiles[n],this.fire("tileunload",{tile:o.el,coords:this._keyToTileCoords(n)}))},_initTile:function(n){oe(n,"leaflet-tile");var o=this.getTileSize();n.style.width=o.x+"px",n.style.height=o.y+"px",n.onselectstart=_,n.onmousemove=_,jr&&this.options.opacity<1&&Tt(n,this.options.opacity),ji&&!Di&&(n.style.WebkitBackfaceVisibility="hidden")},_addTile:function(n,o){var l=this._getTilePos(n),c=this._tileCoordsToKey(n),h=this.createTile(this._wrapCoords(n),u(this._tileReady,this,n));this._initTile(h),this.createTile.length<2&&G(u(this._tileReady,this,n,null,h)),Ie(h,l),this._tiles[c]={el:h,coords:n,current:!0},o.appendChild(h),this.fire("tileloadstart",{tile:h,coords:n})},_tileReady:function(n,o,l){o&&this.fire("tileerror",{error:o,tile:l,coords:n});var c=this._tileCoordsToKey(n);l=this._tiles[c],l&&(l.loaded=+new Date,this._map._fadeAnimated?(Tt(l.el,0),le(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this)):(l.active=!0,this._pruneTiles()),o||(oe(l.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:l.el,coords:n})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),jr||!this._map._fadeAnimated?G(this._pruneTiles,this):setTimeout(u(this._pruneTiles,this),250)))},_getTilePos:function(n){return n.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(n){var o=new T(this._wrapX?v(n.x,this._wrapX):n.x,this._wrapY?v(n.y,this._wrapY):n.y);return o.z=n.z,o},_pxBoundsToTileRange:function(n){var o=this.getTileSize();return new H(n.min.unscaleBy(o).floor(),n.max.unscaleBy(o).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var n in this._tiles)if(!this._tiles[n].loaded)return!1;return!0}});function x0(n){return new Ki(n)}var Yr=Ki.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(n,o){this._url=n,o=E(this,o),o.detectRetina&&Rn&&o.maxZoom>0&&(o.tileSize=Math.floor(o.tileSize/2),o.zoomReverse?(o.zoomOffset--,o.minZoom++):(o.zoomOffset++,o.maxZoom--),o.minZoom=Math.max(0,o.minZoom)),typeof o.subdomains=="string"&&(o.subdomains=o.subdomains.split("")),ji||this.on("tileunload",this._onTileRemove)},setUrl:function(n,o){return this._url===n&&o===void 0&&(o=!0),this._url=n,o||this.redraw(),this},createTile:function(n,o){var l=document.createElement("img");return se(l,"load",u(this._tileOnLoad,this,o,l)),se(l,"error",u(this._tileOnError,this,o,l)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),l.alt="",l.setAttribute("role","presentation"),l.src=this.getTileUrl(n),l},getTileUrl:function(n){var o={r:Rn?"@2x":"",s:this._getSubdomain(n),x:n.x,y:n.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var l=this._globalTileRange.max.y-n.y;this.options.tms&&(o.y=l),o["-y"]=l}return g(this._url,s(o,this.options))},_tileOnLoad:function(n,o){jr?setTimeout(u(n,this,null,o),0):n(null,o)},_tileOnError:function(n,o,l){var c=this.options.errorTileUrl;c&&o.getAttribute("src")!==c&&(o.src=c),n(l,o)},_onTileRemove:function(n){n.tile.onload=null},_getZoomForUrl:function(){var n=this._tileZoom,o=this.options.maxZoom,l=this.options.zoomReverse,c=this.options.zoomOffset;return l&&(n=o-n),n+c},_getSubdomain:function(n){var o=Math.abs(n.x+n.y)%this.options.subdomains.length;return this.options.subdomains[o]},_abortLoading:function(){var n,o;for(n in this._tiles)this._tiles[n].coords.z!==this._tileZoom&&(o=this._tiles[n].el,o.onload=_,o.onerror=_,o.complete||(o.src=j,Ce(o),delete this._tiles[n]))},_removeTile:function(n){var o=this._tiles[n];if(o)return rh||o.el.setAttribute("src",j),Ki.prototype._removeTile.call(this,n)},_tileReady:function(n,o,l){if(!(!this._map||l&&l.getAttribute("src")===j))return Ki.prototype._tileReady.call(this,n,o,l)}});function jh(n,o){return new Yr(n,o)}var Dh=Yr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(n,o){this._url=n;var l=s({},this.defaultWmsParams);for(var c in o)c in this.options||(l[c]=o[c]);o=E(this,o);var h=o.detectRetina&&Rn?2:1,m=this.getTileSize();l.width=m.x*h,l.height=m.y*h,this.wmsParams=l},onAdd:function(n){this._crs=this.options.crs||n.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var o=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[o]=this._crs.code,Yr.prototype.onAdd.call(this,n)},getTileUrl:function(n){var o=this._tileCoordsToNwSe(n),l=this._crs,c=J(l.project(o[0]),l.project(o[1])),h=c.min,m=c.max,C=(this._wmsVersion>=1.3&&this._crs===Nh?[h.y,h.x,m.y,m.x]:[h.x,h.y,m.x,m.y]).join(","),O=Yr.prototype.getTileUrl.call(this,n);return O+R(this.wmsParams,O,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+C},setParams:function(n,o){return s(this.wmsParams,n),o||this.redraw(),this}});function S0(n,o){return new Dh(n,o)}Yr.WMS=Dh,jh.wms=S0;var Jt=Bt.extend({options:{padding:.1,tolerance:0},initialize:function(n){E(this,n),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&oe(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 n={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(n.zoomanim=this._onAnimZoom),n},_onAnimZoom:function(n){this._updateTransform(n.center,n.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(n,o){var l=this._map.getZoomScale(o,this._zoom),c=zn(this._container),h=this._map.getSize().multiplyBy(.5+this.options.padding),m=this._map.project(this._center,o),C=this._map.project(n,o),O=C.subtract(m),z=h.multiplyBy(-l).add(c).add(h).subtract(O);Ct?cr(this._container,z,l):Ie(this._container,z)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var n in this._layers)this._layers[n]._reset()},_onZoomEnd:function(){for(var n in this._layers)this._layers[n]._project()},_updatePaths:function(){for(var n in this._layers)this._layers[n]._update()},_update:function(){var n=this.options.padding,o=this._map.getSize(),l=this._map.containerPointToLayerPoint(o.multiplyBy(-n)).round();this._bounds=new H(l,l.add(o.multiplyBy(1+n*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),bh=Jt.extend({getEvents:function(){var n=Jt.prototype.getEvents.call(this);return n.viewprereset=this._onViewPreReset,n},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Jt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var n=this._container=document.createElement("canvas");se(n,"mousemove",this._onMouseMove,this),se(n,"click dblclick mousedown mouseup contextmenu",this._onClick,this),se(n,"mouseout",this._handleMouseOut,this),this._ctx=n.getContext("2d")},_destroyContainer:function(){le(this._redrawRequest),delete this._ctx,Ce(this._container),Me(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var n;this._redrawBounds=null;for(var o in this._layers)n=this._layers[o],n._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Jt.prototype._update.call(this);var n=this._bounds,o=this._container,l=n.getSize(),c=Rn?2:1;Ie(o,n.min),o.width=c*l.x,o.height=c*l.y,o.style.width=l.x+"px",o.style.height=l.y+"px",Rn&&this._ctx.scale(2,2),this._ctx.translate(-n.min.x,-n.min.y),this.fire("update")}},_reset:function(){Jt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(n){this._updateDashArray(n),this._layers[d(n)]=n;var o=n._order={layer:n,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=o),this._drawLast=o,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(n){this._requestRedraw(n)},_removePath:function(n){var o=n._order,l=o.next,c=o.prev;l?l.prev=c:this._drawLast=c,c?c.next=l:this._drawFirst=l,delete n._order,delete this._layers[d(n)],this._requestRedraw(n)},_updatePath:function(n){this._extendRedrawBounds(n),n._project(),n._update(),this._requestRedraw(n)},_updateStyle:function(n){this._updateDashArray(n),this._requestRedraw(n)},_updateDashArray:function(n){if(typeof n.options.dashArray=="string"){var o=n.options.dashArray.split(/[, ]+/),l=[],c,h;for(h=0;h')}}catch{return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),E0={_initContainer:function(){this._container=de("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Jt.prototype._update.call(this),this.fire("update"))},_initPath:function(n){var o=n._container=qi("shape");oe(o,"leaflet-vml-shape "+(this.options.className||"")),o.coordsize="1 1",n._path=qi("path"),o.appendChild(n._path),this._updateStyle(n),this._layers[d(n)]=n},_addPath:function(n){var o=n._container;this._container.appendChild(o),n.options.interactive&&n.addInteractiveTarget(o)},_removePath:function(n){var o=n._container;Ce(o),n.removeInteractiveTarget(o),delete this._layers[d(n)]},_updateStyle:function(n){var o=n._stroke,l=n._fill,c=n.options,h=n._container;h.stroked=!!c.stroke,h.filled=!!c.fill,c.stroke?(o||(o=n._stroke=qi("stroke")),h.appendChild(o),o.weight=c.weight+"px",o.color=c.color,o.opacity=c.opacity,c.dashArray?o.dashStyle=y(c.dashArray)?c.dashArray.join(" "):c.dashArray.replace(/( *, *)/g," "):o.dashStyle="",o.endcap=c.lineCap.replace("butt","flat"),o.joinstyle=c.lineJoin):o&&(h.removeChild(o),n._stroke=null),c.fill?(l||(l=n._fill=qi("fill")),h.appendChild(l),l.color=c.fillColor||c.color,l.opacity=c.fillOpacity):l&&(h.removeChild(l),n._fill=null)},_updateCircle:function(n){var o=n._point.round(),l=Math.round(n._radius),c=Math.round(n._radiusY||l);this._setPath(n,n._empty()?"M0 0":"AL "+o.x+","+o.y+" "+l+","+c+" 0,"+65535*360)},_setPath:function(n,o){n._path.v=o},_bringToFront:function(n){Fr(n._container)},_bringToBack:function(n){Ur(n._container)}},xs=is?qi:th,Gi=Jt.extend({getEvents:function(){var n=Jt.prototype.getEvents.call(this);return n.zoomstart=this._onZoomStart,n},_initContainer:function(){this._container=xs("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=xs("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ce(this._container),Me(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Jt.prototype._update.call(this);var n=this._bounds,o=n.getSize(),l=this._container;(!this._svgSize||!this._svgSize.equals(o))&&(this._svgSize=o,l.setAttribute("width",o.x),l.setAttribute("height",o.y)),Ie(l,n.min),l.setAttribute("viewBox",[n.min.x,n.min.y,o.x,o.y].join(" ")),this.fire("update")}},_initPath:function(n){var o=n._path=xs("path");n.options.className&&oe(o,n.options.className),n.options.interactive&&oe(o,"leaflet-interactive"),this._updateStyle(n),this._layers[d(n)]=n},_addPath:function(n){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(n._path),n.addInteractiveTarget(n._path)},_removePath:function(n){Ce(n._path),n.removeInteractiveTarget(n._path),delete this._layers[d(n)]},_updatePath:function(n){n._project(),n._update()},_updateStyle:function(n){var o=n._path,l=n.options;o&&(l.stroke?(o.setAttribute("stroke",l.color),o.setAttribute("stroke-opacity",l.opacity),o.setAttribute("stroke-width",l.weight),o.setAttribute("stroke-linecap",l.lineCap),o.setAttribute("stroke-linejoin",l.lineJoin),l.dashArray?o.setAttribute("stroke-dasharray",l.dashArray):o.removeAttribute("stroke-dasharray"),l.dashOffset?o.setAttribute("stroke-dashoffset",l.dashOffset):o.removeAttribute("stroke-dashoffset")):o.setAttribute("stroke","none"),l.fill?(o.setAttribute("fill",l.fillColor||l.color),o.setAttribute("fill-opacity",l.fillOpacity),o.setAttribute("fill-rule",l.fillRule||"evenodd")):o.setAttribute("fill","none"))},_updatePoly:function(n,o){this._setPath(n,nh(n._parts,o))},_updateCircle:function(n){var o=n._point,l=Math.max(Math.round(n._radius),1),c=Math.max(Math.round(n._radiusY),1)||l,h="a"+l+","+c+" 0 1,0 ",m=n._empty()?"M0 0":"M"+(o.x-l)+","+o.y+h+l*2+",0 "+h+-l*2+",0 ";this._setPath(n,m)},_setPath:function(n,o){n._path.setAttribute("d",o)},_bringToFront:function(n){Fr(n._path)},_bringToBack:function(n){Ur(n._path)}});is&&Gi.include(E0);function $h(n){return rs||is?new Gi(n):null}ce.include({getRenderer:function(n){var o=n.options.renderer||this._getPaneRenderer(n.options.pane)||this.options.renderer||this._renderer;return o||(o=this._renderer=this._createRenderer()),this.hasLayer(o)||this.addLayer(o),o},_getPaneRenderer:function(n){if(n==="overlayPane"||n===void 0)return!1;var o=this._paneRenderers[n];return o===void 0&&(o=this._createRenderer({pane:n}),this._paneRenderers[n]=o),o},_createRenderer:function(n){return this.options.preferCanvas&&Bh(n)||$h(n)}});var Fh=Vr.extend({initialize:function(n,o){Vr.prototype.initialize.call(this,this._boundsToLatLngs(n),o)},setBounds:function(n){return this.setLatLngs(this._boundsToLatLngs(n))},_boundsToLatLngs:function(n){return n=ee(n),[n.getSouthWest(),n.getNorthWest(),n.getNorthEast(),n.getSouthEast()]}});function P0(n,o){return new Fh(n,o)}Gi.create=xs,Gi.pointsToPath=nh,fn.geometryToLayer=Lu,fn.coordsToLatLng=Nu,fn.coordsToLatLngs=vs,fn.latLngToCoords=Ou,fn.latLngsToCoords=gs,fn.getFeature=Kr,fn.asFeature=ys,ce.mergeOptions({boxZoom:!0});var Uh=Xt.extend({initialize:function(n){this._map=n,this._container=n._container,this._pane=n._panes.overlayPane,this._resetStateTimeout=0,n.on("unload",this._destroy,this)},addHooks:function(){se(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Me(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ce(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(n){if(!n.shiftKey||n.which!==1&&n.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),$i(),cu(),this._startPoint=this._map.mouseEventToContainerPoint(n),se(document,{contextmenu:ln,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(n){this._moved||(this._moved=!0,this._box=de("div","leaflet-zoom-box",this._container),oe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(n);var o=new H(this._point,this._startPoint),l=o.getSize();Ie(this._box,o.min),this._box.style.width=l.x+"px",this._box.style.height=l.y+"px"},_finish:function(){this._moved&&(Ce(this._box),Ne(this._container,"leaflet-crosshair")),Fi(),fu(),Me(document,{contextmenu:ln,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(n){if(!(n.which!==1&&n.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(u(this._resetState,this),0);var o=new re(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(o).fire("boxzoomend",{boxZoomBounds:o})}},_onKeyDown:function(n){n.keyCode===27&&this._finish()}});ce.addInitHook("addHandler","boxZoom",Uh),ce.mergeOptions({doubleClickZoom:!0});var Zh=Xt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(n){var o=this._map,l=o.getZoom(),c=o.options.zoomDelta,h=n.originalEvent.shiftKey?l-c:l+c;o.options.doubleClickZoom==="center"?o.setZoom(h):o.setZoomAround(n.containerPoint,h)}});ce.addInitHook("addHandler","doubleClickZoom",Zh),ce.mergeOptions({dragging:!0,inertia:!Di,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Hh=Xt.extend({addHooks:function(){if(!this._draggable){var n=this._map;this._draggable=new dr(n._mapPane,n._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),n.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),n.on("zoomend",this._onZoomEnd,this),n.whenReady(this._onZoomEnd,this))}oe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ne(this._map._container,"leaflet-grab"),Ne(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 n=this._map;if(n._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var o=ee(this._map.options.maxBounds);this._offsetLimit=J(this._map.latLngToContainerPoint(o.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(o.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;n.fire("movestart").fire("dragstart"),n.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(n){if(this._map.options.inertia){var o=this._lastTime=+new Date,l=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(l),this._times.push(o),this._prunePositions(o)}this._map.fire("move",n).fire("drag",n)},_prunePositions:function(n){for(;this._positions.length>1&&n-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var n=this._map.getSize().divideBy(2),o=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=o.subtract(n).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(n,o){return n-(n-o)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var n=this._draggable._newPos.subtract(this._draggable._startPos),o=this._offsetLimit;n.xo.max.x&&(n.x=this._viscousLimit(n.x,o.max.x)),n.y>o.max.y&&(n.y=this._viscousLimit(n.y,o.max.y)),this._draggable._newPos=this._draggable._startPos.add(n)}},_onPreDragWrap:function(){var n=this._worldWidth,o=Math.round(n/2),l=this._initialWorldOffset,c=this._draggable._newPos.x,h=(c-o+l)%n+o-l,m=(c+o+l)%n-o-l,C=Math.abs(h+l)0?m:-m))-o;this._delta=0,this._startTime=null,C&&(n.options.scrollWheelZoom==="center"?n.setZoom(o+C):n.setZoomAround(this._lastMousePos,o+C))}});ce.addInitHook("addHandler","scrollWheelZoom",Vh),ce.mergeOptions({tap:!0,tapTolerance:15});var Kh=Xt.extend({addHooks:function(){se(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Me(this._map._container,"touchstart",this._onDown,this)},_onDown:function(n){if(n.touches){if(kt(n),this._fireClick=!0,n.touches.length>1){this._fireClick=!1,clearTimeout(this._holdTimeout);return}var o=n.touches[0],l=o.target;this._startPos=this._newPos=new T(o.clientX,o.clientY),l.tagName&&l.tagName.toLowerCase()==="a"&&oe(l,"leaflet-active"),this._holdTimeout=setTimeout(u(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",o))},this),1e3),this._simulateEvent("mousedown",o),se(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(n){if(clearTimeout(this._holdTimeout),Me(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&n&&n.changedTouches){var o=n.changedTouches[0],l=o.target;l&&l.tagName&&l.tagName.toLowerCase()==="a"&&Ne(l,"leaflet-active"),this._simulateEvent("mouseup",o),this._isTapValid()&&this._simulateEvent("click",o)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(n){var o=n.touches[0];this._newPos=new T(o.clientX,o.clientY),this._simulateEvent("mousemove",o)},_simulateEvent:function(n,o){var l=document.createEvent("MouseEvents");l._simulated=!0,o.target._simulatedClick=!0,l.initMouseEvent(n,!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(l)}});Yt&&(!Gt||ns)&&ce.addInitHook("addHandler","tap",Kh),ce.mergeOptions({touchZoom:Yt&&!Di,bounceAtZoomLimits:!0});var qh=Xt.extend({addHooks:function(){oe(this._map._container,"leaflet-touch-zoom"),se(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ne(this._map._container,"leaflet-touch-zoom"),Me(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(n){var o=this._map;if(!(!n.touches||n.touches.length!==2||o._animatingZoom||this._zooming)){var l=o.mouseEventToContainerPoint(n.touches[0]),c=o.mouseEventToContainerPoint(n.touches[1]);this._centerPoint=o.getSize()._divideBy(2),this._startLatLng=o.containerPointToLatLng(this._centerPoint),o.options.touchZoom!=="center"&&(this._pinchStartLatLng=o.containerPointToLatLng(l.add(c)._divideBy(2))),this._startDist=l.distanceTo(c),this._startZoom=o.getZoom(),this._moved=!1,this._zooming=!0,o._stop(),se(document,"touchmove",this._onTouchMove,this),se(document,"touchend",this._onTouchEnd,this),kt(n)}},_onTouchMove:function(n){if(!(!n.touches||n.touches.length!==2||!this._zooming)){var o=this._map,l=o.mouseEventToContainerPoint(n.touches[0]),c=o.mouseEventToContainerPoint(n.touches[1]),h=l.distanceTo(c)/this._startDist;if(this._zoom=o.getScaleZoom(h,this._startZoom),!o.options.bounceAtZoomLimits&&(this._zoomo.getMaxZoom()&&h>1)&&(this._zoom=o._limitZoom(this._zoom)),o.options.touchZoom==="center"){if(this._center=this._startLatLng,h===1)return}else{var m=l._add(c)._divideBy(2)._subtract(this._centerPoint);if(h===1&&m.x===0&&m.y===0)return;this._center=o.unproject(o.project(this._pinchStartLatLng,this._zoom).subtract(m),this._zoom)}this._moved||(o._moveStart(!0,!1),this._moved=!0),le(this._animRequest);var C=u(o._move,o,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=G(C,this,!0),kt(n)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,le(this._animRequest),Me(document,"touchmove",this._onTouchMove,this),Me(document,"touchend",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))}});ce.addInitHook("addHandler","touchZoom",qh),ce.BoxZoom=Uh,ce.DoubleClickZoom=Zh,ce.Drag=Hh,ce.Keyboard=Wh,ce.ScrollWheelZoom=Vh,ce.Tap=Kh,ce.TouchZoom=qh,r.version=i,r.Control=bt,r.control=Hi,r.Browser=My,r.Evented=K,r.Mixin=Yy,r.Util=We,r.Class=Y,r.Handler=Xt,r.extend=s,r.bind=u,r.stamp=d,r.setOptions=E,r.DomEvent=Hy,r.DomUtil=Uy,r.PosAnimation=gh,r.Draggable=dr,r.LineUtil=t0,r.PolyUtil=n0,r.Point=T,r.point=A,r.Bounds=H,r.bounds=J,r.Transformation=Pt,r.transformation=jt,r.Projection=r0,r.LatLng=te,r.latLng=ie,r.LatLngBounds=re,r.latLngBounds=ee,r.CRS=ve,r.GeoJSON=fn,r.geoJSON=Rh,r.geoJson=p0,r.Layer=Bt,r.LayerGroup=Zr,r.layerGroup=s0,r.FeatureGroup=Hr,r.featureGroup=a0,r.ImageOverlay=ws,r.imageOverlay=m0,r.VideoOverlay=zh,r.videoOverlay=_0,r.SVGOverlay=Ih,r.svgOverlay=v0,r.DivOverlay=dn,r.Popup=qr,r.popup=g0,r.Tooltip=Gr,r.tooltip=y0,r.Icon=Wr,r.icon=l0,r.DivIcon=Ah,r.divIcon=w0,r.Marker=ms,r.marker=u0,r.TileLayer=Yr,r.tileLayer=jh,r.GridLayer=Ki,r.gridLayer=x0,r.SVG=Gi,r.svg=$h,r.Renderer=Jt,r.Canvas=bh,r.canvas=Bh,r.Path=In,r.CircleMarker=_s,r.circleMarker=c0,r.Circle=ku,r.circle=f0,r.Polyline=cn,r.polyline=d0,r.Polygon=Vr,r.polygon=h0,r.Rectangle=Fh,r.rectangle=P0,r.Map=ce,r.map=Wy;var C0=window.L;r.noConflict=function(){return window.L=C0,this},window.L=r})})(Ef,Ef.exports);var ki=Ef.exports;function EP(e,t){const[r,i]=M.useState(null),s=M.useRef(!1);return M.useEffect(()=>{if(e.current!==null&&!s.current){const a=new ki.Map(e.current,{center:{lat:t.location.latitude,lng:t.location.longitude},zoom:12}),u=new ki.TileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO'});a.addLayer(u),i(a),s.current=!0}},[e,t]),r}const ra=Ar("data/fetchOffers",async(e,{extra:t})=>{const{data:r}=await t.get(ur.Offers);return r}),ia=Ar("data/fetchOfferFullInfo",async(e,{extra:t})=>{const{data:r}=await t.get(`${ur.Offers}/${e}`);return r}),oa=Ar("data/fetchOffersNear",async(e,{extra:t})=>{const{data:r}=await t.get(`${ur.Offers}/${e}/nearby`);return r}),sa=Ar("data/fetchComments",async(e,{extra:t})=>{const{data:r}=await t.get(`${ur.Comments}/${e}`);return r}),PP={offers:[],offersFavorites:[],activeOffer:null,status:we.Idle},Wa=Yo({name:"offers",initialState:PP,reducers:{setActiveOffer:(e,t)=>{e.activeOffer=t.payload}},extraReducers:e=>{e.addCase(ra.pending,t=>{t.status=we.Loading}),e.addCase(ra.fulfilled,(t,r)=>{t.offers=r.payload,t.status=we.Succeed}),e.addCase(ra.rejected,t=>{t.status=we.Failed})},selectors:{offers:e=>e.offers,activeOffer:e=>e.activeOffer,status:e=>e.status}}),Vd={...Wa.actions,fetchOffers:ra},Va=Wa.selectors,CP=new ki.Icon(mS),TP=new ki.Icon(_S);function Wg({container:e,city:t,offers:r}){const i=vt(Va.activeOffer),s=M.useRef(null),a=EP(s,t);return M.useEffect(()=>{if(a){const u=ki.layerGroup().addTo(a);return r.forEach(f=>{new ki.Marker({lat:f.location.latitude,lng:f.location.longitude}).setIcon(i!==null&&f.id===i.id?TP:CP).addTo(u)}),a.flyTo([t.location.latitude,t.location.longitude],12),()=>{a.removeLayer(u)}}},[t,a,r,i]),x.jsx("section",{ref:s,className:`${e}__map map`})}function Vg({componentType:e,isFavorite:t}){const r={"place-card":{width:"18",height:"19"},offer:{width:"31",height:"33"}};return x.jsxs("button",{className:Fo(` - ${e}__bookmark-button button`,t&&`${e}__bookmark-button--active`),type:"button",children:[x.jsx("svg",{className:`${e}__bookmark-icon`,...r[e],children:x.jsx("use",{xlinkHref:"#icon-bookmark"})}),x.jsx("span",{className:"visually-hidden",children:t?"In bookmarks":"To bookmarks"})]})}const kP=e=>e*100/5,LP=e=>e.charAt(0).toUpperCase()+e.slice(1);function Kd({componentType:e,rating:t}){return x.jsx("div",{className:`${e}__rating rating`,children:x.jsxs("div",{className:`${e}__stars rating__stars`,children:[x.jsx("span",{style:{width:`${kP(t)}%`}}),x.jsx("span",{className:"visually-hidden",children:"Rating"})]})})}function qd({offer:e,componentType:t,hoverHandler:r}){const{id:i,isPremium:s,previewImage:a,price:u,isFavorite:f,rating:d,title:p,type:v}=e,_=`${tt.Offer}/${i}`,S={cities:{width:"260",height:"200"},"near-places":{width:"260",height:"200"},favorites:{width:"150",height:"110"}},k=()=>r&&r(e),P=()=>r&&r(null);return x.jsxs("article",{className:`${t}__card place-card`,onMouseEnter:k,onMouseLeave:P,children:[s&&x.jsx("div",{className:"place-card__mark",children:x.jsx("span",{children:"Premium"})}),x.jsx("div",{className:`${t}__image-wrapper place-card__image-wrapper`,children:x.jsx(Tn,{to:_,children:x.jsx("img",{className:"place-card__image",src:a,alt:"Place image",...S[t]})})}),x.jsxs("div",{className:"place-card__info",children:[x.jsxs("div",{className:"place-card__price-wrapper",children:[x.jsxs("div",{className:"place-card__price",children:[x.jsxs("b",{className:"place-card__price-value",children:["€",u]}),x.jsx("span",{className:"place-card__price-text",children:"/ night"})]}),x.jsx(Vg,{componentType:"place-card",isFavorite:f})]}),x.jsx(Kd,{componentType:"place-card",rating:d}),x.jsx("h2",{className:"place-card__name",children:x.jsx(Tn,{to:_,children:p})}),x.jsx("p",{className:"place-card__type",children:v})]})]})}var ci=(e=>(e.Popular="Popular",e.PriceLowToHigh="Price: low to high",e.PriceHighToLow="Price: high to low",e.TopRatedFirst="Top rated first",e))(ci||{});const NP="Popular";function OP(e,t){switch(e){case ci.Popular:return t;case ci.PriceLowToHigh:return t.sort((r,i)=>r.price-i.price);case ci.PriceHighToLow:return t.sort((r,i)=>i.price-r.price);case ci.TopRatedFirst:return t.sort((r,i)=>i.rating-r.rating);default:return t}}function MP(e=!1){const[t,r]=M.useState(e);return{isOn:t,off:()=>r(!1),on:()=>r(!0),toggle:()=>r(i=>!i)}}function RP({activeSortOption:e,setActiveSortOption:t}){const{isOn:r,toggle:i,off:s}=MP(!1),a=M.useRef(null);M.useEffect(()=>{if(r){const f=p=>{p.key==="Escape"&&(p.preventDefault(),s())},d=p=>{a.current&&!a.current.contains(p.target)&&s()};return document.addEventListener("keydown",f),document.addEventListener("click",d),()=>{document.removeEventListener("keydown",f),document.removeEventListener("click",d)}}},[r,s,e]);const u=f=>{t(f),s()};return x.jsxs("form",{ref:a,className:"places__sorting",action:"#",method:"get",children:[x.jsx("span",{className:"places__sorting-caption",children:"Sort by"}),x.jsxs("span",{onClick:i,className:"places__sorting-type",tabIndex:0,children:[e,x.jsx("svg",{className:"places__sorting-arrow",width:"7",height:"4",children:x.jsx("use",{xlinkHref:"#icon-arrow-select"})})]}),x.jsx("ul",{className:Fo("places__options","places__options--custom",r&&"places__options--opened"),children:Object.values(ci).map((f,d)=>x.jsx("li",{className:Fo("places__option",e===f&&"places__option--active"),tabIndex:d,onClick:()=>u(f),children:f},f))})]})}/*! ***************************************************************************** + */(function(e,t){(function(r,i){i(t)})(Hm,function(r){var i="1.7.1";function s(n){var o,l,c,h;for(l=1,c=arguments.length;l"u"||!L||!L.Mixin)){n=y(n)?n:[n];for(var o=0;o0?Math.floor(n):Math.ceil(n)};T.prototype={clone:function(){return new T(this.x,this.y)},add:function(n){return this.clone()._add(A(n))},_add:function(n){return this.x+=n.x,this.y+=n.y,this},subtract:function(n){return this.clone()._subtract(A(n))},_subtract:function(n){return this.x-=n.x,this.y-=n.y,this},divideBy:function(n){return this.clone()._divideBy(n)},_divideBy:function(n){return this.x/=n,this.y/=n,this},multiplyBy:function(n){return this.clone()._multiplyBy(n)},_multiplyBy:function(n){return this.x*=n,this.y*=n,this},scaleBy:function(n){return new T(this.x*n.x,this.y*n.y)},unscaleBy:function(n){return new T(this.x/n.x,this.y/n.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=U(this.x),this.y=U(this.y),this},distanceTo:function(n){n=A(n);var o=n.x-this.x,l=n.y-this.y;return Math.sqrt(o*o+l*l)},equals:function(n){return n=A(n),n.x===this.x&&n.y===this.y},contains:function(n){return n=A(n),Math.abs(n.x)<=Math.abs(this.x)&&Math.abs(n.y)<=Math.abs(this.y)},toString:function(){return"Point("+S(this.x)+", "+S(this.y)+")"}};function A(n,o,l){return n instanceof T?n:y(n)?new T(n[0],n[1]):n==null?n:typeof n=="object"&&"x"in n&&"y"in n?new T(n.x,n.y):new T(n,o,l)}function H(n,o){if(n)for(var l=o?[n,o]:n,c=0,h=l.length;c=this.min.x&&l.x<=this.max.x&&o.y>=this.min.y&&l.y<=this.max.y},intersects:function(n){n=J(n);var o=this.min,l=this.max,c=n.min,h=n.max,m=h.x>=o.x&&c.x<=l.x,C=h.y>=o.y&&c.y<=l.y;return m&&C},overlaps:function(n){n=J(n);var o=this.min,l=this.max,c=n.min,h=n.max,m=h.x>o.x&&c.xo.y&&c.y=o.lat&&h.lat<=l.lat&&c.lng>=o.lng&&h.lng<=l.lng},intersects:function(n){n=ee(n);var o=this._southWest,l=this._northEast,c=n.getSouthWest(),h=n.getNorthEast(),m=h.lat>=o.lat&&c.lat<=l.lat,C=h.lng>=o.lng&&c.lng<=l.lng;return m&&C},overlaps:function(n){n=ee(n);var o=this._southWest,l=this._northEast,c=n.getSouthWest(),h=n.getNorthEast(),m=h.lat>o.lat&&c.lato.lng&&c.lng1,br=function(){var n=!1;try{var o=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("testPassiveEventSupport",_,o),window.removeEventListener("testPassiveEventSupport",_,o)}catch{}return n}(),uh=function(){return!!document.createElement("canvas").getContext}(),rs=!!(document.createElementNS&&th("svg").createSVGRect),is=!rs&&function(){try{var n=document.createElement("div");n.innerHTML='';var o=n.firstChild;return o.style.behavior="url(#default#VML)",o&&typeof o.adj=="object"}catch{return!1}}();function Qt(n){return navigator.userAgent.toLowerCase().indexOf(n)>=0}var My={ie:es,ielt9:jr,edge:ts,webkit:ql,android:Ai,android23:ji,androidStock:rh,opera:Yl,chrome:Ql,gecko:Xl,safari:ns,phantom:ih,opera12:oh,win:sh,ie3d:Jl,webkit3d:eu,gecko3d:ah,any3d:Pt,mobile:Dr,mobileWebkit:Ly,mobileWebkit3d:Ny,msPointer:Mn,pointer:qt,touch:Yt,mobileOpera:lh,mobileGecko:Oy,retina:Rn,passiveEvents:br,canvas:uh,svg:rs,vml:is},tu=Mn?"MSPointerDown":"pointerdown",nu=Mn?"MSPointerMove":"pointermove",ru=Mn?"MSPointerUp":"pointerup",iu=Mn?"MSPointerCancel":"pointercancel",Br={},ch=!1;function Ry(n,o,l,c){return o==="touchstart"?Iy(n,l,c):o==="touchmove"?Dy(n,l,c):o==="touchend"&&by(n,l,c),this}function zy(n,o,l){var c=n["_leaflet_"+o+l];return o==="touchstart"?n.removeEventListener(tu,c,!1):o==="touchmove"?n.removeEventListener(nu,c,!1):o==="touchend"&&(n.removeEventListener(ru,c,!1),n.removeEventListener(iu,c,!1)),this}function Iy(n,o,l){var c=u(function(h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&Tt(h),ou(h,o)});n["_leaflet_touchstart"+l]=c,n.addEventListener(tu,c,!1),ch||(document.addEventListener(tu,Ay,!0),document.addEventListener(nu,jy,!0),document.addEventListener(ru,fh,!0),document.addEventListener(iu,fh,!0),ch=!0)}function Ay(n){Br[n.pointerId]=n}function jy(n){Br[n.pointerId]&&(Br[n.pointerId]=n)}function fh(n){delete Br[n.pointerId]}function ou(n,o){n.touches=[];for(var l in Br)n.touches.push(Br[l]);n.changedTouches=[n],o(n)}function Dy(n,o,l){var c=function(h){h.pointerType===(h.MSPOINTER_TYPE_MOUSE||"mouse")&&h.buttons===0||ou(h,o)};n["_leaflet_touchmove"+l]=c,n.addEventListener(nu,c,!1)}function by(n,o,l){var c=function(h){ou(h,o)};n["_leaflet_touchend"+l]=c,n.addEventListener(ru,c,!1),n.addEventListener(iu,c,!1)}var os=Mn?"MSPointerDown":qt?"pointerdown":"touchstart",ss=Mn?"MSPointerUp":qt?"pointerup":"touchend",$r="_leaflet_";function By(n,o,l){var c,h,m=!1,C=250;function O($){if(qt){if(!$.isPrimary||$.pointerType==="mouse")return}else if($.touches.length>1)return;var G=Date.now(),ne=G-(c||G);h=$.touches?$.touches[0]:$,m=ne>0&&ne<=C,c=G}function z($){if(m&&!h.cancelBubble){if(qt){if($.pointerType==="mouse")return;var G={},ne,he;for(he in h)ne=h[he],G[he]=ne&&ne.bind?ne.bind(h):ne;h=G}h.type="dblclick",h.button=0,o(h),c=null}}return n[$r+os+l]=O,n[$r+ss+l]=z,n[$r+"dblclick"+l]=o,n.addEventListener(os,O,br?{passive:!1}:!1),n.addEventListener(ss,z,br?{passive:!1}:!1),n.addEventListener("dblclick",o,!1),this}function $y(n,o){var l=n[$r+os+o],c=n[$r+ss+o],h=n[$r+"dblclick"+o];return n.removeEventListener(os,l,br?{passive:!1}:!1),n.removeEventListener(ss,c,br?{passive:!1}:!1),n.removeEventListener("dblclick",h,!1),this}var su=us(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Di=us(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),dh=Di==="webkitTransition"||Di==="OTransition"?Di+"End":"transitionend";function hh(n){return typeof n=="string"?document.getElementById(n):n}function bi(n,o){var l=n.style[o]||n.currentStyle&&n.currentStyle[o];if((!l||l==="auto")&&document.defaultView){var c=document.defaultView.getComputedStyle(n,null);l=c?c[o]:null}return l==="auto"?null:l}function de(n,o,l){var c=document.createElement(n);return c.className=o||"",l&&l.appendChild(c),c}function Ce(n){var o=n.parentNode;o&&o.removeChild(n)}function as(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Fr(n){var o=n.parentNode;o&&o.lastChild!==n&&o.appendChild(n)}function Ur(n){var o=n.parentNode;o&&o.firstChild!==n&&o.insertBefore(n,o.firstChild)}function au(n,o){if(n.classList!==void 0)return n.classList.contains(o);var l=ls(n);return l.length>0&&new RegExp("(^|\\s)"+o+"(\\s|$)").test(l)}function oe(n,o){if(n.classList!==void 0)for(var l=P(o),c=0,h=l.length;cthis.options.maxZoom)?this.setZoom(n):this},panInsideBounds:function(n,o){this._enforcingBounds=!0;var l=this.getCenter(),c=this._limitCenter(l,this._zoom,ee(n));return l.equals(c)||this.panTo(c,o),this._enforcingBounds=!1,this},panInside:function(n,o){o=o||{};var l=A(o.paddingTopLeft||o.padding||[0,0]),c=A(o.paddingBottomRight||o.padding||[0,0]),h=this.getCenter(),m=this.project(h),C=this.project(n),O=this.getPixelBounds(),z=O.getSize().divideBy(2),$=J([O.min.add(l),O.max.subtract(c)]);if(!$.contains(C)){this._enforcingBounds=!0;var G=m.subtract(C),ne=A(C.x+G.x,C.y+G.y);(C.x<$.min.x||C.x>$.max.x)&&(ne.x=m.x-G.x,G.x>0?ne.x+=z.x-l.x:ne.x-=z.x-c.x),(C.y<$.min.y||C.y>$.max.y)&&(ne.y=m.y-G.y,G.y>0?ne.y+=z.y-l.y:ne.y-=z.y-c.y),this.panTo(this.unproject(ne),o),this._enforcingBounds=!1}return this},invalidateSize:function(n){if(!this._loaded)return this;n=s({animate:!1,pan:!0},n===!0?{animate:!0}:n);var o=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var l=this.getSize(),c=o.divideBy(2).round(),h=l.divideBy(2).round(),m=c.subtract(h);return!m.x&&!m.y?this:(n.animate&&n.pan?this.panBy(m):(n.pan&&this._rawPanBy(m),this.fire("move"),n.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(u(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:o,newSize:l}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(n){if(n=this._locateOptions=s({timeout:1e4,watch:!1},n),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var o=u(this._handleGeolocationResponse,this),l=u(this._handleGeolocationError,this);return n.watch?this._locationWatchId=navigator.geolocation.watchPosition(o,l,n):navigator.geolocation.getCurrentPosition(o,l,n),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(n){var o=n.code,l=n.message||(o===1?"permission denied":o===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:o,message:"Geolocation error: "+l+"."})},_handleGeolocationResponse:function(n){var o=n.coords.latitude,l=n.coords.longitude,c=new te(o,l),h=c.toBounds(n.coords.accuracy*2),m=this._locateOptions;if(m.setView){var C=this.getBoundsZoom(h);this.setView(c,m.maxZoom?Math.min(C,m.maxZoom):C)}var O={latlng:c,bounds:h,timestamp:n.timestamp};for(var z in n.coords)typeof n.coords[z]=="number"&&(O[z]=n.coords[z]);this.fire("locationfound",O)},addHandler:function(n,o){if(!o)return this;var l=this[n]=new o(this);return this._handlers.push(l),this.options[n]&&l.enable(),this},remove:function(){if(this._initEvents(!0),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{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Ce(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(le(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var n;for(n in this._layers)this._layers[n].remove();for(n in this._panes)Ce(this._panes[n]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(n,o){var l="leaflet-pane"+(n?" leaflet-"+n.replace("Pane","")+"-pane":""),c=de("div",l,o||this._mapPane);return n&&(this._panes[n]=c),c},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var n=this.getPixelBounds(),o=this.unproject(n.getBottomLeft()),l=this.unproject(n.getTopRight());return new re(o,l)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(n,o,l){n=ee(n),l=A(l||[0,0]);var c=this.getZoom()||0,h=this.getMinZoom(),m=this.getMaxZoom(),C=n.getNorthWest(),O=n.getSouthEast(),z=this.getSize().subtract(l),$=J(this.project(O,c),this.project(C,c)).getSize(),G=Pt?this.options.zoomSnap:1,ne=z.x/$.x,he=z.y/$.y,hn=o?Math.max(ne,he):Math.min(ne,he);return c=this.getScaleZoom(hn,c),G&&(c=Math.round(c/(G/100))*(G/100),c=o?Math.ceil(c/G)*G:Math.floor(c/G)*G),Math.max(h,Math.min(m,c))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new T(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(n,o){var l=this._getTopLeftPoint(n,o);return new H(l,l.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(n){return this.options.crs.getProjectedBounds(n===void 0?this.getZoom():n)},getPane:function(n){return typeof n=="string"?this._panes[n]:n},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(n,o){var l=this.options.crs;return o=o===void 0?this._zoom:o,l.scale(n)/l.scale(o)},getScaleZoom:function(n,o){var l=this.options.crs;o=o===void 0?this._zoom:o;var c=l.zoom(n*l.scale(o));return isNaN(c)?1/0:c},project:function(n,o){return o=o===void 0?this._zoom:o,this.options.crs.latLngToPoint(ie(n),o)},unproject:function(n,o){return o=o===void 0?this._zoom:o,this.options.crs.pointToLatLng(A(n),o)},layerPointToLatLng:function(n){var o=A(n).add(this.getPixelOrigin());return this.unproject(o)},latLngToLayerPoint:function(n){var o=this.project(ie(n))._round();return o._subtract(this.getPixelOrigin())},wrapLatLng:function(n){return this.options.crs.wrapLatLng(ie(n))},wrapLatLngBounds:function(n){return this.options.crs.wrapLatLngBounds(ee(n))},distance:function(n,o){return this.options.crs.distance(ie(n),ie(o))},containerPointToLayerPoint:function(n){return A(n).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(n){return A(n).add(this._getMapPanePos())},containerPointToLatLng:function(n){var o=this.containerPointToLayerPoint(A(n));return this.layerPointToLatLng(o)},latLngToContainerPoint:function(n){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ie(n)))},mouseEventToContainerPoint:function(n){return _h(n,this._container)},mouseEventToLayerPoint:function(n){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(n))},mouseEventToLatLng:function(n){return this.layerPointToLatLng(this.mouseEventToLayerPoint(n))},_initContainer:function(n){var o=this._container=hh(n);if(o){if(o._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");se(o,"scroll",this._onScroll,this),this._containerId=d(o)},_initLayout:function(){var n=this._container;this._fadeAnimated=this.options.fadeAnimation&&Pt,oe(n,"leaflet-container"+(Yt?" leaflet-touch":"")+(Rn?" leaflet-retina":"")+(jr?" leaflet-oldie":"")+(ns?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var o=bi(n,"position");o!=="absolute"&&o!=="relative"&&o!=="fixed"&&(n.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var n=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Ie(this._mapPane,new T(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(oe(n.markerPane,"leaflet-zoom-hide"),oe(n.shadowPane,"leaflet-zoom-hide"))},_resetView:function(n,o){Ie(this._mapPane,new T(0,0));var l=!this._loaded;this._loaded=!0,o=this._limitZoom(o),this.fire("viewprereset");var c=this._zoom!==o;this._moveStart(c,!1)._move(n,o)._moveEnd(c),this.fire("viewreset"),l&&this.fire("load")},_moveStart:function(n,o){return n&&this.fire("zoomstart"),o||this.fire("movestart"),this},_move:function(n,o,l){o===void 0&&(o=this._zoom);var c=this._zoom!==o;return this._zoom=o,this._lastCenter=n,this._pixelOrigin=this._getNewPixelOrigin(n),(c||l&&l.pinch)&&this.fire("zoom",l),this.fire("move",l)},_moveEnd:function(n){return n&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return le(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(n){Ie(this._mapPane,this._getMapPanePos().subtract(n))},_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(n){this._targets={},this._targets[d(this._container)]=this;var o=n?Me:se;o(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&o(window,"resize",this._onResize,this),Pt&&this.options.transform3DLimit&&(n?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){le(this._resizeRequest),this._resizeRequest=q(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var n=this._getMapPanePos();Math.max(Math.abs(n.x),Math.abs(n.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(n,o){for(var l=[],c,h=o==="mouseout"||o==="mouseover",m=n.target||n.srcElement,C=!1;m;){if(c=this._targets[d(m)],c&&(o==="click"||o==="preclick")&&!n._simulated&&this._draggableMoved(c)){C=!0;break}if(c&&c.listens(o,!0)&&(h&&!hs(m,n)||(l.push(c),h))||m===this._container)break;m=m.parentNode}return!l.length&&!C&&!h&&hs(m,n)&&(l=[this]),l},_handleDOMEvent:function(n){if(!(!this._loaded||wu(n))){var o=n.type;(o==="mousedown"||o==="keypress"||o==="keyup"||o==="keydown")&&hu(n.target||n.srcElement),this._fireDOMEvent(n,o)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(n,o,l){if(n.type==="click"){var c=s({},n);c.type="preclick",this._fireDOMEvent(c,c.type,l)}if(!n._stopped&&(l=(l||[]).concat(this._findEventTargets(n,o)),!!l.length)){var h=l[0];o==="contextmenu"&&h.listens(o,!0)&&Tt(n);var m={originalEvent:n};if(n.type!=="keypress"&&n.type!=="keydown"&&n.type!=="keyup"){var C=h.getLatLng&&(!h._radius||h._radius<=10);m.containerPoint=C?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(n),m.layerPoint=this.containerPointToLayerPoint(m.containerPoint),m.latlng=C?h.getLatLng():this.layerPointToLatLng(m.layerPoint)}for(var O=0;O0?Math.round(n-o)/2:Math.max(0,Math.ceil(n))-Math.max(0,Math.floor(o))},_limitZoom:function(n){var o=this.getMinZoom(),l=this.getMaxZoom(),c=Pt?this.options.zoomSnap:1;return c&&(n=Math.round(n/c)*c),Math.max(o,Math.min(l,n))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ne(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(n,o){var l=this._getCenterOffset(n)._trunc();return(o&&o.animate)!==!0&&!this.getSize().contains(l)?!1:(this.panBy(l,o),!0)},_createAnimProxy:function(){var n=this._proxy=de("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(n),this.on("zoomanim",function(o){var l=su,c=this._proxy.style[l];cr(this._proxy,this.project(o.center,o.zoom),this.getZoomScale(o.zoom,1)),c===this._proxy.style[l]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Ce(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var n=this.getCenter(),o=this.getZoom();cr(this._proxy,this.project(n,o),this.getZoomScale(o,1))},_catchTransitionEnd:function(n){this._animatingZoom&&n.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(n,o,l){if(this._animatingZoom)return!0;if(l=l||{},!this._zoomAnimated||l.animate===!1||this._nothingToAnimate()||Math.abs(o-this._zoom)>this.options.zoomAnimationThreshold)return!1;var c=this.getZoomScale(o),h=this._getCenterOffset(n)._divideBy(1-1/c);return l.animate!==!0&&!this.getSize().contains(h)?!1:(q(function(){this._moveStart(!0,!1)._animateZoom(n,o,!0)},this),!0)},_animateZoom:function(n,o,l,c){this._mapPane&&(l&&(this._animatingZoom=!0,this._animateToCenter=n,this._animateToZoom=o,oe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:n,zoom:o,noUpdate:c}),setTimeout(u(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ne(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),q(function(){this._moveEnd(!0)},this))}});function Wy(n,o){return new ce(n,o)}var bt=Y.extend({options:{position:"topright"},initialize:function(n){E(this,n)},getPosition:function(){return this.options.position},setPosition:function(n){var o=this._map;return o&&o.removeControl(this),this.options.position=n,o&&o.addControl(this),this},getContainer:function(){return this._container},addTo:function(n){this.remove(),this._map=n;var o=this._container=this.onAdd(n),l=this.getPosition(),c=n._controlCorners[l];return oe(o,"leaflet-control"),l.indexOf("bottom")!==-1?c.insertBefore(o,c.firstChild):c.appendChild(o),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ce(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(n){this._map&&n&&n.screenX>0&&n.screenY>0&&this._map.getContainer().focus()}}),Zi=function(n){return new bt(n)};ce.include({addControl:function(n){return n.addTo(this),this},removeControl:function(n){return n.remove(),this},_initControlPos:function(){var n=this._controlCorners={},o="leaflet-",l=this._controlContainer=de("div",o+"control-container",this._container);function c(h,m){var C=o+h+" "+o+m;n[h+m]=de("div",C,l)}c("top","left"),c("top","right"),c("bottom","left"),c("bottom","right")},_clearControlPos:function(){for(var n in this._controlCorners)Ce(this._controlCorners[n]);Ce(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var yh=bt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(n,o,l,c){return l1,this._baseLayersList.style.display=n?"":"none"),this._separator.style.display=o&&n?"":"none",this},_onLayerChange:function(n){this._handlingClick||this._update();var o=this._getLayer(d(n.target)),l=o.overlay?n.type==="add"?"overlayadd":"overlayremove":n.type==="add"?"baselayerchange":null;l&&this._map.fire(l,o)},_createRadioElement:function(n,o){var l='",c=document.createElement("div");return c.innerHTML=l,c.firstChild},_addItem:function(n){var o=document.createElement("label"),l=this._map.hasLayer(n.layer),c;n.overlay?(c=document.createElement("input"),c.type="checkbox",c.className="leaflet-control-layers-selector",c.defaultChecked=l):c=this._createRadioElement("leaflet-base-layers_"+d(this),l),this._layerControlInputs.push(c),c.layerId=d(n.layer),se(c,"click",this._onInputClick,this);var h=document.createElement("span");h.innerHTML=" "+n.name;var m=document.createElement("div");o.appendChild(m),m.appendChild(c),m.appendChild(h);var C=n.overlay?this._overlaysList:this._baseLayersList;return C.appendChild(o),this._checkDisabledLayers(),o},_onInputClick:function(){var n=this._layerControlInputs,o,l,c=[],h=[];this._handlingClick=!0;for(var m=n.length-1;m>=0;m--)o=n[m],l=this._getLayer(o.layerId).layer,o.checked?c.push(l):o.checked||h.push(l);for(m=0;m=0;h--)o=n[h],l=this._getLayer(o.layerId).layer,o.disabled=l.options.minZoom!==void 0&&cl.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Vy=function(n,o,l){return new yh(n,o,l)},xu=bt.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(n){var o="leaflet-control-zoom",l=de("div",o+" leaflet-bar"),c=this.options;return this._zoomInButton=this._createButton(c.zoomInText,c.zoomInTitle,o+"-in",l,this._zoomIn),this._zoomOutButton=this._createButton(c.zoomOutText,c.zoomOutTitle,o+"-out",l,this._zoomOut),this._updateDisabled(),n.on("zoomend zoomlevelschange",this._updateDisabled,this),l},onRemove:function(n){n.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(n){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(n.shiftKey?3:1))},_createButton:function(n,o,l,c,h){var m=de("a",l,c);return m.innerHTML=n,m.href="#",m.title=o,m.setAttribute("role","button"),m.setAttribute("aria-label",o),Ui(m),se(m,"click",ln),se(m,"click",h,this),se(m,"click",this._refocusOnMap,this),m},_updateDisabled:function(){var n=this._map,o="leaflet-disabled";Ne(this._zoomInButton,o),Ne(this._zoomOutButton,o),(this._disabled||n._zoom===n.getMinZoom())&&oe(this._zoomOutButton,o),(this._disabled||n._zoom===n.getMaxZoom())&&oe(this._zoomInButton,o)}});ce.mergeOptions({zoomControl:!0}),ce.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new xu,this.addControl(this.zoomControl))});var Ky=function(n){return new xu(n)},wh=bt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(n){var o="leaflet-control-scale",l=de("div",o),c=this.options;return this._addScales(c,o+"-line",l),n.on(c.updateWhenIdle?"moveend":"move",this._update,this),n.whenReady(this._update,this),l},onRemove:function(n){n.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(n,o,l){n.metric&&(this._mScale=de("div",o,l)),n.imperial&&(this._iScale=de("div",o,l))},_update:function(){var n=this._map,o=n.getSize().y/2,l=n.distance(n.containerPointToLatLng([0,o]),n.containerPointToLatLng([this.options.maxWidth,o]));this._updateScales(l)},_updateScales:function(n){this.options.metric&&n&&this._updateMetric(n),this.options.imperial&&n&&this._updateImperial(n)},_updateMetric:function(n){var o=this._getRoundNum(n),l=o<1e3?o+" m":o/1e3+" km";this._updateScale(this._mScale,l,o/n)},_updateImperial:function(n){var o=n*3.2808399,l,c,h;o>5280?(l=o/5280,c=this._getRoundNum(l),this._updateScale(this._iScale,c+" mi",c/l)):(h=this._getRoundNum(o),this._updateScale(this._iScale,h+" ft",h/o))},_updateScale:function(n,o,l){n.style.width=Math.round(this.options.maxWidth*l)+"px",n.innerHTML=o},_getRoundNum:function(n){var o=Math.pow(10,(Math.floor(n)+"").length-1),l=n/o;return l=l>=10?10:l>=5?5:l>=3?3:l>=2?2:1,o*l}}),Gy=function(n){return new wh(n)},Su=bt.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(n){E(this,n),this._attributions={}},onAdd:function(n){n.attributionControl=this,this._container=de("div","leaflet-control-attribution"),Ui(this._container);for(var o in n._layers)n._layers[o].getAttribution&&this.addAttribution(n._layers[o].getAttribution());return this._update(),this._container},setPrefix:function(n){return this.options.prefix=n,this._update(),this},addAttribution:function(n){return n?(this._attributions[n]||(this._attributions[n]=0),this._attributions[n]++,this._update(),this):this},removeAttribution:function(n){return n?(this._attributions[n]&&(this._attributions[n]--,this._update()),this):this},_update:function(){if(this._map){var n=[];for(var o in this._attributions)this._attributions[o]&&n.push(o);var l=[];this.options.prefix&&l.push(this.options.prefix),n.length&&l.push(n.join(", ")),this._container.innerHTML=l.join(" | ")}}});ce.mergeOptions({attributionControl:!0}),ce.addInitHook(function(){this.options.attributionControl&&new Su().addTo(this)});var qy=function(n){return new Su(n)};bt.Layers=yh,bt.Zoom=xu,bt.Scale=wh,bt.Attribution=Su,Zi.layers=Vy,Zi.zoom=Ky,Zi.scale=Gy,Zi.attribution=qy;var Xt=Y.extend({initialize:function(n){this._map=n},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Xt.addTo=function(n,o){return n.addHandler(o,this),this};var Yy={Events:F},xh=Yt?"touchstart mousedown":"mousedown",Sh={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Eu={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},dr=K.extend({options:{clickTolerance:3},initialize:function(n,o,l,c){E(this,c),this._element=n,this._dragStartTarget=o||n,this._preventOutline=l},enable:function(){this._enabled||(se(this._dragStartTarget,xh,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(dr._dragging===this&&this.finishDrag(),Me(this._dragStartTarget,xh,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(n){if(!(n._simulated||!this._enabled)&&(this._moved=!1,!au(this._element,"leaflet-zoom-anim")&&!(dr._dragging||n.shiftKey||n.which!==1&&n.button!==1&&!n.touches)&&(dr._dragging=this,this._preventOutline&&hu(this._element),cu(),Bi(),!this._moving))){this.fire("down");var o=n.touches?n.touches[0]:n,l=ph(this._element);this._startPoint=new T(o.clientX,o.clientY),this._parentScale=pu(l),se(document,Eu[n.type],this._onMove,this),se(document,Sh[n.type],this._onUp,this)}},_onMove:function(n){if(!(n._simulated||!this._enabled)){if(n.touches&&n.touches.length>1){this._moved=!0;return}var o=n.touches&&n.touches.length===1?n.touches[0]:n,l=new T(o.clientX,o.clientY)._subtract(this._startPoint);!l.x&&!l.y||Math.abs(l.x)+Math.abs(l.y)m&&(C=O,m=z);m>l&&(o[C]=1,Pu(n,o,l,c,C),Pu(n,o,l,C,h))}function Jy(n,o){for(var l=[n[0]],c=1,h=0,m=n.length;co&&(l.push(n[c]),h=c);return ho.max.x&&(l|=2),n.yo.max.y&&(l|=8),l}function e0(n,o){var l=o.x-n.x,c=o.y-n.y;return l*l+c*c}function Hi(n,o,l,c){var h=o.x,m=o.y,C=l.x-h,O=l.y-m,z=C*C+O*O,$;return z>0&&($=((n.x-h)*C+(n.y-m)*O)/z,$>1?(h=l.x,m=l.y):$>0&&(h+=C*$,m+=O*$)),C=n.x-h,O=n.y-m,c?C*C+O*O:new T(h,m)}function un(n){return!y(n[0])||typeof n[0][0]!="object"&&typeof n[0][0]<"u"}function kh(n){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),un(n)}var t0={simplify:Eh,pointToSegmentDistance:Ph,closestPointOnSegment:Qy,clipSegment:Th,_getEdgeIntersection:ps,_getBitCode:hr,_sqClosestPointOnSegment:Hi,isFlat:un,_flat:kh};function Lh(n,o,l){var c,h=[1,4,2,8],m,C,O,z,$,G,ne,he;for(m=0,G=n.length;m1e-7;O++)$=h*Math.sin(C),$=Math.pow((1-$)/(1+$),h/2),z=Math.PI/2-2*Math.atan(m*$)-C,C+=z;return new te(C*o,n.x*o/l)}},r0={LonLat:Cu,Mercator:Tu,SphericalMercator:$e},i0=s({},qe,{code:"EPSG:3395",projection:Tu,transformation:function(){var n=.5/(Math.PI*Tu.R);return jt(n,.5,-n,.5)}()}),Nh=s({},qe,{code:"EPSG:4326",projection:Cu,transformation:jt(1/180,1,-1/180,.5)}),o0=s({},ve,{projection:Cu,transformation:jt(1,0,-1,0),scale:function(n){return Math.pow(2,n)},zoom:function(n){return Math.log(n)/Math.LN2},distance:function(n,o){var l=o.lng-n.lng,c=o.lat-n.lat;return Math.sqrt(l*l+c*c)},infinite:!0});ve.Earth=qe,ve.EPSG3395=i0,ve.EPSG3857=On,ve.EPSG900913=Ty,ve.EPSG4326=Nh,ve.Simple=o0;var Bt=K.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(n){return n.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(n){return n&&n.removeLayer(this),this},getPane:function(n){return this._map.getPane(n?this.options[n]||n:this.options.pane)},addInteractiveTarget:function(n){return this._map._targets[d(n)]=this,this},removeInteractiveTarget:function(n){return delete this._map._targets[d(n)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(n){var o=n.target;if(o.hasLayer(this)){if(this._map=o,this._zoomAnimated=o._zoomAnimated,this.getEvents){var l=this.getEvents();o.on(l,this),this.once("remove",function(){o.off(l,this)},this)}this.onAdd(o),this.getAttribution&&o.attributionControl&&o.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),o.fire("layeradd",{layer:this})}}});ce.include({addLayer:function(n){if(!n._layerAdd)throw new Error("The provided object is not a Layer.");var o=d(n);return this._layers[o]?this:(this._layers[o]=n,n._mapToAdd=this,n.beforeAdd&&n.beforeAdd(this),this.whenReady(n._layerAdd,n),this)},removeLayer:function(n){var o=d(n);return this._layers[o]?(this._loaded&&n.onRemove(this),n.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(n.getAttribution()),delete this._layers[o],this._loaded&&(this.fire("layerremove",{layer:n}),n.fire("remove")),n._map=n._mapToAdd=null,this):this},hasLayer:function(n){return!!n&&d(n)in this._layers},eachLayer:function(n,o){for(var l in this._layers)n.call(o,this._layers[l]);return this},_addLayers:function(n){n=n?y(n)?n:[n]:[];for(var o=0,l=n.length;othis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()o)return C=(c-o)/l,this._map.layerPointToLatLng([m.x-C*(m.x-h.x),m.y-C*(m.y-h.y)])},getBounds:function(){return this._bounds},addLatLng:function(n,o){return o=o||this._defaultShape(),n=ie(n),o.push(n),this._bounds.extend(n),this.redraw()},_setLatLngs:function(n){this._bounds=new re,this._latlngs=this._convertLatLngs(n)},_defaultShape:function(){return un(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(n){for(var o=[],l=un(n),c=0,h=n.length;c=2&&o[0]instanceof te&&o[0].equals(o[l-1])&&o.pop(),o},_setLatLngs:function(n){cn.prototype._setLatLngs.call(this,n),un(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return un(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var n=this._renderer._bounds,o=this.options.weight,l=new T(o,o);if(n=new H(n.min.subtract(l),n.max.add(l)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(n))){if(this.options.noClip){this._parts=this._rings;return}for(var c=0,h=this._rings.length,m;cn.y!=h.y>n.y&&n.x<(h.x-c.x)*(n.y-c.y)/(h.y-c.y)+c.x&&(o=!o);return o||cn.prototype._containsPoint.call(this,n,!0)}});function h0(n,o){return new Vr(n,o)}var fn=Hr.extend({initialize:function(n,o){E(this,o),this._layers={},n&&this.addData(n)},addData:function(n){var o=y(n)?n:n.features,l,c,h;if(o){for(l=0,c=o.length;l0?c:[o.src];return}y(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(o.style,"objectFit")&&(o.style.objectFit="fill"),o.autoplay=!!this.options.autoplay,o.loop=!!this.options.loop,o.muted=!!this.options.muted;for(var m=0;mh?(o.height=h+"px",oe(n,m)):Ne(n,m),this._containerWidth=this._container.offsetWidth},_animateZoom:function(n){var o=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center),l=this._getAnchor();Ie(this._container,o.add(l))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var n=this._map,o=parseInt(bi(this._container,"marginBottom"),10)||0,l=this._container.offsetHeight+o,c=this._containerWidth,h=new T(this._containerLeft,-l-this._containerBottom);h._add(zn(this._container));var m=n.layerPointToContainerPoint(h),C=A(this.options.autoPanPadding),O=A(this.options.autoPanPaddingTopLeft||C),z=A(this.options.autoPanPaddingBottomRight||C),$=n.getSize(),G=0,ne=0;m.x+c+z.x>$.x&&(G=m.x+c-$.x+z.x),m.x-G-O.x<0&&(G=m.x-O.x),m.y+l+z.y>$.y&&(ne=m.y+l-$.y+z.y),m.y-ne-O.y<0&&(ne=m.y-O.y),(G||ne)&&n.fire("autopanstart").panBy([G,ne])}},_onCloseButtonClick:function(n){this._close(),ln(n)},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),g0=function(n,o){return new Gr(n,o)};ce.mergeOptions({closePopupOnClick:!0}),ce.include({openPopup:function(n,o,l){return n instanceof Gr||(n=new Gr(l).setContent(n)),o&&n.setLatLng(o),this.hasLayer(n)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=n,this.addLayer(n))},closePopup:function(n){return(!n||n===this._popup)&&(n=this._popup,this._popup=null),n&&this.removeLayer(n),this}}),Bt.include({bindPopup:function(n,o){return n instanceof Gr?(E(n,o),this._popup=n,n._source=this):((!this._popup||o)&&(this._popup=new Gr(o,this)),this._popup.setContent(n)),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(n,o){return this._popup&&this._map&&(o=this._popup._prepareOpen(this,n,o),this._map.openPopup(this._popup,o)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(n){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(n)),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(n){return this._popup&&this._popup.setContent(n),this},getPopup:function(){return this._popup},_openPopup:function(n){var o=n.layer||n.target;if(this._popup&&this._map){if(ln(n),o instanceof In){this.openPopup(n.layer||n.target,n.latlng);return}this._map.hasLayer(this._popup)&&this._popup._source===o?this.closePopup():this.openPopup(o,n.latlng)}},_movePopup:function(n){this._popup.setLatLng(n.latlng)},_onKeyPress:function(n){n.originalEvent.keyCode===13&&this._openPopup(n)}});var qr=dn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(n){dn.prototype.onAdd.call(this,n),this.setOpacity(this.options.opacity),n.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(n){dn.prototype.onRemove.call(this,n),n.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var n=dn.prototype.getEvents.call(this);return Yt&&!this.options.permanent&&(n.preclick=this._close),n},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var n="leaflet-tooltip",o=n+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=de("div",o)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(n){var o,l,c=this._map,h=this._container,m=c.latLngToContainerPoint(c.getCenter()),C=c.layerPointToContainerPoint(n),O=this.options.direction,z=h.offsetWidth,$=h.offsetHeight,G=A(this.options.offset),ne=this._getAnchor();O==="top"?(o=z/2,l=$):O==="bottom"?(o=z/2,l=0):O==="center"?(o=z/2,l=$/2):O==="right"?(o=0,l=$/2):O==="left"?(o=z,l=$/2):C.xthis.options.maxZoom||lc?this._retainParent(h,m,C,c):!1)},_retainChildren:function(n,o,l,c){for(var h=2*n;h<2*n+2;h++)for(var m=2*o;m<2*o+2;m++){var C=new T(h,m);C.z=l+1;var O=this._tileCoordsToKey(C),z=this._tiles[O];if(z&&z.active){z.retain=!0;continue}else z&&z.loaded&&(z.retain=!0);l+1this.options.maxZoom||this.options.minZoom!==void 0&&h1){this._setView(n,l);return}for(var ne=h.min.y;ne<=h.max.y;ne++)for(var he=h.min.x;he<=h.max.x;he++){var hn=new T(he,ne);if(hn.z=this._tileZoom,!!this._isValidTile(hn)){var pr=this._tiles[this._tileCoordsToKey(hn)];pr?pr.current=!0:C.push(hn)}}if(C.sort(function(An,Ru){return An.distanceTo(m)-Ru.distanceTo(m)}),C.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ss=document.createDocumentFragment();for(he=0;hel.max.x)||!o.wrapLat&&(n.yl.max.y))return!1}if(!this.options.bounds)return!0;var c=this._tileCoordsToBounds(n);return ee(this.options.bounds).overlaps(c)},_keyToBounds:function(n){return this._tileCoordsToBounds(this._keyToTileCoords(n))},_tileCoordsToNwSe:function(n){var o=this._map,l=this.getTileSize(),c=n.scaleBy(l),h=c.add(l),m=o.unproject(c,n.z),C=o.unproject(h,n.z);return[m,C]},_tileCoordsToBounds:function(n){var o=this._tileCoordsToNwSe(n),l=new re(o[0],o[1]);return this.options.noWrap||(l=this._map.wrapLatLngBounds(l)),l},_tileCoordsToKey:function(n){return n.x+":"+n.y+":"+n.z},_keyToTileCoords:function(n){var o=n.split(":"),l=new T(+o[0],+o[1]);return l.z=+o[2],l},_removeTile:function(n){var o=this._tiles[n];o&&(Ce(o.el),delete this._tiles[n],this.fire("tileunload",{tile:o.el,coords:this._keyToTileCoords(n)}))},_initTile:function(n){oe(n,"leaflet-tile");var o=this.getTileSize();n.style.width=o.x+"px",n.style.height=o.y+"px",n.onselectstart=_,n.onmousemove=_,jr&&this.options.opacity<1&&Ct(n,this.options.opacity),Ai&&!ji&&(n.style.WebkitBackfaceVisibility="hidden")},_addTile:function(n,o){var l=this._getTilePos(n),c=this._tileCoordsToKey(n),h=this.createTile(this._wrapCoords(n),u(this._tileReady,this,n));this._initTile(h),this.createTile.length<2&&q(u(this._tileReady,this,n,null,h)),Ie(h,l),this._tiles[c]={el:h,coords:n,current:!0},o.appendChild(h),this.fire("tileloadstart",{tile:h,coords:n})},_tileReady:function(n,o,l){o&&this.fire("tileerror",{error:o,tile:l,coords:n});var c=this._tileCoordsToKey(n);l=this._tiles[c],l&&(l.loaded=+new Date,this._map._fadeAnimated?(Ct(l.el,0),le(this._fadeFrame),this._fadeFrame=q(this._updateOpacity,this)):(l.active=!0,this._pruneTiles()),o||(oe(l.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:l.el,coords:n})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),jr||!this._map._fadeAnimated?q(this._pruneTiles,this):setTimeout(u(this._pruneTiles,this),250)))},_getTilePos:function(n){return n.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(n){var o=new T(this._wrapX?v(n.x,this._wrapX):n.x,this._wrapY?v(n.y,this._wrapY):n.y);return o.z=n.z,o},_pxBoundsToTileRange:function(n){var o=this.getTileSize();return new H(n.min.unscaleBy(o).floor(),n.max.unscaleBy(o).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var n in this._tiles)if(!this._tiles[n].loaded)return!1;return!0}});function x0(n){return new Vi(n)}var Yr=Vi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(n,o){this._url=n,o=E(this,o),o.detectRetina&&Rn&&o.maxZoom>0&&(o.tileSize=Math.floor(o.tileSize/2),o.zoomReverse?(o.zoomOffset--,o.minZoom++):(o.zoomOffset++,o.maxZoom--),o.minZoom=Math.max(0,o.minZoom)),typeof o.subdomains=="string"&&(o.subdomains=o.subdomains.split("")),Ai||this.on("tileunload",this._onTileRemove)},setUrl:function(n,o){return this._url===n&&o===void 0&&(o=!0),this._url=n,o||this.redraw(),this},createTile:function(n,o){var l=document.createElement("img");return se(l,"load",u(this._tileOnLoad,this,o,l)),se(l,"error",u(this._tileOnError,this,o,l)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),l.alt="",l.setAttribute("role","presentation"),l.src=this.getTileUrl(n),l},getTileUrl:function(n){var o={r:Rn?"@2x":"",s:this._getSubdomain(n),x:n.x,y:n.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var l=this._globalTileRange.max.y-n.y;this.options.tms&&(o.y=l),o["-y"]=l}return g(this._url,s(o,this.options))},_tileOnLoad:function(n,o){jr?setTimeout(u(n,this,null,o),0):n(null,o)},_tileOnError:function(n,o,l){var c=this.options.errorTileUrl;c&&o.getAttribute("src")!==c&&(o.src=c),n(l,o)},_onTileRemove:function(n){n.tile.onload=null},_getZoomForUrl:function(){var n=this._tileZoom,o=this.options.maxZoom,l=this.options.zoomReverse,c=this.options.zoomOffset;return l&&(n=o-n),n+c},_getSubdomain:function(n){var o=Math.abs(n.x+n.y)%this.options.subdomains.length;return this.options.subdomains[o]},_abortLoading:function(){var n,o;for(n in this._tiles)this._tiles[n].coords.z!==this._tileZoom&&(o=this._tiles[n].el,o.onload=_,o.onerror=_,o.complete||(o.src=j,Ce(o),delete this._tiles[n]))},_removeTile:function(n){var o=this._tiles[n];if(o)return rh||o.el.setAttribute("src",j),Vi.prototype._removeTile.call(this,n)},_tileReady:function(n,o,l){if(!(!this._map||l&&l.getAttribute("src")===j))return Vi.prototype._tileReady.call(this,n,o,l)}});function jh(n,o){return new Yr(n,o)}var Dh=Yr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(n,o){this._url=n;var l=s({},this.defaultWmsParams);for(var c in o)c in this.options||(l[c]=o[c]);o=E(this,o);var h=o.detectRetina&&Rn?2:1,m=this.getTileSize();l.width=m.x*h,l.height=m.y*h,this.wmsParams=l},onAdd:function(n){this._crs=this.options.crs||n.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var o=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[o]=this._crs.code,Yr.prototype.onAdd.call(this,n)},getTileUrl:function(n){var o=this._tileCoordsToNwSe(n),l=this._crs,c=J(l.project(o[0]),l.project(o[1])),h=c.min,m=c.max,C=(this._wmsVersion>=1.3&&this._crs===Nh?[h.y,h.x,m.y,m.x]:[h.x,h.y,m.x,m.y]).join(","),O=Yr.prototype.getTileUrl.call(this,n);return O+R(this.wmsParams,O,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+C},setParams:function(n,o){return s(this.wmsParams,n),o||this.redraw(),this}});function S0(n,o){return new Dh(n,o)}Yr.WMS=Dh,jh.wms=S0;var Jt=Bt.extend({options:{padding:.1,tolerance:0},initialize:function(n){E(this,n),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&oe(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 n={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(n.zoomanim=this._onAnimZoom),n},_onAnimZoom:function(n){this._updateTransform(n.center,n.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(n,o){var l=this._map.getZoomScale(o,this._zoom),c=zn(this._container),h=this._map.getSize().multiplyBy(.5+this.options.padding),m=this._map.project(this._center,o),C=this._map.project(n,o),O=C.subtract(m),z=h.multiplyBy(-l).add(c).add(h).subtract(O);Pt?cr(this._container,z,l):Ie(this._container,z)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var n in this._layers)this._layers[n]._reset()},_onZoomEnd:function(){for(var n in this._layers)this._layers[n]._project()},_updatePaths:function(){for(var n in this._layers)this._layers[n]._update()},_update:function(){var n=this.options.padding,o=this._map.getSize(),l=this._map.containerPointToLayerPoint(o.multiplyBy(-n)).round();this._bounds=new H(l,l.add(o.multiplyBy(1+n*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),bh=Jt.extend({getEvents:function(){var n=Jt.prototype.getEvents.call(this);return n.viewprereset=this._onViewPreReset,n},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Jt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var n=this._container=document.createElement("canvas");se(n,"mousemove",this._onMouseMove,this),se(n,"click dblclick mousedown mouseup contextmenu",this._onClick,this),se(n,"mouseout",this._handleMouseOut,this),this._ctx=n.getContext("2d")},_destroyContainer:function(){le(this._redrawRequest),delete this._ctx,Ce(this._container),Me(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var n;this._redrawBounds=null;for(var o in this._layers)n=this._layers[o],n._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Jt.prototype._update.call(this);var n=this._bounds,o=this._container,l=n.getSize(),c=Rn?2:1;Ie(o,n.min),o.width=c*l.x,o.height=c*l.y,o.style.width=l.x+"px",o.style.height=l.y+"px",Rn&&this._ctx.scale(2,2),this._ctx.translate(-n.min.x,-n.min.y),this.fire("update")}},_reset:function(){Jt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(n){this._updateDashArray(n),this._layers[d(n)]=n;var o=n._order={layer:n,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=o),this._drawLast=o,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(n){this._requestRedraw(n)},_removePath:function(n){var o=n._order,l=o.next,c=o.prev;l?l.prev=c:this._drawLast=c,c?c.next=l:this._drawFirst=l,delete n._order,delete this._layers[d(n)],this._requestRedraw(n)},_updatePath:function(n){this._extendRedrawBounds(n),n._project(),n._update(),this._requestRedraw(n)},_updateStyle:function(n){this._updateDashArray(n),this._requestRedraw(n)},_updateDashArray:function(n){if(typeof n.options.dashArray=="string"){var o=n.options.dashArray.split(/[, ]+/),l=[],c,h;for(h=0;h')}}catch{return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),E0={_initContainer:function(){this._container=de("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Jt.prototype._update.call(this),this.fire("update"))},_initPath:function(n){var o=n._container=Ki("shape");oe(o,"leaflet-vml-shape "+(this.options.className||"")),o.coordsize="1 1",n._path=Ki("path"),o.appendChild(n._path),this._updateStyle(n),this._layers[d(n)]=n},_addPath:function(n){var o=n._container;this._container.appendChild(o),n.options.interactive&&n.addInteractiveTarget(o)},_removePath:function(n){var o=n._container;Ce(o),n.removeInteractiveTarget(o),delete this._layers[d(n)]},_updateStyle:function(n){var o=n._stroke,l=n._fill,c=n.options,h=n._container;h.stroked=!!c.stroke,h.filled=!!c.fill,c.stroke?(o||(o=n._stroke=Ki("stroke")),h.appendChild(o),o.weight=c.weight+"px",o.color=c.color,o.opacity=c.opacity,c.dashArray?o.dashStyle=y(c.dashArray)?c.dashArray.join(" "):c.dashArray.replace(/( *, *)/g," "):o.dashStyle="",o.endcap=c.lineCap.replace("butt","flat"),o.joinstyle=c.lineJoin):o&&(h.removeChild(o),n._stroke=null),c.fill?(l||(l=n._fill=Ki("fill")),h.appendChild(l),l.color=c.fillColor||c.color,l.opacity=c.fillOpacity):l&&(h.removeChild(l),n._fill=null)},_updateCircle:function(n){var o=n._point.round(),l=Math.round(n._radius),c=Math.round(n._radiusY||l);this._setPath(n,n._empty()?"M0 0":"AL "+o.x+","+o.y+" "+l+","+c+" 0,"+65535*360)},_setPath:function(n,o){n._path.v=o},_bringToFront:function(n){Fr(n._container)},_bringToBack:function(n){Ur(n._container)}},xs=is?Ki:th,Gi=Jt.extend({getEvents:function(){var n=Jt.prototype.getEvents.call(this);return n.zoomstart=this._onZoomStart,n},_initContainer:function(){this._container=xs("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=xs("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ce(this._container),Me(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Jt.prototype._update.call(this);var n=this._bounds,o=n.getSize(),l=this._container;(!this._svgSize||!this._svgSize.equals(o))&&(this._svgSize=o,l.setAttribute("width",o.x),l.setAttribute("height",o.y)),Ie(l,n.min),l.setAttribute("viewBox",[n.min.x,n.min.y,o.x,o.y].join(" ")),this.fire("update")}},_initPath:function(n){var o=n._path=xs("path");n.options.className&&oe(o,n.options.className),n.options.interactive&&oe(o,"leaflet-interactive"),this._updateStyle(n),this._layers[d(n)]=n},_addPath:function(n){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(n._path),n.addInteractiveTarget(n._path)},_removePath:function(n){Ce(n._path),n.removeInteractiveTarget(n._path),delete this._layers[d(n)]},_updatePath:function(n){n._project(),n._update()},_updateStyle:function(n){var o=n._path,l=n.options;o&&(l.stroke?(o.setAttribute("stroke",l.color),o.setAttribute("stroke-opacity",l.opacity),o.setAttribute("stroke-width",l.weight),o.setAttribute("stroke-linecap",l.lineCap),o.setAttribute("stroke-linejoin",l.lineJoin),l.dashArray?o.setAttribute("stroke-dasharray",l.dashArray):o.removeAttribute("stroke-dasharray"),l.dashOffset?o.setAttribute("stroke-dashoffset",l.dashOffset):o.removeAttribute("stroke-dashoffset")):o.setAttribute("stroke","none"),l.fill?(o.setAttribute("fill",l.fillColor||l.color),o.setAttribute("fill-opacity",l.fillOpacity),o.setAttribute("fill-rule",l.fillRule||"evenodd")):o.setAttribute("fill","none"))},_updatePoly:function(n,o){this._setPath(n,nh(n._parts,o))},_updateCircle:function(n){var o=n._point,l=Math.max(Math.round(n._radius),1),c=Math.max(Math.round(n._radiusY),1)||l,h="a"+l+","+c+" 0 1,0 ",m=n._empty()?"M0 0":"M"+(o.x-l)+","+o.y+h+l*2+",0 "+h+-l*2+",0 ";this._setPath(n,m)},_setPath:function(n,o){n._path.setAttribute("d",o)},_bringToFront:function(n){Fr(n._path)},_bringToBack:function(n){Ur(n._path)}});is&&Gi.include(E0);function $h(n){return rs||is?new Gi(n):null}ce.include({getRenderer:function(n){var o=n.options.renderer||this._getPaneRenderer(n.options.pane)||this.options.renderer||this._renderer;return o||(o=this._renderer=this._createRenderer()),this.hasLayer(o)||this.addLayer(o),o},_getPaneRenderer:function(n){if(n==="overlayPane"||n===void 0)return!1;var o=this._paneRenderers[n];return o===void 0&&(o=this._createRenderer({pane:n}),this._paneRenderers[n]=o),o},_createRenderer:function(n){return this.options.preferCanvas&&Bh(n)||$h(n)}});var Fh=Vr.extend({initialize:function(n,o){Vr.prototype.initialize.call(this,this._boundsToLatLngs(n),o)},setBounds:function(n){return this.setLatLngs(this._boundsToLatLngs(n))},_boundsToLatLngs:function(n){return n=ee(n),[n.getSouthWest(),n.getNorthWest(),n.getNorthEast(),n.getSouthEast()]}});function P0(n,o){return new Fh(n,o)}Gi.create=xs,Gi.pointsToPath=nh,fn.geometryToLayer=Lu,fn.coordsToLatLng=Nu,fn.coordsToLatLngs=vs,fn.latLngToCoords=Ou,fn.latLngsToCoords=gs,fn.getFeature=Kr,fn.asFeature=ys,ce.mergeOptions({boxZoom:!0});var Uh=Xt.extend({initialize:function(n){this._map=n,this._container=n._container,this._pane=n._panes.overlayPane,this._resetStateTimeout=0,n.on("unload",this._destroy,this)},addHooks:function(){se(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Me(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ce(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(n){if(!n.shiftKey||n.which!==1&&n.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Bi(),cu(),this._startPoint=this._map.mouseEventToContainerPoint(n),se(document,{contextmenu:ln,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(n){this._moved||(this._moved=!0,this._box=de("div","leaflet-zoom-box",this._container),oe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(n);var o=new H(this._point,this._startPoint),l=o.getSize();Ie(this._box,o.min),this._box.style.width=l.x+"px",this._box.style.height=l.y+"px"},_finish:function(){this._moved&&(Ce(this._box),Ne(this._container,"leaflet-crosshair")),$i(),fu(),Me(document,{contextmenu:ln,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(n){if(!(n.which!==1&&n.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(u(this._resetState,this),0);var o=new re(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(o).fire("boxzoomend",{boxZoomBounds:o})}},_onKeyDown:function(n){n.keyCode===27&&this._finish()}});ce.addInitHook("addHandler","boxZoom",Uh),ce.mergeOptions({doubleClickZoom:!0});var Zh=Xt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(n){var o=this._map,l=o.getZoom(),c=o.options.zoomDelta,h=n.originalEvent.shiftKey?l-c:l+c;o.options.doubleClickZoom==="center"?o.setZoom(h):o.setZoomAround(n.containerPoint,h)}});ce.addInitHook("addHandler","doubleClickZoom",Zh),ce.mergeOptions({dragging:!0,inertia:!ji,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Hh=Xt.extend({addHooks:function(){if(!this._draggable){var n=this._map;this._draggable=new dr(n._mapPane,n._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),n.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),n.on("zoomend",this._onZoomEnd,this),n.whenReady(this._onZoomEnd,this))}oe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ne(this._map._container,"leaflet-grab"),Ne(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 n=this._map;if(n._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var o=ee(this._map.options.maxBounds);this._offsetLimit=J(this._map.latLngToContainerPoint(o.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(o.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;n.fire("movestart").fire("dragstart"),n.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(n){if(this._map.options.inertia){var o=this._lastTime=+new Date,l=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(l),this._times.push(o),this._prunePositions(o)}this._map.fire("move",n).fire("drag",n)},_prunePositions:function(n){for(;this._positions.length>1&&n-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var n=this._map.getSize().divideBy(2),o=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=o.subtract(n).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(n,o){return n-(n-o)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var n=this._draggable._newPos.subtract(this._draggable._startPos),o=this._offsetLimit;n.xo.max.x&&(n.x=this._viscousLimit(n.x,o.max.x)),n.y>o.max.y&&(n.y=this._viscousLimit(n.y,o.max.y)),this._draggable._newPos=this._draggable._startPos.add(n)}},_onPreDragWrap:function(){var n=this._worldWidth,o=Math.round(n/2),l=this._initialWorldOffset,c=this._draggable._newPos.x,h=(c-o+l)%n+o-l,m=(c+o+l)%n-o-l,C=Math.abs(h+l)0?m:-m))-o;this._delta=0,this._startTime=null,C&&(n.options.scrollWheelZoom==="center"?n.setZoom(o+C):n.setZoomAround(this._lastMousePos,o+C))}});ce.addInitHook("addHandler","scrollWheelZoom",Vh),ce.mergeOptions({tap:!0,tapTolerance:15});var Kh=Xt.extend({addHooks:function(){se(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Me(this._map._container,"touchstart",this._onDown,this)},_onDown:function(n){if(n.touches){if(Tt(n),this._fireClick=!0,n.touches.length>1){this._fireClick=!1,clearTimeout(this._holdTimeout);return}var o=n.touches[0],l=o.target;this._startPos=this._newPos=new T(o.clientX,o.clientY),l.tagName&&l.tagName.toLowerCase()==="a"&&oe(l,"leaflet-active"),this._holdTimeout=setTimeout(u(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",o))},this),1e3),this._simulateEvent("mousedown",o),se(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(n){if(clearTimeout(this._holdTimeout),Me(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&n&&n.changedTouches){var o=n.changedTouches[0],l=o.target;l&&l.tagName&&l.tagName.toLowerCase()==="a"&&Ne(l,"leaflet-active"),this._simulateEvent("mouseup",o),this._isTapValid()&&this._simulateEvent("click",o)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(n){var o=n.touches[0];this._newPos=new T(o.clientX,o.clientY),this._simulateEvent("mousemove",o)},_simulateEvent:function(n,o){var l=document.createEvent("MouseEvents");l._simulated=!0,o.target._simulatedClick=!0,l.initMouseEvent(n,!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(l)}});Yt&&(!qt||ns)&&ce.addInitHook("addHandler","tap",Kh),ce.mergeOptions({touchZoom:Yt&&!ji,bounceAtZoomLimits:!0});var Gh=Xt.extend({addHooks:function(){oe(this._map._container,"leaflet-touch-zoom"),se(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ne(this._map._container,"leaflet-touch-zoom"),Me(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(n){var o=this._map;if(!(!n.touches||n.touches.length!==2||o._animatingZoom||this._zooming)){var l=o.mouseEventToContainerPoint(n.touches[0]),c=o.mouseEventToContainerPoint(n.touches[1]);this._centerPoint=o.getSize()._divideBy(2),this._startLatLng=o.containerPointToLatLng(this._centerPoint),o.options.touchZoom!=="center"&&(this._pinchStartLatLng=o.containerPointToLatLng(l.add(c)._divideBy(2))),this._startDist=l.distanceTo(c),this._startZoom=o.getZoom(),this._moved=!1,this._zooming=!0,o._stop(),se(document,"touchmove",this._onTouchMove,this),se(document,"touchend",this._onTouchEnd,this),Tt(n)}},_onTouchMove:function(n){if(!(!n.touches||n.touches.length!==2||!this._zooming)){var o=this._map,l=o.mouseEventToContainerPoint(n.touches[0]),c=o.mouseEventToContainerPoint(n.touches[1]),h=l.distanceTo(c)/this._startDist;if(this._zoom=o.getScaleZoom(h,this._startZoom),!o.options.bounceAtZoomLimits&&(this._zoomo.getMaxZoom()&&h>1)&&(this._zoom=o._limitZoom(this._zoom)),o.options.touchZoom==="center"){if(this._center=this._startLatLng,h===1)return}else{var m=l._add(c)._divideBy(2)._subtract(this._centerPoint);if(h===1&&m.x===0&&m.y===0)return;this._center=o.unproject(o.project(this._pinchStartLatLng,this._zoom).subtract(m),this._zoom)}this._moved||(o._moveStart(!0,!1),this._moved=!0),le(this._animRequest);var C=u(o._move,o,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=q(C,this,!0),Tt(n)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,le(this._animRequest),Me(document,"touchmove",this._onTouchMove,this),Me(document,"touchend",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))}});ce.addInitHook("addHandler","touchZoom",Gh),ce.BoxZoom=Uh,ce.DoubleClickZoom=Zh,ce.Drag=Hh,ce.Keyboard=Wh,ce.ScrollWheelZoom=Vh,ce.Tap=Kh,ce.TouchZoom=Gh,r.version=i,r.Control=bt,r.control=Zi,r.Browser=My,r.Evented=K,r.Mixin=Yy,r.Util=We,r.Class=Y,r.Handler=Xt,r.extend=s,r.bind=u,r.stamp=d,r.setOptions=E,r.DomEvent=Hy,r.DomUtil=Uy,r.PosAnimation=gh,r.Draggable=dr,r.LineUtil=t0,r.PolyUtil=n0,r.Point=T,r.point=A,r.Bounds=H,r.bounds=J,r.Transformation=Et,r.transformation=jt,r.Projection=r0,r.LatLng=te,r.latLng=ie,r.LatLngBounds=re,r.latLngBounds=ee,r.CRS=ve,r.GeoJSON=fn,r.geoJSON=Rh,r.geoJson=p0,r.Layer=Bt,r.LayerGroup=Zr,r.layerGroup=s0,r.FeatureGroup=Hr,r.featureGroup=a0,r.ImageOverlay=ws,r.imageOverlay=m0,r.VideoOverlay=zh,r.videoOverlay=_0,r.SVGOverlay=Ih,r.svgOverlay=v0,r.DivOverlay=dn,r.Popup=Gr,r.popup=g0,r.Tooltip=qr,r.tooltip=y0,r.Icon=Wr,r.icon=l0,r.DivIcon=Ah,r.divIcon=w0,r.Marker=ms,r.marker=u0,r.TileLayer=Yr,r.tileLayer=jh,r.GridLayer=Vi,r.gridLayer=x0,r.SVG=Gi,r.svg=$h,r.Renderer=Jt,r.Canvas=bh,r.canvas=Bh,r.Path=In,r.CircleMarker=_s,r.circleMarker=c0,r.Circle=ku,r.circle=f0,r.Polyline=cn,r.polyline=d0,r.Polygon=Vr,r.polygon=h0,r.Rectangle=Fh,r.rectangle=P0,r.Map=ce,r.map=Wy;var C0=window.L;r.noConflict=function(){return window.L=C0,this},window.L=r})})(Cf,Cf.exports);var Ti=Cf.exports;function AP(e,t){const[r,i]=M.useState(null),s=M.useRef(!1);return M.useEffect(()=>{if(e.current!==null&&!s.current){const a=new Ti.Map(e.current,{center:{lat:t.location.latitude,lng:t.location.longitude},zoom:12}),u=new Ti.TileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO'});a.addLayer(u),i(a),s.current=!0}},[e,t]),r}const ia=Ar("data/fetchOffers",async(e,{extra:t})=>{const{data:r}=await t.get(ur.Offers);return r}),oa=Ar("data/fetchOfferFullInfo",async(e,{extra:t})=>{const{data:r}=await t.get(`${ur.Offers}/${e}`);return r}),sa=Ar("data/fetchOffersNear",async(e,{extra:t})=>{const{data:r}=await t.get(`${ur.Offers}/${e}/nearby`);return r}),aa=Ar("data/fetchComments",async(e,{extra:t})=>{const{data:r}=await t.get(`${ur.Comments}/${e}`);return r}),jP={offers:[],offersFavorites:[],activeOffer:null,status:we.Idle},Va=Yo({name:"offers",initialState:jP,reducers:{setActiveOffer:(e,t)=>{e.activeOffer=t.payload}},extraReducers:e=>{e.addCase(ia.pending,t=>{t.status=we.Loading}),e.addCase(ia.fulfilled,(t,r)=>{t.offers=r.payload,t.status=we.Succeed}),e.addCase(ia.rejected,t=>{t.status=we.Failed})},selectors:{offers:e=>e.offers,activeOffer:e=>e.activeOffer,status:e=>e.status}}),Vd={...Va.actions,fetchOffers:ia},Ka=Va.selectors,DP=new Ti.Icon(mS),bP=new Ti.Icon(_S);function Yg({container:e,city:t,offers:r}){const i=Mt(Ka.activeOffer),s=M.useRef(null),a=AP(s,t);return M.useEffect(()=>{if(a){const u=Ti.layerGroup().addTo(a);return r.forEach(f=>{new Ti.Marker({lat:f.location.latitude,lng:f.location.longitude}).setIcon(i!==null&&f.id===i.id?bP:DP).addTo(u)}),a.flyTo([t.location.latitude,t.location.longitude],12),()=>{a.removeLayer(u)}}},[t,a,r,i]),x.jsx("section",{ref:s,className:`${e}__map map`})}function Qg({componentType:e,isFavorite:t}){const r={"place-card":{width:"18",height:"19"},offer:{width:"31",height:"33"}};return x.jsxs("button",{className:Zo(` + ${e}__bookmark-button button`,t&&`${e}__bookmark-button--active`),type:"button",children:[x.jsx("svg",{className:`${e}__bookmark-icon`,...r[e],children:x.jsx("use",{xlinkHref:"#icon-bookmark"})}),x.jsx("span",{className:"visually-hidden",children:t?"In bookmarks":"To bookmarks"})]})}const BP=e=>e*100/5,$P=e=>e.charAt(0).toUpperCase()+e.slice(1);function Kd({componentType:e,rating:t}){return x.jsx("div",{className:`${e}__rating rating`,children:x.jsxs("div",{className:`${e}__stars rating__stars`,children:[x.jsx("span",{style:{width:`${BP(t)}%`}}),x.jsx("span",{className:"visually-hidden",children:"Rating"})]})})}function Gd({offer:e,componentType:t,hoverHandler:r}){const{id:i,isPremium:s,previewImage:a,price:u,isFavorite:f,rating:d,title:p,type:v}=e,_=`${tt.Offer}/${i}`,S={cities:{width:"260",height:"200"},"near-places":{width:"260",height:"200"},favorites:{width:"150",height:"110"}},k=()=>r&&r(e),P=()=>r&&r(null);return x.jsxs("article",{className:`${t}__card place-card`,onMouseEnter:k,onMouseLeave:P,children:[s&&x.jsx("div",{className:"place-card__mark",children:x.jsx("span",{children:"Premium"})}),x.jsx("div",{className:`${t}__image-wrapper place-card__image-wrapper`,children:x.jsx(Tn,{to:_,children:x.jsx("img",{className:"place-card__image",src:a,alt:"Place image",...S[t]})})}),x.jsxs("div",{className:"place-card__info",children:[x.jsxs("div",{className:"place-card__price-wrapper",children:[x.jsxs("div",{className:"place-card__price",children:[x.jsxs("b",{className:"place-card__price-value",children:["€",u]}),x.jsx("span",{className:"place-card__price-text",children:"/ night"})]}),x.jsx(Qg,{componentType:"place-card",isFavorite:f})]}),x.jsx(Kd,{componentType:"place-card",rating:d}),x.jsx("h2",{className:"place-card__name",children:x.jsx(Tn,{to:_,children:p})}),x.jsx("p",{className:"place-card__type",children:v})]})]})}var ci=(e=>(e.Popular="Popular",e.PriceLowToHigh="Price: low to high",e.PriceHighToLow="Price: high to low",e.TopRatedFirst="Top rated first",e))(ci||{});const FP="Popular";function UP(e,t){switch(e){case ci.Popular:return t;case ci.PriceLowToHigh:return t.sort((r,i)=>r.price-i.price);case ci.PriceHighToLow:return t.sort((r,i)=>i.price-r.price);case ci.TopRatedFirst:return t.sort((r,i)=>i.rating-r.rating);default:return t}}function ZP(e=!1){const[t,r]=M.useState(e);return{isOn:t,off:()=>r(!1),on:()=>r(!0),toggle:()=>r(i=>!i)}}function HP({activeSortOption:e,setActiveSortOption:t}){const{isOn:r,toggle:i,off:s}=ZP(!1),a=M.useRef(null);M.useEffect(()=>{if(r){const f=p=>{p.key==="Escape"&&(p.preventDefault(),s())},d=p=>{a.current&&!a.current.contains(p.target)&&s()};return document.addEventListener("keydown",f),document.addEventListener("click",d),()=>{document.removeEventListener("keydown",f),document.removeEventListener("click",d)}}},[r,s,e]);const u=f=>{t(f),s()};return x.jsxs("form",{ref:a,className:"places__sorting",action:"#",method:"get",children:[x.jsx("span",{className:"places__sorting-caption",children:"Sort by"}),x.jsxs("span",{onClick:i,className:"places__sorting-type",tabIndex:0,children:[e,x.jsx("svg",{className:"places__sorting-arrow",width:"7",height:"4",children:x.jsx("use",{xlinkHref:"#icon-arrow-select"})})]}),x.jsx("ul",{className:Zo("places__options","places__options--custom",r&&"places__options--opened"),children:Object.values(ci).map((f,d)=>x.jsx("li",{className:Zo("places__option",e===f&&"places__option--active"),tabIndex:d,onClick:()=>u(f),children:f},f))})]})}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the @@ -112,9 +112,9 @@ MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. -***************************************************************************** */var tr=function(){return tr=Object.assign||function(t){for(var r,i=1,s=arguments.length;icrypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");function bP(){const e=Array.from({length:aS},()=>DP());return x.jsxs("section",{className:"cities__places places",children:[x.jsx("h2",{className:"visually-hidden",children:"Places"}),x.jsx("div",{style:{width:"100%"},children:x.jsxs(Gg,{speed:2,width:572,height:120,viewBox:"0 0 572 120",backgroundColor:"#f5f5f5",foregroundColor:"#ecebeb",children:[x.jsx("rect",{x:"2",y:"20",rx:"8",ry:"8",width:"450",height:"28"}),x.jsx("rect",{x:"2",y:"70",rx:"4",ry:"4",width:"100",height:"14"})]})}),x.jsx("div",{className:"cities__places-list places__list tabs__content",children:e.map(t=>x.jsx(jP,{},t))})]})}function BP({offersByCity:e,city:t}){const[r,i]=M.useState(NP),{setActiveOffer:s}=gn(Vd),a=vt(Va.status),u=OP(r,e);return a===we.Loading?x.jsx(bP,{}):x.jsxs("section",{className:"cities__places places",children:[x.jsx("h2",{className:"visually-hidden",children:"Places"}),x.jsxs("b",{className:"places__found",children:[e.length," place",e.length>1&&"s"," to stay in ",t==null?void 0:t.name]}),x.jsx(RP,{activeSortOption:r,setActiveSortOption:i}),x.jsx("div",{className:"cities__places-list places__list tabs__content",children:u.map(f=>x.jsx(qd,{componentType:"cities",offer:f,hoverHandler:()=>s(f)},f.id))})]})}function Yg(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;ttypeof e=="number"&&!isNaN(e),Pr=e=>typeof e=="string",mt=e=>typeof e=="function",aa=e=>Pr(e)||mt(e)?e:null,Pf=e=>M.isValidElement(e)||Pr(e)||mt(e)||Uo(e);function $P(e,t,r){r===void 0&&(r=300);const{scrollHeight:i,style:s}=e;requestAnimationFrame(()=>{s.minHeight="initial",s.height=i+"px",s.transition=`all ${r}ms`,requestAnimationFrame(()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(t,r)})})}function Fl(e){let{enter:t,exit:r,appendPosition:i=!1,collapse:s=!0,collapseDuration:a=300}=e;return function(u){let{children:f,position:d,preventExitTransition:p,done:v,nodeRef:_,isIn:S,playToast:k}=u;const P=i?`${t}--${d}`:t,E=i?`${r}--${d}`:r,R=M.useRef(0);return M.useLayoutEffect(()=>{const w=_.current,g=P.split(" "),y=N=>{N.target===_.current&&(k(),w.removeEventListener("animationend",y),w.removeEventListener("animationcancel",y),R.current===0&&N.type!=="animationcancel"&&w.classList.remove(...g))};w.classList.add(...g),w.addEventListener("animationend",y),w.addEventListener("animationcancel",y)},[]),M.useEffect(()=>{const w=_.current,g=()=>{w.removeEventListener("animationend",g),s?$P(w,v,a):v()};S||(p?g():(R.current=1,w.className+=` ${E}`,w.addEventListener("animationend",g)))},[S]),pe.createElement(pe.Fragment,null,f)}}function Nm(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const nt=new Map;let Zo=[];const Cf=new Set,FP=e=>Cf.forEach(t=>t(e)),Qg=()=>nt.size>0;function Xg(e,t){var r;if(t)return!((r=nt.get(t))==null||!r.isToastActive(e));let i=!1;return nt.forEach(s=>{s.isToastActive(e)&&(i=!0)}),i}function Jg(e,t){Pf(e)&&(Qg()||Zo.push({content:e,options:t}),nt.forEach(r=>{r.buildToast(e,t)}))}function Om(e,t){nt.forEach(r=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===r.id&&r.toggle(e,t==null?void 0:t.id):r.toggle(e,t==null?void 0:t.id)})}function UP(e){const{subscribe:t,getSnapshot:r,setProps:i}=M.useRef(function(a){const u=a.containerId||1;return{subscribe(f){const d=function(v,_,S){let k=1,P=0,E=[],R=[],w=[],g=_;const y=new Map,N=new Set,j=()=>{w=Array.from(y.values()),N.forEach(I=>I())},b=I=>{R=I==null?[]:R.filter(X=>X!==I),j()},B=I=>{const{toastId:X,onOpen:V,updateId:G,children:le}=I.props,We=G==null;I.staleId&&y.delete(I.staleId),y.set(X,I),R=[...R,I.props.toastId].filter(Y=>Y!==I.staleId),j(),S(Nm(I,We?"added":"updated")),We&&mt(V)&&V(M.isValidElement(le)&&le.props)};return{id:v,props:g,observe:I=>(N.add(I),()=>N.delete(I)),toggle:(I,X)=>{y.forEach(V=>{X!=null&&X!==V.props.toastId||mt(V.toggle)&&V.toggle(I)})},removeToast:b,toasts:y,clearQueue:()=>{P-=E.length,E=[]},buildToast:(I,X)=>{if((J=>{let{containerId:re,toastId:ee,updateId:te}=J;const ie=re?re!==v:v!==1,ve=y.has(ee)&&te==null;return ie||ve})(X))return;const{toastId:V,updateId:G,data:le,staleId:We,delay:Y}=X,W=()=>{b(V)},F=G==null;F&&P++;const K={...g,style:g.toastStyle,key:k++,...Object.fromEntries(Object.entries(X).filter(J=>{let[re,ee]=J;return ee!=null})),toastId:V,updateId:G,data:le,closeToast:W,isIn:!1,className:aa(X.className||g.toastClassName),bodyClassName:aa(X.bodyClassName||g.bodyClassName),progressClassName:aa(X.progressClassName||g.progressClassName),autoClose:!X.isLoading&&(T=X.autoClose,U=g.autoClose,T===!1||Uo(T)&&T>0?T:U),deleteToast(){const J=y.get(V),{onClose:re,children:ee}=J.props;mt(re)&&re(M.isValidElement(ee)&&ee.props),S(Nm(J,"removed")),y.delete(V),P--,P<0&&(P=0),E.length>0?B(E.shift()):j()}};var T,U;K.closeButton=g.closeButton,X.closeButton===!1||Pf(X.closeButton)?K.closeButton=X.closeButton:X.closeButton===!0&&(K.closeButton=!Pf(g.closeButton)||g.closeButton);let A=I;M.isValidElement(I)&&!Pr(I.type)?A=M.cloneElement(I,{closeToast:W,toastProps:K,data:le}):mt(I)&&(A=I({closeToast:W,toastProps:K,data:le}));const H={content:A,props:K,staleId:We};g.limit&&g.limit>0&&P>g.limit&&F?E.push(H):Uo(Y)?setTimeout(()=>{B(H)},Y):B(H)},setProps(I){g=I},setToggle:(I,X)=>{y.get(I).toggle=X},isToastActive:I=>R.some(X=>X===I),getSnapshot:()=>g.newestOnTop?w.reverse():w}}(u,a,FP);nt.set(u,d);const p=d.observe(f);return Zo.forEach(v=>Jg(v.content,v.options)),Zo=[],()=>{p(),nt.delete(u)}},setProps(f){var d;(d=nt.get(u))==null||d.setProps(f)},getSnapshot(){var f;return(f=nt.get(u))==null?void 0:f.getSnapshot()}}}(e)).current;i(e);const s=M.useSyncExternalStore(t,r,r);return{getToastToRender:function(a){if(!s)return[];const u=new Map;return s.forEach(f=>{const{position:d}=f.props;u.has(d)||u.set(d,[]),u.get(d).push(f)}),Array.from(u,f=>a(f[0],f[1]))},isToastActive:Xg,count:s==null?void 0:s.length}}function ZP(e){const[t,r]=M.useState(!1),[i,s]=M.useState(!1),a=M.useRef(null),u=M.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:f,pauseOnHover:d,closeToast:p,onClick:v,closeOnClick:_}=e;var S,k;function P(){r(!0)}function E(){r(!1)}function R(y){const N=a.current;u.canDrag&&N&&(u.didMove=!0,t&&E(),u.delta=e.draggableDirection==="x"?y.clientX-u.start:y.clientY-u.start,u.start!==y.clientX&&(u.canCloseOnClick=!1),N.style.transform=`translate3d(${e.draggableDirection==="x"?`${u.delta}px, var(--y)`:`0, calc(${u.delta}px + var(--y))`},0)`,N.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance)))}function w(){document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",w);const y=a.current;if(u.canDrag&&u.didMove&&y){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),e.closeToast(),void e.collapseAll();y.style.transition="transform 0.2s, opacity 0.2s",y.style.removeProperty("transform"),y.style.removeProperty("opacity")}}(k=nt.get((S={id:e.toastId,containerId:e.containerId,fn:r}).containerId||1))==null||k.setToggle(S.id,S.fn),M.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||E(),window.addEventListener("focus",P),window.addEventListener("blur",E),()=>{window.removeEventListener("focus",P),window.removeEventListener("blur",E)}},[e.pauseOnFocusLoss]);const g={onPointerDown:function(y){if(e.draggable===!0||e.draggable===y.pointerType){u.didMove=!1,document.addEventListener("pointermove",R),document.addEventListener("pointerup",w);const N=a.current;u.canCloseOnClick=!0,u.canDrag=!0,N.style.transition="none",e.draggableDirection==="x"?(u.start=y.clientX,u.removalDistance=N.offsetWidth*(e.draggablePercent/100)):(u.start=y.clientY,u.removalDistance=N.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(y){const{top:N,bottom:j,left:b,right:B}=a.current.getBoundingClientRect();y.nativeEvent.type!=="touchend"&&e.pauseOnHover&&y.clientX>=b&&y.clientX<=B&&y.clientY>=N&&y.clientY<=j?E():P()}};return f&&d&&(g.onMouseEnter=E,e.stacked||(g.onMouseLeave=P)),_&&(g.onClick=y=>{v&&v(y),u.canCloseOnClick&&p()}),{playToast:P,pauseToast:E,isRunning:t,preventExitTransition:i,toastRef:a,eventHandlers:g}}function HP(e){let{delay:t,isRunning:r,closeToast:i,type:s="default",hide:a,className:u,style:f,controlledProgress:d,progress:p,rtl:v,isIn:_,theme:S}=e;const k=a||d&&p===0,P={...f,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused"};d&&(P.transform=`scaleX(${p})`);const E=Wn("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${S}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":v}),R=mt(u)?u({rtl:v,type:s,defaultClassName:E}):Wn(E,u),w={[d&&p>=1?"onTransitionEnd":"onAnimationEnd"]:d&&p<1?null:()=>{_&&i()}};return pe.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":k},pe.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${S} Toastify__progress-bar--${s}`}),pe.createElement("div",{role:"progressbar","aria-hidden":k?"true":"false","aria-label":"notification timer",className:R,style:P,...w}))}let WP=1;const ey=()=>""+WP++;function VP(e){return e&&(Pr(e.toastId)||Uo(e.toastId))?e.toastId:ey()}function wo(e,t){return Jg(e,t),t.toastId}function Ka(e,t){return{...t,type:t&&t.type||e,toastId:VP(t)}}function Zs(e){return(t,r)=>wo(t,Ka(e,r))}function ye(e,t){return wo(e,Ka("default",t))}ye.loading=(e,t)=>wo(e,Ka("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ye.promise=function(e,t,r){let i,{pending:s,error:a,success:u}=t;s&&(i=Pr(s)?ye.loading(s,r):ye.loading(s.render,{...r,...s}));const f={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(v,_,S)=>{if(_==null)return void ye.dismiss(i);const k={type:v,...f,...r,data:S},P=Pr(_)?{render:_}:_;return i?ye.update(i,{...k,...P}):ye(P.render,{...k,...P}),S},p=mt(e)?e():e;return p.then(v=>d("success",u,v)).catch(v=>d("error",a,v)),p},ye.success=Zs("success"),ye.info=Zs("info"),ye.error=Zs("error"),ye.warning=Zs("warning"),ye.warn=ye.warning,ye.dark=(e,t)=>wo(e,Ka("default",{theme:"dark",...t})),ye.dismiss=function(e){(function(t){var r;if(Qg()){if(t==null||Pr(r=t)||Uo(r))nt.forEach(i=>{i.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const i=nt.get(t.containerId);i?i.removeToast(t.id):nt.forEach(s=>{s.removeToast(t.id)})}}else Zo=Zo.filter(i=>t!=null&&i.options.toastId!==t)})(e)},ye.clearWaitingQueue=function(e){e===void 0&&(e={}),nt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},ye.isActive=Xg,ye.update=function(e,t){t===void 0&&(t={});const r=((i,s)=>{var a;let{containerId:u}=s;return(a=nt.get(u||1))==null?void 0:a.toasts.get(i)})(e,t);if(r){const{props:i,content:s}=r,a={delay:100,...i,...t,toastId:t.toastId||e,updateId:ey()};a.toastId!==e&&(a.staleId=e);const u=a.render||s;delete a.render,wo(u,a)}},ye.done=e=>{ye.update(e,{progress:1})},ye.onChange=function(e){return Cf.add(e),()=>{Cf.delete(e)}},ye.play=e=>Om(!0,e),ye.pause=e=>Om(!1,e);const KP=typeof window<"u"?M.useLayoutEffect:M.useEffect,Hs=e=>{let{theme:t,type:r,isLoading:i,...s}=e;return pe.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${r})`,...s})},hc={info:function(e){return pe.createElement(Hs,{...e},pe.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return pe.createElement(Hs,{...e},pe.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return pe.createElement(Hs,{...e},pe.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return pe.createElement(Hs,{...e},pe.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return pe.createElement("div",{className:"Toastify__spinner"})}},qP=e=>{const{isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:s,playToast:a}=ZP(e),{closeButton:u,children:f,autoClose:d,onClick:p,type:v,hideProgressBar:_,closeToast:S,transition:k,position:P,className:E,style:R,bodyClassName:w,bodyStyle:g,progressClassName:y,progressStyle:N,updateId:j,role:b,progress:B,rtl:I,toastId:X,deleteToast:V,isIn:G,isLoading:le,closeOnClick:We,theme:Y}=e,W=Wn("Toastify__toast",`Toastify__toast-theme--${Y}`,`Toastify__toast--${v}`,{"Toastify__toast--rtl":I},{"Toastify__toast--close-on-click":We}),F=mt(E)?E({rtl:I,position:P,type:v,defaultClassName:W}):Wn(W,E),K=function(H){let{theme:J,type:re,isLoading:ee,icon:te}=H,ie=null;const ve={theme:J,type:re};return te===!1||(mt(te)?ie=te({...ve,isLoading:ee}):M.isValidElement(te)?ie=M.cloneElement(te,ve):ee?ie=hc.spinner():(Ge=>Ge in hc)(re)&&(ie=hc[re](ve))),ie}(e),T=!!B||!d,U={closeToast:S,type:v,theme:Y};let A=null;return u===!1||(A=mt(u)?u(U):M.isValidElement(u)?M.cloneElement(u,U):function(H){let{closeToast:J,theme:re,ariaLabel:ee="close"}=H;return pe.createElement("button",{className:`Toastify__close-button Toastify__close-button--${re}`,type:"button",onClick:te=>{te.stopPropagation(),J(te)},"aria-label":ee},pe.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},pe.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(U)),pe.createElement(k,{isIn:G,done:V,position:P,preventExitTransition:r,nodeRef:i,playToast:a},pe.createElement("div",{id:X,onClick:p,"data-in":G,className:F,...s,style:R,ref:i},pe.createElement("div",{...G&&{role:b},className:mt(w)?w({type:v}):Wn("Toastify__toast-body",w),style:g},K!=null&&pe.createElement("div",{className:Wn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!le})},K),pe.createElement("div",null,f)),A,pe.createElement(HP,{...j&&!T?{key:`pb-${j}`}:{},rtl:I,theme:Y,delay:d,isRunning:t,isIn:G,closeToast:S,hide:_,type:v,style:N,className:y,controlledProgress:T,progress:B||0})))},Ul=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},GP=Fl(Ul("bounce",!0));Fl(Ul("slide",!0));Fl(Ul("zoom"));Fl(Ul("flip"));const YP={position:"top-right",transition:GP,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function QP(e){let t={...YP,...e};const r=e.stacked,[i,s]=M.useState(!0),a=M.useRef(null),{getToastToRender:u,isToastActive:f,count:d}=UP(t),{className:p,style:v,rtl:_,containerId:S}=t;function k(E){const R=Wn("Toastify__toast-container",`Toastify__toast-container--${E}`,{"Toastify__toast-container--rtl":_});return mt(p)?p({position:E,rtl:_,defaultClassName:R}):Wn(R,aa(p))}function P(){r&&(s(!0),ye.play())}return KP(()=>{if(r){var E;const R=a.current.querySelectorAll('[data-in="true"]'),w=12,g=(E=t.position)==null?void 0:E.includes("top");let y=0,N=0;Array.from(R).reverse().forEach((j,b)=>{const B=j;B.classList.add("Toastify__toast--stacked"),b>0&&(B.dataset.collapsed=`${i}`),B.dataset.pos||(B.dataset.pos=g?"top":"bot");const I=y*(i?.2:1)+(i?0:w*b);B.style.setProperty("--y",`${g?I:-1*I}px`),B.style.setProperty("--g",`${w}`),B.style.setProperty("--s",""+(1-(i?N:0))),y+=B.offsetHeight,N+=.025})}},[i,d,r]),pe.createElement("div",{ref:a,className:"Toastify",id:S,onMouseEnter:()=>{r&&(s(!1),ye.pause())},onMouseLeave:P},u((E,R)=>{const w=R.length?{...v}:{...v,pointerEvents:"none"};return pe.createElement("div",{className:k(E),style:w,key:`container-${E}`},R.map(g=>{let{content:y,props:N}=g;return pe.createElement(qP,{...N,stacked:r,collapseAll:P,isIn:f(N.toastId,N.containerId),style:N.style,key:`toast-${N.key}`},y)}))}))}function XP({title:e="Main",citySlug:t}){Qo(e);const{fetchOffers:r}=gn(Vd),i=vt(Va.status);M.useEffect(()=>{i===we.Idle&&r().unwrap().catch(f=>{ye.warning(f.message)})},[i,r]);const s=vt(Va.offers),a=Ii.find(f=>f.slug===t);if(!a)return null;const u=s.filter(f=>f.city.name===a.name);return x.jsxs("div",{className:"page page--gray page--main",children:[x.jsx($l,{}),x.jsxs("main",{className:"page__main page__main--index",children:[x.jsx("h1",{className:"visually-hidden",children:"Cities"}),x.jsx("div",{className:"tabs",children:x.jsx("section",{className:"locations container",children:x.jsx("ul",{className:"locations__list tabs__list",children:x.jsx(xP,{})})})}),x.jsx("div",{className:"cities",children:x.jsxs("div",{className:"cities__places-container container",children:[x.jsx(BP,{offersByCity:u,city:a}),x.jsx("div",{className:"cities__right-section",children:a&&x.jsx(Wg,{container:"cities",city:a,offers:u})})]})})]})]})}const JP="_container_e270g_1",eC={container:JP};function ty({title:e="404"}){return Qo(e),x.jsxs("div",{className:"page page--gray",children:[x.jsx("header",{className:"header",children:x.jsx("div",{className:"container",children:x.jsx("div",{className:"header__wrapper",children:x.jsx("div",{className:"header__left",children:x.jsx(Rd,{})})})})}),x.jsxs("main",{className:eC.container,children:[x.jsxs("h1",{children:["Ошибка 404. ",x.jsx("br",{}),"Страница не найдена 😕"]}),x.jsxs(Tn,{to:"/",className:"locations__item-link",children:[" ","<- Вернуться на главную страницу"]})]})]})}function ny(){return x.jsx("footer",{className:"footer container",children:x.jsx(Tn,{className:"footer__logo-link",to:tt.Root,children:x.jsx("img",{className:"footer__logo",src:"img/logo.svg",alt:"6 cities logo",width:"64",height:"33"})})})}function tC(){return x.jsxs("div",{className:"page page--favorites-empty",children:[x.jsx($l,{}),x.jsx("main",{className:"page__main page__main--favorites page__main--favorites-empty",children:x.jsx("div",{className:"page__favorites-container container",children:x.jsxs("section",{className:"favorites favorites--empty",children:[x.jsx("h1",{className:"visually-hidden",children:"Favorites (empty)"}),x.jsxs("div",{className:"favorites__status-wrapper",children:[x.jsx("b",{className:"favorites__status",children:"Nothing yet saved."}),x.jsx("p",{className:"favorites__status-description",children:"Save properties to narrow down search or plan your future trips."})]})]})})}),x.jsx(ny,{})]})}function nC({title:e="Favorites"}){Qo(e);const t=[];return t.length?x.jsxs("div",{className:"page",children:[x.jsx($l,{}),x.jsx("main",{className:"page__main page__main--favorites",children:x.jsx("div",{className:"page__favorites-container container",children:x.jsxs("section",{className:"favorites",children:[x.jsx("h1",{className:"favorites__title",children:"Saved listing"}),x.jsx("ul",{className:"favorites__list",children:x.jsxs("li",{className:"favorites__locations-items",children:[x.jsx("div",{className:"favorites__locations locations locations--current",children:x.jsx("div",{className:"locations__item",children:x.jsx(Tn,{className:"locations__item-link",to:`${tt.Root}`,children:x.jsx("span",{children:"Amsterdam"})})})}),x.jsx("div",{className:"favorites__places",children:t.map(r=>x.jsx(qd,{componentType:"favorites",offer:r},r.id))})]})})]})})}),x.jsx(ny,{})]}):x.jsx(tC,{})}function rC({host:e,description:t}){const{name:r,avatarUrl:i,isPro:s}=e;return x.jsxs("div",{className:"offer__host",children:[x.jsx("h2",{className:"offer__host-title",children:"Meet the host"}),x.jsxs("div",{className:"offer__host-user user",children:[x.jsx("div",{className:Fo("offer__avatar-wrapper user__avatar-wrapper",s&&"offer__avatar-wrapper--pro"),children:x.jsx("img",{className:"offer__avatar user__avatar",src:i,width:"74",height:"74",alt:"Host avatar"})}),x.jsx("span",{className:"offer__user-name",children:r}),s&&x.jsx("span",{className:"offer__user-status",children:"Pro"})]}),x.jsx("div",{className:"offer__description",children:x.jsx("p",{className:"offer__text",children:t})})]})}var ry={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Hm,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",u="second",f="minute",d="hour",p="day",v="week",_="month",S="quarter",k="year",P="date",E="Invalid Date",R=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var W=["th","st","nd","rd"],F=Y%100;return"["+Y+(W[(F-20)%10]||W[F]||W[0])+"]"}},y=function(Y,W,F){var K=String(Y);return!K||K.length>=W?Y:""+Array(W+1-K.length).join(F)+Y},N={s:y,z:function(Y){var W=-Y.utcOffset(),F=Math.abs(W),K=Math.floor(F/60),T=F%60;return(W<=0?"+":"-")+y(K,2,"0")+":"+y(T,2,"0")},m:function Y(W,F){if(W.date()1)return Y(A[0])}else{var H=W.name;b[H]=W,T=H}return!K&&T&&(j=T),T||!K&&j},V=function(Y,W){if(I(Y))return Y.clone();var F=typeof W=="object"?W:{};return F.date=Y,F.args=arguments,new le(F)},G=N;G.l=X,G.i=I,G.w=function(Y,W){return V(Y,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var le=function(){function Y(F){this.$L=X(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[B]=!0}var W=Y.prototype;return W.parse=function(F){this.$d=function(K){var T=K.date,U=K.utc;if(T===null)return new Date(NaN);if(G.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var A=T.match(R);if(A){var H=A[2]-1||0,J=(A[7]||"0").substring(0,3);return U?new Date(Date.UTC(A[1],H,A[3]||1,A[4]||0,A[5]||0,A[6]||0,J)):new Date(A[1],H,A[3]||1,A[4]||0,A[5]||0,A[6]||0,J)}}return new Date(T)}(F),this.init()},W.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},W.$utils=function(){return G},W.isValid=function(){return this.$d.toString()!==E},W.isSame=function(F,K){var T=V(F);return this.startOf(K)<=T&&T<=this.endOf(K)},W.isAfter=function(F,K){return V(F)r(t),htmlFor:`${t}-stars`,className:"reviews__rating-label form__rating-label",title:e,children:x.jsx("svg",{className:"form__star-image",width:"37",height:"33",children:x.jsx("use",{xlinkHref:"#icon-star"})})})]})}function aC(){const[e,t]=M.useState(0),[r,i]=M.useState(""),s=a=>{a.preventDefault()};return x.jsxs("form",{onSubmit:a=>s(a),className:"reviews__form form",action:"#",method:"post",children:[x.jsx("label",{className:"reviews__label form__label",htmlFor:"review",children:"Your review"}),x.jsx("div",{className:"reviews__rating-form form__rating",children:Object.entries(uS).map(([a,u])=>x.jsx(sC,{onClickHandle:t,starTitle:a,starValue:u},a))}),x.jsx("textarea",{onChange:a=>i(a.target.value),className:"reviews__textarea form__textarea",id:"review",name:"review",placeholder:"Tell how was your stay, what you like and what can be improved"}),x.jsxs("div",{className:"reviews__button-wrapper",children:[x.jsxs("p",{className:"reviews__help",children:["To submit review please make sure to set ",x.jsx("span",{className:"reviews__star",children:"rating"})," and describe your stay with at least ",x.jsx("b",{className:"reviews__text-amount",children:"50 characters"}),"."]}),x.jsx("button",{className:"reviews__submit form__submit button",type:"submit",disabled:r.length{e.addCase(ia.pending,t=>{t.status=we.Loading}),e.addCase(ia.fulfilled,(t,r)=>{t.offerFullInfo=r.payload,t.status=we.Succeed}),e.addCase(ia.rejected,t=>{t.status=we.Failed})},selectors:{offerFullInfo:e=>e.offerFullInfo,status:e=>e.status}}),uC={...qa.actions,fetchOfferFullInfo:ia},cC=qa.selectors,fC={offersNear:[],status:we.Idle},Ga=Yo({name:"offersNear",initialState:fC,reducers:{},extraReducers:e=>{e.addCase(oa.pending,t=>{t.status=we.Loading}),e.addCase(oa.fulfilled,(t,r)=>{t.offersNear=r.payload,t.status=we.Succeed}),e.addCase(oa.rejected,t=>{t.status=we.Failed})},selectors:{offersNear:e=>e.offersNear,status:e=>e.status}}),dC={...Ga.actions,fetchOffersNear:oa},hC=Ga.selectors,pC={comments:[],status:we.Idle},Ya=Yo({name:"comments",initialState:pC,reducers:{},extraReducers:e=>{e.addCase(sa.pending,t=>{t.status=we.Loading}),e.addCase(sa.fulfilled,(t,r)=>{t.comments=r.payload,t.status=we.Succeed}),e.addCase(sa.rejected,t=>{t.status=we.Failed})},selectors:{comments:e=>e.comments,status:e=>e.status}}),mC={...Ya.actions,fetchComments:sa},_C=Ya.selectors;function vC({title:e="Offer",userAuth:t}){Qo(e);const{setActiveOffer:r}=gn(Vd),{fetchOfferFullInfo:i}=gn(uC),{fetchOffersNear:s}=gn(dC),{fetchComments:a}=gn(mC),{offerId:u}=Ix();M.useEffect(()=>{u&&Promise.all([i(u),s(u),a(u)])},[i,s,a,u]);const f=vt(cC.offerFullInfo),d=vt(hC.offersNear),p=vt(_C.comments);if(!f)return x.jsx(ty,{});const{images:v,isPremium:_,isFavorite:S,rating:k,type:P,bedrooms:E,maxAdults:R,price:w,goods:g,host:y,description:N,city:j}=f,b=Ii.find(B=>B.name===j.name);return x.jsxs("div",{className:"page",children:[x.jsx($l,{}),x.jsxs("main",{className:"page__main page__main--offer",children:[x.jsxs("section",{className:"offer",children:[x.jsx("div",{className:"offer__gallery-container container",children:x.jsx("div",{className:"offer__gallery",children:v.map(B=>x.jsx("div",{className:"offer__image-wrapper",children:x.jsx("img",{className:"offer__image",src:B,alt:"Photo studio"})},B))})}),x.jsx("div",{className:"offer__container container",children:x.jsxs("div",{className:"offer__wrapper",children:[_&&x.jsx("div",{className:"offer__mark",children:x.jsx("span",{children:"Premium"})}),x.jsxs("div",{className:"offer__name-wrapper",children:[x.jsx("h1",{className:"offer__name",children:f.title}),x.jsx(Vg,{componentType:"offer",isFavorite:S})]}),x.jsx(Kd,{componentType:"offer",rating:k}),x.jsxs("ul",{className:"offer__features",children:[x.jsx("li",{className:"offer__feature offer__feature--entire",children:LP(P)}),x.jsxs("li",{className:"offer__feature offer__feature--bedrooms",children:[E," Bedrooms"]}),x.jsxs("li",{className:"offer__feature offer__feature--adults",children:["Max ",R," adults"]})]}),x.jsxs("div",{className:"offer__price",children:[x.jsxs("b",{className:"offer__price-value",children:["€",w]}),x.jsx("span",{className:"offer__price-text",children:" night"})]}),x.jsxs("div",{className:"offer__inside",children:[x.jsx("h2",{className:"offer__inside-title",children:"What's inside"}),x.jsx("ul",{className:"offer__inside-list",children:g.map(B=>x.jsx("li",{className:"offer__inside-item",children:B},B))})]}),x.jsx(rC,{host:y,description:N}),x.jsxs("section",{className:"offer__reviews reviews",children:[x.jsxs("h2",{className:"reviews__title",children:["Reviews · ",x.jsx("span",{className:"reviews__amount",children:p.length})]}),x.jsx("ul",{className:"reviews__list",children:p.length>0&&p.map(B=>x.jsx(oC,{review:B},B.id))}),t===ht.Auth&&x.jsx(aC,{})]})]})}),b&&x.jsx(Wg,{container:"offer",city:b,offers:d})]}),x.jsx("div",{className:"container",children:x.jsxs("section",{className:"near-places places",children:[x.jsx("h2",{className:"near-places__title",children:"Other places in the neighbourhood"}),x.jsx("div",{className:"near-places__list places__list",children:d.map(B=>x.jsx(qd,{offer:B,componentType:"near-places",hoverHandler:()=>r(B)},B.id))})]})})]})]})}function gC({children:e}){const t=vt(Ti.authStatus);return console.log(t),t===ht.Auth?e:x.jsx(Md,{to:tt.Login})}function yC(){const[e,t]=M.useState(""),[r,i]=M.useState(""),{login:s}=gn(Wd),a=vt(Ti.requestStatus);console.log(a);const u=f=>{f.preventDefault(),ye.promise(s({email:e,password:r}).unwrap(),{pending:"Loading",success:"Success",error:"Error"})};return x.jsxs("form",{onSubmit:f=>u(f),className:"login__form form",action:"#",method:"post",children:[x.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[x.jsx("label",{className:"visually-hidden",children:"E-mail"}),x.jsx("input",{onChange:f=>t(f.target.value),className:"login__input form__input",type:"email",name:"email",placeholder:"Email",required:!0})]}),x.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[x.jsx("label",{className:"visually-hidden",children:"Password"}),x.jsx("input",{onChange:f=>i(f.target.value),className:"login__input form__input",type:"password",name:"password",placeholder:"Password",required:!0})]}),x.jsx("button",{className:"login__submit form__submit button",type:"submit",children:"Sign in"})]})}function wC({title:e="Login"}){return Qo(e),x.jsxs("div",{className:"page page--gray page--login",children:[x.jsx("header",{className:"header",children:x.jsx("div",{className:"container",children:x.jsx("div",{className:"header__wrapper",children:x.jsx("div",{className:"header__left",children:x.jsx(Rd,{})})})})}),x.jsx("main",{className:"page__main page__main--login",children:x.jsxs("div",{className:"page__login-container container",children:[x.jsxs("section",{className:"login",children:[x.jsx("h1",{className:"login__title",children:"Sign in"}),x.jsx(yC,{})]}),x.jsx("section",{className:"locations locations--login locations--current",children:x.jsx("div",{className:"locations__item",children:x.jsx("a",{className:"locations__item-link",href:"#",children:x.jsx("span",{children:"Amsterdam"})})})})]})})]})}function xC({children:e}){return vt(Ti.authStatus)===ht.Auth?x.jsx(Md,{to:tt.Root}):e}function SC(){const{checkAuth:e}=gn(Wd),t=vt(Ti.authStatus);return M.useEffect(()=>{e()},[t]),x.jsx(eS,{children:x.jsxs(qx,{children:[x.jsx(vr,{path:tt.Root,element:x.jsx(Md,{to:dS})}),Ii.map(r=>x.jsx(vr,{path:tt.Root+r.slug,element:x.jsx(XP,{citySlug:r.slug})},r.slug)),x.jsx(vr,{path:tt.Login,element:x.jsx(xC,{children:x.jsx(wC,{})})}),x.jsx(vr,{path:tt.Favorites,element:x.jsx(gC,{children:x.jsx(nC,{})})}),x.jsx(vr,{path:`${tt.Offer}/:offerId`,element:x.jsx(vC,{userAuth:ht.Auth})}),x.jsx(vr,{path:"/*",element:x.jsx(ty,{})})]})})}function oy(e,t){return function(){return e.apply(t,arguments)}}const{toString:EC}=Object.prototype,{getPrototypeOf:Gd}=Object,Zl=(e=>t=>{const r=EC.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),an=e=>(e=e.toLowerCase(),t=>Zl(t)===e),Hl=e=>t=>typeof t===e,{isArray:Ai}=Array,Ho=Hl("undefined");function PC(e){return e!==null&&!Ho(e)&&e.constructor!==null&&!Ho(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const sy=an("ArrayBuffer");function CC(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&sy(e.buffer),t}const TC=Hl("string"),Rt=Hl("function"),ay=Hl("number"),Wl=e=>e!==null&&typeof e=="object",kC=e=>e===!0||e===!1,la=e=>{if(Zl(e)!=="object")return!1;const t=Gd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},LC=an("Date"),NC=an("File"),OC=an("Blob"),MC=an("FileList"),RC=e=>Wl(e)&&Rt(e.pipe),zC=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rt(e.append)&&((t=Zl(e))==="formdata"||t==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"))},IC=an("URLSearchParams"),AC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xo(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),Ai(e))for(i=0,s=e.length;i0;)if(s=r[i],t===s.toLowerCase())return s;return null}const uy=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),cy=e=>!Ho(e)&&e!==uy;function Tf(){const{caseless:e}=cy(this)&&this||{},t={},r=(i,s)=>{const a=e&&ly(t,s)||s;la(t[a])&&la(i)?t[a]=Tf(t[a],i):la(i)?t[a]=Tf({},i):Ai(i)?t[a]=i.slice():t[a]=i};for(let i=0,s=arguments.length;i(Xo(t,(s,a)=>{r&&Rt(s)?e[a]=oy(s,r):e[a]=s},{allOwnKeys:i}),e),DC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),bC=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},BC=(e,t,r,i)=>{let s,a,u;const f={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!i||i(u,e,t))&&!f[u]&&(t[u]=e[u],f[u]=!0);e=r!==!1&&Gd(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},$C=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const i=e.indexOf(t,r);return i!==-1&&i===r},FC=e=>{if(!e)return null;if(Ai(e))return e;let t=e.length;if(!ay(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},UC=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Gd(Uint8Array)),ZC=(e,t)=>{const i=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=i.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},HC=(e,t)=>{let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},WC=an("HTMLFormElement"),VC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,s){return i.toUpperCase()+s}),Rm=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),KC=an("RegExp"),fy=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),i={};Xo(r,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(i[a]=u||s)}),Object.defineProperties(e,i)},qC=e=>{fy(e,(t,r)=>{if(Rt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=e[r];if(Rt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},GC=(e,t)=>{const r={},i=s=>{s.forEach(a=>{r[a]=!0})};return Ai(e)?i(e):i(String(e).split(t)),r},YC=()=>{},QC=(e,t)=>(e=+e,Number.isFinite(e)?e:t),pc="abcdefghijklmnopqrstuvwxyz",zm="0123456789",dy={DIGIT:zm,ALPHA:pc,ALPHA_DIGIT:pc+pc.toUpperCase()+zm},XC=(e=16,t=dy.ALPHA_DIGIT)=>{let r="";const{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r};function JC(e){return!!(e&&Rt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const eT=e=>{const t=new Array(10),r=(i,s)=>{if(Wl(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[s]=i;const a=Ai(i)?[]:{};return Xo(i,(u,f)=>{const d=r(u,s+1);!Ho(d)&&(a[f]=d)}),t[s]=void 0,a}}return i};return r(e,0)},tT=an("AsyncFunction"),nT=e=>e&&(Wl(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch),D={isArray:Ai,isArrayBuffer:sy,isBuffer:PC,isFormData:zC,isArrayBufferView:CC,isString:TC,isNumber:ay,isBoolean:kC,isObject:Wl,isPlainObject:la,isUndefined:Ho,isDate:LC,isFile:NC,isBlob:OC,isRegExp:KC,isFunction:Rt,isStream:RC,isURLSearchParams:IC,isTypedArray:UC,isFileList:MC,forEach:Xo,merge:Tf,extend:jC,trim:AC,stripBOM:DC,inherits:bC,toFlatObject:BC,kindOf:Zl,kindOfTest:an,endsWith:$C,toArray:FC,forEachEntry:ZC,matchAll:HC,isHTMLForm:WC,hasOwnProperty:Rm,hasOwnProp:Rm,reduceDescriptors:fy,freezeMethods:qC,toObjectSet:GC,toCamelCase:VC,noop:YC,toFiniteNumber:QC,findKey:ly,global:uy,isContextDefined:cy,ALPHABET:dy,generateString:XC,isSpecCompliantForm:JC,toJSONObject:eT,isAsyncFn:tT,isThenable:nT};function ue(e,t,r,i,s){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),r&&(this.config=r),i&&(this.request=i),s&&(this.response=s)}D.inherits(ue,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:D.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const hy=ue.prototype,py={};["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=>{py[e]={value:e}});Object.defineProperties(ue,py);Object.defineProperty(hy,"isAxiosError",{value:!0});ue.from=(e,t,r,i,s,a)=>{const u=Object.create(hy);return D.toFlatObject(e,u,function(d){return d!==Error.prototype},f=>f!=="isAxiosError"),ue.call(u,e.message,t,r,i,s),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};const rT=null;function kf(e){return D.isPlainObject(e)||D.isArray(e)}function my(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function Im(e,t,r){return e?e.concat(t).map(function(s,a){return s=my(s),!r&&a?"["+s+"]":s}).join(r?".":""):t}function iT(e){return D.isArray(e)&&!e.some(kf)}const oT=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function Vl(e,t,r){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=D.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,R){return!D.isUndefined(R[E])});const i=r.metaTokens,s=r.visitor||v,a=r.dots,u=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(s))throw new TypeError("visitor must be a function");function p(P){if(P===null)return"";if(D.isDate(P))return P.toISOString();if(!d&&D.isBlob(P))throw new ue("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(P)||D.isTypedArray(P)?d&&typeof Blob=="function"?new Blob([P]):Buffer.from(P):P}function v(P,E,R){let w=P;if(P&&!R&&typeof P=="object"){if(D.endsWith(E,"{}"))E=i?E:E.slice(0,-2),P=JSON.stringify(P);else if(D.isArray(P)&&iT(P)||(D.isFileList(P)||D.endsWith(E,"[]"))&&(w=D.toArray(P)))return E=my(E),w.forEach(function(y,N){!(D.isUndefined(y)||y===null)&&t.append(u===!0?Im([E],N,a):u===null?E:E+"[]",p(y))}),!1}return kf(P)?!0:(t.append(Im(R,E,a),p(P)),!1)}const _=[],S=Object.assign(oT,{defaultVisitor:v,convertValue:p,isVisitable:kf});function k(P,E){if(!D.isUndefined(P)){if(_.indexOf(P)!==-1)throw Error("Circular reference detected in "+E.join("."));_.push(P),D.forEach(P,function(w,g){(!(D.isUndefined(w)||w===null)&&s.call(t,w,D.isString(g)?g.trim():g,E,S))===!0&&k(w,E?E.concat(g):[g])}),_.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return k(e),t}function Am(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Yd(e,t){this._pairs=[],e&&Vl(e,this,t)}const _y=Yd.prototype;_y.append=function(t,r){this._pairs.push([t,r])};_y.toString=function(t){const r=t?function(i){return t.call(this,i,Am)}:Am;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function sT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vy(e,t,r){if(!t)return e;const i=r&&r.encode||sT,s=r&&r.serialize;let a;if(s?a=s(t,r):a=D.isURLSearchParams(t)?t.toString():new Yd(t,r).toString(i),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class aT{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(i){i!==null&&t(i)})}}const jm=aT,gy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lT=typeof URLSearchParams<"u"?URLSearchParams:Yd,uT=typeof FormData<"u"?FormData:null,cT=typeof Blob<"u"?Blob:null,fT={isBrowser:!0,classes:{URLSearchParams:lT,FormData:uT,Blob:cT},protocols:["http","https","file","blob","url","data"]},yy=typeof window<"u"&&typeof document<"u",dT=(e=>yy&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),hT=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),pT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:yy,hasStandardBrowserEnv:dT,hasStandardBrowserWebWorkerEnv:hT},Symbol.toStringTag,{value:"Module"})),rn={...pT,...fT};function mT(e,t){return Vl(e,new rn.classes.URLSearchParams,Object.assign({visitor:function(r,i,s,a){return rn.isNode&&D.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function _T(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function vT(e){const t={},r=Object.keys(e);let i;const s=r.length;let a;for(i=0;i=r.length;return u=!u&&D.isArray(s)?s.length:u,d?(D.hasOwnProp(s,u)?s[u]=[s[u],i]:s[u]=i,!f):((!s[u]||!D.isObject(s[u]))&&(s[u]=[]),t(r,i,s[u],a)&&D.isArray(s[u])&&(s[u]=vT(s[u])),!f)}if(D.isFormData(e)&&D.isFunction(e.entries)){const r={};return D.forEachEntry(e,(i,s)=>{t(_T(i),s,r,0)}),r}return null}function gT(e,t,r){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}const Qd={transitional:gy,adapter:["xhr","http"],transformRequest:[function(t,r){const i=r.getContentType()||"",s=i.indexOf("application/json")>-1,a=D.isObject(t);if(a&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return s?JSON.stringify(wy(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return mT(t,this.formSerializer).toString();if((f=D.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Vl(f?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(r.setContentType("application/json",!1),gT(t)):t}],transformResponse:[function(t){const r=this.transitional||Qd.transitional,i=r&&r.forcedJSONParsing,s=this.responseType==="json";if(t&&D.isString(t)&&(i&&!this.responseType||s)){const u=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(f){if(u)throw f.name==="SyntaxError"?ue.from(f,ue.ERR_BAD_RESPONSE,this,null,this.response):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],e=>{Qd.headers[e]={}});const Xd=Qd,yT=D.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"]),wT=e=>{const t={};let r,i,s;return e&&e.split(` -`).forEach(function(u){s=u.indexOf(":"),r=u.substring(0,s).trim().toLowerCase(),i=u.substring(s+1).trim(),!(!r||t[r]&&yT[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t},Dm=Symbol("internals");function io(e){return e&&String(e).trim().toLowerCase()}function ua(e){return e===!1||e==null?e:D.isArray(e)?e.map(ua):String(e)}function xT(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}const ST=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function mc(e,t,r,i,s){if(D.isFunction(i))return i.call(this,t,r);if(s&&(t=r),!!D.isString(t)){if(D.isString(i))return t.indexOf(i)!==-1;if(D.isRegExp(i))return i.test(t)}}function ET(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function PT(e,t){const r=D.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(s,a,u){return this[i].call(this,t,s,a,u)},configurable:!0})})}class Kl{constructor(t){t&&this.set(t)}set(t,r,i){const s=this;function a(f,d,p){const v=io(d);if(!v)throw new Error("header name must be a non-empty string");const _=D.findKey(s,v);(!_||s[_]===void 0||p===!0||p===void 0&&s[_]!==!1)&&(s[_||d]=ua(f))}const u=(f,d)=>D.forEach(f,(p,v)=>a(p,v,d));return D.isPlainObject(t)||t instanceof this.constructor?u(t,r):D.isString(t)&&(t=t.trim())&&!ST(t)?u(wT(t),r):t!=null&&a(r,t,i),this}get(t,r){if(t=io(t),t){const i=D.findKey(this,t);if(i){const s=this[i];if(!r)return s;if(r===!0)return xT(s);if(D.isFunction(r))return r.call(this,s,i);if(D.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=io(t),t){const i=D.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||mc(this,this[i],i,r)))}return!1}delete(t,r){const i=this;let s=!1;function a(u){if(u=io(u),u){const f=D.findKey(i,u);f&&(!r||mc(i,i[f],f,r))&&(delete i[f],s=!0)}}return D.isArray(t)?t.forEach(a):a(t),s}clear(t){const r=Object.keys(this);let i=r.length,s=!1;for(;i--;){const a=r[i];(!t||mc(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const r=this,i={};return D.forEach(this,(s,a)=>{const u=D.findKey(i,a);if(u){r[u]=ua(s),delete r[a];return}const f=t?ET(a):String(a).trim();f!==a&&delete r[a],r[f]=ua(s),i[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return D.forEach(this,(i,s)=>{i!=null&&i!==!1&&(r[s]=t&&D.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const i=new this(t);return r.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[Dm]=this[Dm]={accessors:{}}).accessors,s=this.prototype;function a(u){const f=io(u);i[f]||(PT(s,u),i[f]=!0)}return D.isArray(t)?t.forEach(a):a(t),this}}Kl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(Kl.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});D.freezeMethods(Kl);const xn=Kl;function _c(e,t){const r=this||Xd,i=t||r,s=xn.from(i.headers);let a=i.data;return D.forEach(e,function(f){a=f.call(r,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function xy(e){return!!(e&&e.__CANCEL__)}function Jo(e,t,r){ue.call(this,e??"canceled",ue.ERR_CANCELED,t,r),this.name="CanceledError"}D.inherits(Jo,ue,{__CANCEL__:!0});function CT(e,t,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new ue("Request failed with status code "+r.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const TT=rn.hasStandardBrowserEnv?{write(e,t,r,i,s,a){const u=[e+"="+encodeURIComponent(t)];D.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),D.isString(i)&&u.push("path="+i),D.isString(s)&&u.push("domain="+s),a===!0&&u.push("secure"),document.cookie=u.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(){return null},remove(){}};function kT(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function LT(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Sy(e,t){return e&&!kT(t)?LT(e,t):t}const NT=rn.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let i;function s(a){let u=a;return t&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=s(window.location.href),function(u){const f=D.isString(u)?s(u):u;return f.protocol===i.protocol&&f.host===i.host}}():function(){return function(){return!0}}();function OT(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function MT(e,t){e=e||10;const r=new Array(e),i=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const p=Date.now(),v=i[a];u||(u=p),r[s]=d,i[s]=p;let _=a,S=0;for(;_!==s;)S+=r[_++],_=_%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),p-u{const a=s.loaded,u=s.lengthComputable?s.total:void 0,f=a-r,d=i(f),p=a<=u;r=a;const v={loaded:a,total:u,progress:u?a/u:void 0,bytes:f,rate:d||void 0,estimated:d&&u&&p?(u-a)/d:void 0,event:s};v[t?"download":"upload"]=!0,e(v)}}const RT=typeof XMLHttpRequest<"u",zT=RT&&function(e){return new Promise(function(r,i){let s=e.data;const a=xn.from(e.headers).normalize();let{responseType:u,withXSRFToken:f}=e,d;function p(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}let v;if(D.isFormData(s)){if(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((v=a.getContentType())!==!1){const[E,...R]=v?v.split(";").map(w=>w.trim()).filter(Boolean):[];a.setContentType([E||"multipart/form-data",...R].join("; "))}}let _=new XMLHttpRequest;if(e.auth){const E=e.auth.username||"",R=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(E+":"+R))}const S=Sy(e.baseURL,e.url);_.open(e.method.toUpperCase(),vy(S,e.params,e.paramsSerializer),!0),_.timeout=e.timeout;function k(){if(!_)return;const E=xn.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),w={data:!u||u==="text"||u==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:E,config:e,request:_};CT(function(y){r(y),p()},function(y){i(y),p()},w),_=null}if("onloadend"in _?_.onloadend=k:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(k)},_.onabort=function(){_&&(i(new ue("Request aborted",ue.ECONNABORTED,e,_)),_=null)},_.onerror=function(){i(new ue("Network Error",ue.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const w=e.transitional||gy;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),i(new ue(R,w.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,e,_)),_=null},rn.hasStandardBrowserEnv&&(f&&D.isFunction(f)&&(f=f(e)),f||f!==!1&&NT(S))){const E=e.xsrfHeaderName&&e.xsrfCookieName&&TT.read(e.xsrfCookieName);E&&a.set(e.xsrfHeaderName,E)}s===void 0&&a.setContentType(null),"setRequestHeader"in _&&D.forEach(a.toJSON(),function(R,w){_.setRequestHeader(w,R)}),D.isUndefined(e.withCredentials)||(_.withCredentials=!!e.withCredentials),u&&u!=="json"&&(_.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&_.addEventListener("progress",bm(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&_.upload&&_.upload.addEventListener("progress",bm(e.onUploadProgress)),(e.cancelToken||e.signal)&&(d=E=>{_&&(i(!E||E.type?new Jo(null,e,_):E),_.abort(),_=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d)));const P=OT(S);if(P&&rn.protocols.indexOf(P)===-1){i(new ue("Unsupported protocol "+P+":",ue.ERR_BAD_REQUEST,e));return}_.send(s||null)})},Lf={http:rT,xhr:zT};D.forEach(Lf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Bm=e=>`- ${e}`,IT=e=>D.isFunction(e)||e===null||e===!1,Ey={getAdapter:e=>{e=D.isArray(e)?e:[e];const{length:t}=e;let r,i;const s={};for(let a=0;a`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let u=t?a.length>1?`since : +***************************************************************************** */var tr=function(){return tr=Object.assign||function(t){for(var r,i=1,s=arguments.length;icrypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");function YP(){const e=Array.from({length:aS},()=>qP());return x.jsxs("section",{className:"cities__places places",children:[x.jsx("h2",{className:"visually-hidden",children:"Places"}),x.jsx("div",{style:{width:"100%"},children:x.jsxs(ey,{speed:2,width:572,height:120,viewBox:"0 0 572 120",backgroundColor:"#f5f5f5",foregroundColor:"#ecebeb",children:[x.jsx("rect",{x:"2",y:"20",rx:"8",ry:"8",width:"450",height:"28"}),x.jsx("rect",{x:"2",y:"70",rx:"4",ry:"4",width:"100",height:"14"})]})}),x.jsx("div",{className:"cities__places-list places__list tabs__content",children:e.map(t=>x.jsx(GP,{},t))})]})}function QP({offersByCity:e,city:t}){const[r,i]=M.useState(FP),{setActiveOffer:s}=gn(Vd),a=Mt(Ka.status),u=UP(r,e);return a===we.Loading?x.jsx(YP,{}):x.jsxs("section",{className:"cities__places places",children:[x.jsx("h2",{className:"visually-hidden",children:"Places"}),x.jsxs("b",{className:"places__found",children:[e.length," place",e.length>1&&"s"," to stay in ",t==null?void 0:t.name]}),x.jsx(HP,{activeSortOption:r,setActiveSortOption:i}),x.jsx("div",{className:"cities__places-list places__list tabs__content",children:u.map(f=>x.jsx(Gd,{componentType:"cities",offer:f,hoverHandler:()=>s(f)},f.id))})]})}function XP({title:e="Main",citySlug:t}){Qo(e);const{fetchOffers:r}=gn(Vd),i=Mt(Ka.status);M.useEffect(()=>{i===we.Idle&&r().unwrap().catch(f=>{ge.warning(f.message)})},[i,r]);const s=Mt(Ka.offers),a=zi.find(f=>f.slug===t);if(!a)return null;const u=s.filter(f=>f.city.name===a.name);return x.jsxs("div",{className:"page page--gray page--main",children:[x.jsx(Ul,{}),x.jsxs("main",{className:"page__main page__main--index",children:[x.jsx("h1",{className:"visually-hidden",children:"Cities"}),x.jsx("div",{className:"tabs",children:x.jsx("section",{className:"locations container",children:x.jsx("ul",{className:"locations__list tabs__list",children:x.jsx(zP,{})})})}),x.jsx("div",{className:"cities",children:x.jsxs("div",{className:"cities__places-container container",children:[x.jsx(QP,{offersByCity:u,city:a}),x.jsx("div",{className:"cities__right-section",children:a&&x.jsx(Yg,{container:"cities",city:a,offers:u})})]})})]})]})}const JP="_container_e270g_1",eC={container:JP};function ty({title:e="404"}){return Qo(e),x.jsxs("div",{className:"page page--gray",children:[x.jsx("header",{className:"header",children:x.jsx("div",{className:"container",children:x.jsx("div",{className:"header__wrapper",children:x.jsx("div",{className:"header__left",children:x.jsx(Rd,{})})})})}),x.jsxs("main",{className:eC.container,children:[x.jsxs("h1",{children:["Ошибка 404. ",x.jsx("br",{}),"Страница не найдена 😕"]}),x.jsxs(Tn,{to:"/",className:"locations__item-link",children:[" ","<- Вернуться на главную страницу"]})]})]})}function ny(){return x.jsx("footer",{className:"footer container",children:x.jsx(Tn,{className:"footer__logo-link",to:tt.Root,children:x.jsx("img",{className:"footer__logo",src:"img/logo.svg",alt:"6 cities logo",width:"64",height:"33"})})})}function tC(){return x.jsxs("div",{className:"page page--favorites-empty",children:[x.jsx(Ul,{}),x.jsx("main",{className:"page__main page__main--favorites page__main--favorites-empty",children:x.jsx("div",{className:"page__favorites-container container",children:x.jsxs("section",{className:"favorites favorites--empty",children:[x.jsx("h1",{className:"visually-hidden",children:"Favorites (empty)"}),x.jsxs("div",{className:"favorites__status-wrapper",children:[x.jsx("b",{className:"favorites__status",children:"Nothing yet saved."}),x.jsx("p",{className:"favorites__status-description",children:"Save properties to narrow down search or plan your future trips."})]})]})})}),x.jsx(ny,{})]})}function nC({title:e="Favorites"}){Qo(e);const t=[];return t.length?x.jsxs("div",{className:"page",children:[x.jsx(Ul,{}),x.jsx("main",{className:"page__main page__main--favorites",children:x.jsx("div",{className:"page__favorites-container container",children:x.jsxs("section",{className:"favorites",children:[x.jsx("h1",{className:"favorites__title",children:"Saved listing"}),x.jsx("ul",{className:"favorites__list",children:x.jsxs("li",{className:"favorites__locations-items",children:[x.jsx("div",{className:"favorites__locations locations locations--current",children:x.jsx("div",{className:"locations__item",children:x.jsx(Tn,{className:"locations__item-link",to:`${tt.Root}`,children:x.jsx("span",{children:"Amsterdam"})})})}),x.jsx("div",{className:"favorites__places",children:t.map(r=>x.jsx(Gd,{componentType:"favorites",offer:r},r.id))})]})})]})})}),x.jsx(ny,{})]}):x.jsx(tC,{})}function rC({host:e,description:t}){const{name:r,avatarUrl:i,isPro:s}=e;return x.jsxs("div",{className:"offer__host",children:[x.jsx("h2",{className:"offer__host-title",children:"Meet the host"}),x.jsxs("div",{className:"offer__host-user user",children:[x.jsx("div",{className:Zo("offer__avatar-wrapper user__avatar-wrapper",s&&"offer__avatar-wrapper--pro"),children:x.jsx("img",{className:"offer__avatar user__avatar",src:i,width:"74",height:"74",alt:"Host avatar"})}),x.jsx("span",{className:"offer__user-name",children:r}),s&&x.jsx("span",{className:"offer__user-status",children:"Pro"})]}),x.jsx("div",{className:"offer__description",children:x.jsx("p",{className:"offer__text",children:t})})]})}var ry={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Hm,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",u="second",f="minute",d="hour",p="day",v="week",_="month",S="quarter",k="year",P="date",E="Invalid Date",R=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var W=["th","st","nd","rd"],F=Y%100;return"["+Y+(W[(F-20)%10]||W[F]||W[0])+"]"}},y=function(Y,W,F){var K=String(Y);return!K||K.length>=W?Y:""+Array(W+1-K.length).join(F)+Y},N={s:y,z:function(Y){var W=-Y.utcOffset(),F=Math.abs(W),K=Math.floor(F/60),T=F%60;return(W<=0?"+":"-")+y(K,2,"0")+":"+y(T,2,"0")},m:function Y(W,F){if(W.date()1)return Y(A[0])}else{var H=W.name;b[H]=W,T=H}return!K&&T&&(j=T),T||!K&&j},V=function(Y,W){if(I(Y))return Y.clone();var F=typeof W=="object"?W:{};return F.date=Y,F.args=arguments,new le(F)},q=N;q.l=X,q.i=I,q.w=function(Y,W){return V(Y,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var le=function(){function Y(F){this.$L=X(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[B]=!0}var W=Y.prototype;return W.parse=function(F){this.$d=function(K){var T=K.date,U=K.utc;if(T===null)return new Date(NaN);if(q.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var A=T.match(R);if(A){var H=A[2]-1||0,J=(A[7]||"0").substring(0,3);return U?new Date(Date.UTC(A[1],H,A[3]||1,A[4]||0,A[5]||0,A[6]||0,J)):new Date(A[1],H,A[3]||1,A[4]||0,A[5]||0,A[6]||0,J)}}return new Date(T)}(F),this.init()},W.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},W.$utils=function(){return q},W.isValid=function(){return this.$d.toString()!==E},W.isSame=function(F,K){var T=V(F);return this.startOf(K)<=T&&T<=this.endOf(K)},W.isAfter=function(F,K){return V(F)r(t),htmlFor:`${t}-stars`,className:"reviews__rating-label form__rating-label",title:e,children:x.jsx("svg",{className:"form__star-image",width:"37",height:"33",children:x.jsx("use",{xlinkHref:"#icon-star"})})})]})}function aC(){const[e,t]=M.useState(0),[r,i]=M.useState(""),s=a=>{a.preventDefault()};return x.jsxs("form",{onSubmit:a=>s(a),className:"reviews__form form",action:"#",method:"post",children:[x.jsx("label",{className:"reviews__label form__label",htmlFor:"review",children:"Your review"}),x.jsx("div",{className:"reviews__rating-form form__rating",children:Object.entries(uS).map(([a,u])=>x.jsx(sC,{onClickHandle:t,starTitle:a,starValue:u},a))}),x.jsx("textarea",{onChange:a=>i(a.target.value),className:"reviews__textarea form__textarea",id:"review",name:"review",placeholder:"Tell how was your stay, what you like and what can be improved"}),x.jsxs("div",{className:"reviews__button-wrapper",children:[x.jsxs("p",{className:"reviews__help",children:["To submit review please make sure to set ",x.jsx("span",{className:"reviews__star",children:"rating"})," and describe your stay with at least ",x.jsx("b",{className:"reviews__text-amount",children:"50 characters"}),"."]}),x.jsx("button",{className:"reviews__submit form__submit button",type:"submit",disabled:r.length{e.addCase(oa.pending,t=>{t.status=we.Loading}),e.addCase(oa.fulfilled,(t,r)=>{t.offerFullInfo=r.payload,t.status=we.Succeed}),e.addCase(oa.rejected,t=>{t.status=we.Failed})},selectors:{offerFullInfo:e=>e.offerFullInfo,status:e=>e.status}}),uC={...Ga.actions,fetchOfferFullInfo:oa},cC=Ga.selectors,fC={offersNear:[],status:we.Idle},qa=Yo({name:"offersNear",initialState:fC,reducers:{},extraReducers:e=>{e.addCase(sa.pending,t=>{t.status=we.Loading}),e.addCase(sa.fulfilled,(t,r)=>{t.offersNear=r.payload,t.status=we.Succeed}),e.addCase(sa.rejected,t=>{t.status=we.Failed})},selectors:{offersNear:e=>e.offersNear,status:e=>e.status}}),dC={...qa.actions,fetchOffersNear:sa},hC=qa.selectors,pC={comments:[],status:we.Idle},Ya=Yo({name:"comments",initialState:pC,reducers:{},extraReducers:e=>{e.addCase(aa.pending,t=>{t.status=we.Loading}),e.addCase(aa.fulfilled,(t,r)=>{t.comments=r.payload,t.status=we.Succeed}),e.addCase(aa.rejected,t=>{t.status=we.Failed})},selectors:{comments:e=>e.comments,status:e=>e.status}}),mC={...Ya.actions,fetchComments:aa},_C=Ya.selectors;function vC({title:e="Offer",userAuth:t}){Qo(e);const{setActiveOffer:r}=gn(Vd),{fetchOfferFullInfo:i}=gn(uC),{fetchOffersNear:s}=gn(dC),{fetchComments:a}=gn(mC),{offerId:u}=Ix();M.useEffect(()=>{u&&Promise.all([i(u),s(u),a(u)])},[i,s,a,u]);const f=Mt(cC.offerFullInfo),d=Mt(hC.offersNear),p=Mt(_C.comments);if(!f)return x.jsx(ty,{});const{images:v,isPremium:_,isFavorite:S,rating:k,type:P,bedrooms:E,maxAdults:R,price:w,goods:g,host:y,description:N,city:j}=f,b=zi.find(B=>B.name===j.name);return x.jsxs("div",{className:"page",children:[x.jsx(Ul,{}),x.jsxs("main",{className:"page__main page__main--offer",children:[x.jsxs("section",{className:"offer",children:[x.jsx("div",{className:"offer__gallery-container container",children:x.jsx("div",{className:"offer__gallery",children:v.map(B=>x.jsx("div",{className:"offer__image-wrapper",children:x.jsx("img",{className:"offer__image",src:B,alt:"Photo studio"})},B))})}),x.jsx("div",{className:"offer__container container",children:x.jsxs("div",{className:"offer__wrapper",children:[_&&x.jsx("div",{className:"offer__mark",children:x.jsx("span",{children:"Premium"})}),x.jsxs("div",{className:"offer__name-wrapper",children:[x.jsx("h1",{className:"offer__name",children:f.title}),x.jsx(Qg,{componentType:"offer",isFavorite:S})]}),x.jsx(Kd,{componentType:"offer",rating:k}),x.jsxs("ul",{className:"offer__features",children:[x.jsx("li",{className:"offer__feature offer__feature--entire",children:$P(P)}),x.jsxs("li",{className:"offer__feature offer__feature--bedrooms",children:[E," Bedrooms"]}),x.jsxs("li",{className:"offer__feature offer__feature--adults",children:["Max ",R," adults"]})]}),x.jsxs("div",{className:"offer__price",children:[x.jsxs("b",{className:"offer__price-value",children:["€",w]}),x.jsx("span",{className:"offer__price-text",children:" night"})]}),x.jsxs("div",{className:"offer__inside",children:[x.jsx("h2",{className:"offer__inside-title",children:"What's inside"}),x.jsx("ul",{className:"offer__inside-list",children:g.map(B=>x.jsx("li",{className:"offer__inside-item",children:B},B))})]}),x.jsx(rC,{host:y,description:N}),x.jsxs("section",{className:"offer__reviews reviews",children:[x.jsxs("h2",{className:"reviews__title",children:["Reviews · ",x.jsx("span",{className:"reviews__amount",children:p.length})]}),x.jsx("ul",{className:"reviews__list",children:p.length>0&&p.map(B=>x.jsx(oC,{review:B},B.id))}),t===ht.Auth&&x.jsx(aC,{})]})]})}),b&&x.jsx(Yg,{container:"offer",city:b,offers:d})]}),x.jsx("div",{className:"container",children:x.jsxs("section",{className:"near-places places",children:[x.jsx("h2",{className:"near-places__title",children:"Other places in the neighbourhood"}),x.jsx("div",{className:"near-places__list places__list",children:d.map(B=>x.jsx(Gd,{offer:B,componentType:"near-places",hoverHandler:()=>r(B)},B.id))})]})})]})]})}function gC({children:e}){return Mt($o.authStatus)===ht.Auth?e:x.jsx(Md,{to:tt.Login})}function yC(){const[e,t]=M.useState(""),[r,i]=M.useState(""),{login:s}=gn(Wd),a=u=>{u.preventDefault(),ge.promise(s({email:e,password:r}).unwrap(),{pending:"Loading",success:"Success",error:"Error"})};return x.jsxs("form",{onSubmit:u=>a(u),className:"login__form form",action:"#",method:"post",children:[x.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[x.jsx("label",{className:"visually-hidden",children:"E-mail"}),x.jsx("input",{onChange:u=>t(u.target.value),className:"login__input form__input",type:"email",name:"email",placeholder:"Email",required:!0})]}),x.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[x.jsx("label",{className:"visually-hidden",children:"Password"}),x.jsx("input",{onChange:u=>i(u.target.value),className:"login__input form__input",type:"password",name:"password",placeholder:"Password",required:!0})]}),x.jsx("button",{className:"login__submit form__submit button",type:"submit",children:"Sign in"})]})}function wC({title:e="Login"}){return Qo(e),x.jsxs("div",{className:"page page--gray page--login",children:[x.jsx("header",{className:"header",children:x.jsx("div",{className:"container",children:x.jsx("div",{className:"header__wrapper",children:x.jsx("div",{className:"header__left",children:x.jsx(Rd,{})})})})}),x.jsx("main",{className:"page__main page__main--login",children:x.jsxs("div",{className:"page__login-container container",children:[x.jsxs("section",{className:"login",children:[x.jsx("h1",{className:"login__title",children:"Sign in"}),x.jsx(yC,{})]}),x.jsx("section",{className:"locations locations--login locations--current",children:x.jsx("div",{className:"locations__item",children:x.jsx("a",{className:"locations__item-link",href:"#",children:x.jsx("span",{children:"Amsterdam"})})})})]})})]})}function xC({children:e}){return Mt($o.authStatus)===ht.Auth?x.jsx(Md,{to:tt.Root}):e}function SC(){const{checkAuth:e}=gn(Wd),t=Mt($o.authStatus);return M.useEffect(()=>{e()},[t]),x.jsx(eS,{children:x.jsxs(Gx,{children:[x.jsx(vr,{path:tt.Root,element:x.jsx(Md,{to:dS})}),zi.map(r=>x.jsx(vr,{path:tt.Root+r.slug,element:x.jsx(XP,{citySlug:r.slug})},r.slug)),x.jsx(vr,{path:tt.Login,element:x.jsx(xC,{children:x.jsx(wC,{})})}),x.jsx(vr,{path:tt.Favorites,element:x.jsx(gC,{children:x.jsx(nC,{})})}),x.jsx(vr,{path:`${tt.Offer}/:offerId`,element:x.jsx(vC,{userAuth:ht.Auth})}),x.jsx(vr,{path:"/*",element:x.jsx(ty,{})})]})})}function oy(e,t){return function(){return e.apply(t,arguments)}}const{toString:EC}=Object.prototype,{getPrototypeOf:qd}=Object,Zl=(e=>t=>{const r=EC.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),an=e=>(e=e.toLowerCase(),t=>Zl(t)===e),Hl=e=>t=>typeof t===e,{isArray:Ii}=Array,Ho=Hl("undefined");function PC(e){return e!==null&&!Ho(e)&&e.constructor!==null&&!Ho(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const sy=an("ArrayBuffer");function CC(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&sy(e.buffer),t}const TC=Hl("string"),Rt=Hl("function"),ay=Hl("number"),Wl=e=>e!==null&&typeof e=="object",kC=e=>e===!0||e===!1,la=e=>{if(Zl(e)!=="object")return!1;const t=qd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},LC=an("Date"),NC=an("File"),OC=an("Blob"),MC=an("FileList"),RC=e=>Wl(e)&&Rt(e.pipe),zC=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rt(e.append)&&((t=Zl(e))==="formdata"||t==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"))},IC=an("URLSearchParams"),AC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xo(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),Ii(e))for(i=0,s=e.length;i0;)if(s=r[i],t===s.toLowerCase())return s;return null}const uy=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),cy=e=>!Ho(e)&&e!==uy;function Tf(){const{caseless:e}=cy(this)&&this||{},t={},r=(i,s)=>{const a=e&&ly(t,s)||s;la(t[a])&&la(i)?t[a]=Tf(t[a],i):la(i)?t[a]=Tf({},i):Ii(i)?t[a]=i.slice():t[a]=i};for(let i=0,s=arguments.length;i(Xo(t,(s,a)=>{r&&Rt(s)?e[a]=oy(s,r):e[a]=s},{allOwnKeys:i}),e),DC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),bC=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},BC=(e,t,r,i)=>{let s,a,u;const f={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!i||i(u,e,t))&&!f[u]&&(t[u]=e[u],f[u]=!0);e=r!==!1&&qd(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},$C=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const i=e.indexOf(t,r);return i!==-1&&i===r},FC=e=>{if(!e)return null;if(Ii(e))return e;let t=e.length;if(!ay(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},UC=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&qd(Uint8Array)),ZC=(e,t)=>{const i=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=i.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},HC=(e,t)=>{let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},WC=an("HTMLFormElement"),VC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,s){return i.toUpperCase()+s}),Rm=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),KC=an("RegExp"),fy=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),i={};Xo(r,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(i[a]=u||s)}),Object.defineProperties(e,i)},GC=e=>{fy(e,(t,r)=>{if(Rt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=e[r];if(Rt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},qC=(e,t)=>{const r={},i=s=>{s.forEach(a=>{r[a]=!0})};return Ii(e)?i(e):i(String(e).split(t)),r},YC=()=>{},QC=(e,t)=>(e=+e,Number.isFinite(e)?e:t),pc="abcdefghijklmnopqrstuvwxyz",zm="0123456789",dy={DIGIT:zm,ALPHA:pc,ALPHA_DIGIT:pc+pc.toUpperCase()+zm},XC=(e=16,t=dy.ALPHA_DIGIT)=>{let r="";const{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r};function JC(e){return!!(e&&Rt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const eT=e=>{const t=new Array(10),r=(i,s)=>{if(Wl(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[s]=i;const a=Ii(i)?[]:{};return Xo(i,(u,f)=>{const d=r(u,s+1);!Ho(d)&&(a[f]=d)}),t[s]=void 0,a}}return i};return r(e,0)},tT=an("AsyncFunction"),nT=e=>e&&(Wl(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch),D={isArray:Ii,isArrayBuffer:sy,isBuffer:PC,isFormData:zC,isArrayBufferView:CC,isString:TC,isNumber:ay,isBoolean:kC,isObject:Wl,isPlainObject:la,isUndefined:Ho,isDate:LC,isFile:NC,isBlob:OC,isRegExp:KC,isFunction:Rt,isStream:RC,isURLSearchParams:IC,isTypedArray:UC,isFileList:MC,forEach:Xo,merge:Tf,extend:jC,trim:AC,stripBOM:DC,inherits:bC,toFlatObject:BC,kindOf:Zl,kindOfTest:an,endsWith:$C,toArray:FC,forEachEntry:ZC,matchAll:HC,isHTMLForm:WC,hasOwnProperty:Rm,hasOwnProp:Rm,reduceDescriptors:fy,freezeMethods:GC,toObjectSet:qC,toCamelCase:VC,noop:YC,toFiniteNumber:QC,findKey:ly,global:uy,isContextDefined:cy,ALPHABET:dy,generateString:XC,isSpecCompliantForm:JC,toJSONObject:eT,isAsyncFn:tT,isThenable:nT};function ue(e,t,r,i,s){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),r&&(this.config=r),i&&(this.request=i),s&&(this.response=s)}D.inherits(ue,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:D.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const hy=ue.prototype,py={};["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=>{py[e]={value:e}});Object.defineProperties(ue,py);Object.defineProperty(hy,"isAxiosError",{value:!0});ue.from=(e,t,r,i,s,a)=>{const u=Object.create(hy);return D.toFlatObject(e,u,function(d){return d!==Error.prototype},f=>f!=="isAxiosError"),ue.call(u,e.message,t,r,i,s),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};const rT=null;function kf(e){return D.isPlainObject(e)||D.isArray(e)}function my(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function Im(e,t,r){return e?e.concat(t).map(function(s,a){return s=my(s),!r&&a?"["+s+"]":s}).join(r?".":""):t}function iT(e){return D.isArray(e)&&!e.some(kf)}const oT=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function Vl(e,t,r){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=D.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,R){return!D.isUndefined(R[E])});const i=r.metaTokens,s=r.visitor||v,a=r.dots,u=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(s))throw new TypeError("visitor must be a function");function p(P){if(P===null)return"";if(D.isDate(P))return P.toISOString();if(!d&&D.isBlob(P))throw new ue("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(P)||D.isTypedArray(P)?d&&typeof Blob=="function"?new Blob([P]):Buffer.from(P):P}function v(P,E,R){let w=P;if(P&&!R&&typeof P=="object"){if(D.endsWith(E,"{}"))E=i?E:E.slice(0,-2),P=JSON.stringify(P);else if(D.isArray(P)&&iT(P)||(D.isFileList(P)||D.endsWith(E,"[]"))&&(w=D.toArray(P)))return E=my(E),w.forEach(function(y,N){!(D.isUndefined(y)||y===null)&&t.append(u===!0?Im([E],N,a):u===null?E:E+"[]",p(y))}),!1}return kf(P)?!0:(t.append(Im(R,E,a),p(P)),!1)}const _=[],S=Object.assign(oT,{defaultVisitor:v,convertValue:p,isVisitable:kf});function k(P,E){if(!D.isUndefined(P)){if(_.indexOf(P)!==-1)throw Error("Circular reference detected in "+E.join("."));_.push(P),D.forEach(P,function(w,g){(!(D.isUndefined(w)||w===null)&&s.call(t,w,D.isString(g)?g.trim():g,E,S))===!0&&k(w,E?E.concat(g):[g])}),_.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return k(e),t}function Am(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Yd(e,t){this._pairs=[],e&&Vl(e,this,t)}const _y=Yd.prototype;_y.append=function(t,r){this._pairs.push([t,r])};_y.toString=function(t){const r=t?function(i){return t.call(this,i,Am)}:Am;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function sT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vy(e,t,r){if(!t)return e;const i=r&&r.encode||sT,s=r&&r.serialize;let a;if(s?a=s(t,r):a=D.isURLSearchParams(t)?t.toString():new Yd(t,r).toString(i),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class aT{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(i){i!==null&&t(i)})}}const jm=aT,gy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lT=typeof URLSearchParams<"u"?URLSearchParams:Yd,uT=typeof FormData<"u"?FormData:null,cT=typeof Blob<"u"?Blob:null,fT={isBrowser:!0,classes:{URLSearchParams:lT,FormData:uT,Blob:cT},protocols:["http","https","file","blob","url","data"]},yy=typeof window<"u"&&typeof document<"u",dT=(e=>yy&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),hT=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),pT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:yy,hasStandardBrowserEnv:dT,hasStandardBrowserWebWorkerEnv:hT},Symbol.toStringTag,{value:"Module"})),rn={...pT,...fT};function mT(e,t){return Vl(e,new rn.classes.URLSearchParams,Object.assign({visitor:function(r,i,s,a){return rn.isNode&&D.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function _T(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function vT(e){const t={},r=Object.keys(e);let i;const s=r.length;let a;for(i=0;i=r.length;return u=!u&&D.isArray(s)?s.length:u,d?(D.hasOwnProp(s,u)?s[u]=[s[u],i]:s[u]=i,!f):((!s[u]||!D.isObject(s[u]))&&(s[u]=[]),t(r,i,s[u],a)&&D.isArray(s[u])&&(s[u]=vT(s[u])),!f)}if(D.isFormData(e)&&D.isFunction(e.entries)){const r={};return D.forEachEntry(e,(i,s)=>{t(_T(i),s,r,0)}),r}return null}function gT(e,t,r){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}const Qd={transitional:gy,adapter:["xhr","http"],transformRequest:[function(t,r){const i=r.getContentType()||"",s=i.indexOf("application/json")>-1,a=D.isObject(t);if(a&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return s?JSON.stringify(wy(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return mT(t,this.formSerializer).toString();if((f=D.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Vl(f?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(r.setContentType("application/json",!1),gT(t)):t}],transformResponse:[function(t){const r=this.transitional||Qd.transitional,i=r&&r.forcedJSONParsing,s=this.responseType==="json";if(t&&D.isString(t)&&(i&&!this.responseType||s)){const u=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(f){if(u)throw f.name==="SyntaxError"?ue.from(f,ue.ERR_BAD_RESPONSE,this,null,this.response):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],e=>{Qd.headers[e]={}});const Xd=Qd,yT=D.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"]),wT=e=>{const t={};let r,i,s;return e&&e.split(` +`).forEach(function(u){s=u.indexOf(":"),r=u.substring(0,s).trim().toLowerCase(),i=u.substring(s+1).trim(),!(!r||t[r]&&yT[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t},Dm=Symbol("internals");function ro(e){return e&&String(e).trim().toLowerCase()}function ua(e){return e===!1||e==null?e:D.isArray(e)?e.map(ua):String(e)}function xT(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}const ST=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function mc(e,t,r,i,s){if(D.isFunction(i))return i.call(this,t,r);if(s&&(t=r),!!D.isString(t)){if(D.isString(i))return t.indexOf(i)!==-1;if(D.isRegExp(i))return i.test(t)}}function ET(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function PT(e,t){const r=D.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(s,a,u){return this[i].call(this,t,s,a,u)},configurable:!0})})}class Kl{constructor(t){t&&this.set(t)}set(t,r,i){const s=this;function a(f,d,p){const v=ro(d);if(!v)throw new Error("header name must be a non-empty string");const _=D.findKey(s,v);(!_||s[_]===void 0||p===!0||p===void 0&&s[_]!==!1)&&(s[_||d]=ua(f))}const u=(f,d)=>D.forEach(f,(p,v)=>a(p,v,d));return D.isPlainObject(t)||t instanceof this.constructor?u(t,r):D.isString(t)&&(t=t.trim())&&!ST(t)?u(wT(t),r):t!=null&&a(r,t,i),this}get(t,r){if(t=ro(t),t){const i=D.findKey(this,t);if(i){const s=this[i];if(!r)return s;if(r===!0)return xT(s);if(D.isFunction(r))return r.call(this,s,i);if(D.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ro(t),t){const i=D.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||mc(this,this[i],i,r)))}return!1}delete(t,r){const i=this;let s=!1;function a(u){if(u=ro(u),u){const f=D.findKey(i,u);f&&(!r||mc(i,i[f],f,r))&&(delete i[f],s=!0)}}return D.isArray(t)?t.forEach(a):a(t),s}clear(t){const r=Object.keys(this);let i=r.length,s=!1;for(;i--;){const a=r[i];(!t||mc(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const r=this,i={};return D.forEach(this,(s,a)=>{const u=D.findKey(i,a);if(u){r[u]=ua(s),delete r[a];return}const f=t?ET(a):String(a).trim();f!==a&&delete r[a],r[f]=ua(s),i[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return D.forEach(this,(i,s)=>{i!=null&&i!==!1&&(r[s]=t&&D.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const i=new this(t);return r.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[Dm]=this[Dm]={accessors:{}}).accessors,s=this.prototype;function a(u){const f=ro(u);i[f]||(PT(s,u),i[f]=!0)}return D.isArray(t)?t.forEach(a):a(t),this}}Kl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(Kl.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});D.freezeMethods(Kl);const xn=Kl;function _c(e,t){const r=this||Xd,i=t||r,s=xn.from(i.headers);let a=i.data;return D.forEach(e,function(f){a=f.call(r,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function xy(e){return!!(e&&e.__CANCEL__)}function Jo(e,t,r){ue.call(this,e??"canceled",ue.ERR_CANCELED,t,r),this.name="CanceledError"}D.inherits(Jo,ue,{__CANCEL__:!0});function CT(e,t,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new ue("Request failed with status code "+r.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const TT=rn.hasStandardBrowserEnv?{write(e,t,r,i,s,a){const u=[e+"="+encodeURIComponent(t)];D.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),D.isString(i)&&u.push("path="+i),D.isString(s)&&u.push("domain="+s),a===!0&&u.push("secure"),document.cookie=u.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(){return null},remove(){}};function kT(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function LT(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Sy(e,t){return e&&!kT(t)?LT(e,t):t}const NT=rn.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let i;function s(a){let u=a;return t&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=s(window.location.href),function(u){const f=D.isString(u)?s(u):u;return f.protocol===i.protocol&&f.host===i.host}}():function(){return function(){return!0}}();function OT(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function MT(e,t){e=e||10;const r=new Array(e),i=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const p=Date.now(),v=i[a];u||(u=p),r[s]=d,i[s]=p;let _=a,S=0;for(;_!==s;)S+=r[_++],_=_%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),p-u{const a=s.loaded,u=s.lengthComputable?s.total:void 0,f=a-r,d=i(f),p=a<=u;r=a;const v={loaded:a,total:u,progress:u?a/u:void 0,bytes:f,rate:d||void 0,estimated:d&&u&&p?(u-a)/d:void 0,event:s};v[t?"download":"upload"]=!0,e(v)}}const RT=typeof XMLHttpRequest<"u",zT=RT&&function(e){return new Promise(function(r,i){let s=e.data;const a=xn.from(e.headers).normalize();let{responseType:u,withXSRFToken:f}=e,d;function p(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}let v;if(D.isFormData(s)){if(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((v=a.getContentType())!==!1){const[E,...R]=v?v.split(";").map(w=>w.trim()).filter(Boolean):[];a.setContentType([E||"multipart/form-data",...R].join("; "))}}let _=new XMLHttpRequest;if(e.auth){const E=e.auth.username||"",R=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(E+":"+R))}const S=Sy(e.baseURL,e.url);_.open(e.method.toUpperCase(),vy(S,e.params,e.paramsSerializer),!0),_.timeout=e.timeout;function k(){if(!_)return;const E=xn.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),w={data:!u||u==="text"||u==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:E,config:e,request:_};CT(function(y){r(y),p()},function(y){i(y),p()},w),_=null}if("onloadend"in _?_.onloadend=k:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(k)},_.onabort=function(){_&&(i(new ue("Request aborted",ue.ECONNABORTED,e,_)),_=null)},_.onerror=function(){i(new ue("Network Error",ue.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const w=e.transitional||gy;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),i(new ue(R,w.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,e,_)),_=null},rn.hasStandardBrowserEnv&&(f&&D.isFunction(f)&&(f=f(e)),f||f!==!1&&NT(S))){const E=e.xsrfHeaderName&&e.xsrfCookieName&&TT.read(e.xsrfCookieName);E&&a.set(e.xsrfHeaderName,E)}s===void 0&&a.setContentType(null),"setRequestHeader"in _&&D.forEach(a.toJSON(),function(R,w){_.setRequestHeader(w,R)}),D.isUndefined(e.withCredentials)||(_.withCredentials=!!e.withCredentials),u&&u!=="json"&&(_.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&_.addEventListener("progress",bm(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&_.upload&&_.upload.addEventListener("progress",bm(e.onUploadProgress)),(e.cancelToken||e.signal)&&(d=E=>{_&&(i(!E||E.type?new Jo(null,e,_):E),_.abort(),_=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d)));const P=OT(S);if(P&&rn.protocols.indexOf(P)===-1){i(new ue("Unsupported protocol "+P+":",ue.ERR_BAD_REQUEST,e));return}_.send(s||null)})},Lf={http:rT,xhr:zT};D.forEach(Lf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Bm=e=>`- ${e}`,IT=e=>D.isFunction(e)||e===null||e===!1,Ey={getAdapter:e=>{e=D.isArray(e)?e:[e];const{length:t}=e;let r,i;const s={};for(let a=0;a`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let u=t?a.length>1?`since : `+a.map(Bm).join(` -`):" "+Bm(a[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:Lf};function vc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jo(null,e)}function $m(e){return vc(e),e.headers=xn.from(e.headers),e.data=_c.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ey.getAdapter(e.adapter||Xd.adapter)(e).then(function(i){return vc(e),i.data=_c.call(e,e.transformResponse,i),i.headers=xn.from(i.headers),i},function(i){return xy(i)||(vc(e),i&&i.response&&(i.response.data=_c.call(e,e.transformResponse,i.response),i.response.headers=xn.from(i.response.headers))),Promise.reject(i)})}const Fm=e=>e instanceof xn?{...e}:e;function Li(e,t){t=t||{};const r={};function i(p,v,_){return D.isPlainObject(p)&&D.isPlainObject(v)?D.merge.call({caseless:_},p,v):D.isPlainObject(v)?D.merge({},v):D.isArray(v)?v.slice():v}function s(p,v,_){if(D.isUndefined(v)){if(!D.isUndefined(p))return i(void 0,p,_)}else return i(p,v,_)}function a(p,v){if(!D.isUndefined(v))return i(void 0,v)}function u(p,v){if(D.isUndefined(v)){if(!D.isUndefined(p))return i(void 0,p)}else return i(void 0,v)}function f(p,v,_){if(_ in t)return i(p,v);if(_ in e)return i(void 0,p)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(p,v)=>s(Fm(p),Fm(v),!0)};return D.forEach(Object.keys(Object.assign({},e,t)),function(v){const _=d[v]||s,S=_(e[v],t[v],v);D.isUndefined(S)&&_!==f||(r[v]=S)}),r}const Py="1.6.8",Jd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Jd[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Um={};Jd.transitional=function(t,r,i){function s(a,u){return"[Axios v"+Py+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,f)=>{if(t===!1)throw new ue(s(u," has been removed"+(r?" in "+r:"")),ue.ERR_DEPRECATED);return r&&!Um[u]&&(Um[u]=!0,console.warn(s(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,u,f):!0}};function AT(e,t,r){if(typeof e!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let s=i.length;for(;s-- >0;){const a=i[s],u=t[a];if(u){const f=e[a],d=f===void 0||u(f,a,e);if(d!==!0)throw new ue("option "+a+" must be "+d,ue.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ue("Unknown option "+a,ue.ERR_BAD_OPTION)}}const Nf={assertOptions:AT,validators:Jd},Dn=Nf.validators;class Qa{constructor(t){this.defaults=t,this.interceptors={request:new jm,response:new jm}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=` -`+a):i.stack=a}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Li(this.defaults,r);const{transitional:i,paramsSerializer:s,headers:a}=r;i!==void 0&&Nf.assertOptions(i,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean)},!1),s!=null&&(D.isFunction(s)?r.paramsSerializer={serialize:s}:Nf.assertOptions(s,{encode:Dn.function,serialize:Dn.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=a&&D.merge(a.common,a[r.method]);a&&D.forEach(["delete","get","head","post","put","patch","common"],P=>{delete a[P]}),r.headers=xn.concat(u,a);const f=[];let d=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(d=d&&E.synchronous,f.unshift(E.fulfilled,E.rejected))});const p=[];this.interceptors.response.forEach(function(E){p.push(E.fulfilled,E.rejected)});let v,_=0,S;if(!d){const P=[$m.bind(this),void 0];for(P.unshift.apply(P,f),P.push.apply(P,p),S=P.length,v=Promise.resolve(r);_{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](s);i._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(f=>{i.subscribe(f),a=f}).then(s);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,f){i.reason||(i.reason=new Jo(a,u,f),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new eh(function(s){t=s}),cancel:t}}}const jT=eh;function DT(e){return function(r){return e.apply(null,r)}}function bT(e){return D.isObject(e)&&e.isAxiosError===!0}const Of={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(Of).forEach(([e,t])=>{Of[t]=e});const BT=Of;function Cy(e){const t=new ca(e),r=oy(ca.prototype.request,t);return D.extend(r,ca.prototype,t,{allOwnKeys:!0}),D.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return Cy(Li(e,s))},r}const De=Cy(Xd);De.Axios=ca;De.CanceledError=Jo;De.CancelToken=jT;De.isCancel=xy;De.VERSION=Py;De.toFormData=Vl;De.AxiosError=ue;De.Cancel=De.CanceledError;De.all=function(t){return Promise.all(t)};De.spread=DT;De.isAxiosError=bT;De.mergeConfig=Li;De.AxiosHeaders=xn;De.formToJSON=e=>wy(D.isHTMLForm(e)?new FormData(e):e);De.getAdapter=Ey.getAdapter;De.HttpStatusCode=BT;De.default=De;const $T=De,FT=()=>{const e=$T.create({baseURL:oS,timeout:sS});return e.interceptors.request.use(t=>{const r=vP();return r&&t.headers&&(t.headers["x-token"]=r),t}),e},UT=FT(),ZT=Og({[Wa.name]:Wa.reducer,[qa.name]:qa.reducer,[Ya.name]:Ya.reducer,[Ga.name]:Ga.reducer,[Ha.name]:Ha.reducer}),HT=VE({reducer:ZT,middleware:e=>e({thunk:{extraArgument:UT}})});const WT=gc.createRoot(document.getElementById("root"));WT.render(x.jsx(pe.StrictMode,{children:x.jsxs(oE,{store:HT,children:[x.jsx(QP,{autoClose:lS,hideProgressBar:!0}),x.jsx(SC,{})]})})); +`):" "+Bm(a[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:Lf};function vc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jo(null,e)}function $m(e){return vc(e),e.headers=xn.from(e.headers),e.data=_c.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ey.getAdapter(e.adapter||Xd.adapter)(e).then(function(i){return vc(e),i.data=_c.call(e,e.transformResponse,i),i.headers=xn.from(i.headers),i},function(i){return xy(i)||(vc(e),i&&i.response&&(i.response.data=_c.call(e,e.transformResponse,i.response),i.response.headers=xn.from(i.response.headers))),Promise.reject(i)})}const Fm=e=>e instanceof xn?{...e}:e;function ki(e,t){t=t||{};const r={};function i(p,v,_){return D.isPlainObject(p)&&D.isPlainObject(v)?D.merge.call({caseless:_},p,v):D.isPlainObject(v)?D.merge({},v):D.isArray(v)?v.slice():v}function s(p,v,_){if(D.isUndefined(v)){if(!D.isUndefined(p))return i(void 0,p,_)}else return i(p,v,_)}function a(p,v){if(!D.isUndefined(v))return i(void 0,v)}function u(p,v){if(D.isUndefined(v)){if(!D.isUndefined(p))return i(void 0,p)}else return i(void 0,v)}function f(p,v,_){if(_ in t)return i(p,v);if(_ in e)return i(void 0,p)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(p,v)=>s(Fm(p),Fm(v),!0)};return D.forEach(Object.keys(Object.assign({},e,t)),function(v){const _=d[v]||s,S=_(e[v],t[v],v);D.isUndefined(S)&&_!==f||(r[v]=S)}),r}const Py="1.6.8",Jd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Jd[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Um={};Jd.transitional=function(t,r,i){function s(a,u){return"[Axios v"+Py+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,f)=>{if(t===!1)throw new ue(s(u," has been removed"+(r?" in "+r:"")),ue.ERR_DEPRECATED);return r&&!Um[u]&&(Um[u]=!0,console.warn(s(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,u,f):!0}};function AT(e,t,r){if(typeof e!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let s=i.length;for(;s-- >0;){const a=i[s],u=t[a];if(u){const f=e[a],d=f===void 0||u(f,a,e);if(d!==!0)throw new ue("option "+a+" must be "+d,ue.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ue("Unknown option "+a,ue.ERR_BAD_OPTION)}}const Nf={assertOptions:AT,validators:Jd},Dn=Nf.validators;class Qa{constructor(t){this.defaults=t,this.interceptors={request:new jm,response:new jm}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=` +`+a):i.stack=a}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ki(this.defaults,r);const{transitional:i,paramsSerializer:s,headers:a}=r;i!==void 0&&Nf.assertOptions(i,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean)},!1),s!=null&&(D.isFunction(s)?r.paramsSerializer={serialize:s}:Nf.assertOptions(s,{encode:Dn.function,serialize:Dn.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=a&&D.merge(a.common,a[r.method]);a&&D.forEach(["delete","get","head","post","put","patch","common"],P=>{delete a[P]}),r.headers=xn.concat(u,a);const f=[];let d=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(d=d&&E.synchronous,f.unshift(E.fulfilled,E.rejected))});const p=[];this.interceptors.response.forEach(function(E){p.push(E.fulfilled,E.rejected)});let v,_=0,S;if(!d){const P=[$m.bind(this),void 0];for(P.unshift.apply(P,f),P.push.apply(P,p),S=P.length,v=Promise.resolve(r);_{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](s);i._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(f=>{i.subscribe(f),a=f}).then(s);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,f){i.reason||(i.reason=new Jo(a,u,f),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new eh(function(s){t=s}),cancel:t}}}const jT=eh;function DT(e){return function(r){return e.apply(null,r)}}function bT(e){return D.isObject(e)&&e.isAxiosError===!0}const Of={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(Of).forEach(([e,t])=>{Of[t]=e});const BT=Of;function Cy(e){const t=new ca(e),r=oy(ca.prototype.request,t);return D.extend(r,ca.prototype,t,{allOwnKeys:!0}),D.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return Cy(ki(e,s))},r}const De=Cy(Xd);De.Axios=ca;De.CanceledError=Jo;De.CancelToken=jT;De.isCancel=xy;De.VERSION=Py;De.toFormData=Vl;De.AxiosError=ue;De.Cancel=De.CanceledError;De.all=function(t){return Promise.all(t)};De.spread=DT;De.isAxiosError=bT;De.mergeConfig=ki;De.AxiosHeaders=xn;De.formToJSON=e=>wy(D.isHTMLForm(e)?new FormData(e):e);De.getAdapter=Ey.getAdapter;De.HttpStatusCode=BT;De.default=De;const $T=De,FT=()=>{const e=$T.create({baseURL:oS,timeout:sS});return e.interceptors.request.use(t=>{const r=vP();return r&&t.headers&&(t.headers["x-token"]=r),t}),e},UT=FT(),ZT=Og({[Va.name]:Va.reducer,[Ga.name]:Ga.reducer,[Ya.name]:Ya.reducer,[qa.name]:qa.reducer,[Ha.name]:Ha.reducer}),HT=VE({reducer:ZT,middleware:e=>e({thunk:{extraArgument:UT}})});const WT=gc.createRoot(document.getElementById("root"));WT.render(x.jsx(pe.StrictMode,{children:x.jsxs(oE,{store:HT,children:[x.jsx(RP,{autoClose:lS,hideProgressBar:!0}),x.jsx(SC,{})]})})); diff --git a/10/index.html b/10/index.html index c5bdbf8..1b60f19 100644 --- a/10/index.html +++ b/10/index.html @@ -7,7 +7,7 @@ 6 cities - +