PageSourceSearch

https://climbandhome.com/assets/index-CtWZdFLa.js

js climbandhome.com collected 2026-10-09 23:12:23 UTC 1,384,335 bytes, 575 lines download raw bytes

vendor: 4,553 bytes, lines 1-17
1(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))d(m);new MutationObserver(m=>{for(const p of m)if(p.type==="childList")for(const f of p.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&d(f)}).observe(document,{childList:!0,subtree:!0});function r(m){const p={};return m.integrity&&(p.integrity=m.integrity),m.referrerPolicy&&(p.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?p.credentials="include":m.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function d(m){if(m.ep)return;m.ep=!0;const p=r(m);fetch(m.href,p)}})();function f1(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var du={exports:{}},Hl={};/**
2 * @license React
3 * react-jsx-runtime.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var bx;function x1(){if(bx)return Hl;bx=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(d,m,p){var f=null;if(p!==void 0&&(f=""+p),m.key!==void 0&&(f=""+m.key),"key"in m){p={};for(var x in m)x!=="key"&&(p[x]=m[x])}else p=m;return m=p.ref,{$$typeof:l,type:d,key:f,ref:m!==void 0?m:null,props:p}}return Hl.Fragment=i,Hl.jsx=r,Hl.jsxs=r,Hl}var gx;function b1(){return gx||(gx=1,du.exports=x1()),du.exports}var e=b1(),uu={exports:{}},De={};/**
10 * @license React
11 * react.production.js
12 *
13 * Copyright (c) Meta Platforms, Inc. and affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var vx;function g1(){if(vx)return De;vx=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),f=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),j=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.for("react.view_transition"),N=Symbol.iterator;function _(V){return V===null||typeof V!="object"?null:(V=N&&V[N]||V["@@iterator"],typeof V=="function"?V:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,k={};function T(V,pe,Ne){this.props=V,this.context=pe,this.refs=k,this.updater=Ne||z}T.prototype.isReactComponent={},T.prototype.setState=function(V,pe){if(typeof V!="object"&&typeof V!="function"&&V!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,V,pe,"setState")},T.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function w(){}w.prototype=T.prototype;function A(V,pe,Ne){this.props=V,this.context=pe,this.refs=k,this.updater=Ne||z}var L=A.prototype=new w;L.constructor=A,C(L,T.prototype),L.isPureReactComponent=!0;var q=Array.isArray;function H(){}var F={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function J(V,pe,Ne){var ge=Ne.ref;return{$$typeof:l,type:V,key:pe,ref:ge!==void 0?ge:null,props:Ne}}function O(V,pe){return J(V.type,pe,V.props)}function X(V){return typeof V=="object"&&V!==null&&V.$$typeof===l}function B(V){var pe={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(Ne){return pe[Ne]})}var Z=/\/+/g;function te(V,pe){return typeof V=="object"&&V!==null&&V.key!=null?B(""+V.key):pe.toString(36)}function P(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(H,H):(V.status="pending",V.then(function(pe){V.status==="pending"&&(V.status="fulfilled",V.value=pe)},function(pe){V.status==="pending"&&(V.status="rejected",V.reason=pe)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function $(V,pe,Ne,ge,ie){var ee=typeof V;(ee==="undefined"||ee==="boolean")&&(V=null);var he=!1;if(V===null)he=!0;else switch(ee){case"bigint":case"string":case"number":he=!0;break;case"object":switch(V.$$typeof){case l:case i:he=!0;break;case g:return he=V._init,$(he(V._payload),pe,Ne,ge,ie)}}if(he)return ie=ie(V),he=ge===""?"."+te(V,0):ge,q(ie)?(Ne="",he!=null&&(Ne=he.replace(Z,"$&/")+"/"),$(ie,pe,Ne,"",function(Be){return Be}
vendor: 4,433 bytes, line 17
17)):ie!=null&&(X(ie)&&(ie=O(ie,Ne+(ie.key==null||V&&V.key===ie.key?"":(""+ie.key).replace(Z,"$&/")+"/")+he)),pe.push(ie)),1;he=0;var le=ge===""?".":ge+":";if(q(V))for(var me=0;me<V.length;me++)ge=V[me],ee=le+te(ge,me),he+=$(ge,pe,Ne,ee,ie);else if(me=_(V),typeof me=="function")for(V=me.call(V),me=0;!(ge=V.next()).done;)ge=ge.value,ee=le+te(ge,me++),he+=$(ge,pe,Ne,ee,ie);else if(ee==="object"){if(typeof V.then=="function")return $(P(V),pe,Ne,ge,ie);throw pe=String(V),Error("Objects are not valid as a React child (found: "+(pe==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":pe)+"). If you meant to render a collection of children, use an array instead.")}return he}function oe(V,pe,Ne){if(V==null)return V;var ge=[],ie=0;return $(V,ge,"","",function(ee){return pe.call(Ne,ee,ie++)}),ge}function de(V){if(V._status===-1){var pe=V._result,Ne=pe();Ne.then(function(ge){(V._status===0||V._status===-1)&&(V._status=1,V._result=ge,Ne.status===void 0&&(Ne.status="fulfilled",Ne.value=ge))},function(ge){(V._status===0||V._status===-1)&&(V._status=2,V._result=ge,Ne.status===void 0&&(Ne.status="rejected",Ne.reason=ge))}),V._status===-1&&(V._status=0,V._result=Ne)}if(V._status===1)return V._result.default;throw V._result}var ze=typeof reportError=="function"?reportError:function(V){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var pe=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof V=="object"&&V!==null&&typeof V.message=="string"?String(V.message):String(V),error:V});if(!window.dispatchEvent(pe))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",V);return}console.error(V)};function da(V){var pe=F.T,Ne={};Ne.types=pe!==null?pe.types:null,F.T=Ne;try{var ge=V(),ie=F.S;ie!==null&&ie(Ne,ge),typeof ge=="object"&&ge!==null&&typeof ge.then=="function"&&ge.then(H,ze)}catch(ee){ze(ee)}finally{pe!==null&&Ne.types!==null&&(pe.types=Ne.types),F.T=pe}}function Ze(V){var pe=F.T;if(pe!==null){var Ne=pe.types;Ne===null?pe.types=[V]:Ne.indexOf(V)===-1&&Ne.push(V)}else da(Ze.bind(null,V))}var Ea={map:oe,forEach:function(V,pe,Ne){oe(V,function(){pe.apply(this,arguments)},Ne)},count:function(V){var pe=0;return oe(V,function(){pe++}),pe},toArray:function(V){return oe(V,function(pe){return pe})||[]},only:function(V){if(!X(V))throw Error("React.Children.only expected to receive a single React element child.");return V}};return De.Activity=v,De.Children=Ea,De.Component=T,De.Fragment=r,De.Profiler=m,De.PureComponent=A,De.StrictMode=d,De.Suspense=h,De.ViewTransition=S,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,De.__COMPILER_RUNTIME={__proto__:null,c:function(V){return F.H.useMemoCache(V)}},De.addTransitionType=Ze,De.cache=function(V){return function(){return V.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(V,pe,Ne){if(V==null)throw Error("The argument must be a React element, but you passed "+V+".");var ge=C({},V.props),ie=V.key;if(pe!=null)for(ee in pe.key!==void 0&&(ie=""+pe.key),pe)!U.call(pe,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&pe.ref===void 0||(ge[ee]=pe[ee]);var ee=arguments.length-2;if(ee===1)ge.children=Ne;else if(1<ee){for(var he=Array(ee),le=0;le<ee;le++)he[le]=arguments[le+2];ge.children=he}return J(V.type,ie,ge)},De.createContext=function(V){return V={$$typeof:f,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null},V.Provider=V,V.Consumer={$$typeof:p,_context:V},V},De.createElement=function(V,pe,Ne){var ge,ie={},ee=null;if(pe!=null)for(ge in pe.key!==void 0&&(ee=""+pe.key),pe)U.call(pe,ge)&&ge!=="key"&&ge!=="__self"&&ge!=="__source"&&(ie[ge]=pe[ge]);var he=arguments.length-2;if(he===1)ie.children=Ne;else if(1<he){for(var le=Array(he),me=0;me<he;me++)le[me]=arguments[me+2];ie.children=le}if(V&&V.defaultProps)for(ge in he=V.defaultProps,he)ie[ge]===void 0&&(ie[ge]=he[ge]);return J(V,ee,ie)},De.createRef=function(){return{current:null}},De.forwardRef=function(V){return{$$typeof:x,render:V}},De.isValidElement=X,De.lazy=function(V){return{$$typeof:g,_payload:{_status:-1,_result:V},_init:de}},De.memo=function(V,pe){return{$$typeof:j,type:V,compare:pe===void 0?null:pe}},De.startTransition=da,De.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},De.use=function(V){return F.H.use(V)},De.useActionState=function(V,pe,Ne){return F.H.useActionState(V,pe,
vendor: 10,479 bytes, lines 17-41
17Ne)},De.useCallback=function(V,pe){return F.H.useCallback(V,pe)},De.useContext=function(V){return F.H.useContext(V)},De.useDebugValue=function(){},De.useDeferredValue=function(V,pe){return F.H.useDeferredValue(V,pe)},De.useEffect=function(V,pe){return F.H.useEffect(V,pe)},De.useEffectEvent=function(V){return F.H.useEffectEvent(V)},De.useId=function(){return F.H.useId()},De.useImperativeHandle=function(V,pe,Ne){return F.H.useImperativeHandle(V,pe,Ne)},De.useInsertionEffect=function(V,pe){return F.H.useInsertionEffect(V,pe)},De.useLayoutEffect=function(V,pe){return F.H.useLayoutEffect(V,pe)},De.useMemo=function(V,pe){return F.H.useMemo(V,pe)},De.useOptimistic=function(V,pe){return F.H.useOptimistic(V,pe)},De.useReducer=function(V,pe,Ne){return F.H.useReducer(V,pe,Ne)},De.useRef=function(V){return F.H.useRef(V)},De.useState=function(V){return F.H.useState(V)},De.useSyncExternalStore=function(V,pe,Ne){return F.H.useSyncExternalStore(V,pe,Ne)},De.useTransition=function(){return F.H.useTransition()},De.version="19.3.0",De}var yx;function Bu(){return yx||(yx=1,uu.exports=g1()),uu.exports}var b=Bu();const mu=f1(b);var pu={exports:{}},Vl={},hu={exports:{}},fu={};/**
18 * @license React
19 * scheduler.production.js
20 *
21 * Copyright (c) Meta Platforms, Inc. and affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var jx;function v1(){return jx||(jx=1,(function(l){function i(P,$){var oe=P.length;P.push($);e:for(;0<oe;){var de=oe-1>>>1,ze=P[de];if(0<m(ze,$))P[de]=$,P[oe]=ze,oe=de;else break e}}function r(P){return P.length===0?null:P[0]}function d(P){if(P.length===0)return null;var $=P[0],oe=P.pop();if(oe!==$){P[0]=oe;e:for(var de=0,ze=P.length,da=ze>>>1;de<da;){var Ze=2*(de+1)-1,Ea=P[Ze],V=Ze+1,pe=P[V];if(0>m(Ea,oe))V<ze&&0>m(pe,Ea)?(P[de]=pe,P[V]=oe,de=V):(P[de]=Ea,P[Ze]=oe,de=Ze);else if(V<ze&&0>m(pe,oe))P[de]=pe,P[V]=oe,de=V;else break e}}return $}function m(P,$){var oe=P.sortIndex-$.sortIndex;return oe!==0?oe:P.id-$.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;l.unstable_now=function(){return p.now()}}else{var f=Date,x=f.now();l.unstable_now=function(){return f.now()-x}}var h=[],j=[],g=1,v=null,S=3,N=!1,_=!1,z=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function A(P){for(var $=r(j);$!==null;){if($.callback===null)d(j);else if($.startTime<=P)d(j),$.sortIndex=$.expirationTime,i(h,$);else break;$=r(j)}}function L(P){if(z=!1,A(P),!_)if(r(h)!==null)_=!0,q||(q=!0,X());else{var $=r(j);$!==null&&te(L,$.startTime-P)}}var q=!1,H=-1,F=5,U=-1;function J(){return C?!0:!(l.unstable_now()-U<F)}function O(){if(C=!1,q){var P=l.unstable_now();U=P;var $=!0;try{e:{_=!1,z&&(z=!1,T(H),H=-1),N=!0;var oe=S;try{a:{for(A(P),v=r(h);v!==null&&!(v.expirationTime>P&&J());){var de=v.callback;if(typeof de=="function"){v.callback=null,S=v.priorityLevel;var ze=de(v.expirationTime<=P);if(P=l.unstable_now(),typeof ze=="function"){v.callback=ze,A(P),$=!0;break a}v===r(h)&&d(h),A(P)}else d(h);v=r(h)}if(v!==null)$=!0;else{var da=r(j);da!==null&&te(L,da.startTime-P),$=!1}}break e}finally{v=null,S=oe,N=!1}$=void 0}}finally{$?X():q=!1}}}var X;if(typeof w=="function")X=function(){w(O)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,Z=B.port2;B.port1.onmessage=O,X=function(){Z.postMessage(null)}}else X=function(){k(O,0)};function te(P,$){H=k(function(){P(l.unstable_now())},$)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(P){P.callback=null},l.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<P?Math.floor(1e3/P):5},l.unstable_getCurrentPriorityLevel=function(){return S},l.unstable_next=function(P){switch(S){case 1:case 2:case 3:var $=3;break;default:$=S}var oe=S;S=$;try{return P()}finally{S=oe}},l.unstable_requestPaint=function(){C=!0},l.unstable_runWithPriority=function(P,$){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var oe=S;S=P;try{return $()}finally{S=oe}},l.unstable_scheduleCallback=function(P,$,oe){var de=l.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?de+oe:de):oe=de,P){case 1:var ze=-1;break;case 2:ze=250;break;case 5:ze=1073741823;break;case 4:ze=1e4;break;default:ze=5e3}return ze=oe+ze,P={id:g++,callback:$,priorityLevel:P,startTime:oe,expirationTime:ze,sortIndex:-1},oe>de?(P.sortIndex=oe,i(j,P),r(h)===null&&P===r(j)&&(z?(T(H),H=-1):z=!0,te(L,oe-de))):(P.sortIndex=ze,i(h,P),_||N||(_=!0,q||(q=!0,X()))),P},l.unstable_shouldYield=J,l.unstable_wrapCallback=function(P){var $=S;return function(){var oe=S;S=$;try{return P.apply(this,arguments)}finally{S=oe}}}})(fu)),fu}var _x;function y1(){return _x||(_x=1,hu.exports=v1()),hu.exports}var xu={exports:{}},it={};/**
26 * @license React
27 * react-dom.production.js
28 *
29 * Copyright (c) Meta Platforms, Inc. and affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var Nx;function j1(){if(Nx)return it;Nx=1;var l=Bu();function i(g){var v="https://react.dev/errors/"+g;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)v+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+g+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var d={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},m=Symbol.for("react.portal"),p=Symbol.for("react.recoverable"),f=Symbol.for("react.optimistic_key");function x(g,v,S){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:N==null?null:N===f?f:""+N,children:g,containerInfo:v,implementation:S}}var h=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(g,v){if(g==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return it.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,it.browser=function(g){return{$$typeof:p,_reason:g}},it.createPortal=function(g,v){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(i(299));return x(g,v,null,S)},it.flushSync=function(g){var v=h.T,S=d.p;try{if(h.T=null,d.p=2,g)return g()}finally{h.T=v,d.p=S,d.d.f()}},it.preconnect=function(g,v){typeof g=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,d.d.C(g,v))},it.prefetchDNS=function(g){typeof g=="string"&&d.d.D(g)},it.preinit=function(g,v){if(typeof g=="string"&&v&&typeof v.as=="string"){var S=v.as,N=j(S,v.crossOrigin),_=typeof v.integrity=="string"?v.integrity:void 0,z=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;S==="style"?d.d.S(g,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:N,integrity:_,fetchPriority:z}):S==="script"&&d.d.X(g,{crossOrigin:N,integrity:_,fetchPriority:z,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},it.preinitModule=function(g,v){if(typeof g=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var S=j(v.as,v.crossOrigin);d.d.M(g,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}}else v==null&&d.d.M(g)},it.preload=function(g,v){if(typeof g=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var S=v.as,N=j(S,v.crossOrigin);d.d.L(g,S,{crossOrigin:N,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},it.preloadModule=function(g,v){if(typeof g=="string")if(v){var S=j(v.as,v.crossOrigin);d.d.m(g,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}else d.d.m(g)},it.requestFormReset=function(g){d.d.r(g)},it.unstable_batchedUpdates=function(g,v){return g(v)},it.useFormState=function(g,v,S){return h.H.useFormState(g,v,S)},it.useFormStatus=function(){return h.H.useHostTransitionStatus()},it.version="19.3.0",it}var wx;function _1(){if(wx)return xu.exports;wx=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),xu.exports=j1(),xu.exports}/**
34 * @license React
35 * react-dom-client.production.js
36 *
37 * Copyright (c) Meta Platforms, Inc. and affiliates.
38 *
39 * This source code is licensed under the MIT license found in the
40 * LICENSE file in the root directory of this source tree.
41 */var Sx;function N1(){if(Sx)return Vl;Sx=1;var l=y1(),i=Bu(),r=_1();function d(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)s+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function p(a){for(var s=a,n=s;n&&!n.alternate;)s=n,(s.flags&4098)!==0&&(a=s.return),n=s.return;for(;s.return;)s=s.return;return s.tag===3?a:null}function f(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function x(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}
vendor: 19,220 bytes, lines 41-48
41function h(a){if(p(a)!==a)throw Error(d(188))}function j(a){var s=a.alternate;if(!s){if(s=p(a),s===null)throw Error(d(188));return s!==a?null:a}for(var n=a,o=s;;){var c=n.return;if(c===null)break;var u=c.alternate;if(u===null){if(o=c.return,o!==null){n=o;continue}break}if(c.child===u.child){for(u=c.child;u;){if(u===n)return h(c),a;if(u===o)return h(c),s;u=u.sibling}throw Error(d(188))}if(n.return!==o.return)n=c,o=u;else{for(var y=!1,E=c.child;E;){if(E===n){y=!0,n=c,o=u;break}if(E===o){y=!0,o=c,n=u;break}E=E.sibling}if(!y){for(E=u.child;E;){if(E===n){y=!0,n=u,o=c;break}if(E===o){y=!0,o=u,n=c;break}E=E.sibling}if(!y)throw Error(d(189))}}if(n.alternate!==o)throw Error(d(190))}if(n.tag!==3)throw Error(d(188));return n.stateNode.current===n?a:s}function g(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=g(a),s!==null)return s;a=a.sibling}return null}function v(a,s,n,o,c,u){for(;a!==null;){if((a.tag===5||a.tag===27||a.tag===6)&&n(a,o,c,u)||(a.tag!==22||a.memoizedState===null)&&(s||a.tag!==5&&a.tag!==27)&&v(a.child,s,n,o,c,u))return!0;a=a.sibling}return!1}function S(a){for(a=a.return;a!==null;){if(a.tag===3||a.tag===5||a.tag===27)return a;a=a.return}return null}function N(a){var s=!1;for(a=a.return;a!==null&&(a.tag===4&&(s=!0),!(a.tag===3||a.tag===5||a.tag===27));)a=a.return;return s}function _(a){var s=[null,null],n=S(a);return n===null||z(s,a,n.child,{foundSelf:!1}),s}function z(a,s,n,o){for(;n!==null;){if(n===s)o.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(o.foundSelf)return a[1]=n,!0;a[0]=n}else if((n.tag!==22||n.memoizedState===null)&&z(a,s,n.child,o))return!0;n=n.sibling}return!1}function C(a){switch(a.tag){case 5:case 27:case 6:return a.stateNode;case 3:return a.stateNode.containerInfo;default:throw Error(d(559))}}var k=null,T=null;function w(a,s,n){return a===n?!0:a===s?(k=a,!0):!1}function A(a,s,n){return a===n?(T=a,!1):a===s?(T!==null&&(k=a),!0):!1}function L(a){if(a===null)return null;do a=a===null?null:a.return;while(a&&a.tag!==5&&a.tag!==27&&a.tag!==3);return a||null}function q(a,s,n){for(var o=0,c=a;c;c=n(c))o++;c=0;for(var u=s;u;u=n(u))c++;for(;0<o-c;)a=n(a),o--;for(;0<c-o;)s=n(s),c--;for(;o--;){if(a===s||s!==null&&a===s.alternate)return a;a=n(a),s=n(s)}return null}var H=Object.assign,F=Symbol.for("react.element"),U=Symbol.for("react.transitional.element"),J=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),te=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),de=Symbol.for("react.memo"),ze=Symbol.for("react.lazy"),da=Symbol.for("react.activity"),Ze=Symbol.for("react.legacy_hidden"),Ea=Symbol.for("react.memo_cache_sentinel"),V=Symbol.for("react.view_transition"),pe=Symbol.for("react.recoverable"),Ne=Symbol.iterator;function ge(a){return a===null||typeof a!="object"?null:(a=Ne&&a[Ne]||a["@@iterator"],typeof a=="function"?a:null)}var ie=Symbol.for("react.client.reference");function ee(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ie?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case O:return"Fragment";case B:return"Profiler";case X:return"StrictMode";case $:return"Suspense";case oe:return"SuspenseList";case da:return"Activity";case V:return"ViewTransition"}if(typeof a=="object")switch(a.$$typeof){case J:return"Portal";case te:return a.displayName||"Context";case Z:return(a._context.displayName||"Context")+".Consumer";case P:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case de:return s=a.displayName||null,s!==null?s:ee(a.type)||"Memo";case ze:s=a._payload,a=a._init;try{return ee(a(s))}catch{}}return null}var he=Array.isArray,le=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Be={pending:!1,data:null,method:null,action:null},xe=[],Ce=-1;function Te(a){return{current:a}}function Qe(a){0>Ce||(a.current=xe[Ce],xe[Ce]=null,Ce--)}function Ge(a,s){Ce++,xe[Ce]=a.current,a.current=s}var ua=Te(null),Ka=Te(null),ye=Te(null),Va=Te(null);function Ya(a,s){switch(Ge(ye,s),Ge(Ka,a),Ge(ua,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?Cf(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=Cf(s),a=Ef(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Qe(ua),Ge(ua,a)}function Aa(){Qe(ua),Qe(Ka),Qe(ye)}function ja(a){var s=a.memoizedState;s!==null&&(Do._currentValue=s.memoizedState,Ge(Va,a)),s=ua.current;var n=Ef(s,a.type);s!==n&&(Ge(Ka,a),Ge(ua,n))}function Ua(a){Ka.current===a&&(Qe(ua),Qe(Ka)),Va.current===a&&(Qe(Va),Do._currentValue=Be)}var ss,Zt;function Nt(a){if(ss===void 0)try{throw Error()}catch(n){var s=n.stack.trim().match(/\n( *(at )?)/);ss=s&&s[1]||"",Zt=-1<n.stack.indexOf(`
42    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
43`+ss+a+Zt}var ue=!1;function Se(a,s){if(!a||ue)return"";ue=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(s){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ve){var K=ve}Reflect.construct(a,[],ce)}else{try{ce.call()}catch(ve){K=ve}ce=!1;try{var ae=Object.getOwnPropertyDescriptor(a.prototype,"props");Object.defineProperty(a.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ce=!0,new a}finally{ce&&(ae!==void 0?Object.defineProperty(a.prototype,"props",ae):delete a.prototype.props)}}}else{try{throw Error()}catch(ve){K=ve}(ce=a())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ve){if(ve&&K&&typeof ve.stack=="string")return[ve.stack,K.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=o.DetermineComponentFrameRoot(),y=u[0],E=u[1];if(y&&E){var R=y.split(`
44`),Q=E.split(`
45`);for(c=o=0;o<R.length&&!R[o].includes("DetermineComponentFrameRoot");)o++;for(;c<Q.length&&!Q[c].includes("DetermineComponentFrameRoot");)c++;if(o===R.length||c===Q.length)for(o=R.length-1,c=Q.length-1;1<=o&&0<=c&&R[o]!==Q[c];)c--;for(;1<=o&&0<=c;o--,c--)if(R[o]!==Q[c]){if(o!==1||c!==1)do if(o--,c--,0>c||R[o]!==Q[c]){var se=`
46`+R[o].replace(" at new "," at ");return a.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",a.displayName)),se}while(1<=o&&0<=c);break}}}finally{ue=!1,Error.prepareStackTrace=n}return(n=a?a.displayName||a.name:"")?Nt(n):""}function _e(a,s){switch(a.tag){case 26:case 27:case 5:return Nt(a.type);case 16:return Nt("Lazy");case 13:return a.child!==s&&s!==null?Nt("Suspense Fallback"):Nt("Suspense");case 19:return Nt("SuspenseList");case 0:case 15:return Se(a.type,!1);case 11:return Se(a.type.render,!1);case 1:return Se(a.type,!0);case 31:return Nt("Activity");case 30:return Nt("ViewTransition");default:return""}}function Fe(a){try{var s="",n=null;do s+=_e(a,n),n=a,a=a.return;while(a);return s}catch(o){return`
47Error generating stack: `+o.message+`
48`+o.stack}}var _a=Object.prototype.hasOwnProperty,La=l.unstable_scheduleCallback,Ke=l.unstable_cancelCallback,Oa=l.unstable_shouldYield,ma=l.unstable_requestPaint,Ra=l.unstable_now,js=l.unstable_getCurrentPriorityLevel,Us=l.unstable_ImmediatePriority,Rt=l.unstable_UserBlockingPriority,qa=l.unstable_NormalPriority,rt=l.unstable_LowPriority,ke=l.unstable_IdlePriority,Je=l.log,Kt=l.unstable_setDisableYieldValue,Sa=null,sa=null;function qt(a){if(typeof Je=="function"&&Kt(a),sa&&typeof sa.setStrictMode=="function")try{sa.setStrictMode(Sa,a)}catch{}}var ct=Math.clz32?Math.clz32:Br,Or=Math.log,ns=Math.LN2;function Br(a){return a>>>=0,a===0?32:31-(Or(a)/ns|0)|0}var Yo=256,Qo=262144,Kn=4194304;function _s(a){var s=a&42;if(s!==0)return s;switch(a&-a){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&-a;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Yn(a,s,n){var o=a.pendingLanes;if(o===0)return 0;var c=0,u=a.suspendedLanes,y=a.pingedLanes;a=a.warmLanes;var E=o&134217727;return E!==0?(o=E&~u,o!==0?c=_s(o):(y&=E,y!==0?c=_s(y):n||(n=E&~a,n!==0&&(c=_s(n))))):(E=o&~u,E!==0?c=_s(E):y!==0?c=_s(y):n||(n=o&~a,n!==0&&(c=_s(n)))),c===0?0:s!==0&&s!==c&&(s&u)===0&&(u=c&-c,n=s&-s,u>=n||u===32&&(n&4194048)!==0)?s:c}function gn(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function Xl(a,s){(s&8)!==0&&(s|=s&32);var n=a.entangledLanes;if(n!==0)for(a=a.entanglements,n&=s;0<n;){var o=31-ct(n),c=1<<o;s|=a[o],n&=~c}return s}function Pr(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function M(){var a=Kn;return Kn<<=1,(Kn&62914560)===0&&(Kn=4194304),a}function I(a){for(var s=[],n=0;31>n;n++)s.push(a);return s}function be(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function fe(a,s,n,o,c,u){var y=a.pendingLanes;a.pendingLanes=n,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=n,a.entangledLanes&=n,a.errorRecoveryDisabledLanes&=n,a.shellSuspendCounter=0;var E=a.entanglements,R=a.expirationTimes,Q=a.hiddenUpdates;for(n=y&~n;0<n;){var se=31-ct(n),ce=1<<se;E[se]=0,R[se]=-1;var K=Q[se];if(K!==null)for(Q[se]=null,se=0;se<K.length;se++){var ae=K[se];ae!==null&&(ae.lane&=-536870913)}n&=~ce}o!==0&&je(a,o,0),u!==0&&c===0&&a.tag!==0&&(a.suspendedLanes|=u&~(y&~s))}function je(a,s,n){a.pendingLanes|=s,a.suspendedLanes&=~s;var o=31-ct(s);a.entangledLanes|=s,a.entanglements[o]=a.entanglements[o]|1073741824|n&261930}function Ve(a,s){var n=a.entangledLanes|=s;for(a=a.entanglements;n;){var o=31-ct(n),c=1<<o;c&s|a[o]&s&&(a[o]|=s),n&=~c}}function Me(a,s){var n=s&-s;return n=(n&42)!==0?1:Oe(n),(n&(a.suspendedLanes|s))!==0?0:n}function Oe(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Pe(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function la(){var a=me.p;return a!==0?a:(a=window.event,a===void 0?32:dx(a.type))}function pa(a,s){var n=me.p;try{return me.p=a,s()}finally{me.p=n}}var qe=Math.random().toString(36).slice(2),ea="__reactFiber$"+qe,xa="__reactProps$"+qe,os="__reactContainer$"+qe,nm="__reactEvents$"+qe,Mb="__reactListeners$"+qe,Tb="__reactHandles$"+qe,om="__reactResources$"+qe,Jo="__reactMarker$"+qe,Wl="__reactLoad$"+qe;function ei(a){delete a[ea],delete a[xa],delete a[Mb],delete a[Tb]}function vn(a){var s;if(s=a[ea])return s;for(var n=a.parentNode;n;){if(s=n[os]||n[ea]){if(n=s.alternate,s.child!==null||n!==null&&n.child!==null)for(a=Ff(a);a!==null;){if(n=a[ea])return n;a=Ff(a)}return s}a=n,n=a.parentNode}return null}function Qn(a){if(a=a[ea]||a[os]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function Xo(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(d(33))}function Jn(a){var s=a[om];return s||(s=a[om]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Ja(a){a[Jo]=!0}function lm(a){a[Wl]=void 0}var im=new Set,rm={};function yn(a,s){Xn(a,s),Xn(a+"Capture",s)}function Xn(a,s){for(rm[a]=s,a=0;a<s.length;a++)im.add(s[a])}var Lb=RegExp("^[: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]*$"),cm={},dm={};function Rb(a){return _a.call(dm,a)?!0:_a.call(cm,a)?!1:Lb.test(a)?dm[a]=!0:(cm[a]=!0,!1)}var ra=!1;function um(){var a=ra;return ra=!1,a}function ai(a,s,n){if(Rb(s))if(n===null)a.removeAttribute(s);else{switch(typeof n){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var o=s.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,n)}}function ti(a,s,n){if(n===null)a.removeAttribute(s);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,n)}}function Ns(a,s,n,o){if(o===null)a.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(n);return}a.setAttributeNS(s,n,o)}}function wt(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function mm(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function qb(a,s,n){var o=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,u=o.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return c.call(this)},set:function(y){n=""+y,u.call(this,y)}}),Object.defineProperty(a,s,{enumerable:o.enumerable}),{getValue:function(){return n},setValue:function(y){n=""+y},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Ur(a){if(!a._valueTracker){var s=mm(a)?"checked":"value";a._valueTracker=qb(a,s,""+a[s])}}function pm(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var n=s.getValue(),o="";return a&&(o=mm(a)?a.checked?"true":"false":a.value),a=o,a!==n?(s.setValue(a),!0):!1}var Db=/[\n"\\]/g;function Dt(a){return a.replace(Db,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Hr(a,s,n,o,c,u,y,E){a.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?a.type=y:a.removeAttribute("type"),s!=null?y==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+wt(s)):a.value!==""+wt(s)&&(a.value=""+wt(s)):y!=="submit"&&y!=="reset"||a.removeAttribute("value"),s!=null?y==="number"&&a.value==s?Vr(a,wt(a.value)):Vr(a,wt(s)):n!=null?Vr(a,wt(n)):o!=null&&a.removeAttribute("value"),c==null&&u!=null&&(a.defaultChecked=!!u),c!=null&&(a.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?a.name=""+wt(E):a.removeAttribute("name")}function hm(a,s,n,o,c,u,y,E){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(a.type=u),s!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||s!=null)){Ur(a);return}n=n!=null?""+wt(n):"",s=s!=null?""+wt(s):n,E||s===a.value||(a.value=s),a.defaultValue=s}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,a.checked=E?a.checked:!!o,a.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(a.name=y),Ur(a)}function Vr(a,s){a.defaultValue!==""+s&&(a.defaultValue=""+s)}function Wn(a,s,n,o){if(a=a.options,s){s={};for(var c=0;c<n.length;c++)s["$"+n[c]]=!0;for(n=0;n<a.length;n++)c=s.hasOwnProperty("$"+a[n].value),a[n].selected!==c&&(a[n].selected=c),c&&o&&(a[n].defaultSelected=!0)}else{for(n=""+wt(n),s=null,c=0;c<a.length;c++){if(a[c].value===n){a[c].selected=!0,o&&(a[c].defaultSelected=!0);return}s!==null||a[c].disabled||(s=a[c])}s!==null&&(s.selected=!0)}}function fm(a,s,n){if(s!=null&&(s=""+wt(s),s!==a.value&&(a.value=s),n==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=n!=null?""+wt(n):""}function xm(a,s,n,o){if(s==null){if(o!=null){if(n!=null)throw Error(d(92));if(he(o)){if(1<o.length)throw Error(d(93));o=o[0]}n=o}n==null&&(n=""),s=n}n=wt(s),a.defaultValue=n,o=a.textContent,o===n&&o!==""&&o!==null&&(a.value=o),Ur(a)}function eo(a,s){if(s){var n=a.firstChild;if(n&&n===a.lastChild&&n.nodeType===3){n.nodeValue=s;return}}a.textContent=s}var Ob=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function bm(a,s,n){var o=s.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":o?a.setProperty(s,n):typeof n!="number"||n===0||Ob.has(s)?s==="float"?a.cssFloat=n:a[s]=(""+n).trim():a[s]=n+"px"}function gm(a,s,n){if(s!=null&&typeof s!="object")throw Error(d(62));if(a=a.style,n!=null){for(var o in n)!n.hasOwnProperty(o)||s!=null&&s.hasOwnProperty(o)||(o.indexOf("--")===0?a.setProperty(o,""):o==="float"?a.cssFloat="":a[o]="",ra=!0);for(var c in s)o=s[c],s.hasOwnProperty(c)&&n[c]!==o&&(bm(a,c,o),ra=!0)}else for(var u in s)s.hasOwnProperty(u)&&bm(a,u,s[u])}function Gr(a){if(a.indexOf("-")===-1)return!1;switch(a){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 Bb=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
48dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Pb=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function si(a){return Pb.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ls(){}var Fr=null;function $r(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ao=null,to=null;function vm(a){var s=Qn(a);if(s&&(a=s.stateNode)){var n=a[xa]||null;e:switch(a=s.stateNode,s.type){case"input":if(Hr(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),s=n.name,n.type==="radio"&&s!=null){for(n=a;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Dt(""+s)+'"][type="radio"]'),s=0;s<n.length;s++){var o=n[s];if(o!==a&&o.form===a.form){var c=o[xa]||null;if(!c)throw Error(d(90));Hr(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(s=0;s<n.length;s++)o=n[s],o.form===a.form&&pm(o)}break e;case"textarea":fm(a,n.value,n.defaultValue);break e;case"select":s=n.value,s!=null&&Wn(a,!!n.multiple,s,!1)}}}var Ir=!1;function ym(a,s,n){if(Ir)return a(s,n);Ir=!0;try{var o=a(s);return o}finally{if(Ir=!1,(ao!==null||to!==null)&&(sr(),ao&&(s=ao,a=to,to=ao=null,vm(s),a)))for(s=0;s<a.length;s++)vm(a[s])}}function Wo(a,s){var n=a.stateNode;if(n===null)return null;var o=n[xa]||null;if(o===null)return null;n=o[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(a=a.type,o=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!o;break e;default:a=!1}if(a)return null;if(n&&typeof n!="function")throw Error(d(231,s,typeof n));return n}var ws=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zr=!1;if(ws)try{var el={};Object.defineProperty(el,"passive",{get:function(){Zr=!0}}),window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{Zr=!1}var Hs=null,Kr=null,ni=null;
vendor: 3,067 bytes, line 48
48function jm(){if(ni)return ni;var a,s=Kr,n=s.length,o,c="value"in Hs?Hs.value:Hs.textContent,u=c.length;for(a=0;a<n&&s[a]===c[a];a++);var y=n-a;for(o=1;o<=y&&s[n-o]===c[u-o];o++);return ni=c.slice(a,1<o?1-o:void 0)}function oi(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function li(){return!0}function _m(){return!1}function mt(a){function s(n,o,c,u,y){this._reactName=n,this._targetInst=c,this.type=o,this.nativeEvent=u,this.target=y,this.currentTarget=null;for(var E in a)a.hasOwnProperty(E)&&(n=a[E],this[E]=n?n(u):u[E]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?li:_m,this.isPropagationStopped=_m,this}return H(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=li)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=li)},persist:function(){},isPersistent:li}),s}var Vs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ii=mt(Vs),al=H({},Vs,{view:0,detail:0}),Ub=mt(al),Yr,Qr,tl,ri=H({},al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xr,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==tl&&(tl&&a.type==="mousemove"?(Yr=a.screenX-tl.screenX,Qr=a.screenY-tl.screenY):Qr=Yr=0,tl=a),Yr)},movementY:function(a){return"movementY"in a?a.movementY:Qr}}),Nm=mt(ri),Hb=H({},ri,{dataTransfer:0}),Vb=mt(Hb),Gb=H({},al,{relatedTarget:0}),Jr=mt(Gb),Fb=H({},Vs,{animationName:0,elapsedTime:0,pseudoElement:0}),$b=mt(Fb),Ib=H({},Vs,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Zb=mt(Ib),Kb=H({},Vs,{data:0}),wm=mt(Kb),Yb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Jb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xb(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=Jb[a])?!!s[a]:!1}function Xr(){return Xb}var Wb=H({},al,{key:function(a){if(a.key){var s=Yb[a.key]||a.key;if(s!=="Unidentified")return s}
vendor: 5,373 bytes, line 48
48return a.type==="keypress"?(a=oi(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Qb[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xr,charCode:function(a){return a.type==="keypress"?oi(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?oi(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),eg=mt(Wb),ag=H({},ri,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sm=mt(ag),tg=H({},Vs,{submitter:0}),sg=mt(tg),ng=H({},al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xr}),og=mt(ng),lg=H({},Vs,{propertyName:0,elapsedTime:0,pseudoElement:0}),ig=mt(lg),rg=H({},ri,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),cg=mt(rg),dg=H({},Vs,{newState:0,oldState:0,source:0}),ug=mt(dg),mg=[9,13,27,32],Wr=ws&&"CompositionEvent"in window,sl=null;ws&&"documentMode"in document&&(sl=document.documentMode);var pg=ws&&"TextEvent"in window&&!sl,Cm=ws&&(!Wr||sl&&8<sl&&11>=sl),Em=" ",zm=!1;function km(a,s){switch(a){case"keyup":return mg.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Am(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var so=!1;function hg(a,s){switch(a){case"compositionend":return Am(s);case"keypress":return s.which!==32?null:(zm=!0,Em);case"textInput":return a=s.data,a===Em&&zm?null:a;default:return null}}function fg(a,s){if(so)return a==="compositionend"||!Wr&&km(a,s)?(a=jm(),ni=Kr=Hs=null,so=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Cm&&s.locale!=="ko"?null:s.data;default:return null}}var xg={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Mm(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!xg[a.type]:s==="textarea"}function Tm(a,s,n,o){ao?to?to.push(o):to=[o]:ao=o,s=cr(s,"onChange"),0<s.length&&(n=new ii("onChange","change",null,n,o),a.push({event:n,listeners:s}))}var nl=null,ol=null;function bg(a){yf(a,0)}function ci(a){var s=Xo(a);if(pm(s))return a}function Lm(a,s){if(a==="change")return s}var Rm=!1;if(ws){var ec;if(ws){var ac="oninput"in document;if(!ac){var qm=document.createElement("div");qm.setAttribute("oninput","return;"),ac=typeof qm.oninput=="function"}ec=ac}else ec=!1;Rm=ec&&(!document.documentMode||9<document.documentMode)}function Dm(){nl&&(nl.detachEvent("onpropertychange",Om),ol=nl=null)}function Om(a){if(a.propertyName==="value"&&ci(ol)){var s=[];Tm(s,ol,a,$r(a)),ym(bg,s)}}function gg(a,s,n){a==="focusin"?(Dm(),nl=s,ol=n,nl.attachEvent("onpropertychange",Om)):a==="focusout"&&Dm()}function vg(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return ci(ol)}function yg(a,s){if(a==="click")return ci(s)}function jg(a,s){if(a==="input"||a==="change")return ci(s)}function _g(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var St=typeof Object.is=="function"?Object.is:_g;function ll(a,s){if(St(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var n=Object.keys(a),o=Object.keys(s);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var c=n[o];if(!_a.call(s,c)||!St(a[c],s[c]))return!1}return!0}function tc(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Bm(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Pm(a,s){var n=Bm(a);a=0;for(var o;n;){if(n.nodeType===3){if(o=a+n.textContent.length,a<=s&&o>=s)return{node:n,offset:s-a};a=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Bm(n)}}function Um(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?Um(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function Hm(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=tc(a.document);s instanceof a.HTMLIFrameElement;){try{var n=typeof s.contentWindow.location.href=="string"}catch{n=!1}if(n)a=s.contentWindow;else break;s=tc(a.document)}return s}function sc(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var Ng=ws&&"documentMode"in document&&11>=document.documentMode,no=null,nc=null,il=null,oc=!1;function Vm(a,s,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;oc||no==null||no!==tc(o)||(o=no,"selectionStart"in o&&sc(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focu
vendor: 4,646 bytes, line 48
48sNode:o.focusNode,focusOffset:o.focusOffset}),il&&ll(il,o)||(il=o,o=cr(nc,"onSelect"),0<o.length&&(s=new ii("onSelect","select",null,s,n),a.push({event:s,listeners:o}),s.target=no)))}function jn(a,s){var n={};return n[a.toLowerCase()]=s.toLowerCase(),n["Webkit"+a]="webkit"+s,n["Moz"+a]="moz"+s,n}var oo={animationend:jn("Animation","AnimationEnd"),animationiteration:jn("Animation","AnimationIteration"),animationstart:jn("Animation","AnimationStart"),transitionrun:jn("Transition","TransitionRun"),transitionstart:jn("Transition","TransitionStart"),transitioncancel:jn("Transition","TransitionCancel"),transitionend:jn("Transition","TransitionEnd")},lc={},Gm={};ws&&(Gm=document.createElement("div").style,"AnimationEvent"in window||(delete oo.animationend.animation,delete oo.animationiteration.animation,delete oo.animationstart.animation),"TransitionEvent"in window||delete oo.transitionend.transition);function _n(a){if(lc[a])return lc[a];if(!oo[a])return a;var s=oo[a],n;for(n in s)if(s.hasOwnProperty(n)&&n in Gm)return lc[a]=s[n];return a}var Fm=_n("animationend"),$m=_n("animationiteration"),Im=_n("animationstart"),wg=_n("transitionrun"),Sg=_n("transitionstart"),Cg=_n("transitioncancel"),Zm=_n("transitionend"),Km=new Map,ic="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ic.push("scrollEnd");function Yt(a,s){Km.set(a,s),yn(s,[a])}var Eg=0;function Ss(a,s){if(a.name!=null&&a.name!=="auto")return a.name;if(s.autoName!==null)return s.autoName;a=Wt.identifierPrefix;var n=Eg++;return a="_"+a+"t_"+n.toString(32)+"_",s.autoName=a}function Ym(a){if(a==null||typeof a=="string")return a;var s=null,n=Co;if(n!==null)for(var o=0;o<n.length;o++){var c=a[n[o]];if(c!=null){if(c==="none")return"none";s=s==null?c:s+(" "+c)}}return s??a.default}function Cs(a,s){return a=Ym(a),s=Ym(s),s==null?a==="auto"?null:a:s==="auto"?null:s}var di=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Ot=[],lo=0,rc=0;function ui(){for(var a=lo,s=rc=lo=0;s<a;){var n=Ot[s];Ot[s++]=null;var o=Ot[s];Ot[s++]=null;var c=Ot[s];Ot[s++]=null;var u=Ot[s];if(Ot[s++]=null,o!==null&&c!==null){var y=o.pending;y===null?c.next=c:(c.next=y.next,y.next=c),o.pending=c}u!==0&&Qm(n,c,u)}}function mi(a,s,n,o){Ot[lo++]=a,Ot[lo++]=s,Ot[lo++]=n,Ot[lo++]=o,rc|=o,a.lanes|=o,a=a.alternate,a!==null&&(a.lanes|=o)}function cc(a,s,n,o){return mi(a,s,n,o),pi(a)}function Nn(a,s){return mi(a,null,null,s),pi(a)}function Qm(a,s,n){a.lanes|=n;var o=a.alternate;o!==null&&(o.lanes|=n);for(var c=!1,u=a.return;u!==null;)u.childLanes|=n,o=u.alternate,o!==null&&(o.childLanes|=n),u.tag===22&&(a=u.stateNode,a===null||a._visibility&1||(c=!0)),a=u,u=u.return;return a.tag===3?(u=a.stateNode,c&&s!==null&&(c=31-ct(n),a=u.hiddenUpdates,o=a[c],o===null?a[c]=[s]:o.push(s),s.lane=n|536870912),u):null}function pi(a){if(50<kl)throw kl=0,tr=null,Error(d(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var io={};function zg(a,s,n,o){this.tag=a,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bt(a,s,n,o){return new zg(a,s,n,o)}function dc(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Es(a,s){var n=a.alternate;return n===null?(n=bt(a.tag,s,a.key,a.mode),n.elementType=a.elementType,n.type=a.type,n.stateNode=a.stateNode,n.alternate=a,a.alternate=n):(n.pendingProps=s,n.type=a.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 1,112 bytes, line 48
48ons=null),n.flags=a.flags&1206910976,n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,s=a.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},n.sibling=a.sibling,n.index=a.index,n.ref=a.ref,n.refCleanup=a.refCleanup,n}function Jm(a,s){a.flags&=1206910978;var n=a.alternate;return n===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,a.type=n.type,s=n.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function hi(a,s,n,o,c,u){var y=0;if(o=a,typeof o=="function")dc(o)&&(y=1);else if(typeof o=="string")y=t1(a,n,ua.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(o){case da:return a=bt(31,n,s,c),a.elementType=da,a.lanes=u,a;
vendor: 31,632 bytes, line 48
48case O:return wn(n.children,c,u,s);case X:y=8,c|=24;break;case B:return a=bt(12,n,s,c|2),a.elementType=B,a.lanes=u,a;case $:return a=bt(13,n,s,c),a.elementType=$,a.lanes=u,a;case oe:return a=bt(19,n,s,c),a.elementType=oe,a.lanes=u,a;case Ze:case V:return a=c|32,a=bt(30,n,s,a),a.elementType=V,a.lanes=u,a.stateNode={autoName:null,paired:null,clones:null,ref:null},a;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case te:y=10;break e;case Z:y=9;break e;case P:y=11;break e;case de:y=14;break e;case ze:y=16,o=null;break e}y=29,n=Error(d(130,a===null?"null":typeof a,"")),o=null}return s=bt(y,n,s,c),s.elementType=a,s.type=o,s.lanes=u,s}function wn(a,s,n,o){return a=bt(7,a,o,s),a.lanes=n,a}function uc(a,s,n){return a=bt(6,a,null,s),a.lanes=n,a}function Xm(a){var s=bt(18,null,null,0);return s.stateNode=a,s}function mc(a,s,n){return s=bt(4,a.children!==null?a.children:[],a.key,s),s.lanes=n,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var Wm=new WeakMap;function Bt(a,s){if(typeof a=="object"&&a!==null){var n=Wm.get(a);return n!==void 0?n:(s={value:a,source:s,stack:Fe(s)},Wm.set(a,s),s)}return{value:a,source:s,stack:Fe(s)}}var ro=[],co=0,fi=null,rl=0,Pt=[],Ut=0,Gs=null,is=1,rs="";function zs(a,s){ro[co++]=rl,ro[co++]=fi,fi=a,rl=s}function ep(a,s,n){Pt[Ut++]=is,Pt[Ut++]=rs,Pt[Ut++]=Gs,Gs=a;var o=is;a=rs;var c=32-ct(o)-1;o&=~(1<<c),n+=1;var u=32-ct(s)+c;if(30<u){var y=c-c%5;u=(o&(1<<y)-1).toString(32),o>>=y,c-=y,is=1<<32-ct(s)+c|n<<c|o,rs=u+a}else is=1<<u|n<<c|o,rs=a}function xi(a){a.return!==null&&(zs(a,1),ep(a,1,0))}function pc(a){for(;a===fi;)fi=ro[--co],ro[co]=null,rl=ro[--co],ro[co]=null;for(;a===Gs;)Gs=Pt[--Ut],Pt[Ut]=null,rs=Pt[--Ut],Pt[Ut]=null,is=Pt[--Ut],Pt[Ut]=null}function ap(a,s){Pt[Ut++]=is,Pt[Ut++]=rs,Pt[Ut++]=Gs,is=s.id,rs=s.overflow,Gs=a}var Xa=null,za=null,Ye=!1,Fs=null,Ht=!1,hc=Error(d(519));function $s(a){var s=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cl(Bt(s,a)),hc}function tp(a){var s=a.stateNode,n=a.type,o=a.memoizedProps;switch(s[ea]=a,s[xa]=o,n){case"dialog":We("cancel",s),We("close",s);break;case"iframe":case"object":case"embed":We("load",s);break;case"video":case"audio":for(n=0;n<Ml.length;n++)We(Ml[n],s);break;case"source":We("error",s);break;case"img":case"image":case"link":We("error",s),We("load",s);break;case"details":We("toggle",s);break;case"input":We("invalid",s),hm(s,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":We("invalid",s);break;case"textarea":We("invalid",s),xm(s,o.value,o.defaultValue,o.children)}n=o.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||s.textContent===""+n||o.suppressHydrationWarning===!0||wf(s.textContent,n)?(o.popover!=null&&(We("beforetoggle",s),We("toggle",s)),o.onScroll!=null&&We("scroll",s),o.onScrollEnd!=null&&We("scrollend",s),o.onClick!=null&&(s.onclick=ls),s=!0):s=!1,s||$s(a,!0)}function bi(a){for(Xa=a.return;Xa;)switch(Xa.tag){case 5:case 31:case 13:Ht=!1;return;case 27:case 3:Ht=!0;return;default:Xa=Xa.return}}function uo(a){if(a!==Xa)return!1;if(!Ye)return bi(a),Ye=!0,!1;var s=a.tag,n;if((n=s!==3&&s!==27)&&((n=s===5)&&(n=a.type,n=!(n!=="form"&&n!=="button")||Fd(a.type,a.memoizedProps)),n=!n),n&&za&&$s(a),bi(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(d(317));za=Gf(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(d(317));za=Gf(a)}else s===27?(s=za,rn(a.type)?(a=Wd,Wd=null,za=a):za=s):za=Xa?Gt(a.stateNode.nextSibling):null;return!0}function Sn(){za=Xa=null,Ye=!1}function fc(){var a=Fs;return a!==null&&(yt===null?yt=a:yt.push.apply(yt,a),Fs=null),a}function cl(a){Fs===null?Fs=[a]:Fs.push(a)}var xc=Te(null),Cn=null,ks=null;function Is(a,s,n){Ge(xc,s._currentValue),s._currentValue=n}function As(a){a._currentValue=xc.current,Qe(xc)}function gi(a,s,n){for(;a!==null;){var o=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,o!==null&&(o.childLanes|=s)):o!==null&&(o.childLanes&s)!==s&&(o.childLanes|=s),a===n)break;a=a.return}}function bc(a,s,n,o){var c=a.child;for(c!==null&&(c.return=a);c!==null;){var u=c.dependencies;if(u!==null){var y=c.child;u=u.firstContext;e:for(;u!==null;){var E=u;u=c;for(var R=0;R<s.length;R++)if(E.context===s[R]){u.lanes|=n,E=u.alternate,E!==null&&(E.lanes|=n),gi(u.return,n,a),o||(y=null);break e}u=E.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(d(341));y.lanes|=n,u=y.alternate,u!==null&&(u.lanes|=n),gi(y,n,a),y=null}else c.tag===13&&c.memoizedState!==null&&c.memoizedState.dehydrated===null?(c.lanes|=n,y=c.alternate,y!==null&&(y.lanes|=n),gi(c.return,n,a),y=c.child,y=y!==null?y.sibling:null):y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===a){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function En(a,s,n,o){a=null;for(var c=s,u=!1;c!==null;){if(!u){if((c.flags&524288)!==0)u=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(d(387));if(y=y.memoizedProps,y!==null){var E=c.type;St(c.pendingProps.value,y.value)||(a!==null?a.push(E):a=[E])}}else if(c===Va.current){if(y=c.alternate,y===null)throw Error(d(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(a!==null?a.push(Do):a=[Do])}c=c.return}return a!==null&&bc(s,a,n,o),s.flags|=262144,a!==null}function vi(a){for(a=a.firstContext;a!==null;){if(!St(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function zn(a){Cn=a,ks=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function tt(a){return sp(Cn,a)}function yi(a,s){return Cn===null&&zn(a),sp(a,s)}function sp(a,s){var n=s._currentValue;if(s={context:s,memoizedValue:n,next:null},ks===null){if(a===null)throw Error(d(308));ks=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else ks=ks.next=s;return n}var kg=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(n,o){a.push(o)}};this.abort=function(){s.aborted=!0,a.forEach(function(n){return n()})}},Ag=l.unstable_scheduleCallback,Mg=l.unstable_NormalPriority,Ga={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gc(){return{controller:new kg,data:new Map,refCount:0}}function dl(a){a.refCount--,a.refCount===0&&Ag(Mg,function(){a.controller.abort()})}function np(a,s){if((a.pendingLanes&4194048)!==0){var n=a.transitionTypes;for(n===null&&(n=a.transitionTypes=[]),a=0;a<s.length;a++){var o=s[a];n.indexOf(o)===-1&&n.push(o)}}}var ul=null;function Tg(a){var s=a.transitionTypes;return a.transitionTypes=null,s}var ml=null,vc=0,kn=0,mo=null;function Lg(a,s){if(ml===null){var n=ml=[];vc=0,kn=qd(),mo={status:"pending",value:void 0,then:function(o){n.push(o)}}}return vc++,s.then(op,op),s}function op(){if(--vc===0&&(ul=null,ml!==null)){mo!==null&&(mo.status="fulfilled");var a=ml;ml=null,kn=0,mo=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function Rg(a,s){var n=[],o={status:"pending",value:null,reason:null,then:function(c){n.push(c)}};return a.then(function(){o.status="fulfilled",o.value=s;for(var c=0;c<n.length;c++)(0,n[c])(s)},function(c){for(o.status="rejected",o.reason=c,c=0;c<n.length;c++)(0,n[c])(void 0)}),o}var lp=le.S;le.S=function(a,s){if(Xh=Ra(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Lg(a,s),ul!==null)for(var n=Ao;n!==null;)np(n,ul),n=n.next;if(n=a.types,n!==null){for(var o=Ao;o!==null;)np(o,n),o=o.next;if(kn!==0){o=ul,o===null&&(o=ul=[]);for(var c=0;c<n.length;c++){var u=n[c];o.indexOf(u)===-1&&o.push(u)}}}lp!==null&&lp(a,s)};var An=Te(null);function yc(){var a=An.current;return a!==null?a:Ca.pooledCache}function ji(a,s){s===null?Ge(An,An.current):Ge(An,s.pool)}function ip(){var a=yc();return a===null?null:{parent:Ga._currentValue,pool:a}}var po=Error(d(460)),jc=Error(d(474)),_i=Error(d(542)),Ni={then:function(){}};function rp(a){return a=a.status,a==="fulfilled"||a==="rejected"}function cp(a,s,n){switch(n=a[n],n===void 0?a.push(s):n!==s&&(s.then(ls,ls),s=n),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,up(a),a===void 0&&!("reason"in s)?Error(d(600)):a;default:if(typeof s.status=="string")s.then(ls,ls);else{if(a=Ca,a!==null&&100<a.shellSuspendCounter)throw Error(d(482));a=s,a.status="pending",a.then(function(o){if(s.status==="pending"){var c=s;c.status="fulfilled",c.value=o}},function(o){if(s.status==="pending"){var c=s;c.status="rejected",c.reason=o}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,up(a),a}throw Tn=s,po}}function Mn(a){try{var s=a._init;return s(a._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Tn=n,po):n}}var Tn=null;function dp(){if(Tn===null)throw Error(d(459));var a=Tn;return Tn=null,a}function up(a){if(a===po||a===_i)throw Error(d(483))}var ho=null,pl=0;function wi(a){var s=pl;return pl+=1,ho===null&&(ho=[]),cp(ho,a,s)}function Zs(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Si(a,s){throw s.$$typeof===F?Error(d(525)):(a=Object.prototype.toString.call(s),Error(d(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function mp(a){function s(Y,G){if(a){var W=Y.deletions;W===null?(Y.deletions=[G],Y.flags|=16):W.push(G)}}function n(Y,G){if(!a)return null;for(;G!==null;)s(Y,G),G=G.sibling;return null}function o(Y){for(var G=new Map;Y!==null;)Y.key===null?G.set(Y.index,Y):G.set(Y.key,Y),Y=Y.sibling;return G}function c(Y,G){return Y=Es(Y,G),Y.index=0,Y.sibling=null,Y}function u(Y,G,W){return Y.index=W,a?(W=Y.alternate,W!==null?(W=W.index,W<G?(Y.flags|=2,G):W):(Y.flags|=134217730,G)):(Y.flags|=1048576,G)}function y(Y){return a&&Y.alternate===null&&(Y.flags|=134217730),Y}function E(Y,G,W,re){return G===null||G.tag!==6?(G=uc(W,Y.mode,re),G.return=Y,G):(G=c(G,W),G.return=Y,G)}function R(Y,G,W,re){var we=W.type;return we===O?(Y=se(Y,G,W.props.children,re,W.key),Zs(Y,W),Y):G!==null&&(G.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===ze&&Mn(we)===G.type)?(G=c(G,W.props),Zs(G,W),G.return=Y,G):(G=hi(W.type,W.key,W.props,null,Y.mode,re),Zs(G,W),G.return=Y,G)}function Q(Y,G,W,re){return G===null||G.tag!==4||G.stateNode.containerInfo!==W.containerInfo||G.stateNode.implementation!==W.implementation?(G=mc(W,Y.mode,re),G.return=Y,G):(G=c(G,W.children||[]),G.return=Y,G)}function se(Y,G,W,re,we){return G===null||G.tag!==7?(G=wn(W,Y.mode,re,we),G.return=Y,G):(G=c(G,W),G.return=Y,G)}function ce(Y,G,W){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=uc(""+G,Y.mode,W),G.return=Y,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case U:return W=hi(G.type,G.key,G.props,null,Y.mode,W),Zs(W,G),W.return=Y,W;case J:return G=mc(G,Y.mode,W),G.return=Y,G;case ze:return G=Mn(G),ce(Y,G,W)}if(he(G)||ge(G))return G=wn(G,Y.mode,W,null),G.return=Y,G;if(typeof G.then=="function")return ce(Y,wi(G),W);if(G.$$typeof===te)return ce(Y,yi(Y,G),W);Si(Y,G)}return null}function K(Y,G,W,re){var we=G!==null?G.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return we!==null?null:E(Y,G,""+W,re);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case U:return W.key===we?R(Y,G,W,re):null;case J:return W.key===we?Q(Y,G,W,re):null;case ze:return W=Mn(W),K(Y,G,W,re)}if(he(W)||ge(W))return we!==null?null:se(Y,G,W,re,null);if(typeof W.then=="function")return K(Y,G,wi(W),re);if(W.$$typeof===te)return K(Y,G,yi(Y,W),re);Si(Y,W)}return null}function ae(Y,G,W,re,we){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Y=Y.get(W)||null,E(G,Y,""+re,we);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case U:return Y=Y.get(re.key===null?W:re.key)||null,R(G,Y,re,we);case J:return Y=Y.get(re.key===null?W:re.key)||null,Q(G,Y,re,we);case ze:return re=Mn(re),ae(Y,G,W,re,we)}if(he(re)||ge(re))return Y=Y.get(W)||null,se(G,Y,re,we,null);if(typeof re.then=="function")return ae(Y,G,W,wi(re),we);if(re.$$typeof===te)return ae(Y,G,W,yi(G,re),we);Si(G,re)}return null}function ve(Y,G,W,re){for(var we=null,ta=null,Ae=G,Re=G=0,Ia=null;Ae!==null&&Re<W.length;Re++){Ae.index>Re?(Ia=Ae,Ae=null):Ia=Ae.sibling;var na=K(Y,Ae,W[Re],re);if(na===null){Ae===null&&(Ae=Ia);break}a&&Ae&&na.alternate===null&&s(Y,Ae),G=u(na,G,Re),ta===null?we=na:ta.sibling=na,ta=na,Ae=Ia}if(Re===W.length)return n(Y,Ae),Ye&&zs(Y,Re),we;if(Ae===null){for(;Re<W.length;Re++)Ae=ce(Y,W[Re],re),Ae!==null&&(G=u(Ae,G,Re),ta===null?we=Ae:ta.sibling=Ae,ta=Ae);return Ye&&zs(Y,Re),we}for(Ae=o(Ae);Re<W.length;Re++)Ia=ae(Ae,Y,Re,W[Re],re),Ia!==null&&(a&&(na=Ia.alternate,na!==null&&Ae.delete(na.key===null?Re:na.key)),G=u(Ia,G,Re),ta===null?we=Ia:ta.sibling=Ia,ta=Ia);return a&&Ae.forEach(function(pn){return s(Y,pn)}),Ye&&zs(Y,Re),we}function Ee(Y,G,W,re){if(W==null)throw Error(d(151));for(var we=null,ta=null,Ae=G,Re=G=0,Ia=null,na=W.next();Ae!==null&&!na.done;Re++,na=W.next()){Ae.index>Re?(Ia=Ae,Ae=null):Ia=Ae.sibling;var pn=K(Y,Ae,na.value,re);if(pn===null){Ae===null&&(Ae=Ia);break}a&&Ae&&pn.alternate===null&&s(Y,Ae),G=u(pn,G,Re),ta===null?we=pn:ta.sibling=pn,ta=pn,Ae=Ia}if(na.done)return n(Y,Ae),Ye&&zs(Y,Re),we;if(Ae===null){for(;!na.done;Re++,na=W.next())na=ce(Y,na.value,re),na!==null&&(G=u(na,G,Re),ta===null?we=na:ta.sibling=na,ta=na);return Ye&&zs(Y,Re),we}for(Ae=o(Ae);!na.done;Re++,na=W.next())na=ae(Ae,Y,Re,na.value,re),na!==null&&(a&&(Ia=na.alternate,Ia!==null&&Ae.delete(Ia.key===null?Re:Ia.key)),G=u(na,G,Re),ta===null?we=na:ta.sibling=na,ta=na);return a&&Ae.forEach(function(h1){return s(Y,h1)}),Ye&&zs(Y,Re),we}function He(Y,G,W,re){if(typeof W=="object"&&W!==null&&W.type===O&&W.key===null&&W.props.ref===void 0&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case U:e:{for(var we=W.key;G!==null;){if(G.key===we){if(we=W.type,we===O){if(G.tag===7){n(Y,G.sibling),re=c(G,W.props.children),Zs(re,W),re.return=Y,Y=re;break e}}else if(G.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===ze&&Mn(we)===G.type){n(Y,G.sibling),re=c(G,W.props),Zs(re,W),re.return=Y,Y=re;break e}n(Y,G);break}else s(Y,G);G=G.sibling}W.type===O?(re=wn(W.props.children,Y.mode,re,W.key),Zs(re,W),re.return=Y,Y=re):(re=hi(W.type,W.key,W.props,null,Y.mode,re),Zs(re,W),re.return=Y,Y=re)}return y(Y);case J:e:{for(we=W.key;G!==null;){if(G.key===we)if(G.tag===4&&G.stateNode.containerInfo===W.containerInfo&&G.stateNode.implementation===W.implementation){n(Y,G.sibling),re=c(G,W.children||[]),re.return=Y,Y=re;break e}else{n(Y,G);break}else s(Y,G);G=G.sibling}re=mc(W,Y.mode,re),re.return=Y,Y=re}return y(Y);case ze:return W=Mn(W),He(Y,G,W,re)}if(he(W))return ve(Y,G,W,re);if(ge(W)){if(we=ge(W),typeof we!="function")throw Error(d(150));return W=we.call(W),Ee(Y,G,W,re)}if(typeof W.then=="function")return He(Y,G,wi(W),re);if(W.$$typeof===te)return He(Y,G,yi(Y,W),re);Si(Y,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,G!==null&&G.tag===6?(n(Y,G.sibling),re=c(G,W),re.return=Y,Y=re):(n(Y,G),re=uc(W,Y.mode,re),re.return=Y,Y=re),y(Y)):n(Y,G)}return function(Y,G,W,re){try{pl=0;var we=He(Y,G,W,re);return ho=null,we}catch(Ae){if(Ae===po||Ae===_i)throw Ae;var ta=bt(29,Ae,null,Y.mode);return ta.lanes=re,ta.return=Y,ta}finally{}}}var Ln=mp(!0),pp=mp(!1),Ks=!1;function _c(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nc(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ys(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Qs(a,s,n){var o=a.updateQueue;if(o===null)return null;if(o=o.shared,(ca&2)!==0){var c=o.pending;return c===null?s.next=s:(s.next=c.next,c.next=s),o.pending=s,s=pi(a),Qm(a,null,n),s}return mi(a,o,s,n),pi(a)}function hl(a,s,n){if(s=s.updateQueue,s!==null&&(s=s.shared,(n&4194048)!==0)){var o=s.lanes;o&=a.pendingLanes,n|=o,s.lanes=n,Ve(a,n)}}function wc(a,s){var n=a.updateQueue,o=a.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var c=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var y={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?c=u=y:u=u.next=y,n=n.next}while(n!==null);u===null?c=u=s:u=u.next=s}else c=u=s;n={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:u,shared:o.shared,callbacks:o.callbacks},a.updateQueue=n;return}a=n.lastBaseUpdate,a===null?n.firstBaseUpdate=s:a.next=s,n.lastBaseUpdate=s}var Sc=!1;function fl(){if(Sc){var a=mo;if(a!==null)throw a}}function xl(a,s,n,o){Sc=!1;var c=a.updateQueue;Ks=!1;var u=c.firstBaseUpdate,y=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var R=E,Q=R.next;R.next=null,y===null?u=Q:y.next=Q,y=R;var se=a.alternate;se!==null&&(se=se.updateQueue,E=se.lastBaseUpdate,E!==y&&(E===null?se.firstBaseUpdate=Q:E.next=Q,se.lastBaseUpdate=R))}if(u!==null){var ce=c.baseState;y=0,se=Q=R=null,E=u;do{var K=E.lane&-536870913,ae=K!==E.lane;if(ae?(aa&K)===K:(o&K)===K){K!==0&&K===kn&&(Sc=!0),se!==null&&(se=se.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ve=a,Ee=E;K=s;var He=n;switch(Ee.tag){case 1:if(ve=Ee.payload,typeof ve=="function"){ce=ve.call(He,ce,K);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ee.payload,K=typeof ve=="function"?ve.call(He,ce,K):ve,K==null)break e;ce=H({},ce,K);break e;case 2:Ks=!0}}K=E.callback,K!==null&&(a.flags|=64,ae&&(a.flags|=8192),ae=c.callbacks,ae===null?c.callbacks=[K]:ae.push(K))}else ae={lane:K,tag:E.tag,payload:E.payload,callback:E.callback,next:null},se===null?(Q=se=ae,R=ce):se=se.next=ae,y|=K;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;ae=E,E=ae.next,ae.next=null,c.lastBaseUpdate=ae,c.shared.pending=null}}while(!0);se===null&&(R=ce),c.baseState=R,c.firstBaseUpdate=Q,c.lastBaseUpdate=se,u===null&&(c.shared.lanes=0),sn|=y,a.lanes=y,a.memoizedState=ce}}function hp(a,s){if(typeof a!="function")throw Error(d(191,a));a.call(s)}function fp(a,s){var n=a.callbacks;if(n!==null)for(a.callbacks=null,a=0;a<n.length;a++)hp(n[a],s)}var Js=Te(null),Ci=Te(0);function xp(a,s){a=qs,Ge(Ci,a),Ge(Js,s),qs=a|s.baseLanes}function Cc(){Ge(Ci,qs),Ge(Js,Js.current)}function Ec(){qs=Ci.current,Qe(Js),Qe(Ci)}var st=Te(null),dt=null;function Xs(a){var s=a.alternate;Ge(nt,nt.current&1),Ge(st,a),dt===null&&(s===null||Js.current!==null||s.memoizedState!==null)&&(dt=a)}function zc(a){Ge(nt,nt.current),Ge(st,a),dt===null&&(dt=a)}function bp(a){a.tag===22?(Ge(nt,nt.current),Ge(st,a),dt===null&&(dt=a)):Ws()}function Ws(){Ge(nt,nt.current),Ge(st,st.current)}function Ct(a){Qe(st),dt===a&&(dt=null),Qe(nt)}var nt=Te(0);function bl(a,s){Ge(st,st.current),Ge(nt,s)}function kc(a){Qe(nt),Qe(st),dt===a&&(dt=null)}function Ei(a){for(var s=a;s!==null;){if(s.tag===13){var n=s.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Jd(n)||Xd(n)))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!=="independent"){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Ms=0,Ue=null,Na=null,Fa=null,zi=!1,fo=!1,Rn=!1,ki=0,gl=0,xo=null,qg=0;function Ba(){throw Error(d(321))}function Ac(a,s){if(s===null)return!1;for(var n=0;n<s.length&&n<a.length;n++)if(!St(a[n],s[n]))return!1;return!0}function Mc(a,s,n,o,c,u){return Ms=u,Ue=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,le.H=a===null||a.memoizedState===null?eh:ah,Rn=!1,u=n(o,c),Rn=!1,fo&&(u=vp(s,n,o,c)),gp(a),u}function gp(a){le.H=Di;var s=Na!==null&&Na.next!==null;if(Ms=0,Fa=Na=Ue=null,zi=!1,gl=0,xo=null,s)throw Error(d(300));a===null||$a||(a=a.dependencies,a!==null&&vi(a)&&($a=!0))}function vp(a,s,n,o){Ue=a;var c=0;do{if(fo&&(xo=null),gl=0,fo=!1,25<=c)throw Error(d(301));if(c+=1,Fa=Na=null,a.updateQueue!=null){var u=a.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}le.H=Gg,u=s(n,o)}while(fo);return u}function Dg(){var a=le.H,s=a.useState()[0];return s=typeof s.then=="function"?vl(s):s,a=a.useState()[0],(Na!==null?Na.memoizedState:null)!==a&&(Ue.flags|=1024),s}function Tc(){var a=ki!==0;return ki=0,a}function Lc(a,s,n){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~n}function Rc(a){if(zi){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}zi=!1}Ms=0,Fa=Na=Ue=null,fo=!1,gl=ki=0,xo=null}function pt(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fa===null?Ue.memoizedState=Fa=a:Fa=Fa.next=a,Fa}function Ha(){if(Na===null){var a=Ue.alternate;a=a!==null?a.memoizedState:null}else a=Na.next;var s=Fa===null?Ue.memoizedState:Fa.next;if(s!==null)Fa=s,Na=a;else{if(a===null)throw Ue.alternate===null?Error(d(467)):Error(d(310));Na=a,a={memoizedState:Na.memoizedState,baseState:Na.baseState,baseQueue:Na.baseQueue,queue:Na.queue,next:null},Fa===null?Ue.memoizedState=Fa=a:Fa=Fa.next=a}return Fa}function Ai(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vl(a){var s=gl;return gl+=1,xo===null&&(xo=[]),a=cp(xo,a,s),s=Ue,(Fa===null?s.memoizedState:Fa.next)===null&&(s=s.alternate,le.H=s===null||s.memoizedState===null?eh:ah),a}function Mi(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return vl(a);if(a.$$typeof===pe)return;if(a.$$typeof===te)return tt(a)}throw Error(d(438,String(a)))}function qc(a){var s=null,n=Ue.updateQueue;if(n!==null&&(s=n.memoCache),s==null){var o=Ue.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(s={data:o.data.map(function(c){return c.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),n===null&&(n=Ai(),Ue.updateQueue=n),n.memoCache=s,n=s.data[s.index],n===void 0)for(n=s.data[s.index]=Array(a),o=0;o<a;o++)n[o]=Ea;return s.index++,n}function Ts(a,s){return typeof s=="function"?s(a):s}function Ti(a){var s=Ha();return Dc(s,Na,a)}function Dc(a,s,n){var o=a.queue;if(o===null)throw Error(d(311));o.lastRenderedReducer=n;var c=a.baseQueue,u=o.pending;if(u!==null){if(c!==null){var y=c.next;c.next=u.next,u.next=y}s.baseQueue=c=u,o.pending=null}if(u=a.baseState,c===null)a.memoizedState=u;else{s=c.next;var E=y=null,R=null,Q=s,se=!1;do{var ce=Q.lane&-536870913;if(ce!==Q.lane?(aa&ce)===ce:(Ms&ce)===ce){var K=Q.revertLane;if(K===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ce===kn&&(se=!0);else if((Ms&K)===K){Q=Q.next,K===kn&&(se=!0);continue}else ce={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},R===null?(E=R=ce,y=u):R=R.next=ce,Ue.lanes|=K,sn|=K;ce=Q.action,Rn&&n(u,ce),u=Q.hasEagerState?Q.eagerState:n(u,ce)}else K={lane:ce,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},R===null?(E=R=K,y=u):R=R.next=K,Ue.lanes|=ce,sn|=ce;Q=Q.next}while(Q!==null&&Q!==s);if(R===null?y=u:R.next=E,!St(u,a.memoizedState)&&($a=!0,se&&(n=mo,n!==null)))throw n;a.memoizedState=u,a.baseState=y,a.baseQueue=R,o.lastRenderedState=u}return c===null&&(o.lanes=0),[a.memoizedState,o.dispatch]}function Oc(a){var s=Ha(),n=s.queue;if(n===null)throw Error(d(311));n.lastRenderedReducer=a;var o=n.dispatch,c=n.pending,u=s.memoizedState;if(c!==null){n.pending=null;var y=c=c.next;do u=a(u,y.action),y=y.next;while(y!==c);St(u,s.memoizedState)||($a=!0),s.memoizedState=u,s.baseQueue===null&&(s.baseState=u),n.lastRenderedState=u}return[u,o]}function yp(a,s,n){var o=Ue,c=Ha(),u=Ye;if(u){if(n===void 0)throw Error(d(407));n=n()}else n=s();var y=!St((Na||c).memoizedState,n);if(y&&(c.memoizedState=n,$a=!0),c=c.queue,Uc(Np.bind(null,o,c,a),[a]),a=c.getSnapshot!==s||y||Fa!==null&&(Fa.memoizedState.tag&1)!==0,bo(a?9:8,{destroy:void 0},_p.bind(null,o,c,n,s),null),a){if(o.flags|=2048,Ca===null)throw Error(d(349));u||(Ms&127)!==0||jp(o,s,n)}return n}function jp(a,s,n){a.flags|=16384,a={getSnapshot:s,value:n},s=Ue.updateQueue,s===null?(s=Ai(),Ue.updateQueue=s,s.stores=[a]):(n=s.stores,n===null?s.stores=[a]:n.push(a))}function _p(a,s,n,o){s.value=n,s.getSnapshot=o,wp(s)&&Sp(a)}function Np(a,s,n){return n(function(){wp(s)&&Sp(a)})}function wp(a){var s=a.getSnapshot;a=a.value;try{var n=s();return!St(a,n)}catch{return!0}}function Sp(a){var s=Nn(a,2);s!==null&&jt(s,a,2)}function Bc(a){var s=pt();if(typeof a=="function"){var n=a;if(a=n(),Rn){qt(!0);try{n()}finally{qt(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ts,lastRenderedState:a},s}function Cp(a,s,n,o){return a.baseState=n,Dc(a,Na,typeof o=="function"?o:Ts)}function Og(a,s,n,o,c){if(qi(a))throw Error(d(485));if(a=s.action,a!==null){var u={payload:c,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){u.listeners.push(y)}};le.T!==null?n(!0):u.isTransition=!1,o(u),n=s.pending,n===null?(u.next=s.pending=u,Ep(s,u)):(u.next=n.next,s.pending=n.next=u)}}function Ep(a,s){var n=s.action,o=s.payload,c=a.state;if(s.isTransition){var u=le.T,y={};y.types=u!==null?u.types:null,le.T=y;try{var E=n(c,o),R=le.S;R!==null&&R(y,E),zp(a,s,E)}catch(Q){Pc(a,s,Q)}finally{u!==null&&y.types!==null&&(u.types=y.types),le.T=u}}else try{u=n(c,o),zp(a,s,u)}catch(Q){Pc(a,s,Q)}}function zp(a,s,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){kp(a,s,o)},function(o){return Pc(a,s,o)}):kp(a,s,n)}function kp(a,s,n){s.status="fulfilled",s.value=n,Ap(s),a.state=n,s=a.pending,s!==null&&(n=s.next,n===s?a.pending=null:(n=n.next,s.next=n,Ep(a,n)))}function Pc(a,s,n){var o=a.pending;if(a.pending=null,o!==null){o=o.next;do s.status="rejected",s.reason=n,Ap(s),s=s.next;while(s!==o)}a.action=null}function Ap(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function Mp(a,s){return s}function Tp(a,s){if(Ye){var n=Ca.formState;if(n!==null){e:{var o=Ue;if(Ye){if(za){a:{for(var c=za,u=Ht;c.nodeType!==8;){if(!u){c=null;break a}if(c=Gt(c.nextSibling),c===null){c=null;break a}}u=c.data,c=u==="F!"||u==="F"?c:null}if(c){za=Gt(c.nextSibling),o=c.data==="F!";break e}}$s(o)}o=!1}o&&(s=n[0])}}return n=pt(),n.memoizedState=n.baseState=s,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mp,lastRenderedState:s},n.queue=o,n=Jp.bind(null,Ue,o),o.dispatch=n,o=Bc(!1),u=$c.bind(null,Ue,!1,o.queue),o=pt(),c={state:s,dispatch:null,action:a,pending:null},o.queue=c,n=Og.bind(null,Ue,c,u,n),c.dispatch=n,o.memoizedState=a,[s,n,!1]}function Lp(a){var s=Ha();return Rp(s,Na,a)}function Rp(a,s,n){if(s=Dc(a,s,Mp)[0],a=Ti(Ts)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var o=vl(s)}catch(y){throw y===po?_i:y}else o=s;s=Ha();var c=s.queue,u=c.dispatch;return n!==s.memoizedState&&(Ue.flags|=2048,bo(9,{destroy:void 0},Bg.bind(null,c,n),null)),[o,u,a]}function Bg(a,s){a.action=s}function qp(a){var s=Ha(),n=Na;if(n!==null)return Rp(s,n,a);Ha(),s=s.memoizedState,n=Ha();var o=n.queue.dispatch;return n.memoizedState=a,[s,o,!1]}function bo(a,s,n,o){return a={tag:a,create:n,deps:o,inst:s,next:null},s=Ue.updateQueue,s===null&&(s=Ai(),Ue.updateQueue=s),n=s.lastEffect,n===null?s.lastEffect=a.next=a:(o=n.next,n.next=a,a.next=o,s.lastEffect=a),a}function Dp(){return Ha().memoizedState}function Li(a,s,n,o){var c=pt();Ue.flags|=a,c.memoizedState=bo(1|s,{destroy:void 0},n,o===void 0?null:o)}function Ri(a,s,n,o){var c=Ha();o=o===void 0?null:o;var u=c.memoizedState.inst;Na!==null&&o!==null&&Ac(o,Na.memoizedState.deps)?c.memoizedState=bo(s,u,n,o):(Ue.flags|=a,c.memoizedState=bo(1|s,u,n,o))}function Op(a,s){Li(8390656,8,a,s)}function Uc(a,s){Ri(2048,8,a,s)}function Pg(a){Ue.flags|=4;var s=Ue.updateQueue;if(s===null)s=Ai(),Ue.updateQueue=s,s.events=[a];else{var n=s.events;n===null?s.events=[a]:n.push(a)}}function Bp(a){var s=Ha().memoizedState;return Pg({ref:s,nextImpl:a}),function(){if((ca&2)!==0)throw Error(d(440));return s.impl.apply(void 0,arguments)}}function Pp(a,s){return Ri(4,2,a,s)}function Up(a,s){return Ri(4,4,a,s)}function Hp(a,s){if(typeof s=="function"){a=a();var n=s(a);return function(){typeof n=="function"?n():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function Vp(a,s,n){n=n!=null?n.concat([a]):null,Ri(4,4,Hp.bind(null,s,a),n)}function Hc(){}function Gp(a,s){var n=Ha();s=s===void 0?null:s;var o=n.memoizedState;return s!==null&&Ac(s,o[1])?o[0]:(n.memoizedState=[a,s],a)}function Fp(a,s){var n=Ha();s=s===void 0?null:s;var o=n.memoizedState;if(s!==null&&Ac(s,o[1]))return o[0];if(o=a(),Rn){qt(!0);try{a()}finally{qt(!1)}}return n.memoizedState=[o,s],o}function Vc(a,s,n){return n===void 0||(Ms&1073741824)!==0&&(aa&261930)===0?a.memoizedState=s:(a.memoizedState=n,a=ef(),Ue.lanes|=a,sn|=a,n)}function $p(a,s,n,o){return St(n,s)?n:Js.current!==null?(a=Vc(a,n,o),St(a,s)||($a=!0),a):(Ms&106)===0||(Ms&1073741824)!==0&&(aa&261930)===0?($a=!0,a.memoizedState=n):(a=ef(),Ue.lanes|=a,sn|=a,s)}function Ip(a,s,n,o,c){var u=me.p;me.p=u!==0&&8>u?u:8;var y=le.T,E={};E.types=y!==null?y.types:null,le.T=E,$c(a,!1,s,n);try{var R=c(),Q=le.S;if(Q!==null&&Q(E,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var se=Rg(R,o);yl(a,s,se,At(a))}else yl(a,s,o,At(a))}catch(ce){yl(a,s,{then:function(){},status:"rejected",reason:ce},At())}finally{me.p=u,y!==null&&E.types!==null&&(y.types=E.types),le.T=y}}function Ug(){}function Gc(a,s,n,o){if(a.tag!==5)throw Error(d(476));var c=Zp(a).queue;Ip(a,c,s,Be,n===null?Ug:function(){return Kp(a),n(o)})}function Zp(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:Be,baseState:Be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ts,lastRenderedState:Be},next:null};var n={};return s.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ts,lastRenderedState:n},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function Kp(a){var s=Zp(a);s.next===null&&(s=a.alternate.memoizedState),yl(a,s.next.queue,{},At())}function Fc(){return tt(Do)}function Yp(){return Ha().memoizedState}function Qp(){return Ha().memoizedState}function Hg(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var n=At();a=Ys(n);var o=Qs(s,a,n);o!==null&&(jt(o,s,n),hl(o,s,n)),s={cache:gc()},a.payload=s;return}s=s.return}}function Vg(a,s,n){var o=At();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},qi(a)?Xp(s,n):(n=cc(a,s,n,o),n!==null&&(jt(n,a,o),Wp(n,s,o)))}function Jp(a,s,n){var o=At();yl(a,s,n,o)}function yl(a,s,n,o){var c={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(qi(a))Xp(s,c);else{var u=a.alternate;if(a.lanes===0&&(u===null||u.lanes===0)&&(u=s.lastRenderedReducer,u!==null))try{var y=s.lastRenderedState,E=u(y,n);if(c.hasEagerState=!0,c.eagerState=E,St(E,y))return mi(a,s,c,0),Ca===null&&ui(),!1}catch{}finally{}if(n=cc(a,s,c,o),n!==null)return jt(n,a,o),Wp(n,s,o),!0}return!1}function $c(a,s,n,o){if(o={lane:2,revertLane:qd(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},qi(a)){if(s)throw Error(d(479))}else s=cc(a,n,o,2),s!==null&&jt(s,a,2)}function qi(a){var s=a.alternate;return a===Ue||s!==null&&s===Ue}function Xp(a,s){fo=zi=!0;var n=a.pending;n===null?s.next=s:(s.next=n.next,n.next=s),a.pending=s}function Wp(a,s,n){if((n&4194048)!==0){var o=s.lanes;o&=a.pendingLanes,n|=o,s.lanes=n,Ve(a,n)}}var Di={readContext:tt,use:Mi,useCallback:Ba,useContext:Ba,useEffect:Ba,useImperativeHandle:Ba,useLayoutEffect:Ba,useInsertionEffect:Ba,useMemo:Ba,useReducer:Ba,useRef
vendor: 4,799 bytes, line 48
48:Ba,useState:Ba,useDebugValue:Ba,useDeferredValue:Ba,useTransition:Ba,useSyncExternalStore:Ba,useId:Ba,useHostTransitionStatus:Ba,useFormState:Ba,useActionState:Ba,useOptimistic:Ba,useMemoCache:Ba,useCacheRefresh:Ba,useEffectEvent:Ba},eh={readContext:tt,use:Mi,useCallback:function(a,s){return pt().memoizedState=[a,s===void 0?null:s],a},useContext:tt,useEffect:Op,useImperativeHandle:function(a,s,n){n=n!=null?n.concat([a]):null,Li(4194308,4,Hp.bind(null,s,a),n)},useLayoutEffect:function(a,s){return Li(4194308,4,a,s)},useInsertionEffect:function(a,s){Li(4,2,a,s)},useMemo:function(a,s){var n=pt();s=s===void 0?null:s;var o=a();if(Rn){qt(!0);try{a()}finally{qt(!1)}}return n.memoizedState=[o,s],o},useReducer:function(a,s,n){var o=pt();if(n!==void 0){var c=n(s);if(Rn){qt(!0);try{n(s)}finally{qt(!1)}}}else c=s;return o.memoizedState=o.baseState=c,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:c},o.queue=a,a=a.dispatch=Vg.bind(null,Ue,a),[o.memoizedState,a]},useRef:function(a){var s=pt();return a={current:a},s.memoizedState=a},useState:function(a){a=Bc(a);var s=a.queue,n=Jp.bind(null,Ue,s);return s.dispatch=n,[a.memoizedState,n]},useDebugValue:Hc,useDeferredValue:function(a,s){var n=pt();return Vc(n,a,s)},useTransition:function(){var a=Bc(!1);return a=Ip.bind(null,Ue,a.queue,!0,!1),pt().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,n){var o=Ue,c=pt();if(Ye){if(n===void 0)throw Error(d(407));n=n()}else{if(n=s(),Ca===null)throw Error(d(349));(aa&127)!==0||jp(o,s,n)}c.memoizedState=n;var u={value:n,getSnapshot:s};return c.queue=u,Op(Np.bind(null,o,u,a),[a]),o.flags|=2048,bo(9,{destroy:void 0},_p.bind(null,o,u,n,s),null),n},useId:function(){var a=pt(),s=Ca.identifierPrefix;if(Ye){var n=rs,o=is;n=(o&~(1<<32-ct(o)-1)).toString(32)+n,s="_"+s+"R_"+n,n=ki++,0<n&&(s+="H"+n.toString(32)),s+="_"}else n=qg++,s="_"+s+"r_"+n.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:Fc,useFormState:Tp,useActionState:Tp,useOptimistic:function(a){var s=pt();s.memoizedState=s.baseState=a;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=n,s=$c.bind(null,Ue,!0,n),n.dispatch=s,[a,s]},useMemoCache:qc,useCacheRefresh:function(){return pt().memoizedState=Hg.bind(null,Ue)},useEffectEvent:function(a){var s=pt(),n={impl:a};return s.memoizedState=n,function(){if((ca&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},ah={readContext:tt,use:Mi,useCallback:Gp,useContext:tt,useEffect:Uc,useImperativeHandle:Vp,useInsertionEffect:Pp,useLayoutEffect:Up,useMemo:Fp,useReducer:Ti,useRef:Dp,useState:function(){return Ti(Ts)},useDebugValue:Hc,useDeferredValue:function(a,s){var n=Ha();return $p(n,Na.memoizedState,a,s)},useTransition:function(){var a=Ti(Ts)[0],s=Ha().memoizedState;return[typeof a=="boolean"?a:vl(a),s]},useSyncExternalStore:yp,useId:Yp,useHostTransitionStatus:Fc,useFormState:Lp,useActionState:Lp,useOptimistic:function(a,s){var n=Ha();return Cp(n,Na,a,s)},useMemoCache:qc,useCacheRefresh:Qp,useEffectEvent:Bp},Gg={readContext:tt,use:Mi,useCallback:Gp,useContext:tt,useEffect:Uc,useImperativeHandle:Vp,useInsertionEffect:Pp,useLayoutEffect:Up,useMemo:Fp,useReducer:Oc,useRef:Dp,useState:function(){return Oc(Ts)},useDebugValue:Hc,useDeferredValue:function(a,s){var n=Ha();return Na===null?Vc(n,a,s):$p(n,Na.memoizedState,a,s)},useTransition:function(){var a=Oc(Ts)[0],s=Ha().memoizedState;return[typeof a=="boolean"?a:vl(a),s]},useSyncExternalStore:yp,useId:Yp,useHostTransitionStatus:Fc,useFormState:qp,useActionState:qp,useOptimistic:function(a,s){var n=Ha();return Na!==null?Cp(n,Na,a,s):(n.baseState=a,[a,n.queue.dispatch])},useMemoCache:qc,useCacheRefresh:Qp,useEffectEvent:Bp};function Ic(a,s,n,o){s=a.memoizedState,n=n(o,s),n=n==null?s:H({},s,n),a.memoizedState=n,a.lanes===0&&(a.updateQueue.baseState=n)}var Zc={enqueueSetState:function(a,s,n){a=a._reactInternals;var o=At(),c=Ys(o);c.payload=s,n!=null&&(c.callback=n),s=Qs(a,c,o),s!==null&&(jt(s,a,o),hl(s,a,o))},enqueueReplaceState:function(a,s,n){a=a._reactInternals;var o=At(),c=Ys(o);c.tag=1,c.payload=s,n!=null&&(c.callback=n),s=Qs(a,c,o),s!==null&&(jt(s,a,o),hl(s,a,o))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var n=At(),o=Ys(n);o.tag=2,s!=null&&(o.callback=s),s=Qs(a,o,n),s!==null&&(jt(s,a,n),hl(s,a,n))}};function th(a,s,n,o,c,u,y){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(o,u,y):s.prototype&&s.prototype.isPureReactComponent?!ll(n,o)||!ll(c,u):!0}function sh(a,s,n,o){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(n,o),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(n,o),s.state!==a&&Zc.enqueueReplaceState(s,s.state,null)}function qn(a,s){var n=s;
vendor: 69,764 bytes, line 48
48if("ref"in s){n={};for(var o in s)o!=="ref"&&(n[o]=s[o])}if(a=a.defaultProps){n===s&&(n=H({},n));for(var c in a)n[c]===void 0&&(n[c]=a[c])}return n}function nh(a){di(a)}function oh(a){console.error(a)}function lh(a){di(a)}function Oi(a,s){try{var n=a.onUncaughtError;n(s.value,{componentStack:s.stack})}catch(o){setTimeout(function(){throw o})}}function ih(a,s,n){try{var o=a.onCaughtError;o(n.value,{componentStack:n.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Kc(a,s,n){return n=Ys(n),n.tag=3,n.payload={element:null},n.callback=function(){Oi(a,s)},n}function rh(a){return a=Ys(a),a.tag=3,a}function ch(a,s,n,o){var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var u=o.value;a.payload=function(){return c(u)},a.callback=function(){ih(s,n,o)}}var y=n.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(a.callback=function(){ih(s,n,o),typeof c!="function"&&(nn===null?nn=new Set([this]):nn.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})})}function Fg(a,s,n,o,c){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(s=n.alternate,s!==null&&En(s,n,c,!0),n=st.current,n!==null){switch(n.tag){case 31:case 13:case 19:return dt===null?nr():n.alternate===null&&Pa===0&&(Pa=3),n.flags&=-257,n.flags|=65536,n.lanes=c,o===Ni?n.flags|=16384:(s=n.updateQueue,s===null?n.updateQueue=new Set([o]):s.add(o),Td(a,o,c)),!1;case 22:return n.flags|=65536,o===Ni?n.flags|=16384:(s=n.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=s):(n=s.retryQueue,n===null?s.retryQueue=new Set([o]):n.add(o)),Td(a,o,c)),!1}throw Error(d(435,n.tag))}return Td(a,o,c),nr(),!1}if(Ye)return s=st.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=c,o!==hc&&(a=Error(d(422),{cause:o}),cl(Bt(a,n)))):(o!==hc&&(s=Error(d(423),{cause:o}),cl(Bt(s,n))),a=a.current.alternate,a.flags|=65536,c&=-c,a.lanes|=c,o=Bt(o,n),c=Kc(a.stateNode,o,c),wc(a,c),Pa!==4&&(Pa=2)),!1;var u=Error(d(520),{cause:o});if(u=Bt(u,n),zl===null?zl=[u]:zl.push(u),Pa!==4&&(Pa=2),s===null)return!0;o=Bt(o,n),n=s;do{switch(n.tag){case 3:return n.flags|=65536,a=c&-c,n.lanes|=a,a=Kc(n.stateNode,o,a),wc(n,a),!1;case 1:if(s=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(nn===null||!nn.has(u))))return n.flags|=65536,c&=-c,n.lanes|=c,c=rh(c),ch(c,a,n,o),wc(n,c),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Yc=Error(d(461)),$a=!1;function Qa(a,s,n,o){s.child=a===null?pp(s,null,n,o):Ln(s,a.child,n,o)}function dh(a,s,n,o,c){n=n.render;var u=s.ref;if("ref"in o){var y={};for(var E in o)E!=="ref"&&(y[E]=o[E])}else y=o;return zn(s),o=Mc(a,s,n,y,u,c),E=Tc(),a!==null&&!$a?(Lc(a,s,c),Ls(a,s,c)):(Ye&&E&&xi(s),s.flags|=1,Qa(a,s,o,c),s.child)}function uh(a,s,n,o,c){if(a===null){var u=n.type;return typeof u=="function"&&!dc(u)&&u.defaultProps===void 0&&n.compare===null?(s.tag=15,s.type=u,mh(a,s,u,o,c)):(a=hi(n.type,null,o,s,s.mode,c),a.ref=s.ref,a.return=s,s.child=a)}if(u=a.child,!sd(a,c)){var y=u.memoizedProps;if(n=n.compare,n=n!==null?n:ll,n(y,o)&&a.ref===s.ref)return Ls(a,s,c)}return s.flags|=1,a=Es(u,o),a.ref=s.ref,a.return=s,s.child=a}function mh(a,s,n,o,c){if(a!==null){var u=a.memoizedProps;if(ll(u,o)&&a.ref===s.ref)if($a=!1,s.pendingProps=o=u,sd(a,c))(a.flags&131072)!==0&&($a=!0);else return s.lanes=a.lanes,Ls(a,s,c)}return Qc(a,s,n,o,c)}function ph(a,s,n,o){var c=o.children,u=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((s.flags&128)!==0){if(u=u!==null?u.baseLanes|n:n,a!==null){for(o=s.child=a.child,c=0;o!==null;)c=c|o.lanes|o.childLanes,o=o.sibling;o=c&~u}else o=0,s.child=null;return hh(a,s,u,n,o)}if((n&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&ji(s,u!==null?u.cachePool:null),u!==null?xp(s,u):Cc(),bp(s);else return o=s.lanes=536870912,hh(a,s,u!==null?u.baseLanes|n:n,n,o)}else u!==null?(ji(s,u.cachePool),xp(s,u),Ws(),s.memoizedState=null):(a!==null&&ji(s,null),Cc(),Ws());return Qa(a,s,c,n),s.child}function jl(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function hh(a,s,n,o,c){var u=yc();return u=u===null?null:{parent:Ga._currentValue,pool:u},s.memoizedState={baseLanes:n,cachePool:u},a!==null&&ji(s,null),Cc(),bp(s),a!==null&&En(a,s,o,!0),s.childLanes=c,null}function Bi(a,s){return s=Pi({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function fh(a,s,n){return Ln(s,a.child,null,n),a=Bi(s,s.pendingProps),a.flags|=2,Ct(s),s.memoizedState=null,a}function $g(a,s,n){var o=s.pendingProps,c=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Ye){if(o.mode==="hidden")return a=Bi(s,o),s.lanes=536870912,a.memoizedState={baseLanes:0,cachePool:null},jl(null,a);if(zc(s),(a=za)?(a=Vf(a,Ht),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Gs!==null?{id:is,overflow:rs}:null,retryLane:536870912,hydrationErrors:null},n=Xm(a),n.return=s,s.child=n,Xa=s,za=null)):a=null,a===null)throw $s(s);return s.lanes=536870912,null}return Bi(s,o)}var u=a.memoizedState;if(u!==null){var y=u.dehydrated;if(zc(s),c)if(s.flags&256)s.flags&=-257,s=fh(a,s,n);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(d(558));else if($a||En(a,s,n,!1),c=(n&a.childLanes)!==0,$a||c){if(Js.current===null){if(o=Ca,o!==null&&(y=Me(o,n),y!==0&&y!==u.retryLane))throw u.retryLane=y,Nn(a,y),jt(o,a,y),Yc;nr()}s=fh(a,s,n)}else a=u.treeContext,za=Gt(y.nextSibling),Xa=s,Ye=!0,Fs=null,Ht=!1,a!==null&&ap(s,a),s=Bi(s,o),s.flags|=134221824;return s}return a=Es(a.child,{mode:o.mode,children:o.children}),a.ref=s.ref,s.child=a,a.return=s,a}function go(a,s){var n=s.ref;if(n===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(d(284));(a===null||a.ref!==n)&&(s.flags|=4194816)}}function Qc(a,s,n,o,c){return zn(s),n=Mc(a,s,n,o,void 0,c),o=Tc(),a!==null&&!$a?(Lc(a,s,c),Ls(a,s,c)):(Ye&&o&&xi(s),s.flags|=1,Qa(a,s,n,c),s.child)}function xh(a,s,n,o,c,u){return zn(s),s.updateQueue=null,n=vp(s,o,n,c),gp(a),o=Tc(),a!==null&&!$a?(Lc(a,s,u),Ls(a,s,u)):(Ye&&o&&xi(s),s.flags|=1,Qa(a,s,n,u),s.child)}function bh(a,s,n,o,c){if(zn(s),s.stateNode===null){var u=io,y=n.contextType;typeof y=="object"&&y!==null&&(u=tt(y)),u=new n(o,u),s.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Zc,s.stateNode=u,u._reactInternals=s,u=s.stateNode,u.props=o,u.state=s.memoizedState,u.refs={},_c(s),y=n.contextType,u.context=typeof y=="object"&&y!==null?tt(y):io,u.state=s.memoizedState,y=n.getDerivedStateFromProps,typeof y=="function"&&(Ic(s,n,y,o),u.state=s.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(y=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),y!==u.state&&Zc.enqueueReplaceState(u,u.state,null),xl(s,o,u,c),fl(),u.state=s.memoizedState),typeof u.componentDidMount=="function"&&(s.flags|=4194308),o=!0}else if(a===null){u=s.stateNode;var E=s.memoizedProps,R=qn(n,E);u.props=R;var Q=u.context,se=n.contextType;y=io,typeof se=="object"&&se!==null&&(y=tt(se));var ce=n.getDerivedStateFromProps;se=typeof ce=="function"||typeof u.getSnapshotBeforeUpdate=="function",E=s.pendingProps!==E,se||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(E||Q!==y)&&sh(s,u,o,y),Ks=!1;var K=s.memoizedState;u.state=K,xl(s,o,u,c),fl(),Q=s.memoizedState,E||K!==Q||Ks?(typeof ce=="function"&&(Ic(s,n,ce,o),Q=s.memoizedState),(R=Ks||th(s,n,R,o,K,Q,y))?(se||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"&&(s.flags|=4194308)):(typeof u.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=o,s.memoizedState=Q),u.props=o,u.state=Q,u.context=y,o=R):(typeof u.componentDidMount=="function"&&(s.flags|=4194308),o=!1)}else{u=s.stateNode,Nc(a,s),y=s.memoizedProps,se=qn(n,y),u.props=se,ce=s.pendingProps,K=u.context,Q=n.contextType,R=io,typeof Q=="object"&&Q!==null&&(R=tt(Q)),E=n.getDerivedStateFromProps,(Q=typeof E=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y!==ce||K!==R)&&sh(s,u,o,R),Ks=!1,K=s.memoizedState,u.state=K,xl(s,o,u,c),fl();var ae=s.memoizedState;y!==ce||K!==ae||Ks||a!==null&&a.dependencies!==null&&vi(a.dependencies)?(typeof E=="function"&&(Ic(s,n,E,o),ae=s.memoizedState),(se=Ks||th(s,n,se,o,K,ae,R)||a!==null&&a.dependencies!==null&&vi(a.dependencies))?(Q||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(o,ae,R),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(o,ae,R)),typeof u.componentDidUpdate=="function"&&(s.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof u.componentDidUpdate!="function"||y===a.memoizedProps&&K===a.memoizedState||(s.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===a.memoizedProps&&K===a.memoizedState||(s.flags|=1024),s.memoizedProps=o,s.memoizedState=ae),u.props=o,u.state=ae,u.context=R,o=se):(typeof u.componentDidUpdate!="function"||y===a.memoizedProps&&K===a.memoizedState||(s.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===a.memoizedProps&&K===a.memoizedState||(s.flags|=1024),o=!1)}return u=o,go(a,s),o=(s.flags&128)!==0,u||o?(u=s.stateNode,n=o&&typeof n.getDerivedStateFromError!="function"?null:u.render(),s.flags|=1,a!==null&&o?(s.child=Ln(s,a.child,null,c),s.child=Ln(s,null,n,c)):Qa(a,s,n,c),s.memoizedState=u.state,a=s.child):a=Ls(a,s,c),a}function gh(a,s,n,o){return Sn(),s.flags|=256,Qa(a,s,n,o),s.child}var Jc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(a){return{baseLanes:a,cachePool:ip()}}function Wc(a,s,n){return a=a!==null?a.childLanes&~n:0,s&&(a|=kt),a}function vh(a,s,n){var o=s.pendingProps,c=!1,u=(s.flags&128)!==0,y;if((y=u)||(y=a!==null&&a.memoizedState===null?!1:(nt.current&2)!==0),y&&(c=!0,s.flags&=-129),y=(s.flags&32)!==0,s.flags&=-33,a===null){if(Ye){if(c?Xs(s):Ws(),(a=za)?(a=Vf(a,Ht),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Gs!==null?{id:is,overflow:rs}:null,retryLane:536870912,hydrationErrors:null},n=Xm(a),n.return=s,s.child=n,Xa=s,za=null)):a=null,a===null)throw $s(s);return Xd(a)?s.lanes=32:s.lanes=536870912,null}return u=o.children,o=o.fallback,c?(Ws(),c=s.mode,u=Pi({mode:"hidden",children:u},c),o=wn(o,c,n,null),u.return=s,o.return=s,u.sibling=o,s.child=u,o=s.child,o.memoizedState=Xc(n),o.childLanes=Wc(a,y,n),s.memoizedState=Jc,jl(null,o)):(Xs(s),ed(s,u))}var E=a.memoizedState;if(E!==null){var R=E.dehydrated;if(R!==null)return Ig(a,s,u,y,o,R,E,n)}return c?(Ws(),c=o.fallback,u=s.mode,E=a.child,R=E.sibling,o=Es(E,{mode:"hidden",children:o.children}),o.subtreeFlags=E.subtreeFlags&1206910976,R!==null?c=Es(R,c):(c=wn(c,u,n,null),c.flags|=2),c.return=s,o.return=s,o.sibling=c,s.child=o,jl(null,o),o=s.child,c=a.child.memoizedState,c===null?c=Xc(n):(u=c.cachePool,u!==null?(E=Ga._currentValue,u=u.parent!==E?{parent:E,pool:E}:u):u=ip(),c={baseLanes:c.baseLanes|n,cachePool:u}),o.memoizedState=c,o.childLanes=Wc(a,y,n),s.memoizedState=Jc,jl(a.child,o)):(Xs(s),n=a.child,a=n.sibling,n=Es(n,{mode:"visible",children:o.children}),n.return=s,n.sibling=null,a!==null&&(y=s.deletions,y===null?(s.deletions=[a],s.flags|=16):y.push(a)),s.child=n,s.memoizedState=null,n)}function ed(a,s){return s=Pi({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function Pi(a,s){return a=bt(22,a,null,s),a.lanes=0,a}function Ui(a,s,n){return Ln(s,a.child,null,n),a=ed(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function Ig(a,s,n,o,c,u,y,E){if(n)return s.flags&256?(Xs(s),s.flags&=-257,Ui(a,s,E)):s.memoizedState!==null?(Ws(),s.child=a.child,s.flags|=128,null):(Ws(),u=c.fallback,y=s.mode,c=Pi({mode:"visible",children:c.children},y),u=wn(u,y,E,null),u.flags|=2,c.return=s,u.return=s,c.sibling=u,s.child=c,Ln(s,a.child,null,E),c=s.child,c.memoizedState=Xc(E),c.childLanes=Wc(a,o,E),s.memoizedState=Jc,jl(null,c));if(Xs(s),Xd(u)){if(o=u.nextSibling&&u.nextSibling.dataset,o)var R=o.dgst;return o=R,o!==""&&(c=Error(d(419)),c.stack="",c.digest=o,cl({value:c,source:null,stack:null})),Ui(a,s,E)}if($a||En(a,s,E,!1),o=(E&a.childLanes)!==0,$a||o){if(Js.current!==null)return Ui(a,s,E);if(o=Ca,o!==null&&(c=Me(o,E),c!==0&&c!==y.retryLane))throw y.retryLane=c,Nn(a,c),jt(o,a,c),Yc;return Jd(u)||nr(),Ui(a,s,E)}return Jd(u)?(s.flags|=192,s.child=a.child,null):(a=y.treeContext,za=Gt(u.nextSibling),Xa=s,Ye=!0,Fs=null,Ht=!1,a!==null&&ap(s,a),s=ed(s,c.children),s.flags|=134221824,s)}function yh(a,s,n){a.lanes|=s;var o=a.alternate;o!==null&&(o.lanes|=s),gi(a.return,s,n)}function jh(a){for(var s=null;a!==null;){var n=a.alternate;n!==null&&Ei(n)===null&&(s=a),a=a.sibling}return s}function Hi(a,s,n,o,c,u){var y=a.memoizedState;y===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:c,treeForkCount:u}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=o,y.tail=n,y.tailMode=c,y.treeForkCount=u)}function ad(a){var s=a.child;for(a.child=null;s!==null;){var n=s.sibling;s.sibling=a.child,a.child=s,s=n}}function td(a,s,n){var o=s.pendingProps,c=o.revealOrder,u=o.tail;o=o.children;var y=nt.current;if(s.flags&128)return bl(s,y),null;var E=(y&2)!==0;if(E?(y=y&1|2,s.flags|=128):y&=1,bl(s,y),c==="backwards"&&a!==null?(ad(a),Qa(a,s,o,n),ad(a)):Qa(a,s,o,n),o=Ye?rl:0,!E&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&yh(a,n,s);else if(a.tag===19)yh(a,n,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(c){case"backwards":n=jh(s.child),n===null?(c=s.child,s.child=null):(c=n.sibling,n.sibling=null,ad(s)),Hi(s,!0,c,null,u,o);break;case"unstable_legacy-backwards":for(n=null,c=s.child,s.child=null;c!==null;){if(a=c.alternate,a!==null&&Ei(a)===null){s.child=c;break}a=c.sibling,c.sibling=n,n=c,c=a}Hi(s,!0,n,null,u,o);break;case"together":Hi(s,!1,null,null,void 0,o);break;case"independent":s.memoizedState=null;break;default:n=jh(s.child),n===null?(c=s.child,s.child=null):(c=n.sibling,n.sibling=null),Hi(s,!1,c,n,u,o)}return s.child}function _h(a,s,n){var o=s.pendingProps;return Is(s,s.type,o.value),Qa(a,s,o.children,n),s.child}function Ls(a,s,n){if(a!==null&&(s.dependencies=a.dependencies),sn|=s.lanes,(n&s.childLanes)===0)if(a!==null){if(En(a,s,n,!1),(n&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(d(153));if(s.child!==null){for(a=s.child,n=Es(a,a.pendingProps),s.child=n,n.return=s;a.sibling!==null;)a=a.sibling,n=n.sibling=Es(a,a.pendingProps),n.return=s;n.sibling=null}return s.child}function sd(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&vi(a)))}function Zg(a,s,n){switch(s.tag){case 3:Ya(s,s.stateNode.containerInfo),Is(s,Ga,a.memoizedState.cache),Sn();break;case 27:case 5:ja(s);break;case 4:Ya(s,s.stateNode.containerInfo);break;case 10:Is(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,zc(s),null;break;case 13:var o=s.memoizedState;if(o!==null){if(o.dehydrated!==null)return Xs(s),s.flags|=128,null;o=En(a,s,n,!1);var c=s.child.childLanes;return o||(n&c)!==0?vh(a,s,n):(Xs(s),a=Ls(a,s,n),a!==null?a.sibling:null)}Xs(s);break;case 19:if(s.flags&128)return td(a,s,n);if(c=(a.flags&128)!==0,o=(n&s.childLanes)!==0,o||(En(a,s,n,!1),o=(n&s.childLanes)!==0),c){if(o)return td(a,s,n);s.flags|=128}if(c=s.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),bl(s,nt.current),o)break;return null;case 22:return s.lanes=0,ph(a,s,n,s.pendingProps);case 24:Is(s,Ga,a.memoizedState.cache)}return Ls(a,s,n)}function Nh(a,s,n){if(a!==null)if(a.memoizedProps!==s.pendingProps)$a=!0;else{if(!sd(a,n)&&(s.flags&128)===0)return $a=!1,Zg(a,s,n);$a=(a.flags&131072)!==0}else $a=!1,Ye&&(s.flags&1048576)!==0&&ep(s,rl,s.index);switch(s.lanes=0,s.tag){case 16:e:{var o=s.pendingProps;if(a=Mn(s.elementType),s.type=a,typeof a=="function")dc(a)?(o=qn(a,o),s.tag=1,s=bh(null,s,a,o,n)):(s.tag=0,s=Qc(null,s,a,o,n));else{if(a!=null){var c=a.$$typeof;if(c===P){s.tag=11,s=dh(null,s,a,o,n);break e}else if(c===de){s.tag=14,s=uh(null,s,a,o,n);break e}else if(c===te){s.tag=10,s.type=a,s=_h(null,s,n);break e}}throw s=ee(a)||a,Error(d(306,s,""))}}return s;case 0:return Qc(a,s,s.type,s.pendingProps,n);case 1:return o=s.type,c=qn(o,s.pendingProps),bh(a,s,o,c,n);case 3:e:{if(Ya(s,s.stateNode.containerInfo),a===null)throw Error(d(387));o=s.pendingProps;var u=s.memoizedState;c=u.element,Nc(a,s),xl(s,o,null,n);var y=s.memoizedState;if(o=y.cache,Is(s,Ga,o),o!==u.cache&&bc(s,[Ga],n,!0),fl(),o=y.element,u.isDehydrated)if(u={element:o,isDehydrated:!1,cache:y.cache},s.updateQueue.baseState=u,s.memoizedState=u,s.flags&256){s=gh(a,s,o,n);break e}else if(o!==c){c=Bt(Error(d(424)),s),cl(c),s=gh(a,s,o,n);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(za=Gt(a.firstChild),Xa=s,Ye=!0,Fs=null,Ht=!0,n=pp(s,null,o,n),s.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Sn(),o===c){s=Ls(a,s,n);break e}Qa(a,s,o,n)}s=s.child}return s;case 26:return go(a,s),a===null?(n=Yf(s.type,null,s.pendingProps,null))?s.memoizedState=n:Ye||(s.stateNode=zf(s.type,s.pendingProps,ye.current,s)):s.memoizedState=Yf(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return ja(s),a===null&&Ye&&(o=s.stateNode=$f(s.type,s.pendingProps,ye.current),Xa=s,Ht=!0,c=za,rn(s.type)?(Wd=c,za=Gt(o.firstChild)):za=c),Qa(a,s,s.pendingProps.children,n),go(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Ye&&((c=o=za)&&(o=Hv(o,s.type,s.pendingProps,Ht),o!==null?(s.stateNode=o,Xa=s,za=Gt(o.firstChild),Ht=!1,c=!0):c=!1),c||$s(s)),ja(s),c=s.type,u=s.pendingProps,y=a!==null?a.memoizedProps:null,o=u.children,Fd(c,u)?o=null:y!==null&&Fd(c,y)&&(s.flags|=32),s.memoizedState!==null&&(c=Mc(a,s,Dg,null,null,n),Do._currentValue=c),go(a,s),Qa(a,s,o,n),s.child;case 6:return a===null&&Ye&&((a=n=za)&&(n=Vv(n,s.pendingProps,Ht),n!==null?(s.stateNode=n,Xa=s,za=null,a=!0):a=!1),a||$s(s)),null;case 13:return vh(a,s,n);case 4:return Ya(s,s.stateNode.containerInfo),o=s.pendingProps,a===null?s.child=Ln(s,null,o,n):Qa(a,s,o,n),s.child;case 11:return dh(a,s,s.type,s.pendingProps,n);case 7:return o=s.pendingProps,go(a,s),Qa(a,s,o,n),s.child;case 8:return Qa(a,s,s.pendingProps.children,n),s.child;case 12:return Qa(a,s,s.pendingProps.children,n),s.child;case 10:return _h(a,s,n);case 9:return c=s.type._context,o=s.pendingProps.children,zn(s),c=tt(c),o=o(c),s.flags|=1,Qa(a,s,o,n),s.child;case 14:return uh(a,s,s.type,s.pendingProps,n);case 15:return mh(a,s,s.type,s.pendingProps,n);case 19:return td(a,s,n);case 31:return $g(a,s,n);case 22:return ph(a,s,n,s.pendingProps);case 24:return zn(s),o=tt(Ga),a===null?(c=yc(),c===null&&(c=Ca,u=gc(),c.pooledCache=u,u.refCount++,u!==null&&(c.pooledCacheLanes|=n),c=u),s.memoizedState={parent:o,cache:c},_c(s),Is(s,Ga,c)):((a.lanes&n)!==0&&(Nc(a,s),xl(s,null,null,n),fl()),c=a.memoizedState,u=s.memoizedState,c.parent!==o?(c={parent:o,cache:o},s.memoizedState=c,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=c),Is(s,Ga,o)):(o=u.cache,Is(s,Ga,o),o!==c.cache&&bc(s,[Ga],n,!0))),Qa(a,s,s.pendingProps.children,n),s.child;case 30:return s.stateNode===null&&(s.stateNode={autoName:null,paired:null,clones:null,ref:null}),o=s.pendingProps,o.name!=null&&o.name!=="auto"?s.flags|=a===null?18882560:18874368:Ye&&xi(s),a!==null&&a.memoizedProps.name!==o.name?s.flags|=4194816:go(a,s),Qa(a,s,o.children,n),s.child;case 29:throw s.pendingProps}throw Error(d(156,s.tag))}function Rs(a){a.flags|=4}function nd(a,s,n,o,c){var u;if((u=(a.mode&32)!==0)&&(u=n===null?Wf(s,o):Wf(s,o)&&(o.src!==n.src||o.srcSet!==n.srcSet)),u){if(a.flags|=16777216,(c&335544128)===c)if(a.stateNode.complete)a.flags|=8192;else if(nf())a.flags|=8192;else throw Tn=Ni,jc}else a.flags&=-16777217}function wh(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!ex(s))if(nf())a.flags|=8192;else throw Tn=Ni,jc}function Vi(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?M():536870912,a.lanes|=s,No|=s)}function _l(a,s){if(!Ye)switch(a.tailMode){case"visible":break;case"collapsed":for(var n=a.tail,o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:o.sibling=null;break;default:for(s=a.tail,n=null;s!==null;)s.alternate!==null&&(n=s),s=s.sibling;n===null?a.tail=null:n.sibling=null}}function ka(a){var s=a.alternate!==null&&a.alternate.child===a.child,n=0,o=0;if(s)for(var c=a.child;c!==null;)n|=c.lanes|c.childLanes,o|=c.subtreeFlags&1206910976,o|=c.flags&1206910976,c.return=a,c=c.sibling;else for(c=a.child;c!==null;)n|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=a,c=c.sibling;return a.subtreeFlags|=o,a.childLanes=n,s}function Kg(a,s,n){var o=s.pendingProps;switch(pc(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ka(s),null;case 1:return ka(s),null;case 3:return n=s.stateNode,o=null,a!==null&&(o=a.memoizedState.cache),s.memoizedState.cache!==o&&(s.flags|=2048),As(Ga),Aa(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(a===null||a.child===null)&&(uo(s)?Rs(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,fc())),ka(s),null;case 26:var c=s.type,u=s.memoizedState;return a===null?(Rs(s),u!==null?(ka(s),wh(s,u)):(ka(s),nd(s,c,null,o,n))):u?u!==a.memoizedState?(Rs(s),ka(s),wh(s,u)):(ka(s),s.flags&=-16777217):(a=a.memoizedProps,a!==o&&Rs(s),ka(s),nd(s,c,a,o,n)),null;case 27:if(Ua(s),n=ye.current,c=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==o&&Rs(s);else{if(!o){if(s.stateNode===null)throw Error(d(166));return ka(s),s.subtreeFlags&=-33554433,null}a=ua.current,uo(s)?tp(s):(a=$f(c,o,n),s.stateNode=a,Rs(s))}return ka(s),s.subtreeFlags&=-33554433,null;case 5:if(Ua(s),c=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==o&&Rs(s);else{if(!o){if(s.stateNode===null)throw Error(d(166));return ka(s),s.subtreeFlags&=-33554433,null}if(u=ua.current,uo(s))tp(s);else{var y=Ll(ye.current);switch(u){case 1:u=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:u=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":u=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":u=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":u=y.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof o.is=="string"?y.createElement("select",{is:o.is}):y.createElement("select"),o.multiple?u.multiple=!0:o.size&&(u.size=o.size);break;default:u=typeof o.is=="string"?y.createElement(c,{is:o.is}):y.createElement(c)}}u[ea]=s,u[xa]=o;e:for(y=s.child;y!==null;){if(y.tag===5||y.tag===6)u.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===s)break e;for(;y.sibling===null;){if(y.return===null||y.return===s)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}s.stateNode=u;e:switch(lt(u,c,o),c){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Rs(s)}}return ka(s),s.subtreeFlags&=-33554433,nd(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,n),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==o&&Rs(s);else{if(typeof o!="string"&&s.stateNode===null)throw Error(d(166));if(a=ye.current,uo(s)){if(a=s.stateNode,n=s.memoizedProps,o=null,c=Xa,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}a[ea]=s,a=!!(a.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||wf(a.nodeValue,n)),a||$s(s,!0)}else a=Ll(a).createTextNode(o),a[ea]=s,s.stateNode=a}return ka(s),null;case 31:if(n=s.memoizedState,a===null||a.memoizedState!==null){if(o=uo(s),n!==null){if(a===null){if(!o)throw Error(d(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(d(557));a[ea]=s}else Sn(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ka(s),a=!1}else n=fc(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=n),a=!0;if(!a)return s.flags&256?(Ct(s),s):(Ct(s),null);if((s.flags&128)!==0)throw Error(d(558))}return ka(s),null;case 13:if(o=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(c=uo(s),o!==null&&o.dehydrated!==null){if(a===null){if(!c)throw Error(d(318));if(c=s.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(d(317));c[ea]=s}else Sn(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ka(s),c=!1}else c=fc(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=c),c=!0;if(!c)return s.flags&256?(Ct(s),s):(Ct(s),null)}return Ct(s),(s.flags&128)!==0?(s.lanes=n,s):(n=o!==null,a=a!==null&&a.memoizedState!==null,n&&(o=s.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool),u=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),u!==c&&(o.flags|=2048)),n!==a&&n&&(s.child.flags|=8192),Vi(s,s.updateQueue),ka(s),null);case 4:return Aa(),a===null&&Pd(s.stateNode.containerInfo),s.flags|=67108864,ka(s),null;case 10:return As(s.type),ka(s),null;case 19:if(kc(s),o=s.memoizedState,o===null)return ka(s),null;if(c=(s.flags&128)!==0,u=o.rendering,u===null)if(c)_l(o,!1);else{if(Pa!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(u=Ei(a),u!==null){for(s.flags|=128,_l(o,!1),a=u.updateQueue,s.updateQueue=a,Vi(s,a),s.subtreeFlags=0,a=n,n=s.child;n!==null;)Jm(n,a),n=n.sibling;return bl(s,nt.current&1|2),Ye&&zs(s,o.treeForkCount),s.child}a=a.sibling}o.tail!==null&&Ra()>er&&(s.flags|=128,c=!0,_l(o,!1),s.lanes=4194304)}else{if(!c)if(a=Ei(u),a!==null){if(s.flags|=128,c=!0,a=a.updateQueue,s.updateQueue=a,Vi(s,a),_l(o,!0),o.tail===null&&o.tailMode!=="collapsed"&&o.tailMode!=="visible"&&!u.alternate&&!Ye)return ka(s),null}else 2*Ra()-o.renderingStartTime>er&&n!==536870912&&(s.flags|=128,c=!0,_l(o,!1),s.lanes=4194304);o.isBackwards?(u.sibling=s.child,s.child=u):(a=o.last,a!==null?a.sibling=u:s.child=u,o.last=u)}if(o.tail!==null){a=o.tail;e:{for(n=a;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return o.rendering=a,o.tail=a.sibling,o.renderingStartTime=Ra(),a.sibling=null,u=nt.current,u=c?u&1|2:u&1,o.tailMode==="visible"||o.tailMode==="collapsed"||!n||Ye?bl(s,u):(n=u,Ge(st,s),Ge(nt,n),dt===null&&(dt=s)),Ye&&zs(s,o.treeForkCount),a}return ka(s),null;case 22:case 23:return Ct(s),Ec(),o=s.memoizedState!==null,a!==null?a.memoizedState!==null!==o&&(s.flags|=8192):o&&(s.flags|=8192),o?(n&536870912)!==0&&(s.flags&128)===0&&(ka(s),s.subtreeFlags&6&&(s.flags|=8192)):ka(s),n=s.updateQueue,n!==null&&Vi(s,n.retryQueue),n=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),o=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==n&&(s.flags|=2048),a!==null&&Qe(An),null;case 24:return n=null,a!==null&&(n=a.memoizedState.cache),s.memoizedState.cache!==n&&(s.flags|=2048),As(Ga),ka(s),null;case 25:return null;case 30:return s.flags|=33554432,ka(s),null}throw Error(d(156,s.tag))}function Yg(a,s){switch(pc(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return As(Ga),Aa(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return Ua(s),null;case 31:if(s.memoizedState!==null){if(Ct(s),s.alternate===null)throw Error(d(340));Sn()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Ct(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(d(340));Sn()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return kc(s),a=s.flags,a&65536?(s.flags=a&-65537|128,a=s.memoizedState,a!==null&&(a.rendering=null,a.tail=null),s.flags|=4,s):null;case 4:return Aa(),null;case 10:return As(s.type),null;case 22:case 23:return Ct(s),Ec(),a!==null&&Qe(An),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return As(Ga),null;case 25:return null;default:return null}}function Sh(a,s){switch(pc(s),s.tag){case 3:As(Ga),Aa();break;case 26:case 27:case 5:Ua(s);break;case 4:Aa();break;case 31:s.memoizedState!==null&&Ct(s);break;case 13:Ct(s);break;case 19:kc(s);break;case 10:As(s.type);break;case 22:case 23:Ct(s),Ec(),a!==null&&Qe(An);break;case 24:As(Ga)}}function Nl(a,s){try{var n=s.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var c=o.next;n=c;do{if((n.tag&a)===a){o=void 0;var u=n.create,y=n.inst;o=u(),y.destroy=o}n=n.next}while(n!==c)}}catch(E){ga(s,s.return,E)}}function en(a,s,n){try{var o=s.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var u=c.next;o=u;do{if((o.tag&a)===a){var y=o.inst,E=y.destroy;if(E!==void 0){y.destroy=void 0,c=s;var R=n,Q=E;try{Q()}catch(se){ga(c,R,se)}}}o=o.next}while(o!==u)}}catch(se){ga(s,s.return,se)}}function Ch(a){var s=a.updateQueue;if(s!==null){var n=a.stateNode;try{fp(s,n)}catch(o){ga(a,a.return,o)}}}function Eh(a,s,n){n.props=qn(a.type,a.memoizedProps),n.state=a.memoizedState;try{n.componentWillUnmount()}catch(o){ga(a,s,o)}}function cs(a,s){try{var n=a.ref;if(n!==null){switch(a.tag){case 26:case 27:case 5:var o=a.stateNode;break;case 30:var c=a.stateNode,u=Ss(a.memoizedProps,c);(c.ref===null||c.ref.name!==u)&&(c.ref=qf(u)),o=c.ref;break;case 7:if(a.stateNode===null){var y=new Mt(a);v(a.child,!1,Pv,y,void 0,void 0),a.stateNode=y}o=a.stateNode;break;default:o=a.stateNode}typeof n=="function"?a.refCleanup=n(o):n.current=o}}catch(E){ga(a,s,E)}}function ot(a,s){var n=a.ref,o=a.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(c){ga(a,s,c)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(c){ga(a,s,c)}else n.current=null}function Gi(a,s){if((a.tag===5||a.tag===27||a.tag===6)&&a.alternate===null&&s!==null)for(var n=0;n<s.length;n++)Hf(a.stateNode,s[n])}function zh(a){for(var s=a.return;s!==null&&(ld(s)&&Hf(a.stateNode,s.stateNode),!od(s));)s=s.return}function wl(a){for(var s=a.return;s!==null&&(ld(s)&&Uv(a.stateNode,s.stateNode),!od(s));)s=s.return}function od(a){return a.tag===5||a.tag===3||a.tag===27}function ld(a){return a&&a.tag===7&&a.stateNode!==null}function id(a){var s=a.type,n=a.memoizedProps,o=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":n.autoFocus&&o.focus();break e;case"img":n.src?o.src=n.src:n.srcSet&&(o.srcset=n.srcSet)}}catch(c){ga(a,a.return,c)}}function rd(a,s,n){try{var o=a.stateNode;jv(o,a.type,n,s),o[xa]=s}catch(c){ga(a,a.return,c)}}function kh(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&rn(a.type)||a.tag===4}function cd(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||kh(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&rn(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function dd(a,s,n,o){var c=a.tag;if(c===5||c===6)c=a.stateNode,s?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(c,s):(s=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.appendChild(c),n=n._reactRootContainer,n!=null||s.onclick!==null||(s.onclick=ls)),Gi(a,o),ra=!0;else if(c!==4&&(c===27&&(Gi(a,o),o=null,rn(a.type)&&(n=a.stateNode,s=null)),a=a.child,a!==null))for(dd(a,s,n,o),a=a.sibling;a!==null;)dd(a,s,n,o),a=a.sibling}function Fi(a,s,n,o){var c=a.tag;if(c===5||c===6)c=a.stateNode,s?n.insertBefore(c,s):n.appendChild(c),Gi(a,o),ra=!0;else if(c!==4&&(c===27&&(Gi(a,o),o=null,rn(a.type)&&(n=a.stateNode)),a=a.child,a!==null))for(Fi(a,s,n,o),a=a.sibling;a!==null;)Fi(a,s,n,o),a=a.sibling}function Ah(a){var s=a.stateNode,n=a.memoizedProps;try{for(var o=a.type,c=s.attributes;c.length;)s.removeAttributeNode(c[0]);lt(s,o,n),s[ea]=a,s[xa]=n}catch(u){ga(a,a.return,u)}}var $i=!1,Et=null;function Mh(a){(a.tag===30||(a.subtreeFlags&33554432)!==0)&&($i=!0)}var ds=null;function Th(){var a=ds;return ds=null,a}var gt=0;function vo(a,s,n,o,c){return gt=0,Lh(a.child,s,n,o,c)}function Lh(a,s,n,o,c){for(var u=!1;a!==null;){if(a.tag===5){var y=a.stateNode;if(o!==null){var E=Zd(y);o.push(E),E.view&&(u=!0)}else u||Zd(y).view&&(u=!0);$i=!0,Lf(y,gt===0?s:s+"_"+gt,n),gt++}else(a.tag!==22||a.memoizedState===null)&&(a.tag===30&&c||Lh(a.child,s,n,o,c)&&(u=!0));a=a.sibling}return u}function us(a,s){for(;a!==null;)a.tag===5?Rf(a.stateNode,a.memoizedProps):(a.tag!==22||a.memoizedState===null)&&(a.tag===30&&s||us(a.child,s)),a=a.sibling}function Ii(a){if((a.subtreeFlags&18874368)!==0)for(a=a.child;a!==null;){if((a.tag!==22||a.memoizedState===null)&&(Ii(a),a.tag===30&&(a.flags&18874368)!==0&&a.stateNode.paired)){var s=a.memoizedProps;if(s.name==null||s.name==="auto")throw Error(d(544));var n=s.name;s=Cs(s.default,s.share),s!=="none"&&(vo(a,n,s,null,!1)||us(a.child,!1))}a=a.sibling}}function ud(a,s){if(a.tag===30){var n=a.stateNode,o=a.memoizedProps,c=Ss(o,n),u=Cs(o.default,n.paired?o.share:o.enter);u!=="none"?vo(a,c,u,null,!1)?(Ii(a),n.paired||s||Eo(a,o.onEnter)):us(a.child,!1):Ii(a)}else if((a.subtreeFlags&33554432)!==0)for(a=a.child;a!==null;)ud(a,s),a=a.sibling;else Ii(a)}function md(a){if(Et!==null&&Et.size!==0){var s=Et;if((a.subtreeFlags&18874368)!==0)for(a=a.child;a!==null;){if(a.tag!==22||a.memoizedState===null){if(a.tag===30&&(a.flags&18874368)!==0){var n=a.memoizedProps,o=n.name;if(o!=null&&o!=="auto"){var c=s.get(o);if(c!==void 0){var u=Cs(n.default,n.share);if(u!=="none"&&(vo(a,o,u,null,!1)?(u=a.stateNode,c.paired=u,u.paired=c,Eo(a,n.onShare)):us(a.child,!1)),s.delete(o),s.size===0)break}}}md(a)}a=a.sibling}}}function pd(a){if(a.tag===30){var s=a.memoizedProps,n=Ss(s,a.stateNode),o=Et!==null?Et.get(n):void 0,c=Cs(s.default,o!==void 0?s.share:s.exit);c!=="none"&&(vo(a,n,c,null,!1)?o!==void 0?(c=a.stateNode,o.paired=c,c.paired=o,Et.delete(n),Eo(a,s.onShare)):Eo(a,s.onExit):us(a.child,!1)),Et!==null&&md(a)}else if((a.subtreeFlags&33554432)!==0)for(a=a.child;a!==null;)pd(a),a=a.sibling;else Et!==null&&md(a)}function Rh(a){for(a=a.child;a!==null;){if(a.tag===30){var s=a.memoizedProps,n=Ss(s,a.stateNode);s=Cs(s.default,s.update),a.flags&=-5,s!=="none"&&vo(a,n,s,a.memoizedState=[],!1)}else(a.subtreeFlags&33554432)!==0&&Rh(a);a=a.sibling}}function hd(a){if((a.subtreeFlags&18874368)!==0)for(a=a.child;a!==null;){if(a.tag!==22||a.memoizedState===null){if(a.tag===30&&(a.flags&18874368)!==0){var s=a.stateNode;s.paired!==null&&(s.paired=null,us(a.child,!1))}hd(a)}a=a.sibling}}function Zi(a){if(a.tag===30)a.stateNode.paired=null,us(a.child,!1),hd(a);else if((a.subtreeFlags&33554432)!==0)for(a=a.child;a!==null;)Zi(a),a=a.sibling;else hd(a)}function qh(a){for(a=a.child;a!==null;)a.tag===30?us(a.child,!1):(a.subtreeFlags&33554432)!==0&&qh(a),a=a.sibling}function fd(a,s,n,o,c,u,y){for(var E=!1;s!==null;){if(s.tag===5){var R=s.stateNode;if(u!==null&&gt<u.length){var Q=u[gt],se=Zd(R);(Q.view||se.view)&&(E=!0);var ce;if(ce=(a.flags&4)===0)if(se.clip)ce=!0;else{ce=Q.rect;var K=se.rect;ce=ce.y!==K.y||ce.x!==K.x||ce.height!==K.height||ce.width!==K.width}ce&&(a.flags|=4),se.abs?se=!Q.abs:(Q=Q.rect,se=se.rect,se=Q.height!==se.height||Q.width!==se.width),se&&(a.flags|=32)}else a.flags|=32;(a.flags&4)!==0&&Lf(R,gt===0?n:n+"_"+gt,c),E&&(a.flags&4)!==0||(ds===null&&(ds=[]),ds.push(R,gt===0?o:o+"_"+gt,s.memoizedProps)),gt++}else(s.tag!==22||s.memoizedState===null)&&(s.tag===30&&y?a.flags|=s.flags&32:fd(a,s.child,n,o,c,u,y)&&(E=!0));s=s.sibling}return E}function Dh(a,s){for(a=a.child;a!==null;){if(a.tag===30){var n=a.memoizedProps,o=a.stateNode,c=Ss(n,o),u=Cs(n.default,n.update),y;y=a.memoizedState,a.memoizedState=null,o=a;var E=a.child;gt=0,c=fd(o,E,c,c,u,y,!1),(a.flags&4)!==0&&c&&Eo(a,n.onUpdate)}else(a.subtreeFlags&33554432)!==0&&Dh(a);a=a.sibling}}var Wa=!1,ha=!1,ms=!1,xd=!1,Oh=typeof WeakSet=="function"?WeakSet:Set,et=null,ps=!1,Sl=!1,Ki=!1,bd=!1;function Qg(a,s,n){if(a=a.containerInfo,Vd=Oo,a=Hm(a),sc(a)){if("selectionStart"in a)var o={start:a.selectionStart,end:a.selectionEnd};else e:{o=(o=a.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var u=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var E=0,R=-1,Q=-1,se=0,ce=0,K=a,ae=null;a:for(;;){for(var ve;K!==o||u!==0&&K.nodeType!==3||(R=E+u),K!==y||c!==0&&K.nodeType!==3||(Q=E+c),K.nodeType===3&&(E+=K.nodeValue.length),(ve=K.firstChild)!==null;)ae=K,K=ve;for(;;){if(K===a)break a;if(ae===o&&++se===u&&(R=E),ae===y&&++ce===c&&(Q=E),(ve=K.nextSibling)!==null)break;K=ae,ae=K.parentNode}K=ve}o=R===-1||Q===-1?null:{start:R,end:Q}}else o=null}o=o||{start:0,end:0}}else o=null;for(Gd={focusedElem:a,selectionRange:o},Oo=!1,n=(n&335544064)===n,et=s,s=n?9270:1024;et!==null;){if(a=et,n&&(o=a.deletions,o!==null))for(u=0;u<o.length;u++)n&&pd(o[u]);if(a.alternate===null&&(a.flags&2)!==0)n&&Mh(a),Yi(n);else{if(a.tag===22){if(o=a.alternate,a.memoizedState!==null){o!==null&&o.memoizedState===null&&n&&pd(o),Yi(n);continue}else if(o!==null&&o.memoizedState!==null){n&&Mh(a),Yi(n);continue}}o=a.child,(a.subtreeFlags&s)!==0&&o!==null?(o.return=a,et=o):(n&&Rh(a),Yi(n))}}Et=null}function Yi(a){for(;et!==null;){var s=et,n=a,o=s.alternate,c=s.flags;switch(s.tag){case 0:case 11:case 15:break;case 1:if((c&1024)!==0&&o!==null){n=void 0,c=o.memoizedProps,o=o.memoizedState;var u=s.stateNode;try{var y=qn(s.type,c);n=u.getSnapshotBeforeUpdate(y,o),u.__reactInternalSnapshotBeforeUpdate=n}catch(E){ga(s,s.return,E)}}break;case 3:if((c&1024)!==0){if(o=s.stateNode.containerInfo,n=o.nodeType,n===9)Qd(o);else if(n===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":Qd(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&o!==null&&(n=Ss(o.memoizedProps,o.stateNode),c=s.memoizedProps,c=Cs(c.default,c.update),c!=="none"&&vo(o,n,c,o.memoizedState=[],!0));break;default:if((c&1024)!==0)throw Error(d(163))}if(o=s.sibling,o!==null){o.return=s.return,et=o;break}et=s.return}}function Bh(a,s,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:hs(a,n),o&4&&Nl(5,n);break;case 1:if(hs(a,n),o&4)if(a=n.stateNode,s===null)try{a.componentDidMount()}catch(y){ga(n,n.return,y)}else{var c=qn(n.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(c,s,a.__reactInternalSnapshotBeforeUpdate)}catch(y){ga(n,n.return,y)}}o&64&&Ch(n),o&512&&cs(n,n.return);break;case 3:if(hs(a,n),o&64&&(a=n.updateQueue,a!==null)){if(s=null,n.child!==null)switch(n.child.tag){case 27:case 5:s=n.child.stateNode;break;case 1:s=n.child.stateNode}try{fp(a,s)}catch(y){ga(n,n.return,y)}}break;case 27:s===null&&o&4&&Ah(n);case 26:case 5:hs(a,n),s===null&&o&4&&id(n),o&512&&cs(n,n.return);break;case 12:hs(a,n);break;case 31:hs(a,n),o&4&&Vh(a,n);break;case 13:hs(a,n),o&4&&Gh(a,n),o&64&&(a=n.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(n=rv.bind(null,n),Gv(a,n))));break;case 22:if(o=n.memoizedState!==null||Wa,!o){var u=s!==null&&s.memoizedState!==null||ha;s=Wa,c=ha,Wa=o,(ha=u)&&!c?(o=2,(n.subtreeFlags&8772)!==0&&(o|=1),Xt(a,n,o)):hs(a,n),Wa=s,ha=c}break;case 30:hs(a,n),o&512&&cs(n,n.return);break;case 7:o&512&&cs(n,n.return);default:hs(a,n)}}function gd(a,s){for(a=a.child;a!==null;)Ph(a,s),a=a.sibling}function Ph(a,s){switch(a.tag){case 5:case 26:try{var n=a.stateNode;if(s){var o=n.style;typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"}else{var c=a.stateNode,u=a.memoizedProps.style,y=u!=null&&u.hasOwnProperty("display")?u.display:null;c.style.display=y==null||typeof y=="boolean"?"":(""+y).trim()}}catch(R){ga(a,a.return,R)}vd(a,s);break;case 6:try{a.stateNode.nodeValue=s?"":a.memoizedProps,ra=!0}catch(R){ga(a,a.return,R)}break;case 18:try{var E=a.stateNode;s?Tf(E,!0):Tf(a.stateNode,!1)}catch(R){ga(a,a.return,R)}break;case 22:case 23:a.memoizedState===null&&gd(a,s);break;default:gd(a,s)}}function vd(a,s){if(a.subtreeFlags&67108864)for(a=a.child;a!==null;){e:{var n=a,o=s;switch(n.tag){case 4:Ph(n,o);break e;case 22:n.memoizedState===null&&vd(n,o);break e;default:vd(n,o)}}a=a.sibling}}function Uh(a){var s=a.alternate;s!==null&&(a.alternate=null,Uh(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&ei(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Ma=null,vt=!1;function Qt(a,s,n){for(n=n.child;n!==null;)Hh(a,s,n),n=n.sibling}function Hh(a,s,n){if(sa&&typeof sa.onCommitFiberUnmount=="function")try{sa.onCommitFiberUnmount(Sa,n)}catch{}switch(n.tag){case 26:ha||ot(n,s),Qt(a,s,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!ha&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ha||ot(n,s),wl(n);var o=Ma,c=vt;rn(n.type)&&(Ma=n.stateNode,vt=!1),Qt(a,s,n),If(n.stateNode,n.type,n.memoizedProps),Ma=o,vt=c;break;case 5:ha||ot(n,s),wl(n);case 6:if(n.tag===6&&wl(n),o=Ma,c=vt,Ma=null,Qt(a,s,n),Ma=o,vt=c,Ma!==null)if(vt)try{(Ma.nodeType===9?Ma.body:Ma.nodeName==="HTML"?Ma.ownerDocument.body:Ma).removeChild(n.stateNode),ra=!0}catch(u){ga(n,s,u)}else try{Ma.removeChild(n.stateNode),ra=!0}catch(u){ga(n,s,u)}break;case 18:Ma!==null&&(vt?(a=Ma,Mf(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.stateNode),Bo(a)):Mf(Ma,n.stateNode));break;case 4:o=Ma,c=vt,Ma=n.stateNode.containerInfo,vt=!0,Qt(a,s,n),Ma=o,vt=c;break;case 0:case 11:case 14:case 15:en(2,n,s),ha||en(4,n,s),Qt(a,s,n);break;case 1:ha||(ot(n,s),o=n.stateNode,typeof o.componentWillUnmount=="function"&&Eh(n,s,o)),Qt(a,s,n);break;case 21:Qt(a,s,n);break;case 22:ha=(o=ha)||n.memoizedState!==null,Qt(a,s,n),ha=o;break;case 30:ot(n,s),Qt(a,s,n);break;case 7:ha||ot(n,s),Qt(a,s,n);break;default:Qt(a,s,n)}}function Vh(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Bo(a)}catch(n){ga(s,s.return,n)}}}function Gh(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Bo(a)}catch(n){ga(s,s.return,n)}}function Jg(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new Oh),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new Oh),s;default:throw Error(d(435,a.tag))}}function Qi(a,s){var n=Jg(a);s.forEach(function(o){if(!n.has(o)){n.add(o);var c=cv.bind(null,a,o);o.then(c,c)}})}function ht(a,s,n){var o=s.deletions;if(o!==null)for(var c=0;c<o.length;c++){var u=o[c],y=a,E=s,R=E;e:for(;R!==null;){switch(R.tag){case 27:if(rn(R.type)){Ma=R.stateNode,vt=!1;break e}break;case 5:Ma=R.stateNode,vt=!1;break e;case 3:case 4:Ma=R.stateNode.containerInfo,vt=!0;break e}R=R.return}if(Ma===null)throw Error(d(160));Hh(y,E,u),Ma=null,vt=!1,y=u.alternate,y!==null&&(y.return=null),u.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Fh(s,a,n),s=s.sibling}var Jt=null;function Fh(a,s,n){var o=a.alternate,c=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(c&4&&(o=a.updateQueue,o=o!==null?o.events:null,o!==null))for(var u=0;u<o.length;u++){var y=o[u];y.ref.impl=y.nextImpl}ht(s,a,n),ft(a),c&4&&(en(3,a,a.return),Nl(3,a),en(5,a,a.return));break;case 1:ht(s,a,n),ft(a),c&512&&(ha||o===null||ot(o,o.return)),c&64&&Wa&&(a=a.updateQueue,a!==null&&(s=a.callbacks,s!==null&&(n=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=n===null?s:n.concat(s))));break;case 26:if(u=Jt,ht(s,a,n),ft(a),c&512&&(ha||o===null||ot(o,o.return)),c&4)if(c=o!==null?o.memoizedState:null,n=a.memoizedState,o===null)if(n===null)if(a.stateNode===null)if(Wa)a.stateNode=zf(a.type,a.memoizedProps,s.containerInfo,a);else{e:{s=a.type,n=a.memoizedProps,c=u.ownerDocument||u;a:switch(s){case"title":o=c.getElementsByTagName("title")[0],(!o||o[Jo]||o[ea]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=c.createElement(s),c.head.insertBefore(o,c.querySelector("head > title"))),lt(o,s,n),o[ea]=a,Ja(o),s=o;break e;case"link":if(u=Xf("link","href",c).get(s+(n.href||""))){for(y=0;y<u.length;y++)if(o=u[y],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){u.splice(y,1);break a}}o=c.createElement(s),lt(o,s,n),c.head.appendChild(o);break;case"meta":if(u=Xf("meta","content",c).get(s+(n.content||""))){for(y=0;y<u.length;y++)if(o=u[y],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){u.splice(y,1);break a}}o=c.createElement(s),lt(o,s,n),c.head.appendChild(o);break;default:throw Error(d(468,s))}o[ea]=a,Ja(o),s=o}a.stateNode=s}else Wa||su(u,a.type,a.stateNode);else a.stateNode=Jf(u,n,a.memoizedProps);else c!==n?(c===null?(s=o.stateNode,s===null||ha||s.parentNode.removeChild(s)):c.count--,n===null?Wa||su(u,a.type,a.stateNode):Jf(u,n,a.memoizedProps)):n===null&&a.stateNode!==null&&rd(a,a.memoizedProps,o.memoizedProps);break;case 27:ht(s,a,n),ft(a),c&512&&(ha||o===null||ot(o,o.return)),o!==null&&c&4&&rd(a,a.memoizedProps,o.memoizedProps);break;case 5:if(u=ms,ms=!1,ht(s,a,n),ms=u,ft(a),c&512&&(ha||o===null||ot(o,o.return)),a.flags&32){s=a.stateNode;try{eo(s,""),ra=!0}catch(se){ga(a,a.return,se)}}c&4&&a.stateNode!=null&&(s=a.memoizedProps,rd(a,s,o!==null?o.memoizedProps:s)),c&1024&&(xd=!0);break;case 6:if(ht(s,a,n),ft(a),c&4){if(a.stateNode===null)throw Error(d(162));s=a.memoizedProps,n=a.stateNode;try{n.nodeValue=s,ra=!0}catch(se){ga(a,a.return,se)}}break;case 3:if(ra=!1,ur=null,u=Jt,Jt=Rl(s.containerInfo),ht(s,a,n),Jt=u,ft(a),c&4&&o!==null&&o.memoizedState.isDehydrated)try{Bo(s.containerInfo)}catch(se){ga(a,a.return,se)}xd&&(xd=!1,$h(a)),ra=!1;break;case 4:c=ms,ms=Wa,o=um(),u=Jt,Jt=Rl(a.stateNode.containerInfo),ht(s,a,n),ft(a),Jt=u,ra&&Sl&&(Ki=!0),ra=o,ms=c;break;case 12:ht(s,a,n),ft(a);break;case 31:ht(s,a,n),ft(a),c&4&&(s=a.updateQueue,s!==null&&(a.updateQueue=null,Qi(a,s)));break;case 13:ht(s,a,n),ft(a),a.child.flags&8192&&a.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Wi=Ra()),c&4&&(s=a.updateQueue,s!==null&&(a.updateQueue=null,Qi(a,s)));break;case 22:u=a.memoizedState!==null,y=o!==null&&o.memoizedState!==null;var E=Wa,R=ha,Q=ms;Wa=E||u,ms=Q||u,ha=R||y,ht(s,a,n),ha=R,ms=Q,Wa=E,ft(a),c&8192&&(s=a.stateNode,s._visibility=u?s._visibility&-2:s._visibility|1,!u||o===null||y||Wa||ha||(s=y||ha,n=Wa,o=ha,Wa=u||Wa,ha=s,an(a,2),Wa=n,ha=o),!u&&ms||gd(a,u)),c&4&&(s=a.updateQueue,s!==null&&(n=s.retryQueue,n!==null&&(s.retryQueue=null,Qi(a,n))));break;case 19:ht(s,a,n),ft(a),c&4&&(s=a.updateQueue,s!==null&&(a.updateQueue=null,Qi(a,s)));break;case 30:c&512&&(ha||o===null||ot(o,o.return)),c=um(),u=Sl,y=(n&335544064)===n,E=a.memoizedProps,Sl=y&&Cs(E.default,E.update)!=="none",ht(s,a,n),ft(a),y&&o!==null&&ra&&(a.flags|=4),Sl=u,ra=c;break;case 21:break;case 7:c&512&&(ha||o===null||ot(o,o.return)),o&&o.stateNode!==null&&(o.stateNode._fragmentFiber=a);default:ht(s,a,n),ft(a)}}function ft(a){var s=a.flags;if(s&2){try{for(var n,o=a.return;o!==null;){if(kh(o)){n=o;break}o=o.return}o=null;for(var c=a.return;c!==null;){if(ld(c)){var u=c.stateNode;o===null?o=[u]:o.push(u)}if(od(c))break;c=c.return}var y=o;if(n==null)throw Error(d(160));switch(n.tag){case 27:var E=n.stateNode,R=cd(a);Fi(a,R,E,y);break;case 5:var Q=n.stateNode;n.flags&32&&(eo(Q,""),n.flags&=-33);var se=cd(a);Fi(a,se,Q,y);break;case 3:case 4:var ce=n.stateNode.containerInfo,K=cd(a);dd(a,K,ce,y);break;default:throw Error(d(161))}}catch(ae){ga(a,a.return,ae)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function $h(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;$h(s),s.tag===5&&s.flags&1024&&(s=s.stateNode,Oo=!0,s.reset(),Oo=!1),a=a.sibling}}function yo(a,s){if(s.subtreeFlags&9270)for(s=s.child;s!==null;)Ih(s,a),s=s.sibling;else Dh(s)}function Ih(a,s){var n=a.alternate;if(n===null)ud(a,!1);else switch(a.tag){case 3:if(bd=ps=!1,Th(),yo(s,a),!ps&&!Ki){if(a=ds,a!==null)for(var o=0;o<a.length;o+=3){n=a[o];var c=a[o+1];Rf(n,a[o+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+c+")"})}a=s.containerInfo,a=a.nodeType===9?a.documentElement:a.ownerDocument.documentElement,a!==null&&a.style.viewTransitionName===""&&(a.style.viewTransitionName="none",a.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),a.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),bd=!0}ds=null;break;case 5:yo(s,a);break;case 4:o=ps,ps=!1,yo(s,a),ps&&(Ki=!0),ps=o;break;case 22:a.memoizedState===null&&(n.memoizedState!==null?ud(a,!1):yo(s,a));break;case 30:o=ps,c=Th(),ps=!1,yo(s,a),ps&&(a.flags|=4);var u=a.memoizedProps,y=a.stateNode;s=Ss(u,y),y=Ss(n.memoizedProps,y);var E=Cs(u.default,u.update);E==="none"?s=!1:(u=n.memoizedState,n.memoizedState=null,n=a.child,gt=0,s=fd(a,n,s,y,E,u,!0),gt!==(u===null?0:u.length)&&(a.flags|=32)),(a.flags&4)!==0&&s?(Eo(a,a.memoizedProps.onUpdate),ds=c):c!==null&&(c.push.apply(c,ds),ds=c),ps=(a.flags&32)!==0?!0:o;break;default:yo(s,a)}}function hs(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Bh(a,s.alternate,s),s=s.sibling}function an(a,s){for(a=a.child;a!==null;){var n=a,o=s;switch(n.tag){case 0:case 11:case 14:case 15:en(4,n,n.return),an(n,o);break;case 1:ot(n,n.return);var c=n.stateNode;typeof c.componentWillUnmount=="function"&&Eh(n,n.return,c),an(n,o);break;case 27:(o&2)!==0&&If(n.stateNode,n.type,n.memoizedProps);case 5:ot(n,n.return),n.tag!==5&&n.tag!==27||wl(n),an(n,o);break;case 6:wl(n);break;case 26:ot(n,n.return),c=n.stateNode,n.memoizedState!==null||c===null||ha||c.parentNode.removeChild(c),an(n,o);break;case 22:n.memoizedState===null&&an(n,o);break;case 30:ot(n,n.return),an(n,o);break;case 7:ot(n,n.return);default:an(n,o)}a=a.sibling}}function Xt(a,s,n){for(n=(s.subtreeFlags&8772)!==0?n:n&-2,s=s.child;s!==null;){var o=s.alternate,c=a,u=s,y=u.flags,E=(n&1)!==0;switch(u.tag){case 0:case 11:case 15:Xt(c,u,n),Nl(4,u);break;case 1:if(Xt(c,u,n),o=u,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(se){ga(o,o.return,se)}if(o=u,c=o.updateQueue,c!==null){var R=o.stateNode;try{var Q=c.shared.hiddenCallbacks;if(Q!==null)for(c.shared.hiddenCallbacks=null,c=0;c<Q.length;c++)hp(Q[c],R)}catch(se){ga(o,o.return,se)}}E&&y&64&&Ch(u),cs(u,u.return);break;case 27:(n&2)!==0&&Ah(u);case 5:u.tag!==5&&u.tag!==27||zh(u),Xt(c,u,n),E&&o===null&&y&4&&id(u),cs(u,u.return);break;case 6:zh(u);break;case 26:R=u.stateNode,u.memoizedState!==null||R===null||Wa||su(Rl(R.ownerDocument),u.type,R),Xt(c,u,n),E&&o===null&&y&4&&id(u),cs(u,u.return);break;case 12:Xt(c,u,n);break;case 31:Xt(c,u,n),E&&y&4&&Vh(c,u);break;case 13:Xt(c,u,n),E&&y&4&&Gh(c,u);break;case 22:u.memoizedState===null&&Xt(c,u,n),cs(u,u.return);break;case 30:Xt(c,u,n),cs(u,u.return);break;case 7:cs(u,u.return);default:Xt(c,u,n)}s=s.sibling}}function yd(a,s){var n=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==n&&(a!=null&&a.refCount++,n!=null&&dl(n))}function jd(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&dl(a))}function Vt(a,s,n,o){var c=(n&335544064)===n;if(s.subtreeFlags&(c?10262:10256))for(s=s.child;s!==null;)Zh(a,s,n,o),s=s.sibling;else c&&qh(s)}function Zh(a,s,n,o){var c=(n&335544064)===n;c&&s.alternate===null&&s.return!==null&&s.return.alternate!==null&&Zi(s);var u=s.flags;switch(s.tag){case 0:case 11:case 15:Vt(a,s,n,o),u&2048&&Nl(9,s);break;case 1:Vt(a,s,n,o);break;case 3:Vt(a,s,n,o),c&&bd&&(a=a.containerInfo,a=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,a.style.viewTransitionName==="root"&&(a.style.viewTransitionName=""),a=a.ownerDocument.documentElement,a!==null&&a.style.viewTransitionName==="none"&&(a.style.viewTransitionName="")),u&2048&&(u=null,s.alternate!==null&&(u=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==u&&(s.refCount++,u!=null&&dl(u)));break;case 12:if(u&2048){Vt(a,s,n,o),u=s.stateNode;try{var y=s.memoizedProps,E=y.id,R=y.onPostCommit;typeof R=="function"&&R(E,s.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(Q){ga(s,s.return,Q)}}else Vt(a,s,n,o);break;case 31:Vt(a,s,n,o);break;case 13:Vt(a,s,n,o);break;case 23:break;case 22:y=s.stateNode,E=s.alternate,s.memoizedState!==null?(c&&E!==null&&E.memoizedState===null&&Zi(E),y._visibility&2?Vt(a,s,n,o):Cl(a,s)):(c&&E!==null&&E.memoizedState!==null&&Zi(s),y._visibility&2?Vt(a,s,n,o):(y._visibility|=2,jo(a,s,n,o,(s.subtreeFlags&10256)!==0||!1))),u&2048&&yd(E,s);break;case 24:Vt(a,s,n,o),u&2048&&jd(s.alternate,s);break;case 30:c&&(u=s.alternate,u!==null&&(us(u.child,!0),us(s.child,!0))),Vt(a,s,n,o);break;default:Vt(a,s,n,o)}}function jo(a,s,n,o,c){for(c=c&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var u=a,y=s,E=n,R=o,Q=y.flags;switch(y.tag){case 0:case 11:case 15:jo(u,y,E,R,c),Nl(8,y);break;case 23:break;case 22:var se=y.stateNode;y.memoizedState!==null?se._visibility&2?jo(u,y,E,R,c):Cl(u,y):(se._visibility|=2,jo(u,y,E,R,c)),c&&Q&2048&&yd(y.alternate,y);break;case 24:jo(u,y,E,R,c),c&&Q&2048&&jd(y.alternate,y);break;default:jo(u,y,E,R,c)}s=s.sibling}}function Cl(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var n=a,o=s,c=o.flags;switch(o.tag){case 22:Cl(n,o),c&2048&&yd(o.alternate,o);break;case 24:Cl(n,o),c&2048&&jd(o.alternate,o);break;default:Cl(n,o)}s=s.sibling}}var Dn=8192;function On(a,s,n){if(a.subtreeFlags&Dn)for(a=a.child;a!==null;)Kh(a,s,n),a=a.sibling}function Kh(a,s,n){switch(a.tag){case 26:On(a,s,n),a.flags&Dn&&(a.memoizedState!==null?s1(n,Jt,a.memoizedState,a.memoizedProps):(a=a.stateNode,(s&335544128)===s&&tx(n,a)));break;case 5:On(a,s,n),a.flags&Dn&&(a=a.stateNode,(s&335544128)===s&&tx(n,a));break;case 3:case 4:var o=Jt;Jt=Rl(a.stateNode.containerInfo),On(a,s,n),Jt=o;break;case 22:a.memoizedState===null&&(o=a.alternate,o!==null&&o.memoizedState!==null?(o=Dn,Dn=16777216,On(a,s,n),Dn=o):On(a,s,n));break;case 30:if((a.flags&Dn)!==0&&(o=a.memoizedProps.name,o!=null&&o!=="auto")){var c=a.stateNode;c.paired=null,Et===null&&(Et=new Map),Et.set(o,c)}On(a,s,n);break;default:On(a,s,n)}}function Yh(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function El(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var n=0;n<s.length;n++){var o=s[n];et=o,Jh(o,a)}Yh(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Qh(a),a=a.sibling}function Qh(a){switch(a.tag){case 0:case 11:case 15:El(a),a.flags&2048&&en(9,a,a.return);break;case 3:El(a);break;case 12:El(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Ji(a)):El(a);break;default:El(a)}}function Ji(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var n=0;n<s.length;n++){var o=s[n];et=o,Jh(o,a)}Yh(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:en(8,s,s.return),Ji(s);break;case 22:n=s.stateNode,n._visibility&2&&(n._visibility&=-3,Ji(s));break;default:Ji(s)}a=a.sibling}}function Jh(a,s){for(;et!==null;){var n=et;switch(n.tag){case 0:case 11:case 15:en(8,n,s);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var o=n.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:dl(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,et=o;else e:for(n=a;et!==null;){o=et;var c=o.sibling,u=o.return;if(Uh(o),o===n){et=null;break e}if(c!==null){c.return=u,et=c;break e}et=u}}}var Xg={getCacheForType:function(a){var s=tt(Ga),n=s.data.get(a);return n===void 0&&(n=a(),s.data.set(a,n)),n},cacheSignal:function(){return tt(Ga).controller.signal}},Wg=typeof WeakMap=="function"?WeakMap:Map,ca=0,Ca=null,Xe=null,aa=0,ba=0,zt=null,tn=!1,_o=!1,_d=!1,qs=0,Pa=0,sn=0,Bn=0,Xi=0,kt=0,No=0,zl=null,yt=null,Nd=!1,Wi=0,Xh=0,er=1/0,ar=null,nn=null,Da=0,Wt=null,Pn=null,fs=0,wd=0,Sd=null,Wh=null,wo=null,So=null,Co=null,kl=0,tr=null;function At(){return(ca&2)!==0&&aa!==0?aa&-aa:le.T!==null?qd():la()}function ef(){if(kt===0)if((aa&536870912)===0||Ye){var a=Qo;Qo<<=1,(Qo&3932160)===0&&(Qo=262144),kt=a}else kt=536870912;return a=st.current,a!==null&&(a.flags|=32),kt}function Eo(a,s){if(s!=null){var n=a.stateNode,o=n.ref;o===null&&(o=n.ref=qf(Ss(a.memoizedProps,n))),So===null&&(So=[]),So.push(s.bind(null,o))}}function jt(a,s,n){(a===Ca&&(ba===2||ba===9)||a.cancelPendingCommit!==null)&&(zo(a,0),on(a,aa,kt,!1)),be(a,n),((ca&2)===0||a!==Ca)&&(a===Ca&&((ca&2)===0&&(Bn|=n),Pa===4&&on(a,aa,kt,!1)),xs(a))}function af(a,s,n){if((ca&6)!==0)throw Error(d(327));var o=!n&&(s&127)===0&&(s&a.expiredLanes)===0||gn(a,s),c=o?tv(a,s):Ed(a,s,!0),u=o;do{if(c===0){_o&&!o&&on(a,s,0,!1);break}else{if(n=a.current.alternate,u&&!ev(n)){c=Ed(a,s,!1),u=!1;continue}if(c===2){if(u=s,a.errorRecoveryDisabledLanes&u)var y=0;else y=a.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){s=y;e:{var E=a;c=zl;var R=E.current.memoizedState.isDehydrated;if(R&&(zo(E,y).flags|=256),y=Ed(E,y,!1),y!==2&&y!==6){if(_d&&!R){E.errorRecoveryDisabledLanes|=u,Bn|=u,c=4;break e}u=yt,yt=c,u!==null&&(yt===null?yt=u:yt.push.apply(yt,u))}c=y}if(u=!1,c!==2)continue}}if(c===1){zo(a,0),on(a,s,0,!0);break}e:{switch(o=a,u=c,u){case 0:case 1:throw Error(d(345));case 4:if((s&4194048)!==s&&(s&62914560)!==s)break;case 6:on(o,s,kt,!tn);break e;case 2:yt=null;break;case 3:case 5:break;default:throw Error(d(329))}if((s&62914560)===s&&(c=Wi+300-Ra(),10<c)){if(on(o,s,kt,!tn),Yn(o,0,!0)!==0)break e;fs=s,o.timeoutHandle=Id(tf.bind(null,o,n,yt,ar,Nd,s,kt,Bn,No,tn,u,"Throttled",-0,0),c);break e}tf(o,n,yt,ar,Nd,s,kt,Bn,No,tn,u,null,-0,0)}}break}while(!0);xs(a)}function tf(a,s,n,o,c,u,y,E,R,Q,se,ce,K,ae){a.timeoutHandle=-1;var ve=s.subtreeFlags,Ee=(u&335544064)===u;if(ce=null,(Ee||ve&8192||(ve&16785408)===16785408)&&(ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ls},Et=null,Kh(s,u,ce),Ee&&(ve=ce,Ee=a.containerInfo,Ee=(Ee.nodeType===9?Ee:Ee.ownerDocument).__reactViewTransition,Ee!=null&&(ve.count++,ve.waitingForViewTransition=!0,ve=Ol.bind(ve),Ee.finished.then(ve,ve))),ve=(u&62914560)===u?Wi-Ra():(u&4194048)===u?Xh-Ra():0,ve=n1(ce,ve),ve!==null)){fs=u,a.cancelPendingCommit=ve(uf.bind(null,a,s,u,n,o,c,y,E,R,Q,se,ce,null,K,ae)),on(a,u,y,!Q);return}uf(a,s,u,n,o,c,y,E,R,Q,se,ce)}function ev(a){for(var s=a;;){var n=s.tag;if((n===0||n===11||n===15)&&s.flags&16384&&(n=s.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var o=0;o<n.length;o++){var c=n[o],u=c.getSnapshot;c=c.value;try{if(!St(u(),c))return!1}catch{return!1}}if(n=s.child,s.subtreeFlags&16384&&n!==null)n.return=s,s=n;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function on(a,s,n,o){s=Xl(a,s),s&=~Xi,s&=~Bn,a.suspendedLanes|=s,a.pingedLanes&=~s,o&&(a.warmLanes|=s),o=a.expirationTimes;for(var c=s;0<c;){var u=31-ct(c),y=1<<u;o[u]=-1,c&=~y}n!==0&&je(a,n,s)}function sr(){return(ca&6)===0?(Al(0),!1):!0}function Cd(){if(Xe!==null){if(ba===0)var a=Xe.return;else a=Xe,ks=Cn=null,Rc(a),ho=null,pl=0,a=Xe;for(;a!==null;)Sh(a.alternate,a),a=a.return;Xe=null}}function zo(a,s){var n=a.timeoutHandle;return n!==-1&&(a.timeoutHandle=-1,wv(n)),n=a.cancelPendingCommit,n!==null&&(a.cancelPendingCommit=null,n()),fs=0,Cd(),Ca=a,Xe=n=Es(a.current,null),aa=s,ba=0,zt=null,tn=!1,_o=gn(a,s),_d=!1,No=kt=Xi=Bn=sn=Pa=0,yt=zl=null,Nd=!1,qs=Xl(a,s),ui(),n}function sf(a,s){Ue=null,le.H=Di,s===po||s===_i?(s=dp(),ba=3):s===jc?(s=dp(),ba=4):ba=s===Yc?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,zt=s,Xe===null&&(Pa=1,Oi(a,Bt(s,a.current)))}function nf(){var a=st.current;return a===null?!0:(aa&4194048)===aa?dt===null:(aa&62914560)===aa||(aa&536870912)!==0?a===dt:!1}function of(){var a=le.H;return le.H=Di,a===null?Di:a}function lf(){var a=le.A;return le.A=Xg,a}function nr(){Pa=4,tn||(aa&4194048)!==aa&&st.current!==null||(_o=!0),(sn&134217727)===0&&(Bn&134217727)===0||Ca===null||on(Ca,aa,kt,!1)}function Ed(a,s,n){var o=ca;ca|=2;var c=of(),u=lf();(Ca!==a||aa!==s)&&(ar=null,zo(a,s)),s=!1;var y=Pa;e:do try{if(ba!==0&&Xe!==null){var E=Xe,R=zt;switch(ba){case 8:Cd(),y=6;break e;case 3:case 2:case 9:case 6:st.current===null&&(s=!0);var Q=ba;if(ba=0,zt=null,ko(a,E,R,Q),n&&_o){y=0;break e}break;default:Q=ba,ba=0,zt=null,ko(a,E,R,Q)}}av(),y=Pa;break}catch(se){sf(a,se)}while(!0);return s&&a.shellSuspendCounter++,ks=Cn=null,ca=o,le.H=c,le.A=u,Xe===null&&(Ca=null,aa=0,ui()),y}function av(){for(;Xe!==null;)rf(Xe)}function tv(a,s){var n=ca;ca|=2;var o=of(),c=lf();Ca!==a||aa!==s?(ar=null,er=Ra()+500,zo(a,s)):_o=gn(a,s);e:do try{if(ba!==0&&Xe!==null){s=Xe;var u=zt;a:switch(ba){case 1:ba=0,zt=null,ko(a,s,u,1);break;case 2:case 9:if(rp(u)){ba=0,zt=null,cf(s);break}s=function(){ba!==2&&ba!==9||Ca!==a||(ba=7),xs(a)},u.then(s,s);break e;case 3:ba=7;break e;case 4:ba=5;break e;case 7:rp(u)?(ba=0,zt=null,cf(s)):(ba=0,zt=null,ko(a,s,u,7));break;case 5:var y=null;switch(Xe.tag){case 26:y=Xe.memoizedState;case 5:case 27:var E=Xe;if(y?ex(y):E.stateNode.complete){ba=0,zt=null;var R=E.sibling;if(R!==null)Xe=R;else{var Q=E.return;Q!==null?(Xe=Q,or(Q)):Xe=null}break a}}ba=0,zt=null,ko(a,s,u,5);break;case 6:ba=0,zt=null,ko(a,s,u,6);break;case 8:Cd(),Pa=6;break e;default:throw Error(d(462))}}sv();break}catch(se){sf(a,se)}while(!0);return ks=Cn=null,le.H=o,le.A=c,ca=n,Xe!==null?0:(Ca=null,aa=0,ui(),Pa)}function sv(){for(;Xe!==null&&!Oa();)rf(Xe)}function rf(a){var s=Nh(a.alternate,a,qs);a.memoizedProps=a.pendingProps,s===null?or(a):Xe=s}function cf(a){var s=a,n=s.alternate;switch(s.tag){case 15:case 0:s=xh(n,s,s.pendingProps,s.type,void 0,aa);break;case 11:s=xh(n,s,s.pendingProps,s.type.render,s.ref,aa);break;case 5:Rc(s);var o=s;o===Xa&&(Ye?(bi(o),o.tag===5&&o.stateNode!=null&&(za=o.stateNode)):(bi(o),Ye=!0));default:Sh(n,s),s=Xe=Jm(s,qs),s=Nh(n,s,qs)}a.memoizedProps=a.pendingProps,s===null?or(a):Xe=s}function ko(a,s,n,o){ks=Cn=null,Rc(s),ho=null,pl=0;var c=s.return;try{if(Fg(a,c,s,n,aa)){Pa=1,Oi(a,Bt(n,a.current)),Xe=null;return}}catch(u){if(c!==null)throw Xe=c,u;Pa=1,Oi(a,Bt(n,a.current)),Xe=null;return}s.flags&32768?(Ye||o===1?a=!0:_o||(aa&536870912)!==0?a=!1:(tn=a=!0,(o===2||o===9||o===3||o===6)&&(o=st.current,o!==null&&o.tag===13&&(o.flags|=16384))),df(s,a)):or(s)}function or(a){var s=a;do{if((s.flags&32768)!==0){df(s,tn);return}a=s.return;var n=Kg(s.alternate,s,qs);if(n!==null){Xe=n;return}if(s=s.sibling,s!==null){Xe=s;return}Xe=s=a}while(s!==null);Pa===0&&(Pa=5)}function df(a,s){do{var n=Yg(a.alternate,a);if(n!==null){n.flags&=32767,Xe=n;return}if(n=a.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!s&&(a=a.sibling,a!==null)){Xe=a;return}Xe=a=n}while(a!==null);Pa=6,Xe=null}function uf(a,s,n,o,c,u,y,E,R,Q,se,ce){a.cancelPendingCommit=null;do lr();while(Da!==0);if((ca&6)!==0)throw Error(d(327));if(s!==null){if(s===a.current)throw Error(d(177));a===Ca&&(Xe=Ca=null,aa=0),Pn=s,Wt=a,fs=n,Sd=c,Wh=o,nv(a,s,n,y,E,R,ce)}}function nv(a,s,n,o,c,u,y){var E=s.lanes|s.childLanes;if(wd=E,E|=rc,fe(a,n,E,o,c,u),So=null,(n&335544064)===n?(Co=Tg(a),o=10262):(Co=null,o=10256),(s.subtreeFlags&o)!==0||(s.flags&o)!==0?(a.callbackNode=null,a.callbackPriority=0,dv(qa,function(){return Md(),null})):(a.callbackNode=null,a.callbackPriority=0),$i=!1,o=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||o){o=le.T,le.T=null,c=me.p,me.p=2,u=ca,ca|=4;try{Qg(a,s,n)}finally{ca=u,me.p=c,le.T=o}}Da=1,$i?wo=Av(y,a.containerInfo,Co,zd,kd,lv,Ad,Md,ov):(zd(),kd(),Ad())}function ov(a){if(Da!==0){var s=Wt.onRecoverableError;s(a,{componentStack:null})}}function lv(){Da===3&&(Da=0,Ih(Pn,Wt),Da=4)}function zd(){if(Da===1){Da=0;var a=Wt,s=Pn,n=fs,o=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||o){o=le.T,le.T=null;var c=me.p;me.p=2;var u=ca;ca|=4;try{Sl=Ki=!1,Fh(s,a,n),n=Gd;var y=Hm(a.containerInfo),E=n.focusedElem,R=n.selectionRange;if(y!==E&&E&&E.ownerDocument&&Um(E.ownerDocument.documentElement,E)){if(R!==null&&sc(E)){var Q=R.start,se=R.end;if(se===void 0&&(se=Q),"selectionStart"in E)E.selectionStart=Q,E.selectionEnd=Math.min(se,E.value.length);else{var ce=E.ownerDocument||document,K=ce&&ce.defaultView||window;if(K.getSelection){var ae=K.getSelection(),ve=E.textContent.length,Ee=Math.min(R.start,ve),He=R.end===void 0?Ee:Math.min(R.end,ve);!ae.extend&&Ee>He&&(y=He,He=Ee,Ee=y);var Y=Pm(E,Ee),G=Pm(E,He);if(Y&&G&&(ae.rangeCount!==1||ae.anchorNode!==Y.node||ae.anchorOffset!==Y.offset||ae.focusNode!==G.node||ae.focusOffset!==G.offset)){var W=ce.createRange();W.setStart(Y.node,Y.offset),ae.removeAllRanges(),Ee>He?(ae.addRange(W),ae.extend(G.node,G.offset)):(W.setEnd(G.node,G.offset),ae.addRange(W))}}}}for(ce=[],ae=E;ae=ae.parentNode;)ae.nodeType===1&&ce.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ce.length;E++){var re=ce[E];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Oo=!!Vd,Gd=Vd=null}finally{ca=u,me.p=c,le.T=o}}a.current=s,Da=2}}function kd(){if(Da===2){Da=0;var a=Wt,s=Pn,n=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||n){n=le.T,le.T=null;var o=me.p;me.p=2;var c=ca;ca|=4;try{Bh(a,s.alternate,s)}finally{ca=c,me.p=o,le.T=n}}Da=3}}function Ad(){if(Da===4||Da===3){Da=0;var a=wo;wo=null,ma();var s=Wt,n=Pn,o=fs,c=Wh,u=(o&335544064)===o?10262:10256;if((n.subtreeFlags&u)!==0||(n.flags&u)!==0?Da=5:(Da=0,Pn=Wt=null,mf(s,s.pendingLanes)),u=s.pendingLanes,u===0&&(nn=null),Pe(o),n=n.stateNode,sa&&typeof sa.onCommitFiberRoot=="function")try{sa.onCommitFiberRoot(Sa,n,void 0,(n.current.flags&128)===128)}catch{}if(c!==null){n=le.T,u=me.p,me.p=2,le.T=null;try{for(var y=s.onRecoverableError,E=0;E<c.length;E++){var R=c[E];y(R.value,{componentStack:R.stack})}}finally{le.T=n,me.p=u}}if(c=So,y=Co,Co=null,c!==null&&(So=null,y===null&&(y=[]),a!==null))for(R=0;R<c.length;R++)n=(0,c[R])(y),n!==void 0&&a.finished.finally(n);(fs&3)!==0&&lr(),xs(s),u=s.pendingLanes,(o&261930)!==0&&(u&42)!==0?s===tr?kl++:(kl=0,tr=s):(kl=0,tr=null),Al(0)}}function mf(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,dl(s)))}function lr(){return wo!==null&&(wo.skipTransition(),wo=null),zd(),kd(),Ad(),Md()}function Md(){if(Da!==5)return!1;var a=Wt,s=wd;wd=0;var n=Pe(fs),o=le.T,c=me.p;try{me.p=32>n?32:n,le.T=null,n=Sd,Sd=null;var u=Wt,y=fs;if(Da=0,Pn=Wt=null,fs=0,(ca&6)!==0)throw Error(d(331));var E=ca;if(ca|=4,Qh(u.current),Zh(u,u.current,y,n),ca=E,Al(0,!1),sa&&typeof sa.onPostCommitFiberRoot=="function")try{sa.onPostCommitFiberRoot(Sa,u)}catch{}return!0}finally{me.p=c,le.T=o,mf(a,s)}}function pf(a,s,n){s=Bt(n,s),s=Kc(a.stateNode,s,2),a=Qs(a,s,2),a!==null&&(be(a,2),xs(a))}function ga(a,s,n){if(a.tag===3)pf(a,a,n);else for(;s!==null;){if(s.tag===3){pf(s,a,n);break}else if(s.tag===1){var o=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(nn===null||!nn.has(o))){a=Bt(n,a),n=rh(2),o=Qs(s,n,2),o!==null&&(ch(n,o,s,a),be(o,2),xs(o));break}}s=s.return}}function Td(a,s,n){var o=a.pingCache;if(o===null){o=a.pingCache=new Wg;var c=new Set;o.set(s,c)}else c=o.get(s),c===void 0&&(c=new Set,o.set(s,c));c.has(n)||(_d=!0,c.add(n),a=iv.bind(null,a,s,n),s.then(a,a))}function iv(a,s,n){var o=a.pingCache;o!==null&&o.delete(s),a.pingedLanes|=a.suspendedLanes&n,a.warmLanes&=~n,Ca===a&&(aa&n)===n&&((Pa===4||Pa===3&&(aa&62914560)===aa&&300>Ra()-Wi)&&(ca&2)===0?zo(a,0):Xi|=n,No===aa&&(No=0)),xs(a)}function hf(a,s){s===0&&(s=M()),a=Nn(a,s),a!==null&&(be(a,s),xs(a))}function rv(a){var s=a.memoizedState,n=0;s!==null&&(n=s.retryLane),hf(a,n)}function cv(a,s){var n=0;switch(a.tag){case 31:case 13:var o=a.stateNode,c=a.memoizedState;c!==null&&(n=c.retryLane);break;case 19:o=a.stateNode;break;case 22:o=a.stateNode._retryCache;break;default:throw Error(d(314))}o!==null&&o.delete(s),hf(a,n)}function dv(a,s){return La(a,s)}var Ao=null,Mo=null,Ld=!1,ir=!1,Rd=!1,ln=0;function xs(a){a!==Mo&&a.next===null&&(Mo===null?Ao=Mo=a:Mo=Mo.next=a),ir=!0,Ld||(Ld=!0,mv())}function Al(a,s){if(!Rd&&ir){Rd=!0;do for(var n=!1,o=Ao;o!==null;){if(a!==0){var c=o.pendingLanes;if(c===0)var u=0;else{var y=o.suspendedLanes,E=o.pingedLanes;u=(1<<31-ct(42|a)+1)-1,u&=c&~(y&~E),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,gf(o,u))}
vendor: 4,452 bytes, line 48
48else u=aa,u=Yn(o,o===Ca?u:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(u&3)===0||gn(o,u)||(n=!0,gf(o,u));o=o.next}while(n);Rd=!1}}function uv(){ff()}function ff(){ir=Ld=!1;var a=0;ln!==0&&Nv()&&(a=ln);for(var s=Ra(),n=null,o=Ao;o!==null;){var c=o.next,u=xf(o,s);u===0?(o.next=null,n===null?Ao=c:n.next=c,c===null&&(Mo=n)):(n=o,(a!==0||(u&3)!==0)&&(ir=!0)),o=c}Da!==0&&Da!==5||Al(a),ln!==0&&(ln=0)}function xf(a,s){for(var n=a.suspendedLanes,o=a.pingedLanes,c=a.expirationTimes,u=a.pendingLanes&-62914561;0<u;){var y=31-ct(u),E=1<<y,R=c[y];R===-1?((E&n)===0||(E&o)!==0)&&(c[y]=Pr(E,s)):R<=s&&(a.expiredLanes|=E),u&=~E}if(s=Ca,n=aa,n=Yn(a,a===s?n:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),o=a.callbackNode,n===0||a===s&&(ba===2||ba===9)||a.cancelPendingCommit!==null)return o!==null&&o!==null&&Ke(o),a.callbackNode=null,a.callbackPriority=0;if((n&3)===0||gn(a,n)){if(s=n&-n,s===a.callbackPriority)return s;switch(o!==null&&Ke(o),Pe(n)){case 2:case 8:n=Rt;break;case 32:n=qa;break;case 268435456:n=ke;break;default:n=qa}return o=bf.bind(null,a),n=La(n,o),a.callbackPriority=s,a.callbackNode=n,s}return o!==null&&o!==null&&Ke(o),a.callbackPriority=2,a.callbackNode=null,2}function bf(a,s){if(Da!==0&&Da!==5)return a.callbackNode=null,a.callbackPriority=0,null;var n=a.callbackNode;if(lr()&&a.callbackNode!==n)return null;var o=aa;return o=Yn(a,a===Ca?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),o===0?null:(af(a,o,s),xf(a,Ra()),a.callbackNode!=null&&a.callbackNode===n?bf.bind(null,a):null)}function gf(a,s){if(lr())return null;af(a,s,!0)}function mv(){Sv(function(){(ca&6)!==0?La(Us,uv):ff()})}function qd(){if(ln===0){var a=kn;a===0&&(a=Yo,Yo<<=1,(Yo&261888)===0&&(Yo=256)),ln=a}return ln}function vf(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:si(a)}function pv(a,s,n,o,c){if(s==="submit"&&n&&n.stateNode===c){var u=vf((c[xa]||null).action),y=o.submitter;y&&(s=(s=y[xa]||null)?vf(s.formAction):y.getAttribute("formAction"),s!==null&&(u=s,y=null));var E=new ii("action","action",null,o,c);a.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(ln!==0){var R=new FormData(c,y);Gc(n,{pending:!0,data:R,method:c.method,action:u},null,R)}}else typeof u=="function"&&(E.preventDefault(),R=new FormData(c,y),Gc(n,{pending:!0,data:R,method:c.method,action:u},u,R))},currentTarget:c}]})}}for(var Dd=0;Dd<ic.length;Dd++){var Od=ic[Dd],hv=Od.toLowerCase(),fv=Od[0].toUpperCase()+Od.slice(1);Yt(hv,"on"+fv)}Yt(Fm,"onAnimationEnd"),Yt($m,"onAnimationIteration"),Yt(Im,"onAnimationStart"),Yt("dblclick","onDoubleClick"),Yt("focusin","onFocus"),Yt("focusout","onBlur"),Yt(wg,"onTransitionRun"),Yt(Sg,"onTransitionStart"),Yt(Cg,"onTransitionCancel"),Yt(Zm,"onTransitionEnd"),Xn("onMouseEnter",["mouseout","mouseover"]),Xn("onMouseLeave",["mouseout","mouseover"]),Xn("onPointerEnter",["pointerout","pointerover"]),Xn("onPointerLeave",["pointerout","pointerover"]),yn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),yn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),yn("onBeforeInput",["compositionend","keypress","textInput","paste"]),yn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),yn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),yn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ml="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),xv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ml));function yf(a,s){s=(s&4)!==0;for(var n=0;n<a.length;n++){var o=a[n],c=o.event;o=o.listeners;e:{var u=void 0;if(s)for(var y=o.length-1;0<=y;y--){var E=o[y],R=E.instance,Q=E.currentTarget;if(E=E.listener,R!==u&&c.isPropagationStopped())break e;u=E,c.currentTarget=Q;try{u(c)}catch(se){di(se)}c.currentTarget=null,u=R}else for(y=0;y<o.length;y++){if(E=o[y],R=E.instance,Q=E.currentTarget,E=E.listener,R!==u&&c.isPropagationStopped())break e;u=E,c.currentTarget=Q;try{u(c)}catch(se){di(se)}c.currentTarget=null,u=R}}}}function We(a,s){var n=s[nm];n===void 0&&(n=s[nm]=new Set);var o=a+"__bubble";
vendor: 32,147 bytes, lines 48-49
48n.has(o)||(jf(s,a,2,!1),n.add(o))}function Bd(a,s,n){var o=0;s&&(o|=4),jf(n,a,o,s)}var rr="_reactListening"+Math.random().toString(36).slice(2);function Pd(a){if(!a[rr]){a[rr]=!0,im.forEach(function(n){n!=="selectionchange"&&(xv.has(n)||Bd(n,!1,a),Bd(n,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[rr]||(s[rr]=!0,Bd("selectionchange",!1,s))}}function jf(a,s,n,o){switch(dx(s)){case 2:var c=r1;break;case 8:c=c1;break;default:c=ou}n=c.bind(null,s,n,a),c=void 0,!Zr||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(c=!0),o?c!==void 0?a.addEventListener(s,n,{capture:!0,passive:c}):a.addEventListener(s,n,!0):c!==void 0?a.addEventListener(s,n,{passive:c}):a.addEventListener(s,n,!1)}function Ud(a,s,n,o,c){var u=o;if((s&1)===0&&(s&2)===0&&o!==null)e:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var E=o.stateNode.containerInfo;if(E===c)break;if(y===4)for(y=o.return;y!==null;){var R=y.tag;if((R===3||R===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;E!==null;){if(y=vn(E),y===null)return;if(R=y.tag,R===5||R===6||R===26||R===27){o=u=y;continue e}E=E.parentNode}}o=o.return}ym(function(){var Q=u,se=$r(n),ce=[];e:{var K=Km.get(a);if(K!==void 0){var ae=ii,ve=a;switch(a){case"keypress":if(oi(n)===0)break e;case"keydown":case"keyup":ae=eg;break;case"focusin":ve="focus",ae=Jr;break;case"focusout":ve="blur",ae=Jr;break;case"beforeblur":case"afterblur":ae=Jr;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=Nm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=Vb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=og;break;case Fm:case $m:case Im:ae=$b;break;case Zm:ae=ig;break;case"scroll":case"scrollend":ae=Ub;break;case"wheel":ae=cg;break;case"copy":case"cut":case"paste":ae=Zb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=Sm;break;case"submit":ae=sg;break;case"toggle":case"beforetoggle":ae=ug}var Ee=(s&4)!==0,He=!Ee&&(a==="scroll"||a==="scrollend"),Y=Ee?K!==null?K+"Capture":null:K;Ee=[];for(var G=Q,W;G!==null;){var re=G;if(W=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||W===null||Y===null||(re=Wo(G,Y),re!=null&&Ee.push(Tl(G,re,W))),He)break;G=G.return}0<Ee.length&&(K=new ae(K,ve,null,n,se),ce.push({event:K,listeners:Ee}))}}if((s&7)===0){e:{if(ae=a==="mouseover"||a==="pointerover",K=a==="mouseout"||a==="pointerout",ae&&n!==Fr&&(ve=n.relatedTarget||n.fromElement)&&(vn(ve)||ve[os]))break e;(K||ae)&&(ve=se.window===se?se:(ae=se.ownerDocument)?ae.defaultView||ae.parentWindow:window,K?(ae=n.relatedTarget||n.toElement,K=Q,ae=ae?vn(ae):null,ae!==null&&(He=p(ae),Ee=ae.tag,ae!==He||Ee!==5&&Ee!==27&&Ee!==6)&&(ae=null)):(K=null,ae=Q),K!==ae&&(Ee=Nm,re="onMouseLeave",Y="onMouseEnter",G="mouse",(a==="pointerout"||a==="pointerover")&&(Ee=Sm,re="onPointerLeave",Y="onPointerEnter",G="pointer"),He=K==null?ve:Xo(K),W=ae==null?ve:Xo(ae),ve=new Ee(re,G+"leave",K,n,se),ve.target=He,ve.relatedTarget=W,re=null,vn(se)===Q&&(Ee=new Ee(Y,G+"enter",ae,n,se),Ee.target=W,Ee.relatedTarget=He,re=Ee),He=re,Ee=K&&ae?q(K,ae,bv):null,K!==null&&_f(ce,ve,K,Ee,!1),ae!==null&&He!==null&&_f(ce,He,ae,Ee,!0)))}e:{if(K=Q?Xo(Q):window,ae=K.nodeName&&K.nodeName.toLowerCase(),ae==="select"||ae==="input"&&K.type==="file")var we=Lm;else if(Mm(K))if(Rm)we=jg;else{we=vg;var ta=gg}else ae=K.nodeName,!ae||ae.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?Q&&Gr(Q.elementType)&&(we=Lm):we=yg;if(we&&(we=we(a,Q))){Tm(ce,we,n,se);break e}ta&&ta(a,K,Q)}switch(ta=Q?Xo(Q):window,a){case"focusin":(Mm(ta)||ta.contentEditable==="true")&&(no=ta,nc=Q,il=null);break;case"focusout":il=nc=no=null;break;case"mousedown":oc=!0;break;case"contextmenu":case"mouseup":case"dragend":oc=!1,Vm(ce,n,se);break;case"selectionchange":if(Ng)break;case"keydown":case"keyup":Vm(ce,n,se)}var Ae;if(Wr)e:{switch(a){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else so?km(a,n)&&(Re="onCompositionEnd"):a==="keydown"&&n.keyCode===229&&(Re="onCompositionStart");Re&&(Cm&&n.locale!=="ko"&&(so||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&so&&(Ae=jm()):(Hs=se,Kr="value"in Hs?Hs.value:Hs.textContent,so=!0)),ta=cr(Q,Re),0<ta.length&&(Re=new wm(Re,a,null,n,se),ce.push({event:Re,listeners:ta}),Ae?Re.data=Ae:(Ae=Am(n),Ae!==null&&(Re.data=Ae)))),(Ae=pg?hg(a,n):fg(a,n))&&(Re=cr(Q,"onBeforeInput"),0<Re.length&&(ta=new wm("onBeforeInput","beforeinput",null,n,se),ce.push({event:ta,listeners:Re}),ta.data=Ae)),pv(ce,a,Q,n,se)}yf(ce,s)})}function Tl(a,s,n){return{instance:a,listener:s,currentTarget:n}}function cr(a,s){for(var n=s+"Capture",o=[];a!==null;){var c=a,u=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||u===null||(c=Wo(a,n),c!=null&&o.unshift(Tl(a,c,u)),c=Wo(a,s),c!=null&&o.push(Tl(a,c,u))),a.tag===3)return o;a=a.return}return[]}function bv(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function _f(a,s,n,o,c){for(var u=s._reactName,y=[];n!==null&&n!==o;){var E=n,R=E.alternate,Q=E.stateNode;if(E=E.tag,R!==null&&R===o)break;E!==5&&E!==26&&E!==27||Q===null||(R=Q,c?(Q=Wo(n,u),Q!=null&&y.unshift(Tl(n,Q,R))):c||(Q=Wo(n,u),Q!=null&&y.push(Tl(n,Q,R)))),n=n.return}y.length!==0&&a.push({event:s,listeners:y})}var gv=/\r\n?/g,vv=/\u0000|\uFFFD/g;function Nf(a){return(typeof a=="string"?a:""+a).replace(gv,`
49`).replace(vv,"")}function wf(a,s){return s=Nf(s),Nf(a)===s}function va(a,s,n,o,c,u){switch(n){case"children":if(typeof o=="string")s==="body"||s==="textarea"&&o===""||eo(a,o);else if(typeof o=="number"||typeof o=="bigint")s!=="body"&&eo(a,""+o);else return;break;case"className":ti(a,"class",o);break;case"tabIndex":ti(a,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":ti(a,n,o);break;case"style":gm(a,o,u);return;case"data":if(s!=="object"){ti(a,"data",o);break}case"src":case"href":if(o===""&&(s!=="a"||n!=="href")){a.removeAttribute(n);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){a.removeAttribute(n);break}o=si(o),a.setAttribute(n,o);break;case"action":case"formAction":if(typeof o=="function"){a.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(n==="formAction"?(s!=="input"&&va(a,s,"name",c.name,c,null),va(a,s,"formEncType",c.formEncType,c,null),va(a,s,"formMethod",c.formMethod,c,null),va(a,s,"formTarget",c.formTarget,c,null)):(va(a,s,"encType",c.encType,c,null),va(a,s,"method",c.method,c,null),va(a,s,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){a.removeAttribute(n);break}o=si(o),a.setAttribute(n,o);break;case"onClick":o!=null&&(a.onclick=ls);return;case"onScroll":o!=null&&We("scroll",a);return;case"onScrollEnd":o!=null&&We("scrollend",a);return;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(d(61));if(n=o.__html,n!=null){if(c.children!=null)throw Error(d(60));(u!=null?u.__html:void 0)!==n&&(a.innerHTML=n)}}break;case"multiple":a.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":a.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){a.removeAttribute("xlink:href");break}n=si(o),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?a.setAttribute(n,o):a.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?a.setAttribute(n,""):a.removeAttribute(n);break;case"capture":case"download":o===!0?a.setAttribute(n,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?a.setAttribute(n,o):a.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?a.setAttribute(n,o):a.removeAttribute(n);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?a.removeAttribute(n):a.setAttribute(n,o);break;case"popover":We("beforetoggle",a),We("toggle",a),ai(a,"popover",o);break;case"xlinkActuate":Ns(a,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Ns(a,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Ns(a,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Ns(a,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Ns(a,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Ns(a,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Ns(a,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Ns(a,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Ns(a,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ai(a,"is",o);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=Bb.get(n)||n,ai(a,n,o);else return}ra=!0}function Hd(a,s,n,o,c,u){switch(n){case"style":gm(a,o,u);return;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(d(61));if(n=o.__html,n!=null){if(c.children!=null)throw Error(d(60));(u!=null?u.__html:void 0)!==n&&(a.innerHTML=n)}}break;case"children":if(typeof o=="string")eo(a,o);else if(typeof o=="number"||typeof o=="bigint")eo(a,""+o);else return;break;case"onScroll":o!=null&&We("scroll",a);return;case"onScrollEnd":o!=null&&We("scrollend",a);return;case"onClick":o!=null&&(a.onclick=ls);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!rm.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(c=n.endsWith("Capture"),u=n.slice(2,c?n.length-7:void 0),s=a[xa]||null,s=s!=null?s[n]:null,typeof s=="function"&&a.removeEventListener(u,s,c),typeof o=="function")){typeof s!="function"&&s!==null&&(n in a?a[n]=null:a.hasAttribute(n)&&a.removeAttribute(n)),a.addEventListener(u,o,c);break e}ra=!0,n in a?a[n]=o:o===!0?a.setAttribute(n,""):ai(a,n,o)}return}ra=!0}function lt(a,s,n){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",a),We("load",a);var o=!1,c=!1,u;for(u in n)if(n.hasOwnProperty(u)){var y=n[u];if(y!=null)switch(u){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,s));default:va(a,s,u,y,n,null)}}c&&va(a,s,"srcSet",n.srcSet,n,null),o&&va(a,s,"src",n.src,n,null);return;case"input":We("invalid",a);var E=u=y=c=null,R=null,Q=null;for(o in n)if(n.hasOwnProperty(o)){var se=n[o];if(se!=null)switch(o){case"name":c=se;break;case"type":y=se;break;case"checked":R=se;break;case"defaultChecked":Q=se;break;case"value":u=se;break;case"defaultValue":E=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(d(137,s));break;default:va(a,s,o,se,n,null)}}hm(a,u,E,R,Q,y,c,!1);return;case"select":We("invalid",a),o=y=u=null;for(c in n)if(n.hasOwnProperty(c)&&(E=n[c],E!=null))switch(c){case"value":u=E;break;case"defaultValue":y=E;break;case"multiple":o=E;default:va(a,s,c,E,n,null)}s=u,n=y,a.multiple=!!o,s!=null?Wn(a,!!o,s,!1):n!=null&&Wn(a,!!o,n,!0);return;case"textarea":We("invalid",a),u=c=o=null;for(y in n)if(n.hasOwnProperty(y)&&(E=n[y],E!=null))switch(y){case"value":o=E;break;case"defaultValue":c=E;break;case"children":u=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(d(91));break;default:va(a,s,y,E,n,null)}xm(a,o,c,u);return;case"option":for(R in n)if(n.hasOwnProperty(R)&&(o=n[R],o!=null))switch(R){case"selected":a.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:va(a,s,R,o,n,null)}return;case"dialog":We("beforetoggle",a),We("toggle",a),We("cancel",a),We("close",a);break;case"iframe":case"object":We("load",a);break;case"video":case"audio":for(o=0;o<Ml.length;o++)We(Ml[o],a);break;case"image":We("error",a),We("load",a);break;case"details":We("toggle",a);break;case"embed":case"source":case"link":We("error",a),We("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in n)if(n.hasOwnProperty(Q)&&(o=n[Q],o!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,s));default:va(a,s,Q,o,n,null)}return;default:if(Gr(s)){for(se in n)n.hasOwnProperty(se)&&(o=n[se],o!==void 0&&Hd(a,s,se,o,n,void 0));return}}for(E in n)n.hasOwnProperty(E)&&(o=n[E],o!=null&&va(a,s,E,o,n,null))}var yv={};function jv(a,s,n,o){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,u=null,y=null,E=null,R=null,Q=null,se=null;for(ae in n){var ce=n[ae];if(n.hasOwnProperty(ae)&&ce!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":R=ce;default:o.hasOwnProperty(ae)||va(a,s,ae,null,o,ce)}}for(var K in o){var ae=o[K];if(ce=n[K],o.hasOwnProperty(K)&&(ae!=null||ce!=null))switch(K){case"type":ae!==ce&&(ra=!0),u=ae;break;case"name":ae!==ce&&(ra=!0),c=ae;break;case"checked":ae!==ce&&(ra=!0),Q=ae;break;case"defaultChecked":ae!==ce&&(ra=!0),se=ae;break;case"value":ae!==ce&&(ra=!0),y=ae;break;case"defaultValue":ae!==ce&&(ra=!0),E=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(d(137,s));break;default:ae!==ce&&va(a,s,K,ae,o,ce)}}Hr(a,y,E,R,Q,se,u,c);return;case"select":ae=y=E=K=null;for(u in n)if(R=n[u],n.hasOwnProperty(u)&&R!=null)switch(u){case"value":break;case"multiple":ae=R;default:o.hasOwnProperty(u)||va(a,s,u,null,o,R)}for(c in o)if(u=o[c],R=n[c],o.hasOwnProperty(c)&&(u!=null||R!=null))switch(c){case"value":u!==R&&(ra=!0),K=u;break;case"defaultValue":u!==R&&(ra=!0),E=u;break;case"multiple":u!==R&&(ra=!0),y=u;default:u!==R&&va(a,s,c,u,o,R)}s=E,n=y,o=ae,K!=null?Wn(a,!!n,K,!1):!!o!=!!n&&(s!=null?Wn(a,!!n,s,!0):Wn(a,!!n,n?[]:"",!1));return;case"textarea":ae=K=null;for(E in n)if(c=n[E],n.hasOwnProperty(E)&&c!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:va(a,s,E,null,o,c)}for(y in o)if(c=o[y],u=n[y],o.hasOwnProperty(y)&&(c!=null||u!=null))switch(y){case"value":c!==u&&(ra=!0),K=c;break;case"defaultValue":c!==u&&(ra=!0),ae=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(d(91));break;default:c!==u&&va(a,s,y,c,o,u)}fm(a,K,ae);return;case"option":for(var ve in n)if(K=n[ve],n.hasOwnProperty(ve)&&K!=null&&!o.hasOwnProperty(ve))switch(ve){case"selected":a.selected=!1;break;default:va(a,s,ve,null,o,K)}for(R in o)if(K=o[R],ae=n[R],o.hasOwnProperty(R)&&K!==ae&&(K!=null||ae!=null))switch(R){case"selected":K!==ae&&(ra=!0),a.selected=K&&typeof K!="function"&&typeof K!="symbol";break;default:va(a,s,R,K,o,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ee in n)K=n[Ee],n.hasOwnProperty(Ee)&&K!=null&&!o.hasOwnProperty(Ee)&&va(a,s,Ee,null,o,K);for(Q in o)if(K=o[Q],ae=n[Q],o.hasOwnProperty(Q)&&K!==ae&&(K!=null||ae!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(d(137,s));break;default:va(a,s,Q,K,o,ae)}return;default:if(Gr(s)){for(var He in n)K=n[He],n.hasOwnProperty(He)&&K!==void 0&&!o.hasOwnProperty(He)&&Hd(a,s,He,void 0,o,K);for(se in o)K=o[se],ae=n[se],!o.hasOwnProperty(se)||K===ae||K===void 0&&ae===void 0||Hd(a,s,se,K,o,ae);return}}for(var Y in n)K=n[Y],n.hasOwnProperty(Y)&&K!=null&&!o.hasOwnProperty(Y)&&va(a,s,Y,null,o,K);for(ce in o)K=o[ce],ae=n[ce],!o.hasOwnProperty(ce)||K===ae||K==null&&ae==null||va(a,s,ce,K,o,ae)}function Sf(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _v(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,n=performance.getEntriesByType("resource"),o=0;o<n.length;o++){var c=n[o],u=c.transferSize,y=c.initiatorType,E=c.duration;if(u&&E&&Sf(y)){for(y=0,E=c.responseEnd,o+=1;o<n.length;o++){var R=n[o],Q=R.startTime;if(Q>E)break;var se=R.transferSize,ce=R.initiatorType;se&&Sf(ce)&&(R=R.responseEnd,y+=se*(R<E?1:(E-Q)/(R-Q)))}if(--o,s+=8*(u+y)/(c.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Vd=null,Gd=null;function Ll(a){return a.nodeType===9?a:a.ownerDocument}function Cf(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ef(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function zf(a,s,n,o){return n=Ll(n).createElement(a),n[ea]=o,n[xa]=s,lt(n,a,s),Ja(n),n}function Fd(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var $d=null;function Nv(){var a=window.event;return a&&a.type==="popstate"?a===$d?!1:($d=a,!0):($d=null,!1)}var Id=typeof setTimeout=="function"?setTimeout:void 0,wv=typeof clearTimeout=="function"?clearTimeout:void 0,kf=typeof Promise=="function"?Promise:void 0,Af=typeof requestAnimationFrame=="function"?requestAnimationFrame:Id,Sv=typeof queueMicrotask=="function"?queueMicrotask:typeof kf<"u"?function(a){return kf.resolve(null).then(a).catch(Cv)}:Id;function Cv(a){setTimeout(function(){throw a})}function rn(a){return a==="head"}function Mf(a,s){var n=s,o=0;do{var c=n.nextSibling;if(a.removeChild(n),c&&c.nodeType===8)if(n=c.data,n==="/$"||n==="/&"){if(o===0){a.removeChild(c),Bo(s);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")eu(a.ownerDocument.documentElement);else if(n==="head"){n=a.ownerDocument.head,eu(n);for(var u=n.firstChild;u;){var y=u.nextSibling,E=u.nodeName;u[Jo]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=y}}else n==="body"&&eu(a.ownerDocument.body);n=c}while(n);Bo(s)}function Tf(a,s){var n=a;a=0;do{var o=n.nextSibling;if(n.nodeType===1?s?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(s?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(a===0)break;a--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||a++;n=o}while(n)}function Lf(a,s,n){if(s=CSS.escape(s)!==s?"r-"+btoa(s).replace(/=/g,""):s,a.style.viewTransitionName=s,n!=null&&(a.style.viewTransitionClass=n),n=getComputedStyle(a),n.display==="inline"){if(s=a.getClientRects(),s.length===1)var o=1;else for(var c=o=0;c<s.length;c++){var u=s[c];0<u.width&&0<u.height&&o++}o===1&&(a=a.style,a.display=s.length===1?"inline-block":"block",a.marginTop="-"+n.paddingTop,a.marginBottom="-"+n.paddingBottom)}}function Rf(a,s){a=a.style,s=s.style;var n=s!=null?s.hasOwnProperty("viewTransitionName")?s.viewTransitionName:s.hasOwnProperty("view-transition-name")?s["view-transition-name"]:null:null;a.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=s!=null?s.hasOwnProperty("viewTransitionClass")?s.viewTransitionClass:s.hasOwnProperty("view-transition-class")?s["view-transition-class"]:null:null,a.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),a.display==="inline-block"&&(s==null?a.display=a.margin="":(n=s.display,a.display=n==null||typeof n=="boolean"?"":n,n=s.margin,n!=null?a.margin=n:(n=s.hasOwnProperty("marginTop")?s.marginTop:s["margin-top"],a.marginTop=n==null||typeof n=="boolean"?"":n,s=s.hasOwnProperty("marginBottom")?s.marginBottom:s["margin-bottom"],a.marginBottom=s==null||typeof s=="boolean"?"":s)))}function Ev(a,s,n){return n=n.ownerDocument.defaultView,{rect:a,abs:s.position==="absolute"||s.position==="fixed",clip:s.clipPath!=="none"||s.overflow!=="visible"||s.filter!=="none"||s.mask!=="none"||s.mask!=="none"||s.borderRadius!=="0px",view:0<=a.bottom&&0<=a.right&&a.top<=n.innerHeight&&a.left<=n.innerWidth}}function Zd(a){var s=a.getBoundingClientRect(),n=getComputedStyle(a);return Ev(s,n,a)}function zv(a){return a.documentElement.clientHeight}function kv(a){this.addEventListener("load",a),this.addEventListener("error",a)}function Av(a,s,n,o,c,u,y,E,R){var Q=s.nodeType===9?s:s.ownerDocument;try{var se=Q.startViewTransition({update:function(){var K=Q.defaultView,ae=K.navigation&&K.navigation.transition,ve=Q.fonts.status;o();var Ee=[];if(ve==="loaded"&&(zv(Q),Q.fonts.status==="loading"&&Ee.push(Q.fonts.ready)),ve=Ee.length,a!==null)for(var He=a.suspenseyImages,Y=0,G=0;G<He.length;G++){var W=He[G];if(!W.complete){var re=W.getBoundingClientRect();if(0<re.bottom&&0<re.right&&re.top<K.innerHeight&&re.left<K.innerWidth){if(Y+=ax(W),Y>mr){Ee.length=ve;break}W=new Promise(kv.bind(W)),Ee.push(W)}}}if(0<Ee.length)return K=Promise.race([Promise.all(Ee),new Promise(function(we){return setTimeout(we,500)})]).then(c,c),(ae?Promise.allSettled([ae.finished,K]):K).then(u,u);if(c(),ae)return ae.finished.then(u,u);u()},types:n});Q.__reactViewTransition=se;var ce=[];return se.ready.then(function(){for(var K=Q.documentElement.getAnimations({subtree:!0}),ae=0;ae<K.length;ae++){var ve=K[ae],Ee=ve.effect,He=Ee.pseudoElement;if(He!=null&&He.startsWith("::view-transition")){ce.push(ve),ve=Ee.getKeyframes();for(var Y=He=void 0,G=!0,W=0;W<ve.length;W++){var re=ve[W],we=re.width;if(He===void 0)He=we;else if(He!==we){G=!1;break}if(we=re.height,Y===void 0)Y=we;else if(Y!==we){G=!1;break}delete re.width,delete re.height,re.transform==="none"&&delete re.transform}G&&He!==void 0&&Y!==void 0&&(Ee.setKeyframes(ve),G=getComputedStyle(Ee.target,Ee.pseudoElement),G.width!==He||G.height!==Y)&&(G=ve[0],G.width=He,G.height=Y,G=ve[ve.length-1],G.width=He,G.height=Y,Ee.setKeyframes(ve))}}y()},function(K){Q.__reactViewTransition===se&&(Q.__reactViewTransition=null);try{if(typeof K=="object"&&K!==null)switch(K.name){case"InvalidStateError":(K.message==="View transition was skipped because document visibility state is hidden."||K.message==="Skipping view transition because document visibility state has become hidden."||K.message==="Skipping view transition because viewport size changed."||K.message==="Transition was aborted because of invalid state")&&(K=null)}K!==null&&R(K)}finally{o(),c(),y()}}),se.finished.finally(function(){for(var K=0;K<ce.length;K++)ce[K].cancel();Q.__reactViewTransition===se&&(Q.__reactViewTransition=null),E()}),se}catch{return o(),c(),y(),null}}function Un(a,s){this._scope=document.documentElement,this._selector="::view-transition-"+a+"("+s+")"}Un.prototype.animate=function(a,s){return s=typeof s=="number"?{duration:s}:H({},s),s.pseudoElement=this._selector,this._scope.animate(a,s)},Un.prototype.getAnimations=function(){for(var a=this._scope,s=this._selector,n=a.getAnimations({subtree:!0}),o=[],c=0;c<n.length;c++){var u=n[c].effect;u!==null&&u.target===a&&u.pseudoElement===s&&o.push(n[c])}return o},Un.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function qf(a){return{name:a,group:new Un("group",a),imagePair:new Un("image-pair",a),old:new Un("old",a),new:new Un("new",a)}}function Mt(a){this._fragmentFiber=a,this._observers=this._eventListeners=null}Mt.prototype.addEventListener=function(a,s,n){var o=null,c=null;if(!(n!=null&&typeof n!="boolean"&&(o=n.signal||null,o!==null&&o.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var u=this._eventListeners;if(Of(u,a,s,n)===-1){var y=this,E=s;n!=null&&typeof n!="boolean"&&n.once===!0&&(E=function(R){y.removeEventListener(a,s,n),typeof s=="function"?s.call(this,R):s.handleEvent(R)}),o!==null&&(c=y.removeEventListener.bind(y,a,s,n),o.addEventListener("abort",c,{once:!0}),c=o.removeEventListener.bind(o,"abort",c)),o=To(n),u.push({type:a,listener:s,optionsOrUseCapture:n,attachedListener:E,cleanup:c}),v(this._fragmentFiber.child,!1,Mv,a,E,o)}this._eventListeners=u}};function Mv(a,s,n,o){return C(a).addEventListener(s,n,o),!1}Mt.prototype.removeEventListener=function(a,s,n){var o=this._eventListeners;if(o!==null&&(s=Of(o,a,s,n),s!==-1)){var c=o[s];n=c.attachedListener;var u=c.cleanup;c=To(c.optionsOrUseCapture),v(this._fragmentFiber.child,!1,Tv,a,n,c),o.splice(s,1),u!==null&&u()}};function Tv(a,s,n,o){return C(a).removeEventListener(s,n,o),!1}function To(a){return a!=null&&typeof a!="boolean"&&(a.once===!0||a.signal instanceof AbortSignal)?{capture:a.capture,passive:a.passive}:a}function Df(a){return a==null?"c=0":typeof a=="boolean"?"c="+(a?"1":"0"):"c="+(a.capture?"1":"0")}function Of(a,s,n,o){if(a.length===0)return-1;o=Df(o);for(var c=0;c<a.length;c++){var u=a[c];if(u.type===s&&u.listener===n&&Df(u.optionsOrUseCapture)===o)return c}return-1}Mt.prototype.dispatchEvent=function(a){var s=S(this._fragmentFiber);if(s===null)return!0;s=C(s);var n=this._eventListeners;if(n!==null&&0<n.length||!a.bubbles){var o=s.nodeType===9?s.createComment(""):document.createTextNode("");if(n)for(var c=0;c<n.length;c++){var u=n[c];o.addEventListener(u.type,u.attachedListener,To(u.optionsOrUseCapture))}if(s.appendChild(o),a=o.dispatchEvent(a),n)for(c=0;c<n.length;c++)u=n[c],o.removeEventListener(u.type,u.attachedListener,To(u.optionsOrUseCapture));return s.removeChild(o),a}return s.dispatchEvent(a)},Mt.prototype.focus=function(a){v(this._fragmentFiber.child,!0,Bf,a,void 0,void 0)};function Bf(a,s){return a.tag===6?!1:(a=C(a),Fv(a,s))}Mt.prototype.focusLast=function(a){var s=[];v(this._fragmentFiber.child,!0,Kd,s,void 0,void 0);for(var n=s.length-1;0<=n&&!Bf(s[n],a);n--);};function Kd(a,s){return s.push(a),!1}Mt.prototype.blur=function(){var a=S(this._fragmentFiber);a!==null&&(a=C(a),a=Ll(a).activeElement,a!==null&&v(this._fragmentFiber.child,!1,Lv,a,void 0,void 0))};function Lv(a,s){return a.tag===6?!1:(a=C(a),a===s||a.contains(s)?(s.blur(),!0):!1)}Mt.prototype.observeUsing=function(a){this._observers===null&&(this._observers=new Set),this._observers.add(a),v(this._fragmentFiber.child,!1,Rv,a,void 0,void 0)};function Rv(a,s){return a.tag===6||(a=C(a),s.observe(a)),!1}Mt.prototype.unobserveUsing=function(a){var s=this._observers;if(s!==null&&s.has(a)){s.delete(a),v(this._fragmentFiber.child,!1,qv,a,void 0,void 0);for(var n=s=0;n<es.length;n++){var o=es[n];o.fragmentInstance===this&&o.observer===a?a.unobserve(o.instance):es[s++]=o}es.length=s}};function qv(a,s){return a.tag===6||(a=C(a),s.unobserve(a)),!1}var es=[],Yd=!1;function Dv(a,s,n){es.push({fragmentInstance:a,observer:s,instance:n}),Yd||(Yd=!0,$v(function(){Yd=!1;var o=es;es=[];for(var c=0;c<o.length;c++){var u=o[c];u.observer.unobserve(u.instance)}}))}Mt.prototype.getClientRects=function(){var a=[];return v(this._fragmentFiber.child,!1,Ov,a,void 0,void 0),a};function Ov(a,s){if(a.tag===6){a=a.stateNode;var n=a.ownerDocument.createRange();n.selectNodeContents(a),s.push.apply(s,n.getClientRects())}else a=C(a),s.push.apply(s,a.getClientRects());return!1}Mt.prototype.getRootNode=function(a){var s=S(this._fragmentFiber);return s===null?this:C(s).getRootNode(a)},Mt.prototype.compareDocumentPosition=function(a){var s=S(this._fragmentFiber);if(s===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];v(this._fragmentFiber.child,!1,Kd,n,void 0,void 0);var o=C(s);if(n.length===0){if(n=o,N(this._fragmentFiber)){e:{for(s=this._fragmentFiber.return;s!==null;){if(s.tag===4){s=s.stateNode.containerInfo;break e}if(s.tag===3||s.tag===5||s.tag===27)break;s=s.return}s=null}s!=null&&(n=s)}s=this._fragmentFiber;var c=o=n.compareDocumentPosition(a);return n===a?c=Node.DOCUMENT_POSITION_CONTAINS:o&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=_(s)[1],n===null?c=Node.DOCUMENT_POSITION_PRECEDING:(a=C(n).compareDocumentPosition(a),c=a===0||a&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),c|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}s=C(n[0]),c=C(n[n.length-1]);var u=N(this._fragmentFiber)?s.parentElement:o;if(u==null)return Node.DOCUMENT_POSITION_DISCONNECTED;o=u.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY,u=u.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_CONTAINED_BY;var y=s.compareDocumentPosition(a),E=c.compareDocumentPosition(a),R=y&Node.DOCUMENT_POSITION_CONTAINED_BY||E&Node.DOCUMENT_POSITION_CONTAINED_BY;return E=o&&u&&y&Node.DOCUMENT_POSITION_FOLLOWING&&E&Node.DOCUMENT_POSITION_PRECEDING,s=o&&s===a||u&&c===a||R||E?Node.DOCUMENT_POSITION_CONTAINED_BY:!o&&s===a||!u&&c===a?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:y,s&Node.DOCUMENT_POSITION_DISCONNECTED||s&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Bv(s,this._fragmentFiber,n[0],n[n.length-1],a)?s:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Bv(a,s,n,o,c){var u=vn(c);if(a&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!u)e:{for(;u!==null;){if(u.tag===7&&(u===s||u.alternate===s)){n=!0;break e}u=u.return}n=!1}return n}if(a&Node.DOCUMENT_POSITION_CONTAINS){if(u===null)return u=c.ownerDocument,c===u||c===u.documentElement||c===u.body;e:{for(u=s,s=S(s);u!==null;){if(!(u.tag!==5&&u.tag!==3&&u.tag!==27||u!==s&&u.alternate!==s)){u=!0;break e}u=u.return}u=!1}return u}return a&Node.DOCUMENT_POSITION_PRECEDING?((s=!!u)&&!(s=u===n)&&(s=q(n,u,L),s===null?s=!1:(v(s,!0,w,u,n),u=k,k=null,s=u!==null)),s):a&Node.DOCUMENT_POSITION_FOLLOWING?((s=!!u)&&!(s=u===o)&&(s=q(o,u,L),s===null?s=!1:(v(s,!0,A,u,o),u=k,T=k=null,s=u!==null)),s):!1}function Pf(a,s){var n=a.ownerDocument.createRange();n.selectNodeContents(a),a=n.getBoundingClientRect(),window.scrollTo(window.scrollX+a.left,s?window.scrollY+a.top:window.scrollY+a.bottom-window.innerHeight)}Mt.prototype.scrollIntoView=function(a){if(typeof a=="object")throw Error(d(566));var s=[];v(this._fragmentFiber.child,!1,Kd,s,void 0,void 0);var n=a!==!1;if(s.length===0){var o=_(this._fragmentFiber);if(o=n?o[1]||o[0]||S(this._fragmentFiber):o[0]||o[1],o===null)return;if(o.tag===6){a=C(o),Pf(a,n);return}if(o=C(o),o.nodeType!==9){if(o.nodeType===11){n="host"in o?o.host:null,n!==null&&n.scrollIntoView(a);return}o.scrollIntoView(a)}}for(o=n?s.length-1:0;o!==(n?-1:s.length);){var c=s[o];c.tag===6?(c=C(c),Pf(c,n)):C(c).scrollIntoView(a),o+=n?-1:1}};function Pv(a,s){return a=C(a),Uf(a,s),!1}function Uf(a,s){a.reactFragments==null&&(a.reactFragments=new Set),a.reactFragments.add(s)}function Hf(a,s){var n=s._eventListeners;if(n!==null)for(var o=0;o<n.length;o++){var c=n[o];a.addEventListener(c.type,c.attachedListener,To(c.optionsOrUseCapture))}a.nodeType!==3&&(n=s._observers,n!==null&&n.forEach(function(u){for(var y=0,E=0;E<es.length;E++){var R=es[E];(R.fragmentInstance!==s||R.observer!==u||R.instance!==a)&&(es[y++]=R)}es.length=y,u.observe(a)}),Uf(a,s))}function Uv(a,s){var n=s._eventListeners;if(n!==null)for(var o=0;o<n.length;o++){var c=n[o];a.removeEventListener(c.type,c.attachedListener,To(c.optionsOrUseCapture))}a.nodeType!==3&&(n=s._observers,n!==null&&n.forEach(function(u){typeof u.rootMargin=="str
49ing"?Dv(s,u,a):u.unobserve(a)}),a.reactFragments!=null&&a.reactFragments.delete(s))}function Qd(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var n=s;switch(s=s.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Qd(n),ei(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}a.removeChild(n)}}function Hv(a,s,n,o){for(;a.nodeType===1;){var c=n;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!o&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(o){if(!a[Jo])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(u=a.getAttribute("rel"),u==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(u!==c.rel||a.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||a.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||a.getAttribute("title")!==(c.title==null?null:c.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(u=a.getAttribute("src"),(u!==(c.src==null?null:c.src)||a.getAttribute("type")!==(c.type==null?null:c.type)||a.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&u&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var u=c.name==null?null:""+c.name;if(c.type==="hidden"&&a.getAttribute("name")===u)return a}else return a;if(a=Gt(a.nextSibling),a===null)break}return null}function Vv(a,s,n){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!n||(a=Gt(a.nextSibling),a===null))return null;return a}function Vf(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=Gt(a.nextSibling),a===null))return null;return a}function Jd(a){return a.data==="$?"||a.data==="$~"}function Xd(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function Gv(a,s){var n=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||n.readyState!=="loading")s();else{var o=function(){s(),n.removeEventListener("DOMContentLoaded",o)};n.addEventListener("DOMContentLoaded",o),a._reactRetry=o}}function Gt(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var Wd=null;function Gf(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var n=a.data;if(n==="/$"||n==="/&"){if(s===0)return Gt(a.nextSibling);s--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||s++}a=a.nextSibling}return null}function Ff(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var n=a.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(s===0)return a;s--}else n!=="/$"&&n!=="/&"||s++}a=a.previousSibling}return null}function Fv(a,s){function n(){o=!0}if(a.ownerDocument.activeElement===a)return!0;var o=!1;try{a.ownerDocument.addEventListener("focus",n,!0),(a.focus||HTMLElement.prototype.focus).call(a,s)}finally{a.ownerDocument.removeEventListener("focus",n,!0)}return o}function $v(a){Af(function(){Af(function(s){return a(s)})})}function $f(a,s,n){switch(s=Ll(n),a){case"html":if(a=s.documentElement,!a)throw Error(d(452));return a;case"head":if(a=s.head,!a)throw Error(d(453));return a;case"body":if(a=s.body,!a)throw Error(d(454));return a;default:throw Error(d(451))}}function If(a,s,n){for(var o in n){var c=n[o];n.hasOwnProperty(o)&&c!=null&&va(a,s,o,null,yv,c)}n.dangerouslySetInnerHTML!=null&&(a.textContent=""),a.onclick===ls&&(a.onclick=null),ei(a)}function eu(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);ei(a)}var Ft=new Map,Zf=new Set;function Rl(a){if(typeof a.getRootNode=="function"){var s=a.getRootNode();if(s.nodeType===9||s.nodeType===11)return s}return a.nodeType===9?a:a.ownerDocument}var Ds=me.d;me.d={f:Iv,r:Zv,D:Kv,C:Yv,L:Qv,m:Jv,X:Wv,S:Xv,M:e1};function Iv(){var a=Ds.f(),s=sr();return a||s}function Zv(a){var s=Qn(a);s!==null&&s.tag===5&&s.type==="form"?Kp(s):Ds.r(a)}var Lo=typeof document>"u"?null:document;function Kf(a,s,n){var o=Lo;if(o&&typeof s=="string"&&s){var c=Dt(s);c='link[rel="'+a+'"][href="'+c+'"]',typeof n=="string"&&(c+='[crossorigin="'+n+'"]'),Zf.has(c)||(Zf.add(c),a={rel:a,crossOrigin:n,href:s},o.querySelector(c)===null&&(s=o.createElement("link"),lt(s,"link",a),Ja(s),o.head.appendChild(s)))}}function Kv(a){Ds.D(a),Kf("dns-prefetch",a,null)}function Yv(a,s){Ds.C(a,s),Kf("preconnect",a,s)}function Qv(a,s,n){Ds.L(a,s,n);var o=Lo;if(o&&a&&s){var c='link[rel="preload"][as="'+Dt(s)+'"]';s==="image"&&n&&n.imageSrcSet?(c+='[imagesrcset="'+Dt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(c+='[imagesizes="'+Dt(n.imageSizes)+'"]')):c+='[href="'+Dt(a)+'"]';var u=c;switch(s){case"style":u=Ro(a);break;case"script":u=qo(a)}if(!(Ft.has(u)||(a=H({rel:"preload",href:s==="image"&&n&&n.imageSrcSet?void 0:a,as:s},n),Ft.set(u,a),o.querySelector(c)!==null||s==="style"&&o.querySelector(ql(u))||s==="script"&&o.querySelector(Dl(u))))){var y=o.createElement("link");lt(y,"link",a),s==="style"&&(y[Wl]=!0,y.onload=y.onerror=function(){lm(y)}),Ja(y),o.head.appendChild(y)}}}function Jv(a,s){Ds.m(a,s);var n=Lo;if(n&&a){var o=s&&typeof s.as=="string"?s.as:"script",c='link[rel="modulepreload"][as="'+Dt(o)+'"][href="'+Dt(a)+'"]',u=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=qo(a)}if(!Ft.has(u)&&(a=H({rel:"modulepreload",href:a},s),Ft.set(u,a),n.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Dl(u)))return}o=n.createElement("link"),lt(o,"link",a),Ja(o),n.head.appendChild(o)}}}function Xv(a,s,n){Ds.S(a,s,n);var o=Lo;if(o&&a){var c=Jn(o).hoistableStyles,u=Ro(a);s=s||"default";var y=c.get(u);if(!y){var E={loading:0,preload:null};if(y=o.querySelector(ql(u)))E.loading=5;else{a=H({rel:"stylesheet",href:a,"data-precedence":s},n),(n=Ft.get(u))&&au(a,n);var R=y=o.createElement("link");Ja(R),lt(R,"link",a),R._p=new Promise(function(Q,se){R.onload=Q,R.onerror=se}),R.addEventListener("load",function(){E.loading|=1}),R.addEventListener("error",function(){E.loading|=2}),E.loading|=4,dr(y,s,o)}y={type:"stylesheet",instance:y,count:1,state:E},c.set(u,y)}}}function Wv(a,s){Ds.X(a,s);var n=Lo;if(n&&a){var o=Jn(n).hoistableScripts,c=qo(a),u=o.get(c);u||(u=n.querySelector(Dl(c)),u||(a=H({src:a,async:!0},s),(s=Ft.get(c))&&tu(a,s),u=n.createElement("script"),Ja(u),lt(u,"link",a),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},o.set(c,u))}}function e1(a,s){Ds.M(a,s);var n=Lo;if(n&&a){var o=Jn(n).hoistableScripts,c=qo(a),u=o.get(c);u||(u=n.querySelector(Dl(c)),u||(a=H({src:a,async:!0,type:"module"},s),(s=Ft.get(c))&&tu(a,s),u=n.createElement("script"),Ja(u),lt(u,"link",a),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},o.set(c,u))}}function Yf(a,s,n,o){var c=(c=ye.current)?Rl(c):null;if(!c)throw Error(d(446));switch(a){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=Ro(n.href),s=Jn(c).hoistableStyles,o=s.get(n),o||(o={type:"style",instance:null,count:0,state:null},s.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){a=Ro(n.href);var u=Jn(c).hoistableStyles,y=u.get(a);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(a,y),(u=c.querySelector(ql(a)))?u._p||(y.instance=u,y.state.loading=5):(u=Ft.get(a),u||(u={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ft.set(a,u)),a1(c,a,u,y.state))),s&&o===null)throw Error(d(528,""));return y}if(s&&o!==null)throw Error(d(529,""));return null;case"script":return s=n.async,n=n.src,typeof n=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?
vendor: 4,191 bytes, line 49
49(n=qo(n),s=Jn(c).hoistableScripts,o=s.get(n),o||(o={type:"script",instance:null,count:0,state:null},s.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,a))}}function Ro(a){return'href="'+Dt(a)+'"'}function ql(a){return'link[rel="stylesheet"]['+a+"]"}function Qf(a){return H({},a,{"data-precedence":a.precedence,precedence:null})}function a1(a,s,n,o){if(s=a.querySelector('link[rel="preload"][as="style"]['+s+"]")){if(s[Wl]!==!0){o.loading=1;return}}else s=a.createElement("link"),s[Wl]=!0,s.onload=s.onerror=lm.bind(null,s),lt(s,"link",n),Ja(s),a.head.appendChild(s);o.preload=s,s.addEventListener("load",function(){return o.loading|=1}),s.addEventListener("error",function(){return o.loading|=2})}function qo(a){return'[src="'+Dt(a)+'"]'}function Dl(a){return"script[async]"+a}function Jf(a,s,n){if(s.count++,s.instance===null)switch(s.type){case"style":var o=a.querySelector('style[data-href~="'+Dt(n.href)+'"]');if(o)return s.instance=o,Ja(o),o;var c=H({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(a.ownerDocument||a).createElement("style"),Ja(o),lt(o,"style",c),dr(o,n.precedence,a),s.instance=o;case"stylesheet":c=Ro(n.href);var u=a.querySelector(ql(c));if(u)return s.state.loading|=4,s.instance=u,Ja(u),u;o=Qf(n),(c=Ft.get(c))&&au(o,c),u=(a.ownerDocument||a).createElement("link"),Ja(u);var y=u;return y._p=new Promise(function(E,R){y.onload=E,y.onerror=R}),lt(u,"link",o),s.state.loading|=4,dr(u,n.precedence,a),s.instance=u;case"script":return u=qo(n.src),(c=a.querySelector(Dl(u)))?(s.instance=c,Ja(c),c):(o=n,(c=Ft.get(u))&&(o=H({},n),tu(o,c)),a=a.ownerDocument||a,c=a.createElement("script"),Ja(c),lt(c,"link",o),a.head.appendChild(c),s.instance=c);case"void":return null;default:throw Error(d(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(o=s.instance,s.state.loading|=4,dr(o,n.precedence,a));return s.instance}function dr(a,s,n){for(var o=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,u=c,y=0;y<o.length;y++){var E=o[y];if(E.dataset.precedence===s)u=E;else if(u!==c)break}u?u.parentNode.insertBefore(a,u.nextSibling):(s=n.nodeType===9?n.head:n,s.insertBefore(a,s.firstChild))}function au(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function tu(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var ur=null;function Xf(a,s,n){if(ur===null){var o=new Map,c=ur=new Map;c.set(n,o)}else c=ur,o=c.get(n),o||(o=new Map,c.set(n,o));if(o.has(a))return o;for(o.set(a,null),n=n.getElementsByTagName(a),c=0;c<n.length;c++){var u=n[c];if(!(u[Jo]||u[ea]||a==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var y=u.getAttribute(s)||"";y=a+y;var E=o.get(y);E?E.push(u):o.set(y,[u])}}return o}function su(a,s,n){a=a.ownerDocument||a,a.head.insertBefore(n,s==="title"?a.querySelector("head > title"):null)}function t1(a,s,n){if(n===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return a=s.disabled,typeof s.precedence=="string"&&a==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Wf(a,s){return a==="img"&&s.src!=null&&s.src!==""&&s.onLoad==null&&s.loading!=="lazy"}function ex(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function ax(a){return(a.width||100)*(a.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function tx(a,s){typeof s.decode=="function"&&(a.imgCount++,s.complete||(a.imgBytes+=ax(s),a.suspenseyImages.push(s)),a=o1.bind(a),s.decode().then(a,a))}function s1(a,s,n,o){if(n.type==="stylesheet"&&(typeof o.media!="str
49ing"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var c=Ro(o.href),u=s.querySelector(ql(c));if(u){s=u._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Ol.bind(a),s.then(a,a)),n.state.loading|=4,n.instance=u,Ja(u);return}u=s.ownerDocument||s,o=Qf(o),(c=Ft.get(c))&&au(o,c),u=u.createElement("link"),Ja(u);var y=u;y._p=new Promise(function(E,R){y.onload=E,y.onerror=R}),lt(u,"link",o),n.instance=u}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(n,s),(s=n.state.preload)&&(n.state.loading&3)===0&&(a.count++,n=Ol.bind(a),s.addEventListener("load",n),s.addEventListener("error",n))}}var mr=0;function n1(a,s){return a.stylesheets&&a.count===0&&hr(a,a.stylesheets),0<a.count||0<a.imgCount?function(n){var o=setTimeout(function(){if(a.stylesheets&&hr(a,a.stylesheets),a.unsuspend){var u=a.unsuspend;a.unsuspend=null,u()}},6e4+s);0<a.imgBytes&&mr===0&&(mr=62500*_v());var c=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&hr(a,a.stylesheets),a.unsuspend)){var u=a.unsuspend;a.unsuspend=null,u()}},(a.imgBytes>mr?50:800)+s);return a.unsuspend=n,function(){a.unsuspend=null,clearTimeout(o),clearTimeout(c)}}:null}function sx(a){if(a.count===0&&(a.imgCount===0||!a.waitingForImages)){if(a.stylesheets)hr(a,a.stylesheets);else if(a.unsuspend){var s=a.unsuspend;a.unsuspend=null,s()}}}function Ol(){this.count--,sx(this)}function o1(){this.imgCount--,sx(this)}var pr=null;function hr(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,pr=new Map,s.forEac
vendor: 10,474 bytes, line 49
49h(l1,a),pr=null,Ol.call(a))}function l1(a,s){if(!(s.state.loading&4)){var n=pr.get(a);if(n)var o=n.get(null);else{n=new Map,pr.set(a,n);for(var c=a.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<c.length;u++){var y=c[u];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(n.set(y.dataset.precedence,y),o=y)}o&&n.set(null,o)}c=s.instance,y=c.getAttribute("data-precedence"),u=n.get(y)||o,u===o&&n.set(null,c),n.set(y,c),this.count++,o=Ol.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),u?u.parentNode.insertBefore(c,u.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(c,a.firstChild)),s.state.loading|=4}}var Do={$$typeof:te,Provider:null,Consumer:null,_currentValue:Be,_currentValue2:Be,_threadCount:0};function i1(a,s,n,o,c,u,y,E,R){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=I(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=I(0),this.hiddenUpdates=I(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=u,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.transitionTypes=null,this.incompleteTransitions=new Map}function nx(a,s,n,o,c,u,y,E,R,Q,se,ce){return a=new i1(a,s,n,y,R,Q,se,ce,E),s=1,u===!0&&(s|=24),u=bt(3,null,null,s),a.current=u,u.stateNode=a,s=gc(),s.refCount++,a.pooledCache=s,s.refCount++,u.memoizedState={element:o,isDehydrated:n,cache:s},_c(u),a}function ox(a){return a?(a=io,a):io}function lx(a,s,n,o,c,u){c=ox(c),o.context===null?o.context=c:o.pendingContext=c,o=Ys(s),o.payload={element:n},u=u===void 0?null:u,u!==null&&(o.callback=u),n=Qs(a,o,s),n!==null&&(jt(n,a,s),hl(n,a,s))}function ix(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var n=a.retryLane;a.retryLane=n!==0&&n<s?n:s}}function nu(a,s){ix(a,s),(a=a.alternate)&&ix(a,s)}function rx(a){if(a.tag===13||a.tag===31){var s=Nn(a,67108864);s!==null&&jt(s,a,67108864),nu(a,67108864)}}function cx(a){if(a.tag===13||a.tag===31){var s=At();s=Oe(s);var n=Nn(a,s);n!==null&&jt(n,a,s),nu(a,s)}}var Oo=!0;function r1(a,s,n,o){var c=le.T;le.T=null;var u=me.p;try{me.p=2,ou(a,s,n,o)}finally{me.p=u,le.T=c}}function c1(a,s,n,o){var c=le.T;le.T=null;var u=me.p;try{me.p=8,ou(a,s,n,o)}finally{me.p=u,le.T=c}}function ou(a,s,n,o){if(Oo){var c=lu(o);if(c===null)Ud(a,s,o,fr,n),ux(a,o);else if(u1(c,a,s,n,o))o.stopPropagation();else if(ux(a,o),s&4&&-1<d1.indexOf(a)){for(;c!==null;){var u=Qn(c);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var y=_s(u.pendingLanes);if(y!==0){var E=u;for(E.pendingLanes|=2,E.entangledLanes|=2;y;){var R=1<<31-ct(y);E.entanglements[1]|=R,y&=~R}xs(u),(ca&6)===0&&(er=Ra()+500,Al(0))}}break;case 31:case 13:E=Nn(u,2),E!==null&&jt(E,u,2),sr(),nu(u,2)}if(u=lu(o),u===null&&Ud(a,s,o,fr,n),u===c)break;c=u}c!==null&&o.stopPropagation()}else Ud(a,s,o,null,n)}}function lu(a){return a=$r(a),iu(a)}var fr=null;function iu(a){if(fr=null,a=vn(a),a!==null){var s=p(a);if(s===null)a=null;else{var n=s.tag;if(n===13){if(a=f(s),a!==null)return a;a=null}else if(n===31){if(a=x(s),a!==null)return a;a=null}else if(n===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return fr=a,null}function dx(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(js()){case Us:return 2;case Rt:return 8;case qa:case rt:return 32;case ke:return 268435456;default:return 32}default:return 32}}var ru=!1,cn=null,dn=null,un=null,Bl=new Map,Pl=new Map,mn=[],d1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ux(a,s){switch(a){case"focusin":case"focusout":cn=null;break;case"dragenter":case"dragleave":dn=null;break;case"mouseover":case"mouseout":un=null;break;case"pointerover":case"pointerout":Bl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pl.delete(s.pointerId)}}function Ul(a,s,n,o,c,u){return a===null||a.nativeEvent!==u?(a={blockedOn:s,domEventName:n,eventSystemFlags:o,nativeEvent:u,targetContainers:[c]},s!==null&&(s=Qn(s),s!==null&&rx(s)),a):(a.eventSystemFlags|=o,s=a.targetContainers,c!==null&&s.indexOf(c)===-1&&s.push(c),a)}function u1(a,s,n,o,c){switch(s){case"focusin":return cn=Ul(cn,a,s,n,o,c),!0;case"dragenter":return dn=Ul(dn,a,s,n,o,c),!0;case"mouseover":return un=Ul(un,a,s,n,o,c),!0;case"pointerover":var u=c.pointerId;return Bl.set(u,Ul(Bl.get(u)||null,a,s,n,o,c)),!0;case"gotpointercapture":return u=c.pointerId,Pl.set(u,Ul(Pl.get(u)||null,a,s,n,o,c)),!0}return!1}function mx(a){var s=vn(a.target);if(s!==null){var n=p(s);if(n!==null){if(s=n.tag,s===13){if(s=f(n),s!==null){a.blockedOn=s,pa(a.priority,function(){cx(n)});return}}else if(s===31){if(s=x(n),s!==null){a.blockedOn=s,pa(a.priority,function(){cx(n)});return}}else if(s===3&&n.stateNode.current.memoizedState.isDehydrated){a.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}a.blockedOn=null}function xr(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var n=lu(a.nativeEvent);if(n===null){n=a.nativeEvent;var o=new n.constructor(n.type,n);Fr=o,n.target.dispatchEvent(o),Fr=null}else return s=Qn(n),s!==null&&rx(s),a.blockedOn=n,!1;s.shift()}return!0}function px(a,s,n){xr(a)&&n.delete(s)}function m1(){ru=!1,cn!==null&&xr(cn)&&(cn=null),dn!==null&&xr(dn)&&(dn=null),un!==null&&xr(un)&&(un=null),Bl.forEach(px),Pl.forEach(px)}function br(a,s){a.blockedOn===s&&(a.blockedOn=null,ru||(ru=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,m1)))}var gr=null;function hx(a){gr!==a&&(gr=a,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){gr===a&&(gr=null);for(var s=0;s<a.length;s+=3){var n=a[s],o=a[s+1],c=a[s+2];if(typeof o!="function"){if(iu(o||n)===null)continue;break}var u=Qn(n);u!==null&&(a.splice(s,3),s-=3,Gc(u,{pending:!0,data:c,method:n.method,action:o},o,c))}}))}function Bo(a){function s(R){return br(R,a)}cn!==null&&br(cn,a),dn!==null&&br(dn,a),un!==null&&br(un,a),Bl.forEach(s),Pl.forEach(s);for(var n=0;n<mn.length;n++){var o=mn[n];o.blockedOn===a&&(o.blockedOn=null)}for(;0<mn.length&&(n=mn[0],n.blockedOn===null);)mx(n),n.blockedOn===null&&mn.shift();if(n=(a.ownerDocument||a).$$reactFormReplay,n!=null)for(o=0;o<n.length;o+=3){var c=n[o],u=n[o+1],y=c[xa]||null;if(typeof u=="function")y||hx(n);else if(y){var E=null;if(u&&u.hasAttribute("formAction")){if(c=u,y=u[xa]||null)E=y.formAction;else if(iu(c)!==null)continue}else E=y.action;typeof E=="function"?n[o+1]=E:(n.splice(o,3),o-=3),hx(n)}}}function fx(){function a(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(y){return c=y})},focusReset:"manual",scroll:"manual"})}function s(){c!==null&&(c(),c=null),o||setTimeout(n,20)}function n(){if(!o&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,c=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(n,100),function(){o=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),c!==null&&(c(),c=null)}}}function cu(a){this._internalRoot=a}vr.prototype.render=cu.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(d(409));var n=s.current,o=At();lx(n,o,a,s,null,null)},vr.prototype.unmount=cu.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;lx(a.current,2,null,a,null,null),sr(),s[os]=null}};function vr(a){this._internalRoot=a}vr.prototype.unstable_scheduleHydration=function(a){if(a){var s=la();a={blockedOn:null,target:a,priority:s};for(var n=0;n<mn.length&&s!==0&&s<mn[n].priority;n++);mn.splice(n,0,a),n===0&&mx(a)}};var xx=i.version;if(xx!=="19.3.0")throw Error(d(527,xx,"19.3.0"));me.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(d(188)):(a=Object.keys(a).join(","),Error(d(268,a)));return a=j(s),a=a!==null?g(a):null,a=a===null?null:a.stateNode,a};var p1={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:le,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yr.isDisabled&&yr.supportsFiber)try{Sa=yr.inject(p1),sa=yr}catch{}}return Vl.createRoot=function(a,s){if(!m(a))throw Error(d(299));var n=!1,o="",c=nh,u=oh,y=lh;return s!=null&&(s.unstable_strictMode===!0&&(n=!0),s.identifierPrefix!==void 0&&(o=s.identifierPrefix),s.onUncaughtError!==void 0&&(c=s.onUncaughtError),s.onCaughtError!==void 0&&(u=s.onCaughtError),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=nx(a,1,!1,null,null,n,o,null,c,u,y,fx),a[os]=s.
49current,Pd(a),new cu(s)},Vl.hydrateRoot=function(a,s,n){if(!m(a))throw Error(d(299));var o=!1,c="",u=nh,y=oh,E=lh,R=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(y=n.onCaughtError),n.onRecoverableError!==void 0&&(E=n.onRecoverableError),n.formState!==void 0&&(R=n.formState)),s=nx(a,1,!0,s,n??null,o,c,R,u,y,E,fx),s.context=ox(null),n=s.current,o=At(),o=Oe(o),c=Ys(o),c.callback=null,Qs(n,c,o),n=o,s.current.lanes=n,be(s,n),xs(s),a[os]=s.current,Pd(a),new vr(s)},Vl.version="19.3.0",Vl}var Cx;function w1(){if(Cx)return pu.exports;Cx=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),pu.exports=N1(),pu.exports}var S1=w1();/**
50 * react-router v7.18.4
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */var Pu=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,a0=/^[\\/]{2}/;function C1(l,i){return i+l.replace(/\\/g,"/")}var Ex="popstate";function zx(l){return typeof l=="object"&&l!=null&&"pathname"in l&&"search"in l&&"hash"in l&&"state"in l&&"key"in l}function E1(l={}){function i(d,m){var j;let p=(j=m.state)==null?void 0:j.masked,{pathname:f,search:x,hash:h}=p||d.location;return Eu("",{pathname:f,search:x,hash:h},m.state&&m.state.usr||null,m.state&&m.state.key||"default",p?{pathname:d.location.pathname,search:d.location.search,hash:d.location.hash}:void 0)}function r(d,m){return typeof m=="string"?m:In(m)}return k1(i,r,null,l)}function Ta(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function $t(l,i){if(!l){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function z1(){return Math.random().toString(36).substring(2,10)}function kx(l,i){return{usr:l.state,key:l.key,idx:i,masked:l.mask?{pathname:l.pathname,search:l.search,hash:l.hash}:void 0}}function Eu(l,i,r=null,d,m){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof i=="string"?$o(i):i,state:r,key:i&&i.key||d||z1(),mask:m}}function In({pathname:l="/",search:i="",hash:r=""}){return i&&i!=="?"&&(l+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(l+=r.charAt(0)==="#"?r:"#"+r),l}function $o(l){let i={};if(l){let r=l.indexOf("#");r>=0&&(i.hash=l.substring(r),l=l.substring(0,r));let d=l.indexOf("?");d>=0&&(i.search=l.substring(d),l=l.substring(0,d)),l&&(i.pathname=l)}return i}function k1(l,i,r,d={}){let{window:m=document.defaultView,v5Compat:p=!1}=d,f=m.history,x="POP",h=null,j=g();j==null&&(j=0,f.replaceState({...f.state,idx:j},""));function g(){return(f.state||{idx:null}).idx}function v(){x="POP";let C=g(),k=C==null?null:C-j;j=C,h&&h({action:x,location:z.location,delta:k})}function S(C,k){x="PUSH";let T=zx(C)?C:Eu(z.location,C,k);j=g()+1;let w=kx(T,j),A=z.createHref(T.mask||T);try{f.pushState(w,"",A)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;m.location.assign(A)}p&&h&&h({action:x,location:z.location,delta:1})}function N(C,k){x="REPLACE";let T=zx(C)?C:Eu(z.location,C,k);j=g();let w=kx(T,j),A=z.createHref(T.mask||T);f.replaceState(w,"",A),p&&h&&h({action:x,location:z.location,delta:0})}function _(C){return A1(m,C)}let z={get action(){return x},get location(){return l(m,f)},listen(C){if(h)throw new Error("A history only accepts one active listener");return m.addEventListener(Ex,v),h=C,()=>{m.removeEventListener(Ex,v),h=null}},createHref(C){return i(m,C)},createURL:_,encodeLocation(C){let k=_(C);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:S,replace:N,go(C){return f.go(C)}};return z}function A1(l,i,r=!1){let d="http://localhost";l&&(d=l.location.origin!=="null"?l.location.origin:l.location.href),Ta(d,"No window.location.(origin|href) available to create URL");let m=typeof i=="string"?i:In(i);return m=m.replace(/ $/,"%20"),!r&&a0.test(m)&&(m=d+m),new URL(m,d)}function t0(l,i,r="/"){return M1(l,i,r,!1)}function M1(l,i,r,d,m){let p=typeof i=="string"?$o(i):i,f=Ps(p.pathname||"/",r);if(f==null)return null;let x=T1(l),h=null,j=G1(f);for(let g=0;h==null&&g<x.length;++g)h=V1(x[g],j,d);return h}function T1(l){let i=s0(l);return L1(i),i}function s0(l,i=[],r=[],d="",m=!1){let p=(f,x,h=m,j)=>{let g={relativePath:j===void 0?f.path||"":j,caseSensitive:f.caseSensitive===!0,childrenIndex:x,route:f};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(d)&&h)return;Ta(g.relativePath.startsWith(d),`Absolute route path "${g.relativePath}" nested under path "${d}
58" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(d.length)}let v=as([d,g.relativePath]),S=r.concat(g);f.children&&f.children.length>0&&(Ta(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),s0(f.children,i,S,v,h)),!(f.path==null&&!f.index)&&i.push({path:v,score:U1(v,f.index),routesMeta:S.map((N,_)=>{let[z,C]=l0(N.relativePath,N.caseSensitive,_===S.length-1);return{...N,matcher:z,compiledParams:C}})})};return l.forEach((f,x)=>{var h;if(f.path===""||!((h=f.path)!=null&&h.includes("?")))p(f,x);else for(let j of n0(f.path))p(f,x,!0,j)}),i}function n0(l){let i=l.split("/");if(i.length===0)return[];let[r,...d]=i,m=r.endsWith("?"),p=r.replace(/\?$/,"");if(d.length===0)return m?[p,""]:[p];let f=n0(d.join("/")),x=[];return x.push(...f.map(h=>h===""?p:[p,h].join("/"))),m&&x.push(...f),x.map(h=>l.startsWith("/")&&h===""?"/":h)}function L1(l){l.sort((i,r)=>i.score!==r.score?r.score-i.score:H1(i.routesMeta.map(d=>d.childrenIndex),r.routesMeta.map(d=>d.childrenIndex)))}var R1=/^:[\w-]+$/,q1=3,D1=2,O1=1,B1=10,P1=-2,Ax=l=>l==="*";function U1(l,i){let r=l.split("/"),d=r.length;return r.some(Ax)&&(d+=P1),i&&(d+=D1),r.filter(m=>!Ax(m)).reduce((m,p)=>m+(R1.test(p)?q1:p===""?O1:B1),d)}function H1(l,i){return l.length===i.length&&l.slice(0,-1).every((d,m)=>d===i[m])?l[l.length-1]-i[i.length-1]:0}function V1(l,i,r=!1){let{routesMeta:d}=l,m={},p="/",f=[];for(let x=0;x<d.length;++x){let h=d[x],j=x===d.length-1,g=p==="/"?i:i.slice(p.length)||"/",v={path:h.relativePath,caseSensitive:h.caseSensitive,end:j},S=h.matcher&&h.compiledParams?o0(v,g,h.matcher,h.compiledParams):Ar(v,g),N=h.route;if(!S&&j&&r&&!d[d.length-1].route.index&&(S=Ar({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},g)),!S)return null;
58Object.assign(m,S.params),f.push({params:m,pathname:as([p,S.pathname]),pathnameBase:I1(as([p,S.pathnameBase])),route:N}),S.pathnameBase!=="/"&&(p=as([p,S.pathnameBase]))}return f}function Ar(l,i){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[r,d]=l0(l.path,l.caseSensitive,l.end);return o0(l,i,r,d)}function o0(l,i,r,d){let m=i.match(r);if(!m)return null;let p=m[0],f=Vo(p,1),x=m.slice(1);return{params:d.reduce((j,{paramName:g,isOptional:v},S)=>{if(g==="*"){let _=x[S]||"";f=Vo(p.slice(0,p.length-_.length),1)}const N=x[S];return v&&!N?j[g]=void 0:j[g]=(N||"").replace(/%2F/g,"/"),j},{}),pathname:p,pathnameBase:f,pattern:l}}function l0(l,i=!1,r=!0){$t(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let d=[],m="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,x,h,j,g)=>{if(d.push({paramName:x,isOptional:h!=null}),h){let v=g.charAt(j+f.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(d.push({paramName:"*"}),m+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?m+="\\/*$":l!==""&&l!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,i?void 0:"i"),d]}function G1(l){try{return l.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return $t(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),l}}function Ps(l,i){if(i==="/")return l;if(!l.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,d=l.charAt(r);return d&&d!=="/"?null:l.slice(r)||"/"}function F1(l,i="/"){let{pathname:r,search:d="",hash:m=""}=typeof l=="string"?$o(l):l,p;return r?(r=i0(r),r.startsWith("/")||r.startsWith("\\")?p=Mx(r.substring(1),"/"):p=Mx(r,i)):p=i,{pathname:p,search:Z1(d),hash:K1(m)}}function Mx(l,i){let r=Vo(i).split("/");return l.split("/").forEach(m=>{m===".."?r.length>1&&r.pop():m!=="."&&r.push(m)}),r.length>1?r.join("/"):"/"}function bu(l,i,r,d){return`Cannot include a '${l}' character in a manually specified \`to.${i}\` field [${JSON.stringify(d)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function $1(l){return l.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function Uu(l){let i=$1(l);return i.map((r,d)=>d===i.length-1?r.pathname:r.pathnameBase)}function Tr(l,i,r,d=!1){let m;typeof l=="string"?m=$o(l):(m={...l},Ta(!m.pathname||!m.pathname.includes("?"),bu("?","pathname","search",m)),Ta(!m.pathname||!m.pathname.includes("#"),bu("#","pathname","hash",m)),Ta(!m.search||!m.search.includes("#"),bu("#","search","hash",m)));let p=l===""||m.pathname==="",f=p?"/":m.pathname,x;if(f==null)x=r;else{let v=i.length-1;if(!d&&f.startsWith("..")){let S=f.split("/");for(;S[0]==="..";)S.shift(),v-=1;m.pathname=S.join("/")}x=v>=0?i[v]:"/"}let h=F1(m,x),j=f&&f!=="/"&&f.endsWith("/"),g=(p||f===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(j||g)&&(h.pathname+="/"),h}var i0=l=>l.replace(/[\\/]{2,}/g,"/"),as=l=>i0(l.join("/"));function Vo(l,i=0){let r=l.length;for(;r>i&&l.charCodeAt(r-1)===47;)r--;return r===l.length?l:l.slice(0,r)}var I1=l=>Vo(l).replace(/^\/*/,"/"),Z1=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,K1=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,Y1=class{constructor(l,i,r,d=!1){this.status=l,this.statusText=i||"",this.internal=d,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Q1(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function J1(l){let i=l.map(r=>r.route.path).filter(Boolean);return as(i)||"/"}var r0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function c0(l,i){let r=l;if(typeof r!="string"||!Pu.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let d=r,m=!1;if(r0)try{let p=new URL(window.location.href),f=a0.test(r)?new URL(C1(r,p.protocol)):new URL(r),x=Ps(f.pathname,i);f.origin===p.origin&&x!=null?r=x+f.search+f.hash:m=!0}catch{$t(!1,`<Link to="${r}">
58 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:d,isExternal:m,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Tx=new URL("http://localhost");function Hu(l){if(l.createURL)return l.createURL("/");try{return new URL(l.createHref("/"),Tx)}catch{return Tx}}function gu(l,i){return l.origin===i.origin&&(l.origin!=="null"||l.protocol===i.protocol&&l.host===i.host)}function X1(l,i){if(l.startsWith("//"))return!0;let r=i.protocol.toLowerCase();return l.toLowerCase().startsWith(r)?i.host===""||l.slice(r.length).startsWith("//"):!1}function Vu(l,i,r,d){let m=null;try{m=l==null?null:new URL(l,r)}catch{}let p=new URL(i,r),f=m!=null&&!gu(m,r),x=!gu(p,r);if(d==="reject"){if(f||x)throw new Error("External navigation is not allowed")}else if(x&&(m==null||!X1(l,m)||!gu(m,p)))throw new Error("External navigation is not allowed")}var d0=["POST","PUT","PATCH","DELETE"];new Set(d0);var W1=["GET",...d0];new Set(W1);var ey=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ay(l){try{return ey.includes(new URL(l).protocol)}catch{return!1}}var Io=b.createContext(null);Io.displayName="DataRouter";var Lr=b.createContext(null);Lr.displayName="DataRouterState";var u0=b.createContext(!1);function ty(){return b.useContext(u0)}var m0=b.createContext({isTransitioning:!1});m0.displayName="ViewTransition";var sy=b.createContext(new Map);sy.displayName="Fetchers";var ny=b.createContext(null);ny.displayName="Await";var Tt=b.createContext(null);Tt.displayName="Navigation";var Zl=b.createContext(null);Zl.displayName="Location";var ts=b.createContext({outlet:null,matches:[],isDataRoute:!1});ts.displayName="Route";var Gu=b.createContext(null);Gu.displayName="RouteError";var p0="REACT_ROUTER_ERROR",oy="REDIRECT",ly="ROUTE_ERROR_RESPONSE";function iy(l){if(l.startsWith(`${p0}:${oy}:{`))try{let i=JSON.parse(l.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function ry(l){if(l.startsWith(`${p0}:${ly}:{`))try{let i=JSON.parse(l.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new Y1(i.status,i.statusText,i.data)}catch{}}function cy(l,{relative:i}={}){Ta(Zo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:d}=b.useContext(Tt),{hash:m,pathname:p,search:f}=Kl(l,{relative:i}),x=p;return r!=="/"&&(x=p==="/"?r:as([r,p])),d.createHref({pathname:x,search:f,hash:m})}function Zo(){return b.useContext(Zl)!=null}function It(){return Ta(Zo(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Zl).location}var h0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function f0(l){b.useContext(Tt).static||b.useLayoutEffect(l)}function Za(){let{isDataRoute:l}=b.useContext(ts);return l?_y():dy()}function dy(){Ta(Zo(),"useNavigate() may be used only in the context of a <Router> component.");let l=b.useContext(Io),{basename:i,navigator:r}=b.useContext(Tt),{matches:d}=b.useContext(ts),{pathname:m}=It(),p=JSON.stringify(Uu(d)),f=b.useRef(!1);return f0(()=>{f.current=!0}),b.useCallback((h,j={})=>{if($t(f.current,h0),!f.current)return;if(typeof h=="number"){r.go(h);return}let g=Tr(h,JSON.parse(p),m,j.relative==="path");l==null&&i!=="/"&&(g.pathname=g.pathname==="/"?i:as([i,g.pathname])),Vu(typeof h=="string"?h:In(h),r.createHref(g),Hu(r),"reject"),(j.replace?r.replace:r.push)(g,j.state,j)},[i,r,p,m,l])}b.createContext(null);function Rr(){let{matches:l}=b.useContext(ts),i=l[l.length-1];return(i==null?void 0:i.params)??{}}function Kl(l,{relative:i}={}){let{matches:r}=b.useContext(ts),{pathname:d}=It(),m=JSON.stringify(Uu(r));return b.useMemo(()=>Tr(l,JSON.parse(m),d,i==="path"),[l,m,d,i])}function uy(l,i){return x0(l,i)}function x0(l,i,r){var C;Ta(Zo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=b.useContext(Tt),{matches:m}=b.useContext(ts),p=m[m.length-1],f=p?p.params:{},x=p?p.pathname:"/",h=p?p.pathnameBase:"/",j=p&&p.route;{let k=j&&j.path||"";g0(x,!j||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
60Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let g=It(),v;if(i){let k=typeof i=="string"?$o(i):i;Ta(h==="/"||((C=k.pathname)==null?void 0:C.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${k.pathname}" was given in the \`location\` prop.`),v=k}else v=g;let S=v.pathname||"/",N=S;if(h!=="/"){let k=h.replace(/^\//,"").split("/");N="/"+S.replace(/^\//,"").split("/").slice(k.length).join("/")}let _=r&&r.state.matches.length?r.state.matches.map(k=>Object.assign(k,{route:r.manifest[k.route.id]||k.route})):t0(l,{pathname:N});$t(j||_!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),$t(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let z=xy(_&&_.map(k=>Object.assign({},k,{params:Object.assign({},f,k.params),pathname:as([h,d.encodeLocation?d.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?h:as([h,d.encodeLocation?d.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),m,r);return i&&z?b.createElement(Zl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...v},navigationType:"POP"}},z):z}function my(){let l=jy(),i=Q1(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),r=l instanceof Error?l.stack:null,d="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:d},p={padding:"2px 4px",backgroundColor:d},f=null;return console.error("Error handled by React Router default ErrorBoundary:",l),f=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:p},"ErrorBoundary")," or"," ",b.createElement("code",{style:p},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application 
60Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},i),r?b.createElement("pre",{style:m},r):null,f)}var py=b.createElement(my,null),b0=class extends b.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,i){return i.location!==l.location||i.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:i.error,location:i.location,revalidation:l.revalidation||i.revalidation}}componentDidCatch(l,i){this.props.onError?this.props.onError(l,i):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const r=ry(l.digest);r&&(l=r)}let i=l!==void 0?b.createElement(ts.Provider,{value:this.props.routeContext},b.createElement(Gu.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?b.createElement(hy,{error:l},i):i}};b0.contextType=u0;var vu=new WeakMap;function hy({children:l,error:i}){let{basename:r,navigator:d}=b.useContext(Tt);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let m=iy(i.digest);if(m){let p=vu.get(i);if(p)throw p;let f=c0(m.location,r),x=f.absoluteURL||f.to;if(Vu(m.location,x,Hu(d),"allow-explicit"),ay(x))throw new Error("Invalid redirect location");if(r0&&!vu.get(i))if(f.isExternal||m.reloadDocument)window.location.href=x;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:m.replace}));throw vu.set(i,h),h}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x}`})}}return l}function fy({routeContext:l,match:i,children:r}){let d=b.useContext(Io);return d&&d.static&&d.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=i.route.id),b.createElement(ts.Provider,{value:l},r)}function xy(l,i=[],r){let d=r==null?void 0:r.state;if(l==null){if(!d)return null;if(d.errors)l=d.matches;else if(i.length===0&&!d.initialized&&d.matches.length>0)l=d.matches;else return null}let m=l,p=d==null?void 0:d.errors;if(p!=null){let g=m.findIndex(v=>v.route.id&&(p==null?void 0:p[v.route.id])!==void 0);Ta(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(p).join(",")}`),m=m.slice(0,Math.min(m.length,g+1))}let f=!1,x=-1;if(r&&d){f=d.renderFallback;for(let g=0;g<m.length;g++){let v=m[g];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(x=g),v.route.id){let{loaderData:S,errors:N}=d,_=v.route.loader&&!S.hasOwnProperty(v.route.id)&&(!N||N[v.route.id]===void 0);if(v.route.lazy||_){r.isStatic&&(f=!0),x>=0?m=m.slice(0,x+1):m=[m[0]];break}}}}let h=r==null?void 0:r.onError,j=d&&h?(g,v)=>{var S,N;h(g,{location:d.location,params:((N=(S=d.matches)==null?void 0:S[0])==null?void 0:N.params)??{},pattern:J1(d.matches),errorInfo:v})}:void 0;return m.reduceRight((g,v,S)=>{let N,_=!1,z=null,C=null;d&&(N=p&&v.route.id?p[v.route.id]:void 0,z=v.route.errorElement||py,f&&(x<0&&S===0?(g0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,C=null):x===S&&(_=!0,C=v.route.hydrateFallbackElement||null)));let k=i.concat(m.slice(0,S+1)),T=()=>{let w;return N?w=z:_?w=C:v.route.Component?w=b.createElement(v.route.Component,null):v.route.element?w=v.route.element:w=g,b.createElement(fy,{match:v,routeContext:{outlet:g,matches:k,isDataRoute:d!=null},children:w})};return d&&(v.route.ErrorBoundary||v.route.errorElement||S===0)?b.createElement(b0,{location:d.location,revalidation:d.revalidation,component:z,error:N,children:T(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:j}):T()},null)}function Fu(l){return`${l} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function by(l){let i=b.useContext(Io);return Ta(i,Fu(l)),i}function gy(l){let i=b.useContext(Lr);return Ta(i,Fu(l)),i}function vy(l){let i=b.useContext(ts);return Ta(i,Fu(l)),i}function $u(l){let i=vy(l),r=i.matches[i.matches.length-1];return Ta(r.route.id,`${l} can only be used on routes that contain a unique "id"`),r.route.id}function yy(){return $u("useRouteId")}function jy(){var d;let l=b.useContext(Gu),i=gy("useRouteError"),r=$u("useRouteError");return l!==void 0?l:(d=i.errors)==null?void 0:d[r]}function _y(){let{router:l}=by("useNavigate"),i=$u("useNavigate"),r=b.useRef(!1);return f0(()=>{r.current=!0}),b.useCallback(async(m,p={})=>{$t(r.current,h0),r.current&&(typeof m=="number"?await l.navigate(m):await l.navigate(m,{fromRouteId:i,...p}))},[l,i])}var Lx={};function g0(l,i,r){!i&&!Lx[l]&&(Lx[l]=!0,$t(!1,r))}b.memo(Ny);function Ny({routes:l,manifest:i,future:r,state:d,isStatic:m,onError:p}){return x0(l,void 0,{manifest:i,state:d,isStatic:m,onError:p})}function wy({to:l,replace:i,state:r,relative:d}){Ta(Zo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m,navigator:p}=b.useContext(Tt);$t(!m,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=b.useContext(ts),{pathname:x}
60=It(),h=Za(),j=Tr(l,Uu(f),x,d==="path");Vu(typeof l=="string"?l:In(l),p.createHref(j),Hu(p),"reject");let g=JSON.stringify(j);return b.useEffect(()=>{h(JSON.parse(g),{replace:i,state:r,relative:d})},[h,g,d,i,r]),null}function ia(l){Ta(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Sy({basename:l="/",children:i=null,location:r,navigationType:d="POP",navigator:m,static:p=!1,useTransitions:f}){Ta(!Zo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let x=l.replace(/^\/*/,"/"),h=b.useMemo(()=>({basename:x,navigator:m,static:p,useTransitions:f,future:{}}),[x,m,p,f]);typeof r=="string"&&(r=$o(r));let{pathname:j="/",search:g="",hash:v="",state:S=null,key:N="default",mask:_}=r,z=b.useMemo(()=>{let C=Ps(j,x);return C==null?null:{location:{pathname:C,search:g,hash:v,state:S,key:N,mask:_},navigationType:d}},[x,j,g,v,S,N,d,_]);return $t(z!=null,`<Router basename="${x}"> is not able to match the URL "${j}${g}${v}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:b.createElement(Tt.Provider,{value:h},b.createElement(Zl.Provider,{children:i,value:z}))}function Cy({children:l,location:i}){return uy(zu(l),i)}function zu(l,i=[]){let r=[];return b.Children.forEach(l,(d,m)=>{if(!b.isValidElement(d))return;let p=[...i,m];if(d.type===b.Fragment){r.push.apply(r,zu(d.props.children,p));return}Ta(d.type===ia,`[${typeof d.type=="string"?d.type:d.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ta(!d.props.index||!d.props.children,"An index route cannot have child routes.");let f={id:d.props.id||p.join("-"),caseSensitive:d.props.caseSensitive,element:d.props.element,Component:d.props.Component,index:d.props.index,path:d.props.path,middleware:d.props.middleware,loader:d.props.loader,action:d.props.action,hydrateFallbackElement:d.props.hydrateFallbackElement,HydrateFallback:d.props.HydrateFallback,errorElement:d.props.errorElement,ErrorBoundary:d.props.ErrorBoundary,hasErrorBoundary:d.props.hasErrorBoundary===!0||d.props.ErrorBoundary!=null||d.props.errorElement!=null,shouldRevalidate:d.props.shouldRevalidate,handle:d.props.handle,lazy:d.props.lazy};d.props.children&&(f.children=zu(d.props.children,p)),r.push(f)}),r}var Er="get",zr="application/x-www-form-urlencoded";function qr(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function Ey(l){return qr(l)&&l.tagName.toLowerCase()==="button"}function zy(l){return qr(l)&&l.tagName.toLowerCase()==="form"}function ky(l){return qr(l)&&l.tagName.toLowerCase()==="input"}function Ay(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function My(l,i){return l.button===0&&(!i||i==="_self")&&!Ay(l)}function ku(l=""){return new URLSearchParams(typeof l=="string"||Array.isArray(l)||l instanceof URLSearchParams?l:Object.keys(l).reduce((i,r)=>{let d=l[r];return i.concat(Array.isArray(d)?d.map(m=>[r,m]):[[r,d]])},[]))}function Ty(l,i){let r=ku(l);return i&&i.forEach((d,m)=>{r.has(m)||i.getAll(m).forEach(p=>{r.append(m,p)})}),r}var jr=null;function Ly(){if(jr===null)try{new FormData(document.createElement("form"),0),jr=!1}catch{jr=!0}return jr}var Ry=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yu(l){return l!=null&&!Ry.has(l)?($t(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zr}"`),null):l}function qy(l,i){let r,d,m,p,f;if(zy(l)){let x=l.getAttribute("action");d=x?Ps(x,i):null,r=l.getAttribute("method")||Er,m=yu(l.getAttribute("enctype"))||zr,p=new FormData(l)}else if(Ey(l)||ky(l)&&(l.type==="submit"||l.type==="image")){let x=l.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=l.getAttribute("formaction")||x.getAttribute("action");if(d=h?Ps(h,i):null,r=l.getAttribute("formmethod")||x.getAttribute("method")||Er,m=yu(l.getAttribute("formenctype"))||yu(x.getAttribute("enctype"))||zr,p=new FormData(x,l),!Ly()){let{name:j,type:g,value:v}=l;if(g==="image"){let S=j?`${j}.`:"";p.append(`${S}x`,"0"),p.append(`${S}y`,"0")}else j&&p.append(j,v)}}else{if(qr(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Er,d=null,m=zr,f=l}return p&&m==="text/plain"&&(f=p,p=void 0),{action:d,method:r.toLowerCase(),encType:m,formData:p,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Iu(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function v0(l,i,r,d){let m=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return r?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${d}`:m.pathname=`${m.pathname}.${d}`:m.pathname==="/"?m.pathname=`_root.${d}`:i&&Ps(m.pathname,i)==="/"?m.pathname=`${Vo(i)}/_root.${d}`:m.pathname=`${Vo(m.pathname)}.${d}`,m}async function Dy(l,i){if(l.id in i)return i[l.id];try{let r=await import(l.module);return i[l.id]=r,r}catch(r){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.
60isSpaMode,window.location.reload(),new Promise(()=>{})}}function Oy(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function By(l,i,r){let d=await Promise.all(l.map(async m=>{let p=i.routes[m.route.id];if(p){let f=await Dy(p,r);return f.links?f.links():[]}return[]}));return Vy(d.flat(1).filter(Oy).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function Rx(l,i,r,d,m,p){let f=(h,j)=>r[j]?h.route.id!==r[j].route.id:!0,x=(h,j)=>{var g;return r[j].pathname!==h.pathname||((g=r[j].route.path)==null?void 0:g.endsWith("*"))&&r[j].params["*"]!==h.params["*"]};return p==="assets"?i.filter((h,j)=>f(h,j)||x(h,j)):p==="data"?i.filter((h,j)=>{var v;let g=d.routes[h.route.id];if(!g||!g.hasLoader)return!1;if(f(h,j)||x(h,j))return!0;if(h.route.shouldRevalidate){let S=h.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((v=r[0])==null?void 0:v.params)||{},nextUrl:new URL(l,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function Py(l,i,{includeHydrateFallback:r}={}){return Uy(l.map(d=>{let m=i.routes[d.route.id];if(!m)return[];let p=[m.module];return m.clientActionModule&&(p=p.concat(m.clientActionModule)),m.clientLoaderModule&&(p=p.concat(m.clientLoaderModule)),r&&m.hydrateFallbackModule&&(p=p.concat(m.hydrateFallbackModule)),m.imports&&(p=p.concat(m.imports)),p}).flat(1))}function Uy(l){return[...new Set(l)]}function Hy(l){let i={},r=Object.keys(l).sort();for(let d of r)i[d]=l[d];return i}function Vy(l,i){let r=new Set;return new Set(i),l.reduce((d,m)=>{let p=JSON.stringify(Hy(m));return r.has(p)||(r.add(p),d.push({key:p,link:m})),d},[])}function Zu(){let l=b.useContext(Io);return Iu(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function Gy(){let l=b.useContext(Lr);return Iu(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Ku=b.createContext(void 0);Ku.displayName="FrameworkContext";function Dr(){let l=b.useContext(Ku);return Iu(l,"You must render this element inside a <HydratedRouter> element"),l}function Fy(l,i){let r=b.useContext(Ku),[d,m]=b.useState(!1),[p,f]=b.useState(!1),{onFocus:x,onBlur:h,onMouseEnter:j,onMouseLeave:g,onTouchStart:v}=i,S=b.useRef(null);b.useEffect(()=>{if(l==="render"&&f(!0),l==="viewport"){let z=k=>{k.forEach(T=>{f(T.isIntersecting)})},C=new IntersectionObserver(z,{threshold:.5});return S.current&&C.observe(S.current),()=>{C.disconnect()}}},[l]),b.useEffect(()=>{if(d){let z=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(z)}}},[d]);let N=()=>{m(!0)},_=()=>{m(!1),f(!1)};return r?l!=="intent"?[p,S,{}]:[p,S,{onFocus:Gl(x,N),onBlur:Gl(h,_),onMouseEnter:Gl(j,N),onMouseLeave:Gl(g,_),onTouchStart:Gl(v,N)}]:[!1,S,{}]}function Gl(l,i){return r=>{l&&l(r),r.defaultPrevented||i(r)}}function $y({page:l,...i}){let r=ty(),{nonce:d}=Dr(),{router:m}=Zu(),p=b.useMemo(()=>t0(m.routes,l,m.basename),[m.routes,l,m.basename]);return p?(i.nonce==null&&d&&(i={...i,nonce:d}),r?b.createElement(Zy,{page:l,matches:p,...i}):b.createElement(Ky,{page:l,matches:p,...i})):null}function Iy(l){let{manifest:i,routeModules:r}=Dr(),[d,m]=b.useState([]);return b.useEffect(()=>{let p=!1;return By(l,i,r).then(f=>{p||m(f)}),()=>{p=!0}},[l,i,r]),d}function Zy({page:l,matches:i,...r}){let d=It(),{future:m}=Dr(),{basename:p}=Zu(),f=b.useMemo(()=>{if(l===d.pathname+d.search+d.hash)return[];let x=v0(l,p,m.v8_trailingSlashAwareDataRequests,"rsc"),h=!1,j=[];for(let g of i)typeof g.route.shouldRevalidate=="function"?h=!0:j.push(g.route.id);return h&&j.length>0&&x.searchParams.set("_routes",j.join(",")),[x.pathname+x.search]},[p,m.v8_trailingSlashAwareDataRequests,l,d,i]);return b.createElement(b.Fragment,null,f.map(x=>b.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...r})))}function Ky({page:l,matches:i,...r}){let d=It(),{future:m,manifest:p,routeModules:f}=Dr(),{basename:x}=Zu(),{loaderData:h,matches:j}=Gy(),g=b.useMemo(()=>Rx(l,i,j,p,d,"data"),[l,i,j,p,d]),v=b.useMemo(()=>Rx(l,i,j,p,d,"assets"),[l,i,j,p,d]),S=b.useMemo(()=>
60{if(l===d.pathname+d.search+d.hash)return[];let z=new Set,C=!1;if(i.forEach(T=>{var A;let w=p.routes[T.route.id];!w||!w.hasLoader||(!g.some(L=>L.route.id===T.route.id)&&T.route.id in h&&((A=f[T.route.id])!=null&&A.shouldRevalidate)||w.hasClientLoader?C=!0:z.add(T.route.id))}),z.size===0)return[];let k=v0(l,x,m.v8_trailingSlashAwareDataRequests,"data");return C&&z.size>0&&k.searchParams.set("_routes",i.filter(T=>z.has(T.route.id)).map(T=>T.route.id).join(",")),[k.pathname+k.search]},[x,m.v8_trailingSlashAwareDataRequests,h,d,p,g,i,l,f]),N=b.useMemo(()=>Py(v,p),[v,p]),_=Iy(v);return b.createElement(b.Fragment,null,S.map(z=>b.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...r})),N.map(z=>b.createElement("link",{key:z,rel:"modulepreload",href:z,...r})),_.map(({key:z,link:C})=>b.createElement("link",{key:z,nonce:r.nonce,...C,crossOrigin:C.crossOrigin??r.crossOrigin})))}function Yy(...l){return i=>{l.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var Qy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Qy&&(window.__reactRouterVersion="7.18.4")}catch{}function Jy({basename:l,children:i,useTransitions:r,window:d}){let m=b.useRef();m.current==null&&(m.current=E1({window:d,v5Compat:!0}));let p=m.current,[f,x]=b.useState({action:p.action,location:p.location}),h=b.useCallback(j=>{r===!1?x(j):b.startTransition(()=>x(j))},[r]);return b.useLayoutEffect(()=>p.listen(h),[p,h]),b.createElement(Sy,{basename:l,children:i,location:f.location,navigationType:f.action,navigator:p,useTransitions:r})}var ne=b.forwardRef(function({onClick:i,discover:r="render",prefetch:d="none",relative:m,reloadDocument:p,replace:f,mask:x,state:h,target:j,to:g,preventScrollReset:v,viewTransition:S,defaultShouldRevalidate:N,..._},z){let{basename:C,navigator:k,useTransitions:T}=b.useContext(Tt),w=typeof g=="string"&&Pu.test(g),A=c0(g,C);g=A.to;let L=cy(g,{relative:m}),q=It(),H=null;if(x){let te=Tr(x,[],q.mask?q.mask.pathname:"/",!0);C!=="/"&&(te.pathname=te.pathname==="/"?C:as([C,te.pathname])),H=k.createHref(te)}let[F,U,J]=Fy(d,_),O=ej(g,{replace:f,mask:x,state:h,target:j,preventScrollReset:v,relative:m,viewTransition:S,defaultShouldRevalidate:N,useTransitions:T});function X(te){i&&i(te),te.defaultPrevented||O(te)}let B=!(A.isExternal||p),Z=b.createElement("a",{..._,...J,href:(B?H:void 0)||A.absoluteURL||L,onClick:B?X:i,ref:Yy(z,U),target:j,"data-discover":!w&&r==="render"?"true":void 0});return F&&!w?b.createElement(b.Fragment,null,Z,b.createElement($y,{page:L})):Z});ne.displayName="Link";var wa=b.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:d="",end:m=!1,style:p,to:f,viewTransition:x,children:h,...j},g){let v=Kl(f,{relative:j.relative}),S=It(),N=b.useContext(Lr),{navigator:_,basename:z}=b.useContext(Tt),C=N!=null&&oj(v)&&x===!0,k=_.encodeLocation?_.encodeLocation(v).pathname:v.pathname,T=S.pathname,w=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;r||(T=T.toLowerCase(),w=w?w.toLowerCase():null,k=k.toLowerCase()),w&&z&&(w=Ps(w,z)||w);const A=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let L=T===k||!m&&T.startsWith(k)&&T.charAt(A)==="/",q=w!=null&&(w===k||!m&&w.startsWith(k)&&w.charAt(k.length)==="/"),H={isActive:L,isPending:q,isTransitioning:C},F=L?i:void 0,U;typeof d=="function"?U=d(H):U=[d,L?"active":null,q?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let J=typeof p=="function"?p(H):p;return b.createElement(ne,{...j,"aria-current":F,className:U,ref:g,style:J,to:f,viewTransition:x},typeof h=="function"?h(H):h)});wa.displayName="NavLink";var Xy=b.forwardRef(({discover:l="render",fetcherKey:i,navigate:r,reloadDocument:d,replace:m,state:p,method:f=Er,action:x,onSubmit:h,relative:j,preventScrollReset:g,viewTransition:v,defaultShouldRevalidate:S,...N},_)=>{let{useTransitions:z}=b.useContext(Tt),C=sj(),k=nj(x,{relative:j}),T=f.toLowerCase()==="get"?"get":"post",w=typeof x=="string"&&Pu.test(x),A=L=>{if(h&&h(L),L.defaultPrevented)return;L.preventDefault();let q=L.nativeEvent.submitter,H=(q==null?void 0:q.getAttribute("formmethod"))||f,F=()=>C(q||L.currentTarget,{fetcherKey:i,method:H,navigate:r,replace:m,state:p,relative:j,preventScrollReset:g,viewTransition:v,defaultShouldRevalidate:S}
60);z&&r!==!1?b.startTransition(()=>F()):F()};return b.createElement("form",{ref:_,method:T,action:k,onSubmit:d?h:A,...N,"data-discover":!w&&l==="render"?"true":void 0})});Xy.displayName="Form";function Wy(l){return`${l} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function y0(l){let i=b.useContext(Io);return Ta(i,Wy(l)),i}function ej(l,{target:i,replace:r,mask:d,state:m,preventScrollReset:p,relative:f,viewTransition:x,defaultShouldRevalidate:h,useTransitions:j}={}){let g=Za(),v=It(),S=Kl(l,{relative:f});return b.useCallback(N=>{if(My(N,i)){N.preventDefault();let _=r!==void 0?r:In(v)===In(S),z=()=>g(l,{replace:_,mask:d,state:m,preventScrollReset:p,relative:f,viewTransition:x,defaultShouldRevalidate:h});j?b.startTransition(()=>z()):z()}},[v,g,S,r,d,m,i,l,p,f,x,h,j])}function Yl(l){$t(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let i=b.useRef(ku(l)),r=b.useRef(!1),d=It(),m=b.useMemo(()=>Ty(d.search,r.current?null:i.current),[d.search]),p=Za(),f=b.useCallback((x,h)=>{const j=ku(typeof x=="function"?x(new URLSearchParams(m)):x);r.current=!0,p("?"+j,h)},[p,m]);return[m,f]}var aj=0,tj=()=>`__${String(++aj)}__`;function sj(){let{router:l}=y0("useSubmit"),{basename:i}=b.useContext(Tt),r=yy(),d=l.fetch,m=l.navigate;return b.useCallback(async(p,f={})=>{let{action:x,method:h,encType:j,formData:g,body:v}=qy(p,i);if(f.navigate===!1){let S=f.fetcherKey||tj();await d(S,r,f.action||x,{defaultShouldRevalidate:f.defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:g,body:v,formMethod:f.method||h,formEncType:f.encType||j,flushSync:f.flushSync})}else await m(f.action||x,{defaultShouldRevalidate:f.defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:g,body:v,formMethod:f.method||h,formEncType:f.encType||j,replace:f.replace,state:f.state,fromRouteId:r,flushSync:f.flushSync,viewTransition:f.viewTransition})},[d,m,i,r])}function nj(l,{relative:i}={}){let{basename:r}=b.useContext(Tt),d=b.useContext(ts);Ta(d,"useFormAction must be used inside a RouteContext");let[m]=d.matches.slice(-1),p={...Kl(l||".",{relative:i})},f=It();if(l==null){p.search=f.search;let x=new URLSearchParams(p.search),h=x.getAll("index");if(h.some(g=>g==="")){x.delete("index"),h.filter(v=>v).forEach(v=>x.append("index",v));let g=x.toString();p.search=g?`?${g}`:""}}return(!l||l===".")&&m.route.index&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(p.pathname=p.pathname==="/"?r:as([r,p.pathname])),In(p)}function oj(l,{relative:i}={}){let r=b.useContext(m0);Ta(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:d}=y0("useViewTransitionState"),m=Kl(l,{relative:i});if(!r.isTransitioning)return!1;let p=Ps(r.currentLocation.pathname,d)||r.currentLocation.pathname,f=Ps(r.nextLocation.pathname,d)||r.nextLocation.pathname;return Ar(m.pathname,f)!=null||Ar(m.pathname,p)!=null}function lj(l){const i=l.querySelector("base"),r=i==null?void 0:i.getAttribute("href");if(r)return r;const d=l.querySelector('meta[name="app-base"]');return d!=null&&d.content?d.content:"/"}function ij({basename:l,...i}){const r=lj(document);return l!==void 0&&l!==r&&console.warn(`[router-wrapper] ignoring BrowserRouter basename "${l}" passed by app code — using the platform-correct basename "${r}" instead.`),b.createElement(Jy,{...i,basename:r})}class xt extends Error{constructor(i){var r,d,m,p;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,xt.prototype),i!==null&&typeof i=="object"&&(this.originalError=i.originalError,this.url=typeof i.url=="string"?i.url:"",this.status=typeof i.status=="number"?i.status:0,this.isAbort=!!i.isAbort||i.name==="AbortError"||i.message==="Aborted",i.response!==null&&typeof i.response=="object"?this.response=i.response:i.data!==null&&typeof i.data=="object"?this.response=i.data:this.response={}),this.originalError||i instanceof xt||(this.originalError=i),this.name="ClientResponseError "+this.status,this.message=(r=this.response)==null?void 0:r.message,this.message||(this.isAbort?this.message="The request was aborted (most likely autocancelled; you can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation).":(p=(m=(d=this.originalError)==null?void 0:d.cause)==null?void 0:m.message)!=null&&p.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong."),this.cause=this.originalError}get data(){return this.response}toJSON(){return{...this}}}const _r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function rj(l,i){const r={};if(typeof l!="string")return r;const d=Object.assign({},{}).decode||cj;let m=0;for(;m<l.length;){const p=l.indexOf("=",m);if(p===-1)break;let f=l.indexOf(";",m);if(f===-1)f=l.length;else if(f<p){m=l.lastIndexOf(";",p-1)+1;continue}const x=l.slice(m,p).trim();if(r[x]===void 0){let h=l.slice(p+1,f).trim();h.charCodeAt(0)===34&&(h=h.slice(1,-1));try{r[x]=d(h)}catch{r[x]=h}}m=f+1}return r}function qx(l,i,r){const d=Object.assign({},r||{}),m=d.encode||dj;
60if(!_r.test(l))throw new TypeError("argument name is invalid");const p=m(i);if(p&&!_r.test(p))throw new TypeError("argument val is invalid");let f=l+"="+p;if(d.maxAge!=null){const x=d.maxAge-0;if(isNaN(x)||!isFinite(x))throw new TypeError("option maxAge is invalid");f+="; Max-Age="+Math.floor(x)}if(d.domain){if(!_r.test(d.domain))throw new TypeError("option domain is invalid");f+="; Domain="+d.domain}if(d.path){if(!_r.test(d.path))throw new TypeError("option path is invalid");f+="; Path="+d.path}if(d.expires){if(!(function(h){return Object.prototype.toString.call(h)==="[object Date]"||h instanceof Date})(d.expires)||isNaN(d.expires.valueOf()))throw new TypeError("option expires is invalid");f+="; Expires="+d.expires.toUTCString()}if(d.httpOnly&&(f+="; HttpOnly"),d.secure&&(f+="; Secure"),d.priority)switch(typeof d.priority=="string"?d.priority.toLowerCase():d.priority){case"low":f+="; Priority=Low";break;case"medium":f+="; Priority=Medium";break;case"high":f+="; Priority=High";break;default:throw new TypeError("option priority is invali
60d")}if(d.sameSite)switch(typeof d.sameSite=="string"?d.sameSite.toLowerCase():d.sameSite){case!0:f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"strict":f+="; SameSite=Strict";break;case"none":f+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return f}function cj(l){return l.indexOf("%")!==-1?decodeURIComponent(l):l}function dj(l){return encodeURIComponent(l)}const uj=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let j0;function Uo(l){if(l)try{const i=decodeURIComponent(j0(l.split(".")[1]).split("").map((function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(i)||{}}catch{}return{}}function _0(l,i=0){let r=Uo(l);return!(Object.keys(r).length>0&&(!r.exp||r.exp-i>Date.now()/1e3))}j0=typeof atob!="function"||uj?l=>{let i=String(l).replace(/=+$/,"");if(i.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,d,m=0,p=0,f="";d=i.charAt(p++);~d&&(r=m%4?64*r+d:d,m++%4)?f+=String.fromCharCode(255&r>>(-2*m&6)):0)d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(d);return f}:atob;const Dx="pb_auth";class Yu{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get record(){return this.baseModel}get model(){return this.baseModel}get isValid(){return!_0(this.token)}get isSuperuser(){var r,d;let i=Uo(this.token);return i.type=="auth"&&(((r=this.record)==null?void 0:r.collectionName)=="_superusers"||!((d=this.record)!=null&&d.collectionName)&&i.collectionId=="pbc_3142635823")}get isAdmin(){return console.warn("Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),this.isSuperuser}get isAuthRecord(){return console.warn("Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),Uo(this.token).type=="auth"&&!this.isSuperuser}save(i,r){this.baseToken=i||"",this.baseModel=r||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(i,r=Dx){const d=rj(i||"")[r]||"";let m={};try{m=JSON.parse(d),(typeof m===null||typeof m!="object"||Array.isArray(m))&&(m={})}catch{}this.save(m.token||"",m.record||m.model||null)}exportToCookie(i,r=Dx){var h,j;const d={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},m=Uo(this.token);d.expires=m!=null&&m.exp?new Date(1e3*m.exp):new Date("1970-01-01"),i=Object.assign({},d,i);const p={token:this.token,record:this.record?JSON.parse(JSON.stringify(this.record)):null};let f=qx(r,JSON.stringify(p),i);const x=typeof Blob<"u"?new Blob([f]).size:f.length;if(p.record&&x>4096){p.record={id:(h=p.record)==null?void 0:h.id,email:(j=p.record)==null?void 0:j.email};const g=["collectionId","collectionName","verified"];for(const v in this.record)g.includes(v)&&(p.record[v]=this.record[v]);f=qx(r,JSON.stringify(p),i)}return f}onChange(i,r=!1){return this._onChangeCallbacks.push(i),r&&i(this.token,this.record),()=>{for(let d=this._onChangeCallbacks.length-1;d>=0;d--)if(this._onChangeCallbacks[d]==i)return delete this._onChangeCallbacks[d],void this._onChangeCallbacks.splice(d,1)}}triggerChange(){for(const i of this._onChangeCallbacks)i&&i(this.token,this.record)}}class mj extends Yu{constructor(i="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=i,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get record(){const i=this._storageGet(this.storageKey)||{};return i.record||i.model||null}get model(){return this.record}save(i,r){this._storageSet(this.storageKey,{token:i,record:r}),super.save(i,r)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(i){if(typeof window<"u"&&(window!=null&&window.localStorage)){const r=window.localStorage.getItem(i)||"";try{return JSON.parse(r)}catch{return r}}return this.storageFallback[i]}_storageSet(i,r){if(typeof window<"u"&&(window!=null&&window.localStorage)){let d=r;typeof r!="string"&&(d=JSON.stringify(r)),window.localStorage.setItem(i,d)}else this.storageFallback[i]=r}_storageRemove(i){var r;typeof window<"u"&&(window!=null&&window.localStorage)&&((r=window.localStorage)==null||r.removeItem(i)),delete this.storageFallback[i]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",(i=>{if(i.key!=this.storageKey)return;const r=this._storageGet(this.storageKey)||{};super.save(r.token||"",r.record||r.model||null)}))}}class ys{constructor(i){this.client=i}}class pj extends ys{async getAll(i){return i=Object.assign({method:"GET"},i),this.client.send("/api/settings",i)}async update(i,r){return r=Object.assign({method:"PATCH",body:i},r),this.client.send("/api/settings",r)}async testS3(i="storage",r){return r=Object.assign({method:"POST",body:{filesystem:i}},r),this.client.send("/api/settings/test/s3",r).then((()=>!0))}async testEmail(i,r,d,m){return m=Object.assign({method:"POST",body:{email:r,template:d,collection:i}},m),this.client.send("/api/settings/test/email",m).then((()=>!0))}async generateAppleClientSecret(i,r,d,m,p,f){return f=Object.assign({method:"POST",body:{clientId:i,teamId:r,keyId:d,privateKey:m,duration:p}},f),this.client.send("/api/settings/apple/generate-client-secret",f)}}const hj=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function Qu(l){if(l){l.query=l.query||{};for(let i in l)hj.includes(i)||(l.query[i]=l[i],delete l[i])}}function Ju(l){const i=[];for(const r in l){const d=encodeURIComponent(r),m=Array.isArray(l[r])?l[r]:[l[r]];for(let p of m)p=fj(p),p!==null&&i.push(d+"="+p)}return i.join("&")}function fj(l){return l==null?null:l instanceof Date?encodeURIComponent(l.toISOString().replace("T"," ")):encodeURIComponent(typeof l=="object"?JSON.stringify(l):l)}class N0 extends ys{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[],this.pendingSubmits=[],this.isProcessingPendingSubmits=!1}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(i,r,d){var f;if(!i)throw new Error("topic must be set.");let m=i;if(d){Qu(d=Object.assign({},d));const x="options="+encodeURIComponent(JSON.stringify({query:d.query,headers:d.headers}));m+=(m.includes("?")?"&":"?")+x}const p=function(x){const h=x;let j;try{j=JSON.parse(h==null?void 0:h.data)}catch{}r(j||{})};return this.subscriptions[m]||(this.subscriptions[m]=[]),this.subscriptions[m].push(p),this.isConnected?this.subscriptions[m].length===1?await this.submitSubscriptions():(f=this.eventSource)==null||f.addEventListener(m,p):await this.connect(),async()=>this.unsubscribeByTopicAndListener(i,p)}async unsubscribe(i){var r;if(i){const d=this.getSubscriptionsByTopic(i);for(let m in d)if(this.hasSubscriptionListeners(m)){for(let p of this.subscriptions[m])(r=this.eventSource)==null||r.removeEventListener(m,p);delete this.subscriptions[m]}}else this.subscriptions={};await this.submitSubscriptions()}async unsubscribeByPrefix(i){var d;let r=!1;for(let m in this.subscriptions)if((m+"?").startsWith(i)){r=!0;for(let p of this.subscriptions[m])(d=this.eventSource)==null||d.removeEventListener(m,p);delete this.subscriptions[m]}r&&await this.submitSubscriptions()}async unsubscribeByTopicAndListener(i,r){var m;const d=this.getSubscriptionsByTopic(i);for(let p in d){if(!Array.isArray(this.subscriptions[p])||!this.subscriptions[p].length)continue;let f=!1;for(let x=this.subscriptions[p].length-1;x>=0;x--)this.subscriptions[p][x]===r&&(f=!0,delete this.subscriptions[p][x],this.subscriptions[p].splice(
vendor: 7,089 bytes, line 60
60x,1),(m=this.eventSource)==null||m.removeEventListener(p,r));f&&(this.subscriptions[p].length||delete this.subscriptions[p])}await this.submitSubscriptions()}hasSubscriptionListeners(i){var r,d;if(this.subscriptions=this.subscriptions||{},i)return!!((r=this.subscriptions[i])!=null&&r.length);for(let m in this.subscriptions)if((d=this.subscriptions[m])!=null&&d.length)return!0;return!1}async submitSubscriptions(){return new Promise(((i,r)=>{this.pendingSubmits.push({resolve:i,reject:r}),this.pendingSubmits.length==1&&queueMicrotask((()=>this.finalizePendingSubscriptions()))}))}async finalizePendingSubscriptions(){if(this.isProcessingPendingSubmits||!this.pendingSubmits.length)return;const i=this.pendingSubmits.slice();this.pendingSubmits=[],this.isProcessingPendingSubmits=!0;try{await this.sendSubscriptions();for(let r of i)r.resolve()}catch(r){for(let d of i)r?d.reject(r):d.resolve()}finally{this.isProcessingPendingSubmits=!1,this.pendingSubmits.length>0&&await this.finalizePendingSubscriptions()}}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(i){const r={};i=i.includes("?")?i:i+"?";for(let d in this.subscriptions)(d+"?").startsWith(i)&&(r[d]=this.subscriptions[d]);return r}getNonEmptySubscriptionKeys(){const i=[];for(let r in this.subscriptions)this.subscriptions[r].length&&i.push(r);return i}hasUnsentSubscriptions(){const i=this.getNonEmptySubscriptionKeys();if(i.length!=this.lastSentSubscriptions.length)return!0;for(const r of i)if(!this.lastSentSubscriptions.includes(r))return!0;return!1}async sendSubscriptions(){if(this.clientId){if(!this.hasSubscriptionListeners())return this.disconnect();if(this.hasUnsentSubscriptions())return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch((i=>{if(!(i!=null&&i.isAbort))throw i}))}}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let i in this.subscriptions)for(let r of this.subscriptions[i])this.eventSource.addEventListener(i,r)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let i in this.subscriptions)for(let r of this.subscriptions[i])this.eventSource.removeEventListener(i,r)}async connect(){if(!(this.reconnectAttempts>0))return new Promise(((i,r)=>{this.pendingConnects.push({resolve:i,reject:r}),this.pendingConnects.length==1&&queueMicrotask((()=>this.initConnect()))}))}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout((()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))}),this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildURL("/api/realtime")),this.eventSource.onerror=i=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",(i=>{const r=i;this.clientId=r==null?void 0:r.lastEventId,this.lastSentSubscriptions=[],this.submitSubscriptions().then((async()=>{let d=3;for(;this.hasUnsentSubscriptions()&&d>0;)d--,await this.submitSubscriptions();for(let p of this.pendingConnects)p.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const m=this.getSubscriptionsByTopic("PB_CONNECT");for(let p in m)for(let f of m[p])f(i);this.hasUnsentSubscriptions()&&await this.submitSubscriptions()})).catch((d=>{this.clientId="",this.lastSentSubscriptions=[],this.connectErrorHandler(d)}))}))}connectErrorHandler(i){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let d of this.pendingConnects)d.reject(new xt(i));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const r=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout((()=>{this.initConnect()}),r)}disconnect(i=!1){var r;if(this.clientId&&this.onDisconnect&&this.onDisconnect(Object.keys(this.subscriptions)),clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(r=this.eventSource)==null||r.close(),this.eventSource=null,this.clientId="",this.lastSentSubscriptions=[],!i){this.reconnectAttempts=0;for(let d of this.pendingConnects)d.resolve();this.pendingConnects=[]}}}class w0 extends ys{decode(i){return i}async getFullList(i,r){if(typeof i=="number")return this._getFullList(i,r);let d=1e3;return(r=Object.assign({},i,r)).batch&&(d=r.batch,delete r.batch),this._getFullList(d,r)}async getList(i=1,r=30,d){return(d=Object.assign({method:"GET"},d)).query=Object.assign({page:i,perPage:r},d.query),this.client.send(this.baseCrudPath,d).then((m=>{var p;return m.items=((p=m.items)==null?void 0:p.map((f=>this.decode(f))))||[],m}))}async getFirstListItem(i,r){return(r=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+i},r)).query=Object.assign({filter:i,skipTotal:1},r.query),this.getList(1,1,r).then((d=>{var m;if(!((m=d==null?void 0:d.items)!=null&&m.length))throw new xt({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return d.items[0]}))}async getOne(i,r){if(!i)throw new xt({url:this.client.buildURL(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(i),r).then((d=>this.decode(d)))}async create(i,r){return r=Object.assign({method:"POST",body:i},r),this.client.send(this.baseCrudPath,r).then((d=>this.decode(d)))}async update(i,r,d){return d=Object.assign({method:"PATCH",body:r},d),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(i),d).then((m=>this.decode(m)))}async delete(i,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(i),r).then((()=>!0))}_getFullList(i=1e3,r){(r=r||{}).query=Object.assign({skipTotal:1},r.query);let d=[],m=async p=>this.getList(p,i||1e3,r).then((f=>{const x=f.items;return d=d.concat(x),x.length==f.perPage?m(p+1):d}));return m(1)}}function hn(l,i,r,d){const m=d!==void 0;return m||r!==void 0?m?(console.warn(l),i.body=Object.assign({},i.body,r),i.query=Object.assign({},i.query,d),i):Object.assign(i,r):i}function ju(l){var i;(i=l._resetAutoRefresh)==null||i.call(l)}class xj extends w0{constructor(i,r){super(i),this.collectionIdOrName=r}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}get isSuperusers(){return this.collectionIdOrName=="_superusers"||this.collectionIdOrName=="_pbc_2773867675"}async subscribe(i,r,d){if(!i)throw new Error("Missing topic.");
60if(!r)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+i,r,d)}async unsubscribe(i){return i?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+i):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(i,r){if(typeof i=="number")return super.getFullList(i,r);const d=Object.assign({},i,r);return super.getFullList(d)}async getList(i=1,r=30,d){return super.getList(i,r,d)}async getFirstListItem(i,r){return super.getFirstListItem(i,r)}async getOne(i,r){return super.getOne(i,r)}async create(i,r){return super.create(i,r)}async update(i,r,d){return super.update(i,r,d).then((m=>{var p,f,x;if(((p=this.client.authStore.record)==null?void 0:p.id)===(m==null?void 0:m.id)&&(((f=this.client.authStore.record)==null?void 0:f.collectionId)===this.collectionIdOrName||((x=this.client.authStore.record)==null?void 0:x.collectionName)===this.collectionIdOrName)){let h=Object.assign({},this.client.authStore.record.expand),j=Object.assign({},this.client.authStore.record,m);h&&(j.expand=Object.assign(h,m.expand)),this.client.authStore.save(this.client.authStore.token,j)}return m}))}async delete(i,r){return super.delete(i,r).then((d=>{var m,p,f;return!d||((m=this.client.authStore.record)==null?void 0:m.id)!==i||((p=this.client.authStore.record)==null?void 0:p.collectionId)!==this.collectionIdOrName&&((f=this.client.authStore.record)==null?void 0:f.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),d}))}authResponse(i){const r=this.decode((i==null?void 0:i.record)||{});return this.client.authStore.save(i==null?void 0:i.token,r),Object.assign({},i,{token:(i==null?void 0:i.token)||"",record:r})}async listAuthMethods(i){return i=Object.assign({method:"GET",fields:"mfa,otp,password,oauth2"},i),this.client.send(this.baseCollectionPath+"/auth-methods",i)}async authWithPassword(i,r,d){let m;d=Object.assign({method:"POST",body:{identity:i,password:r}},d),this.isSuperusers&&(m=d.autoRefreshThreshold,delete d.autoRefreshThreshold,d.autoRefresh||ju(this.client));let p=await this.client.send(this.baseCollectionPath+"/auth-with-password",d);return p=this.authResponse(p),m&&this.isSuperusers&&(function(x,h,j,g){ju(x);const v=x.beforeSend,S=x.authStore.record,N=x.authStore.onChange(((_,z)=>{(!_||(z==null?void 0:z.id)!=(S==null?void 0:S.id)||(z!=null&&z.collectionId||S!=null&&S.collectionId)&&(z==null?void 0:z.collectionId)!=(S==null?void 0:S.collectionId))&&ju(x)}));x._resetAutoRefresh=function(){N(),x.beforeSend=v,delete x._resetAutoRefresh},x.beforeSend=async(_,z)=>{var w;const C=x.authStore.token;if((w=z.query)!=null&&w.autoRefresh)return v?v(_,z):{url:_,sendOptions:z};let k=x.authStore.isValid;if(k&&_0(x.authStore.token,h))try{await j()}catch{k=!1}k||await g();const T=z.headers||{};for(let A in T)if(A.toLowerCase()=="authorization"&&C==T[A]&&x.authStore.token){T[A]=x.authStore.token;break}return z.headers=T,v?v(_,z):{url:_,sendOptions:z}}})(this.client,m,(()=>this.authRefresh({autoRefresh:!0})),(()=>this.authWithPassword(i,r,Object.assign({autoRefresh:!0},d)))),p}async authWithOAuth2Code(i,r,d,m,p,f,x){let h={method:"POST",body:{provider:i,code:r,codeVerifier:d,redirectURL:m,createData:p}};return h=hn("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).",h,f,x),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",h).then((j=>this.authResponse(j)))}authWithOAuth2(...i){if(i.length>1||typeof(i==null?void 0:i[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((i==null?void 0:i[0])||"",(i==null?void 0:i[1])||"",(i==null?void 0:i[2])||"",(i==null?void 0:i[3])||"",(i==null?void 0:i[4])||{},(i==null?void 0:i[5])||{},(i==null?void 0:i[6])||{});const r=(i==null?void 0:i[0])||{};let d=null;r.urlCallback||(d=Ox(void 0));const m=new N0(this.client);function p(){d==null||d.close(),m.unsubscribe()}const f={},x=r.requestKey;return x&&(f.requestKey=x),this.listAuthMethods(f).then((h=>{const j=h.oauth2.providers.find((v=>v.name===r.provider));if(!j)throw new xt(new Error(`Missing or invalid provider "${r.provider}".`));const g=this.client.buildURL("/api/oauth2-redirect");return new Promise((async(v,S)=>{var _,z,C;const N=x?(_=this.client.cancelControllers)==null?void 0:_[x]:void 0;
vendor: 8,532 bytes, line 60
60N&&(N.signal.onabort=()=>{p(),S(new xt({isAbort:!0,message:"manually cancelled"}))}),m.onDisconnect=k=>{k.length&&S&&(p(),S(new xt(new Error("realtime connection interrupted"))))};try{await m.subscribe("@oauth2",(async A=>{var q;const L=m.clientId;try{if(!A.state||L!==A.state)throw new Error("State parameters don't match.");if(A.error||!A.code)throw new Error("OAuth2 redirect error or missing code: "+A.error);const H=Object.assign({},r);delete H.provider,delete H.scopes,delete H.createData,delete H.urlCallback,(q=N==null?void 0:N.signal)!=null&&q.onabort&&(N.signal.onabort=null);const F=await this.authWithOAuth2Code(j.name,A.code,j.codeVerifier,g,r.createData,H);v(F)}catch(H){S(new xt(H))}p()}));const k={state:m.clientId};(z=r.scopes)!=null&&z.length&&(k.scope=r.scopes.join(" "));const T=this._replaceQueryParams(j.authURL+g,k);await(r.urlCallback||function(A){d?d.location.href=A:d=Ox(A)})(T)}catch(k){(C=N==null?void 0:N.signal)!=null&&C.onabort&&(N.signal.onabort=null),p(),S(new xt(k))}}))})).catch((h=>{throw p(),h}))}async authRefresh(i,r){let d={method:"POST"};return d=hn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",d,i,r),this.client.send(this.baseCollectionPath+"/auth-refresh",d).then((m=>this.authResponse(m)))}async requestPasswordReset(i,r,d){let m={method:"POST",body:{email:i}};return m=hn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",m,r,d),this.client.send(this.baseCollectionPath+"/request-password-reset",m).then((()=>!0))}async confirmPasswordReset(i,r,d,m,p){let f={method:"POST",body:{token:i,password:r,passwordConfirm:d}};return f=hn("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",f,m,p),this.client.send(this.baseCollectionPath+"/confirm-password-reset",f).then((()=>!0))}async requestVerification(i,r,d){let m={method:"POST",body:{email:i}};return m=hn("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",m,r,d),this.client.send(this.baseCollectionPath+"/request-verification",m).then((()=>!0))}async confirmVerification(i,r,d){let m={method:"POST",body:{token:i}};return m=hn("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",m,r,d),this.client.send(this.baseCollectionPath+"/confirm-verification",m).then((()=>{const p=Uo(i),f=this.client.authStore.record;return f&&!f.verified&&f.id===p.id&&f.collectionId===p.collectionId&&(f.verified=!0,this.client.authStore.save(this.client.authStore.token,f)),!0}))}async requestEmailChange(i,r,d){let m={method:"POST",body:{newEmail:i}};return m=hn("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",m,r,d),this.client.send(this.baseCollectionPath+"/request-email-change",m).then((()=>!0))}async confirmEmailChange(i,r,d,m){let p={method:"POST",body:{token:i,password:r}};return p=hn("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",p,d,m),this.client.send(this.baseCollectionPath+"/confirm-email-change",p).then((()=>{const f=Uo(i),x=this.client.authStore.record;return x&&x.id===f.id&&x.collectionId===f.collectionId&&this.client.authStore.clear(),!0}))}async listExternalAuths(i,r){return this.client.collection("_externalAuths").getFullList(Object.assign({},r,{filter:this.client.filter("recordRef = {:id}",{id:i})}))}async unlinkExternalAuth(i,r,d){const m=await this.client.collection("_externalAuths").getFirstListItem(this.client.filter("recordRef = {:recordId} && provider = {:provider}",{recordId:i,provider:r}));return this.client.collection("_externalAuths").delete(m.id,d).then((()=>!0))}async requestOTP(i,r){return r=Object.assign({method:"POST",body:{email:i}},r),this.client.send(this.baseCollectionPath+"/request-otp",r)}async authWithOTP(i,r,d){return d=Object.assign({method:"POST",body:{otpId:i,password:r}},d),this.client.send(this.baseCollectionPath+"/auth-with-otp",d).then((m=>this.authResponse(m)))}async impersonate(i,r,d){(d=Object.assign({method:"POST",body:{duration:r}},d)).headers=d.headers||{},d.headers.Authorization||(d.headers.Authorization=this.client.authStore.token);const m=new Xu(this.client.baseURL,new Yu,this.client.lang),p=await m.send(this.baseCollectionPath+"/impersonate/"+encodeURIComponent(i),d);return m.authStore.save(p==null?void 0:p.token,this.decode((p==null?void 0:p.record)||{})),m}_replaceQueryParams(i,r={}){let d=i,m="";i.indexOf("?")>=0&&(d=i.substring(0,i.indexOf("?")),m=i.substring(i.indexOf("?")+1));const p={},f=m.split("&");for(const x of f){if(x=="")continue;const h=x.split("=");p[decodeURIComponent(h[0].replace(/\+/g," "))]=decodeURIComponent((h[1]||"").replace(/\+/g," "))}for(let x in r)r.hasOwnProperty(x)&&(r[x]==null?delete p[x]:p[x]=r[x]);m="";for(let x in p)p.hasOwnProperty(x)&&(m!=""&&(m+="&"),m+=encodeURIComponent(x.replace(/%20/g,"+"))+"="+encodeURIComponent(p[x].replace(/%20/g,"+")));return m!=""?d+"?"+m:d}}function Ox(l){if(typeof window>"u"||!(window!=null&&window.open))throw new xt(new Error("Not in a browser context - please pass a custom urlCallback function."));let i=1024,r=768,d=window.innerWidth,m=window.innerHeight;i=i>d?d:i,r=r>m?m:r;let p=d/2-i/2,f=m/2-r/2;return window.open(l,"popup_window","width="+i+",height="+r+",top="+f+",left="+p+",resizable,menubar=no")}class bj extends w0{get baseCrudPath(){return"/api/collections"}async import(i,r=!1,d){return d=Object.assign({method:"PUT",body:{collections:i,deleteMissing:r}},d),this.client.send(this.baseCrudPath+"/import",d).then((()=>!0))}async truncate(i,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(i)+"/truncate",r).then((()=>!0))}async getScaffolds(i){return i=Object.assign({method:"GET"},i),this.client.send(this.baseCrudPath+"/meta/scaffolds",i)}async getAllOAuth2Providers(i){return i=Object.assign({method:"GET"},i),this.client.send(this.baseCrudPath+"/meta/oauth2-providers",i)}async dryRunViewQuery(i,r){return r=Object.assign({method:"POST",body:{query:i}},r),this.client.send(this.baseCrudPath+"/meta/dry-run-view",r)}}class gj extends ys{async getList(i=1,r=30,d){return(d=Object.assign({method:"GET"},d)).query=Object.assign({page:i,perPage:r},d.query),this.client.send("/api/logs",d)}async getOne(i,r){if(!i)throw new xt({url:this.client.buildURL("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send("/api/logs/"+encodeURIComponent(i),r)}async getStats(i){return i=Object.assign({method:"GET"},i),this.client.send("/api/logs/stats",i)}}class vj extends ys{async check(i){return i=Object.assign({method:"GET"},i),this.client.send("/api/health",i)}}class yj extends ys{getUrl(i,r,d={}){return console.warn("Please replace pb.files.getUrl() with pb.files.getURL()"),this.getURL(i,r,d)}getURL(i,r,d={}){if(!r||!(i!=null&&i.id)||!(i!=null&&i.collectionId)&&!(i!=null&&i.collectionName))return"";const m=[];m.push("api"),m.push("files"),m.push(encodeURIComponent(i.collectionId||i.collectionName)),m.push(encodeURIComponent(i.id)),m.push(encodeURIComponent(r));let p=this.client.buildURL(m.join("/"));d.download===!1&&delete d.download;const f=Ju(d);return f&&(p+=(p.includes("?")?"&":"?")+f),p}async getToken(i){return i=Object.assign({method:"POST"},i),this.client.send("/api/files/token",i).then((r=>(r==null?void 0:r.token)||""))}}class jj extends ys{async getFullList(i){return i=Object.assign({method:"GET"},i),this.client.send("/api/backups",i)}async create(i,r){return r=Object.assign({method:"POST",body:{name:i}},r),this.client.send("/api/backups",r).then((()=>!0))}async upload(i,r){return r=Object.assign({method:"POST",body:i},r),this.client.send("/api/backups/upload",r).then((()=>!0))}async delete(i,r){return r=Object.assign({method:"DELETE"},r),this.client.send(`/api/backups/${encodeURIComponent(i)}`,r).then((()=>!0))}async restore(i,r){return r=Object.assign({method:"POST"},r),this.client.send(`/api/backups/${encodeURIComponent(i)}/restore`,r).then((()=>!0))}getDownloadUrl(i,r){return console.warn("Please replace pb.backups.getDownloadUrl(
60) with pb.backups.getDownloadURL()"),this.getDownloadURL(i,r)}getDownloadURL(i,r){return this.client.buildURL(`/api/backups/${encodeURIComponent(r)}?token=${encodeURIComponent(i)}`)}}class _j extends ys{async getFullList(i){return i=Object.assign({method:"GET"},i),this.client.send("/api/crons",i)}async run(i,r){return r=Object.assign({method:"POST"},r),this.client.send(`/api/crons/${encodeURIComponent(i)}`,r).then((()=>!0))}}class Nj extends ys{async run(i,r){return r=Object.assign({method:"POST",body:{query:i}},r),this.client.send("/api/sql",r)}}function Au(l){return typeof Blob<"u"&&l instanceof Blob||typeof File<"u"&&l instanceof File||l!==null&&typeof l=="object"&&l.uri&&(typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal)}function Mu(l){var i;return l&&(((i=l.constructor)==null?void 0:i.name)==="FormData"||typeof FormData<"u"&&l instanceof FormData)}function Bx(l){for(const i in l){const r=Array.isArray(l[i])?l[i]:[l[i]];for(const d of r)if(Au(d))return!0}return!1}const wj=/^[\-\.\d]+$/;function Px(l){if(typeof l!="string")return l;if(l=="true")return!0;if(l=="false")return!1;if((l[0]==="-"||l[0]>="0"&&l[0]<="9")&&wj.test(l)){let i=+l;if(""+i===l)return i}return l}class Sj extends ys{constructor(){super(...arguments),this.requests=[],this.subs={}}collection(i){return this.subs[i]||(this.subs[i]=new Cj(this.requests,i)),this.subs[i]}async send(i){const r=new FormData,d=[];for(let m=0;m<this.requests.length;m++){const p=this.requests[m];if(d.push({method:p.method,url:p.url,headers:p.headers,body:p.json}),p.files)for(let f in p.files){const x=p.files[f]||[];for(let h of x)r.append("requests."+m+"."+f,h)}}return r.append("@jsonPayload",JSON.stringify({requests:d})),i=Object.assign({method:"POST",body:r},i),this.client.send("/api/batch",i)}}class Cj{constructor(i,r){this.requests=[],this.requests=i,this.collectionIdOrName=r}upsert(i,r){r=Object.assign({body:i||{}},r);const d={method:"PUT",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records"};this.prepareRequest(d,r),this.requests.push(d)}create(i,r){r=Object.assign({body:i||{}},r);const d={method:"POST",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records"};this.prepareRequest(d,r),this.requests.push(d)}update(i,r,d){d=Object.assign({body:r||{}},d);const m={method:"PATCH",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records/"+encodeURIComponent(i)};this.prepareRequest(m,d),this.requests.push(m)}delete(i,r){r=Object.assign({},r);const d={method:"DELETE",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records/"+encodeURIComponent(i)};this.prepareRequest(d,r),this.requests.push(d)}prepareRequest(i,r){if(Qu(r),i.headers=r.headers,i.json={},i.files={},r.query!==void 0){const m=Ju(r.query);m&&(i.url+=(i.url.includes("?")?"&":"?")+m)}let d=r.body;Mu(d)&&(d=(function(p){let f={};return p.forEach(((x,h)=>{if(h==="@jsonPayload"&&typeof x=="string")try{let j=JSON.parse(x);Object.assign(f,j)}catch(j){console.warn("@jsonPayload error:",j)}else f[h]!==void 0?(Array.isArray(f[h])||(f[h]=[f[h]]),f[h].push(Px(x))):f[h]=Px(x)})),f})(d));for(const m in d){const p=d[m];if(Au(p))i.files[m]=i.files[m]||[],i.files[m].push(p);else if(Array.isArray(p)){const f=[],x=[];for(const h of p)Au(h)?f.push(h):x.push(h);if(f.length>0&&f.length==p.length){i.files[m]=i.files[m]||[];for(let h of f)i.files[m].push(h)}else if(i.json[m]=x,f.length>0){let h=m;m.startsWith("+")||m.endsWith("+")||(h+="+"),i.files[h]=i.files[h]||[];for(let j of f)i.files[h].push(j)}}else i.json[m]=p}}}class Xu{get baseUrl(){return this.baseURL}set baseUrl(i){this.baseURL=i}constructor(i="/",r,d="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseURL=i,this.lang=d,r?this.authStore=r:typeof window<"u"&&window.Deno?this.authStore=new Yu:this.authStore=new mj,this.collections=new bj(this),this.files=new yj(this),this.logs=new gj(this),this.settings=new pj(this),this.realtime=new N0(this),this.health=new vj(this),this.backups=new jj(this),this.crons=new _j(this),this.sql=ne
60w Nj(this)}get admins(){return this.collection("_superusers")}createBatch(){return new Sj(this)}collection(i){return this.recordServices[i]||(this.recordServices[i]=new xj(this,i)),this.recordServices[i]}autoCancellation(i){return this.enableAutoCancellation=!!i,this}cancelRequest(i){return this.cancelControllers[i]&&(this.cancelControllers[i].abort(),delete this.cancelControllers[i]),this}cancelAllRequests(){for(let i in this.cancelControllers)this.cancelControllers[i].abort();return this.cancelControllers={},this}filter(i,r){if(!r)return i;function d(m){switch(typeof m){case"boolean":case"number":return""+m;case"string":return JSON.stringify(m);default:if(m==null)return"null";if(m instanceof Date)return JSON.stringify(m.toISOString().replace("T"," "));{const p=JSON.stringify(m);return p.startsWith("[")||p.startsWith("{")?JSON.stringify(p):p}}}for(let m in r)i=i.replaceAll("{:"+m+"}",d(r[m]));return i}getFileUrl(i,r,d={}){return console.warn("Please replace pb.getFileUrl() with pb.files.getURL()"),this.files.getURL(i,r,d)}buildUrl(i){return console.warn("Please replace pb.buildUrl() with pb.buildURL()"),this.buildURL(i)}buildURL(i){var d;let r=this.baseURL;return typeof window>"u"||!window.location||r.startsWith("https://")||r.startsWith("http://")||(r=(d=window.location.origin)!=null&&d.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseURL.startsWith("/")||(r+=window.location.pathname||"/",r+=r.endsWith("/")?"":"/"),r+=this.baseURL),i&&(r+=r.endsWith("/")?"":"/",r+=i.startsWith("/")?i.substring(1):i),r}async send(i,r){r=this.initSendOptions(i,r);let d=this.buildURL(i);if(this.beforeSend){const m=Object.assign({},await this.beforeSend(d,r));m.url!==void 0||m.options!==void 0?(d=m.url||d,r=m.options||r):Object.keys(m).length&&(r=m,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(r.query!==void 0){const m=Ju(r.query);m&&(d+=(d.includes("?")?"&":"?")+m),delete r.query}return this.getHeader(r.headers,"Content-Type")=="application/json"&&r.body&&typeof r.body!="string"&&(r.body=JSON.stringify(r.body)),(r.fetch||fetch)(d,r).then((async m=>{var f;let p={};try{p=await m.json()}catch(x){if((f=r.signal)!=null&&f.aborted||(x==null?void 0:x.name)=="AbortError"||(x==null?void 0:x.message)=="Aborted")throw x}if(this.afterSend&&(p=await this.afterSend(m,p,r)),m.status>=400)throw new xt({url:m.url,status:m.status,data:p});return p})).catch((m=>{throw new xt(m)}))}initSendOptions(i,r){if((r=Object.assign({method:"GET"},r)).body=(function(m){if(typeof FormData>"u"||m===void 0||typeof m!="object"||m===null||Mu(m)||!Bx(m))return m;const p=new FormData;for(const f in m){const x=m[f];if(x!==void 0)if(typeof x!="object"||Bx({data:x})){const h=Array.isArray(x)?x:[x];for(let j of h)p.append(f,j)}else{let h={};h[f]=x,p.append("@jsonPayload",JSON.stringify(h))}}return p})(r.body),Qu(r),r.query=Object.assign({},r.params,r.query),r.requestKey===void 0&&(r.$autoCancel===!1||r.query.$autoCancel===!1?r.requestKey=null:(r.$cancelKey||r.query.$cancelKey)&&(r.requestKey=r.$cancelKey||r.query.$cancelKey)),delete r.$autoCancel,delete r.query.$autoCancel,delete r.$cancelKey,delete r.query.$cancelKey,this.getHeader(r.headers,"Content-Type")!==null||Mu(r.body)||(r.headers=Object.assign({},r.headers,{"Content-Type":"application/json"})),this.getHeader(r.headers,"Accept-Language")===null&&(r.headers=Object.assign({},r.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(r.headers,"Authorization")===null&&(r.headers=Object.assign({},r.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&r.requestKey!==null){const d=r.requestKey||(r.method||"GET")+i;delete r.requestKey,this.cancelRequest(d);const m=new AbortController;this.cancelControllers[d]=m,r.signal=m.signal}return r}getHeader(i,r){i=i||{},r=r.toLowerCase();for(let d in i)if(d.toLowerCase()==r)return i[d];return null}}function S0(l,i){return l.startsWith("/.sfs-preview")||i?"/.sfs-bd":"/.sfs-be"}const Ej=S0(window.location.pathname,!1);new Xu(`${window.location.origin}${Ej}/`);class zj extends Xu{constructor(i,r,d){const m=`${window.location.origin}${S0(window.location.pathname,!1)}/`;i!==m&&console.warn(`[pocketbase-wrapper] ignoring PocketBase base URL "${i}" passed by app code — using the platform-correct URL "${m}" instead.`),super(m,r,d)}}
60const D=new zj,C0=b.createContext(null);async function Nr(l){try{return await D.collection("members").getOne(l)}catch{return D.authStore.record}}async function kj(l){try{const i=await D.collection("members").getOne(l);if(i.founder_bonus_at||(await D.collection("members").getList(1,1,{filter:'founder_bonus_at != ""'})).totalItems>=100)return;const d=new Date().toISOString();await D.collection("members").update(l,{cp_balance:(i.cp_balance||0)+200,founder_bonus_at:d,is_founder:!0});try{await D.collection("pending_emails").create({to_email:i.email,to_name:i.name||"escalador",subject:"Ya tienes tus primeros 200 Climbpoints — añade tu casa para conseguir 300 más",template:"founder_welcome",status:"pending"})}catch{}}catch{}}async function Aj(l){try{const i=await D.collection("members").getOne(l);if(!i.is_founder||i.home_bonus_at)return;const r=new Date().toISOString();await D.collection("members").update(l,{cp_balance:(i.cp_balance||0)+300,home_bonus_at:r})}catch{}}function Mj({children:l}){const[i,r]=b.useState(null),[d,m]=b.useState(!1);b.useEffect(()=>{const h=D.authStore.onChange(async(j,g)=>{if(g!=null&&g.id){const v=await Nr(g.id);r(v)}else r(null)});return D.authStore.isValid?D.collection("members").authRefresh().then(async()=>{const j=await Nr(D.authStore.record.id);r(j)}).catch(()=>{D.authStore.clear(),r(null)}).finally(()=>m(!0)):(r(null),m(!0)),()=>h()},[]);const p=async(h,j,g,v,S=!1)=>{await D.collection("members").create({email:h,password:j,passwordConfirm:v||j,name:g,marketing_consent:S});try{await D.collection("members").requestVerification(h)}catch{}await D.collection("members").authWithPassword(h,j);const N=D.authStore.record;if(N!=null&&N.id){await kj(N.id);const _=await Nr(N.id);r(_)}else r(N)},f=async(h,j)=>{await D.collection("members").authWithPassword(h,j);const g=await Nr(D.authStore.record.id);r(g)},x=()=>{D.authStore.clear(),r(null)};return e.jsx(C0.Provider,{value:{user:i,authReady:d,signup:p,login:f,logout:x},children:l})}function oa(){return b.useContext(C0)}const E0=b.createContext({alertCount:0,setAlertCount:()=>{}});function Tj({children:l}){const[i,r]=b.useState(0);return e.jsx(E0.Provider,{value:{alertCount:i,setAlertCount:r},children:l})}function z0(){return b.useContext(E0)}const Lj={es:{buttons:{cancel:"Cancelar",edit:"Editar",delete:"Borrar",save:"Guardar",save_route:"Guardar vía",close:"Cerrar",reopen:"Reabrir",next:"Siguiente →",prev:"← Anterior",confirm:"Sí, confirmar",send:"→",clear_filters:"Borrar filtros",select:"Seleccionar…"},common:{not_linked:"Sin vincular",not_specified:"Sin especificar",no_grade:"Sin grado"},signup:{title:"Únete gratis",subtitle:"Casas, escuelas y comunidad escaladora",name_label:"Tu nombre o apodo",name_placeholder:"Como te llaman en la pared",email_label:"Correo electrónico",email_placeholder:"[email protected]",password_label:"Contraseña",password_placeholder:"Mínimo 8 caracteres",show_password:"mostrar",hide_password:"ocultar",submit:"Crear cuenta gratis",submitting:"Creando tu cuenta…",legal_accept:"He leído y acepto los",terms_of_use:"Términos de uso",and:"y la",privacy_policy:"Política de privacidad",already_member:"¿Ya tienes cuenta?",login_link:"Inicia sesión"},login:{title:"Inicia sesión",subtitle:"Continúa con tu cuenta",email_label:"Correo electrónico",email_placeholder:"[email protected]",password_label:"Contraseña",password_placeholder:"Tu contraseña",show_password:"mostrar",hide_password:"ocultar",submit:"Inicia sesión",submitting:"Iniciando sesión…",no_account:"¿No tienes cuenta?",signup_link:"Regístrate gratis"},nav:{home:"Inicio",community:"Comunidad",crags:"Escuelas",homes:"Casas",map:"Mapa",topos:"Croquis",reviews:"Reseñas de escalada",guides:"Guías",about:"Quiénes somos",help:"Ayuda",profile:"Mi perfil",dashboard:"Mi panel",admin:"Admin",login:"Entrar",signup:"Unirse",logout:"Salir",language:"Seleccionar idioma",explore:"Explorar",find_partner:"Encuentra compañero"},buttons:{save:"Guardar",cancel:"Cancelar",delete:"Eliminar",edit:"Editar",publish:"Publicar",close:"Cerrar",submit:"Enviar",send:"Enviar",search:"Buscar",filter:"Filtrar",clear:"Limpiar",more:"Ver más",less:"Ver menos",loading:"Cargando...",retry:"Reintentar",confirm:"Confirmar",reject:"Rechazar",approve:"Aprobar",preapprove:"Preaprobar",contact:"Contactar",message:"Mensaje",reply:"Responder",view_croquis:"Ver o sub
60ir croquis",share_climb:"Compartir escalada",join_free:"Unirme gratis",already_have_account:"Ya tengo cuenta"},forms:{required_field:"Campo obligatorio",invalid_email:"Email inválido",password_too_short:"La contraseña debe tener al menos 8 caracteres",passwords_dont_match:"Las contraseñas no coinciden",error_saving:"Error al guardar. Intenta de nuevo.",success:"Guardado correctamente",confirm_delete:"¿Estás seguro de que quieres eliminar esto?",name:"Nombre",email:"Correo electrónico",password:"Contraseña",confirm_password:"Confirmar contraseña",description:"Descripción",location:"Ubicación",country:"País",province:"Provincia",municipality:"Municipio"},homes:{title:"Casas",my_homes:"Mis casas",browse_homes:"Busca casas",browse_schools:"Busca escuelas",view_map:"Ver el mapa",add_home:"Añadir casa",edit_home:"Editar casa",delete_home:"Eliminar casa",publish_home:"Publicar casa",available:"Disponible",not_available:"No disponible",complete_house:"Casa completa",private_room:"Habitación privada",capacity:"Capacidad",guests:"huéspedes",dates:"Fechas",check_in:"Entrada",check_out:"Salida",amenities:"Servicios",rules:"Normas",nearby_crags:"Escuelas cercanas",difficulty_levels:"Niveles de dificultad",climbing_types:"Tipos de escalada",climbing_area:"Zona de escalada",about_home:"Sobre la casa",contact_host:"Contactar anfitrión",no_homes:"Aún no hay casas en esta zona",empty_state_cta:"Publicar mi casa aquí"},exchange:{exchange_request:"Solicitud de intercambio",send_request:"Enviar solicitud",pending:"Pendiente",preapproved:"Preaaprobada",approved:"Aprobada",completed:"Completado",declined:"Rechazada",my_exchanges:"Mis intercambios",requests_sent:"Solicitudes enviadas",requests_received:"Solicitudes recibidas",preapproved_exchanges:"Intercambios preaaprobados",upcoming:"Próximos intercambios",past:"Intercambios pasados",exchange_details:"Detalles del intercambio",message_to_host:"Mensaje al anfitrión",view_request:"Ver solicitud y responder",confirm_exchange:"Confirmar intercambio",decline_exchange:"Rechazar intercambio",preapprove_exchange:"Preaprobar intercambio",guest_reviews:"Valoraciones como huésped",host_reviews:"Valoraciones como anfitrión"},climbing:{crags:"Escuelas de escalada",sectors:"Sectores",routes:"Vías",grade:"Grado",style:"Estilo",sport:"Deportiva",boulder:"Bloque",classic:"Clásica",reviews:"Reseñas",ratings:"Valoraciones",conditions:"Condiciones",best_season:"Mejor temporada",dry:"Seca",wet:"Mojada",community_grade:"Grado de la comunidad",i_climbed_it:"La he escalado",save:"Guardar",view_reviews:"Ver reseñas",add_review:"Añadir reseña",saved_items:"Vías guardadas",ascents:"Ascensiones",comments:"Debates",no_comments:"Sin debates aún",register_to_comment:"Regístrate para comentar",view_or_upload_croquis:"Ver o subir croquis"},topos:{title:"Croquis",add_topo:"Subir croquis",school_or_sector:"Escuela o sector",school:"Escuela",sector:"Sector",route:"Vía",images:"Imágenes",description:"Descripción",my_topos:"Mis croquis",public_gallery:"Galería pública",upload_images:"Subir imágenes",max_images:"Máximo 3 imágenes",no_download:"Las imágenes no se pueden descargar"},map:{title:"Mapa",be_first_here:"Sé el primero aquí",publish_your_house:"Publica tu casa",available_climbers:"Escaladores disponibles",available_houses:"Casas disponibles",climbing_schools:"Escuelas de escalada",guides:"Guías",filter:"Filtrar",zones_without_house:"Zonas sin casa",zoom_in:"Haz zoom para ver detalles",legend:"Leyenda",search_location:"Buscar ubicación",no_results:"Sin resultados"},climb_points:{title:"ClimbPoints",balance:"Saldo",earned:"Ganados",spent:"Gastados",bonus:"Bonus",founder_bonus:"Bonus fundador",welcome_bonus:"Bonus de bienvenida",publish_home:"Publicar casa",share_knowledge:"Compartir conocimiento",exchange_system:"Sistema de intercambio",how_it_works:"Cómo funciona",points_rules:"Normas de ClimbPoints",availability:"Disponibilidad",accommodation:"Alojamiento",exchange_cost:"Costo del intercambio",transaction_history:"Historial de transacciones"},messages:{title:"Mensajes",new_message:"Nuevo mensaje",private_messages:"Mensajes privados",conversations:"Conversaciones",no_messages:"Aún no tienes mensajes",unread:"Sin leer",mark_as_read:"Marcar como leído",type_message:"Escribe tu mensaje...",send:"Enviar",find_member:"Buscar miembro",chat_with:"Chat con"},profile:{my_profile:"Mi perfil",edit_profile:"Editar perfil",avatar:"Avatar",bio:"Biografía",location:"Ubicación",climbing_level:"Nivel de escalada",favorite_zones:"Zonas habituales",available_to_climb:"Disponible para escalar",styles:"Estilos que me gustan",preferences:"Preferencias",safety_verification:"Verificación de seguridad",privacy_settings:"Configuración de privacidad",account_settings:"Configuración de cuenta",change_password:"Cambiar contraseña",delete_account:"Eliminar cuenta",export_data:"Exportar datos",blocked_users:"Usuarios bloqueados",marketing_consent:"Recibir noticias y actualizaciones"},admin:{title:"Administración",dashboard:"Panel de administración",users:"Usuarios",homes:"Casas",schools:"Escuelas",reports:"Reportes",moderation:"Moderación",escalators:"Escaladores",climb_points_tab:"ClimbPoints",stats:"Estadísticas",settings:"Configuración",pen
60ding_reports:"Reportes pendientes",resolved:"Resuelto",declined:"Rechazado",duplicate_schools:"Escuelas duplicadas",merge_schools:"Fusionar escuelas",block_user:"Bloquear usuario",delete_review:"Eliminar reseña"},errors:{not_found:"No encontrado",unauthorized:"No autorizado",forbidden:"Acceso denegado",server_error:"Error del servidor. Intenta de nuevo.",network_error:"Error de red. Revisa tu conexión.",must_login:"Debes iniciar sesión",must_register:"Debes registrarte",email_not_verified:"Verifica tu correo para continuar",email_already_in_use:"Este correo ya está registrado",invalid_credentials:"Correo o contraseña incorrectos",no_results:"Sin resultados",empty_state:"Aún no hay contenido aquí",try_again:"Intenta de nuevo",loading_error:"Error al cargar. Intenta de nuevo.",save_error:"Error al guardar",delete_error:"Error al eliminar"},auth:{sign_up:"Crear cuenta",sign_in:"Iniciar sesión",sign_out:"Cerrar sesión",forgot_password:"¿Olvidaste tu contraseña?",reset_password:"Restablecer contraseña",verify_email:"Verificar correo",email_verification_sent:"Te hemos enviado un correo de verificación",check_inbox:"Revisa tu bandeja de entrada",click_link_verify:"Haz clic en el enlace para verificar tu cuenta",resend_verification:"Reenviar correo de verificación",account_created:"¡Cuenta creada! Bienvenido a Climb & Home.",password_reset_sent:"Te hemos enviado un enlace para restablecer tu contraseña",password_changed:"Contraseña cambiada correctamente",terms_accepted:"He leído y acepto los Términos de uso y la Política de privacidad",marketing_signup:"Recibir noticias sobre Climb & Home",onboarding_welcome:"Bienvenido a Climb & Home",onboarding_step1:"Completa tu perfil",onboarding_step2:"Añade tu casa",onboarding_step3:"Explora la comunidad"},legal:{terms:"Términos de uso",privacy:"Política de privacidad",cookies:"Política de cookies",legal_notice:"Aviso legal",gdpr:"RGPD",cancellation_policy:"Política de cancelaciones",i_accept:"Acepto",i_decline:"Rechazo"},footer:{copyright:"© 2026 CLIMB & HOME — Intercambio de casas para escaladores",about:"Quiénes somos",homes:"Casas",schools:"Escuelas",topos:"Croquis",community:"Comunidad",help:"Ayuda",contact:"Contacto",terms:"Términos",privacy:"Privacidad",legal:"Marco legal",presentation:"Ver presentación de CLIMB & HOME"},homes_page:{title:"Casas de escaladores",subtitle:"Alójate intercambiando casas con locales que conocen las mejores vías de la zona",gate_title:"Las casas son solo para la comunidad",gate_desc:`Escaladores de toda Europa comparten su casa cuando se van a escalar fuera.
61Regístrate gratis para ver dónde y cuándo están disponibles.`,gate_signup:"Crear cuenta",gate_login:"Ya tengo cuenta",zone_filter:"Zona de escalada…",climbers_filter:"Escaladores",climber_1:"1 escalador",climber_2:"2 escaladores",climber_3:"3 o más",climber_4:"4 o más",climber_6:"6 o más",climber_8:"8 o más",from_date:"Fecha de llegada",to_date:"Fecha de salida",pets_allowed:"Se admiten mascotas",clear_filters:"Limpiar filtros",nights:"noche",guests:"huésp.",balance:"Saldo:",available_homes:"casa",available:"disponible",calculating_for:"calculando para",no_homes_title:"Sé el primero aquí",no_homes_desc:"No hay casas disponibles en esta zona. Regístrate y publica tu casa.",no_homes_zone:"Esta zona tiene escalada increíble pero todavía no hay anfitriones. Si vives cerca, publicar tu casa aquí tiene mucho valor para la comunidad.",no_homes_expand:"Prueba a ampliar los filtros o busca en otra zona.",no_homes_growing:"La comunidad está creciendo. Publica tu casa y serás el primer anfitrión — eso tiene mucho valor para los escaladores que buscan en tu zona.",remove_filters:"Quitar filtros y ver todo",publish_home:"Publicar mi casa"},routes_page:{title:"Escuelas del mundo",subtitle:"Conocimiento local compartido por escaladores de todo el planeta",schools_listed:"escuelas catalogadas en todo el mund
61o",search_schools:"Buscar escuelas",search_placeholder:"Busca por nombre, país, zona o grado…",search_non_member:"Buscar por nombre, país o zona…",clear_search:"Borrar búsqueda",directory_members_only:"El directorio es para miembros",directory_desc:"Más de 700 escuelas de escalada en todo el mundo, con sectores, reseñas y consejos de la comunidad. Regístrate gratis para acceder.",create_account:"Crear cuenta gratis",already_have_account:"Ya tengo cuenta — entrar",loading:"Cargando…",error_loading:"No se ha podido cargar el contenido. Comprueba tu conexión.",retry:"Reintentar",no_results:"No hay escuelas que coincidan con tu búsqueda.",clear_filters:"Borrar filtros",schools_on_map:"Escuelas en el mapa",community_recommendations:"Recomendaciones de la comunidad",view_on_map:"Ver en el mapa →",view_school:"Ver escuela →",view_reviews:"Reseñas →"},comunidad:{badge:"Comunidad de escaladores",hero_title:"SOMOS ESCALADORES",hero_subtitle:"QUE VIAJAMOS JUNTOS",hero_desc:"Aquí cada miembro aporta algo real: una reseña, un croquis, un techo donde quedarse. Lo que sabes de la roca vale mucho para quien viene detrás — y al revés.",join_cta:"Unirme — es gratis",view_topos:"Ver croquis",about_us:"Quiénes somos",join_title:"ÚNETE A LA COMUNIDAD",join_desc:"Los miembros pueden valorar vías, responder reseñas y compartir sus propias experiencias en la roca.",recent_reviews:"RESEÑAS RECIENTES",recent_reviews_desc:"Lo que la comunidad cuenta de las vías",view_all:"Ver todas"},profile:{my:"Mi",profile:"perfil",identity_desc:"Tu identidad en la comunidad escaladora — lo que los anfitriones ven antes de aceptar tu solicitud.",change_photo:"Cambiar foto de perfil",your_photo:"Tu foto de perfil",upload_photo:"Subir foto",photo_ready:"Foto lista — pulsa 'Guardar cambios' para publicarla",climbing_level:"Nivel de escalada",available_to_climb:"Disponible para compartir escaladas",location:"Ubicación",save_profile:"Guardar perfil",saving:"Guardando…",saved:"Perfil guardado",error:"Error al guardar. Intenta de nuevo.",guest_ratings:"Valoraciones como huésped",host_ratings:"Valoraciones como anfitrión",no_guest_reviews:"Sin valoraciones como huésped todavía",no_host_reviews:"Sin valoraciones como anfitrión todavía"},home:{headline:`Escala
62y viaja`,tagline:"La comunidad de escaladores",description:"Intercambia tu casa con otros escaladores. Sé parte de una comunidad global.",search_crag:"¿A qué escuela quieres ir?",browse_homes:"Busca casas",browse_schools:"Busca escuelas",view_map:"Ver el mapa",featured_homes:"Escaladores que abren su puerta",featured_homes_desc:"Escaladores que abren su casa y saben dónde escalar",top_destinations:"Destinos principales",how_works:"Cómo funciona",how_works_subtitle:"Más que un intercambio de casas — un intercambio de conocimiento entre escaladores.",step1_title:"Únete a la comunidad",step1_desc:"Crea tu perfil, añade tu casa y describe las zonas de escalada que tienes cerca.",step2_title:"Encuentra un anfitrión local",step2_desc:"Busca casas en los destinos que te interesan. El anfitrión comparte información local sobre las zonas que conoce.",step3_title:"Comparte el conocimiento",step3_desc:"Comparte información sobre las zonas y vías que conoces, siempre que su difusión esté permitida. Un complemento útil a las guías existentes.",grow_cta:"Ayúdanos a crecer",grow_desc:"Publica tu casa y obtén 300 CP adicionales. Si eres uno de los primeros 100 fundadores, suma 100 CP más.",publish_home:"Publicar mi casa",stories_title:"Así imaginamos los intercambios",stories_subtitle:"Historias ficticias que reflejan lo que queremos construir juntos. Las tuyas vendrán pronto.",stories_cta:"Únete y comparte la tuya →",fictional_badge:"Ejemplo ficticio",review_question:"¿Quieres dejar tu propia reseña después de tu primer intercambio?",signup_and_review:"Regístrate y empieza →",good_schools_title:"¿Tienes buenas escuelas cerca de casa?",good_schools_desc:"Comparte tu casa con la comunidad escaladora y a cambio descubre zonas increíbles de la mano de locales.",start_now:"Empezar ahora"},dashboard:{reviews:{rating_general:"Experiencia general",rating_home:"La vivienda",rating_cleanliness:"Limpieza y estado",rating_accuracy:"Correspondía con el anuncio",rating_communication:"Comunicación",rating_respect:"Respeto por la vivienda y pertenencias",rating_cleanliness_guest:"Limpieza y cuidado al marcharse",rating_agreement_guest:"Cumplimiento de lo acordado",rating_communication_guest:"Comunicación y comportamiento",rating_accuracy_host:"La casa correspondía con lo descrito",rating_communication_host:"Comunicación y atención",rating_agreement_host:"Cumplimiento de lo acordado",rating_condition:"Condiciones de la vivienda",rating_support:"Atención ante posibles incidencias",validate_rating:"Por favor valora al menos el primer criterio.",save_error:"No se pudo guardar la valoración.",guest_title:"Valora tu experiencia como huésped",host_title:"Valora tu experiencia como anfitrión",guest_subtitle:"Cuéntanos cómo fue el anfitrión y la casa",host_subtitle:"Cuéntanos cómo se 
62comportó el huésped",comment_placeholder:"Cuéntanos cómo fue la experiencia…",sending:"Enviando…",send_rating:"Enviar valoración",sent_success:"¡Valoración enviada!",sent_notice:"Se publicará cuando la otra parte también haya valorado — así nadie se condiciona por la opinión del otro."},homes:{title_required:"El título es obligatorio.",location_required:"La ubicación es obligatoria.",must_login:"Debes iniciar sesión para añadir una casa.",title_label:"Título de tu casa *",title_example:"p.ej. Casa en El Chorro",location_label:"Municipio *",location_example:"p.ej. Valle de Aisa, Arenas de Cabrales, El Chorro…",country_label:"País",country_example:"España",description_label:"Descripción",description_placeholder:"Cuéntanos sobre tu casa y el entorno…",climbing_areas_label:"Escuelas de escalada",climbing_areas_placeholder:"Describe los sectores, accesos, tipo de roca…",max_guests_label:"Número máximo de escaladores",max_guests_example:"2",saving:"Guardando…",publish_button:"Publicar casa",accommodation_full:"Vivienda completa",accommodation_full_desc:"El huésped dispone de toda la vivienda",accommodation_private:"Habitación privada",accommodation_private_desc:"Habitación en tu casa, zonas comunes compartidas",room_details_title:"Detalles de la habitación privada",bed_type_label:"Tipo de cama",bed_double:"Cama doble",bed_twin:"Dos camas individuales",bed_single:"Cama individual",bed_bunk:"Literas",bath_private:"Baño privado",kitchen_shared:"Cocina compartida",host_present:"Anfitrión presente durante la estancia"},extras:{escuela_cercana:"Escuela de escalada a menos de 50 km",parking_bicis:"Parking / garaje para bicis y material",rocodromo_cercano:"Rocódromo a menos de 20 km",wifi:"WiFi",mascotas:"Se admiten mascotas"},difficulties:["Alpinismo","Escalada Clásica","Escalada Deportiva","Rocódromo","Senderismo","Esquí de Montaña","BTT"]},dashboard:{my_homes:"Mis casas",add_home:"Añadir casa",reviews:"Reseñas",sketches:"Croquis",my_places:"Mis lugares",exchanges:"Intercambios",companions:"Compañeros",requests:"Solicitudes",accommodation_type_label:"Tipo de alojamiento *",private_home:"Casa privada (tuya)",private_room:"Habitación privada",shared_room:"Habitación compartida",common_areas_label:"Zonas comunes disponibles",common_areas_placeholder:"p.ej. salón, terraza, jardín…",house_rules_label:"Normas de convivencia",house_rules_placeholder:"p.ej. no fumar en el interior, llegada antes de las 22h…",description_label:"Descripción",climbing_areas_label:"Zonas de escalada cercanas",activities_label:"Actividades cercanas",photos_label:"Fotos de tu casa",photos_hint:"(hasta 6 · arrastra para ordenar)",value_in_climbpoints:"Valor en ClimbPoints",base_value_desc:"Base según capacidad ({guests} CP) + extras marcados (máx. +40 CP). La plataforma calcula el valor — tú no lo puedes modificar.",available_for_exchange:"Disponible para intercambio ahora",sketch_type_label:"Tipo",sketch_sport:"Escalada deportiva",sketch_classic:"Escalada clásica",sketch_btt:"Vuelta en BTT",sketch_hiking:"Senderismo",sketch_croquis:"Croquis / Topo",sketch_photo:"Galería de fotos",sketch_sector_label:"Sector / zona",sketch_grade_label:"Grado",sketch_description_label:"Descripción / beta",sketch_photos_label:"Fotos o croquis",sketch_photos_hint:"(hasta 5)",loading:"Cargando…",tip_home_label:"Casa a la que pertenece *",select_home:"Selecciona una casa",no_homes:"Aún no has publicado ninguna casa",no_requests:"Sin solicitudes pendientes",no_reviews:"Sin reseñas aún",no_places:"Sin lugares guardados",exchange_status_pending:"Pendiente",exchange_status_accepted:"Aceptada",exchange_status_declined:"Rechazada",exchange_from:"De",exchange_to:"A",exchange_message:"Mensaje del solicitante",publish_home:"Publicar casa",update_home:"Actualizar casa",delete_home:"Borrar casa",add_review:"Añadir reseña",add_sketch:"Añadir croquis",add_tip:"Añadir información",accept_exchange:"Aceptar intercambio",decline_exchange:"Rechazar",publish_review:"Publicar reseña",review_as_host:"Como anfitrión",review_as_guest:"Como huésped",rating_label:"Valoración",review_text_label:"Tu reseña",publish_both:"Publicar ambas reseñas",field_required:"Campo requerido",max_chars:"Máximo {max} caracteres"},homes_page:{title:"Casas de escaladores",subtitle:"Alójate intercambiando casas con locales que conocen las mejores vías de la zona",gate_title:"Las casas son solo para la comunidad",gate_desc:`Escaladores de toda Europa comparten su casa cuando se van a escalar fuera.
63Regístrate gratis para ver dónde y cuándo están disponibles.`,join_free:"Unirme gratis — es inmediato",already_member:"Ya tengo cuenta",signup_easy:"Solo nombre, correo y contraseña. Sin tarjeta, sin pasos extras.",search_school:"Escuela, municipio, zona…",search_placeholder:"Escuela, municipio, zona…",climbing_zone:"Zona de escalada…",num_guests:"Escaladores",guest_1:"1 escalador",guest_2:"2 escaladores",guest_3:"3 o más",guest_4:"4 o más",guest_6:"6 o más",guest_8:"8 o más",arrival_date:"Fecha de llegada",departure_date:"Fecha de salida",pets_only:"Mascotas",full_house:"Solo viviendas completas",private_room:"Solo habitaciones privadas",sort_by:"Ordenar por",sort_distance:"Proximidad",sort_newest:"Más nuevo",sort_highest_rated:"Mejor valorado",no_results:"Sin resultados para estos filtros",try_wider_dates:"Prueba con otras fechas",try_wider_radius:"Prueba a más distancia",loading:"Cargando casas…",error:"No pudimos cargar las casas. Intenta de nuevo más tarde.",search_btn:"Buscar",loading_dots:"…",show_result:"Mostrando {count} casa",show_results:"Mostrando {count} casas",no_homes_title:"Sé el primero aquí",no_homes_desc:"Publica tu casa para que otros escaladores puedan visitarte cuando tú estés fuera.",publish_home:"Publicar mi casa"}},en:{buttons:{cancel:"Cancel",edit:"Edit",delete:"Delete",save:"Save",save_route:"Save route",close:"Close",reopen:"Reopen",next:"Next →",prev:"← Previous",confirm:"Yes, confirm",send:"→",clear_filters:"Clear filters",select:"Select…"},common:{not_linked:"Not linked",not_specified:"Not specified",no_grade:"No grade"},nav:{home:"Home",community:"Community",crags:"Schools",homes:"Homes",map:"Map",topos:"Topos",reviews:"Route reviews",guides:"Guides",about:"About us",help:"Help",profile:"My profile",dashboard:"My panel",admin:"Admin",login:"Login",signup:"Join",logout:"Logout",language:"Select language",explore:"Explore",find_partner:"Find partner"},buttons:{save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",publish:"Publish",close:"Close",submit:"Submit",send:"Send",search:"Search",filter:"Filter",clear:"Clear",more:"View more",less:"View less",loading:"Loading...",retry:"Retry",confirm:"Confirm",reject:"Reject",approve:"Approve",preapprove:"Pre-approve",contact:"Contact",message:"Message",reply:"Reply",view_croquis:"View or upload topos",
63share_climb:"Share climb",join_free:"Join for free",already_have_account:"I already have an account"},forms:{required_field:"Required field",invalid_email:"Invalid email",password_too_short:"Password must be at least 8 characters",passwords_dont_match:"Passwords don't match",error_saving:"Error saving. Try again.",success:"Saved successfully",confirm_delete:"Are you sure you want to delete this?",name:"Name",email:"Email",password:"Password",confirm_password:"Confirm password",description:"Description",location:"Location",country:"Country",province:"Province",municipality:"Municipality"},homes:{title:"Homes",my_homes:"My homes",add_home:"Add home",edit_home:"Edit home",delete_home:"Delete home",publish_home:"Publish home",available:"Available",not_available:"Not available",complete_house:"Entire house",private_room:"Private room",capacity:"Capacity",guests:"guests",dates:"Dates",check_in:"Check-in",check_out:"Check-out",amenities:"Amenities",rules:"Rules",nearby_crags:"Nearby climbing schools",difficulty_levels:"Difficulty levels",climbing_types:"Climbing types",climbing_area:"Climbing area",about_home:"About this home",contact_host:"Contact host",no_homes:"No homes in this area yet",empty_state_cta:"Publish my home here"},exchange:{exchange_request:"Exchange request",send_request:"Send request",pending:"Pending",preapproved:"Pre-approved",approved:"Approved",completed:"Completed",declined:"Declined",my_exchanges:"My exchanges",requests_sent:"Requests sent",requests_received:"Requests received",preapproved_exchanges:"Pre-approved exchanges",upcoming:"Upcoming exchanges",past:"Past exchanges",exchange_details:"Exchange details",message_to_host:"Message to host",view_request:"View request and reply",confirm_exchange:"Confirm exchange",decline_exchange:"Decline exchange",preapprove_exchange:"Pre-approve exchange",guest_reviews:"Guest reviews",host_reviews:"Host reviews"},climbing:{crags:"Climbing schools",sectors:"Sectors",routes:"Routes",grade:"Grade",style:"Style",sport:"Sport",boulder:"Boulder",classic:"Classic",reviews:"Reviews",ratings:"Ratings",conditions:"Conditions",best_season:"Best season",dry:"Dry",wet:"Wet",community_grade:"Community grade",i_climbed_it:"I've climbed it",save:"Save",view_reviews:"View reviews",add_review:"Add review",saved_items:"Saved routes",ascents:"Ascents",comments:"Comments",no_comments:"No comments yet",register_to_comment:"Register to comment"},topos:{title:"Topos",add_topo:"Upload topo",school:"School",sector:"Sector",route:"Route",images:"Images",description:"Description",my_topos:"My topos",public_gallery:"Public gallery",upload_images:"Upload images",max_images:"Maximum 3 images",no_download:"Images cannot be downloaded"},map:{title:"Map",be_first_here:"Be first here",publish_your_house:"Publish your house",available_climbers:"Available climbers",available_houses:"Available houses",climbing_schools:"Climbing schools",guides:"Guides",filter:"Filter",zones_without_house:"Zones without house",zoom_in:"Zoom in for details",legend:"Legend",search_location:"Search location",no_results:"No results"},climb_points:{title:"ClimbPoints",balance:"Balance",earned:"Earned",spent:"Spent",bonus:"Bonus",founder_bonus:"Founder bonus",welcome_bonus:"Welcome bonus",publish_home:"Publish home",share_knowledge:"Share knowledge",exchange_system:"Exchange system",how_it_works:"How it works",points_rules:"ClimbPoints rules",availability:"Availability",accommodation:"Accommodation",exchange_cost:"Exchange cost",transaction_history:"Transaction history"},messages:{title:"Messages",new_message:"New message",private_messages:"Private messages",conversations:"Conversations",no_messages:"You have no messages yet",unread:"Unread",mark_as_read:"Mark as read",type_message:"Type your message...",send:"Send",find_member:"Find member",chat_with:"Chat with"},profile:{my_profile:"My profile",edit_profile:"Edit profile",avatar:"Avatar",bio:"Bio",location:"Location",climbing_level:"Climbing level",favorite_zones:"Favorite zones",available_to_climb:"Available to climb",styles:"Favorite styles",preferences:"Preferences",safety_verification:"Safety verification",privacy_settings:"Privacy settings",account_settings:"Account settings",change_password:"Change password",delete_account:"Delete account",export_data:"Export data",blocked_users:"Blocked users",marketing_consent:"Get news and updates"},admin:{title:"Administration",dashboard:"Admin dashboard",users:"Users",homes:"Homes",schools:"Schools",reports:"Reports",moderation:"Moderation",escalators:"Climbers",climb_points_tab:"ClimbPoints",stats:"Statistics",settings:"Settings",pending_reports:"Pending reports",resolved:"Resolved",declined:"Declined",duplicate_schools:"Duplicate schools",merge_schools:"Merge schools",block_user:"Block user",delete_review:"Delete review"},errors:{not_found:"Not found",unauthorized:"Unauthorized",forbidden:"Access denied",server_error:"Server error. Try again.",network_error:"Network error. Check your connection.",must_login:"You must log in",must_register:"You must register",email_not_verified:"Verify your email to continue",email_already_in_use:"This email is already registered",invali
63d_credentials:"Invalid email or password",no_results:"No results",empty_state:"No content here yet",try_again:"Try again",loading_error:"Error loading. Try again.",save_error:"Error saving",delete_error:"Error deleting"},auth:{sign_up:"Sign up",sign_in:"Sign in",sign_out:"Sign out",forgot_password:"Forgot your password?",reset_password:"Reset password",verify_email:"Verify email",email_verification_sent:"We've sent you a verification email",check_inbox:"Check your inbox",click_link_verify:"Click the link to verify your account",resend_verification:"Resend verification email",account_created:"Account created! Welcome to Climb & Home.",password_reset_sent:"We've sent you a password reset link",password_changed:"Password changed successfully",terms_accepted:"I have read and accept the Terms of use and Privacy policy",marketing_signup:"Get news about Climb & Home",onboarding_welcome:"Welcome to Climb & Home",onboarding_step1:"Complete your profile",onboarding_step2:"Add your home",onboarding_step3:"Explore the community"},legal:{terms:"Terms of use",privacy:"Privacy policy",cookies:"Cookie policy",legal_notice:"Legal notice",gdpr:"GDPR",cancellation_policy:"Cancellation policy",i_accept:"I accept",i_decline:"I decline"},signup:{title:"Join free",subtitle:"Homes, climbing schools and community",name_label:"Your name or nickname",name_placeholder:"How they call you at the wall",email_label:"Email",email_placeholder:"[email protected]",password_label:"Password",password_placeholder:"At least 8 characters",show_password:"show",hide_password:"hide",submit:"Create account free",submitting:"Creating your account…",legal_accept:"I have read and accept the",terms_of_use:"Terms of use",and:"and the",privacy_policy:"Privacy policy",already_member:"Already have an account?",login_link:"Sign in"},login:{title:"Sign in",subtitle:"Continue with your account",email_label:"Email",email_placeholder:"[email protected]",password_label:"Password",password_placeholder:"Your password",show_password:"show",hide_password:"hide",submit:"Sign in",submitting:"Signing in…",no_account:"Don't have an account?",signup_link:"Sign up free"},footer:{copyright:"© 2026 CLIMB & HOME — Home exchange for climbers",about:"About us",homes:"Homes",schools:"Schools",topos:"Topos",community:"Community",help:"Help",contact:"Contact",terms:"Terms",privacy:"Privacy",legal:"Legal",presentation:"View CLIMB & HOME presentation"},homes_page:{title:"Climbers' homes",subtitle:"Stay by exchanging homes with locals who know the best routes in the area",gate_title:"Homes are for the community only",gate_desc:`Climbers from all over Europe share their home when they go climbing elsewhere.
64Sign up free to see where and when they're available.`,gate_signup:"Create account",gate_login:"Already have an account",zone_filter:"Climbing zone…",climbers_filter:"Climbers",climber_1:"1 climber",climber_2:"2 climbers",climber_3:"3 or more",climber_4:"4 or more",climber_6:"6 or more",climber_8:"8 or more",from_date:"Arrival date",to_date:"Departure date",pets_allowed:"Pets welcome",clear_filters:"Clear filters",nights:"night",guests:"guests",balance:"Balance:",available_homes:"home",available:"available",calculating_for:"calculating for",no_homes_title:"Be the first here",no_homes_desc:"No homes available in this area. Sign up and publish your home.",no_homes_zone:"This area has amazing climbing but there are no hosts yet. If you live nearby, publishing your home here has a lot of value for the community.",no_homes_expand:"Try expanding your filters or search in another zone.",no_homes_growing:"The community is growing. Publish your home and be the first host — that has a lot of value for climbers searching in your zone.",remove_filters:"Remove filters and see all",publish_home:"Publish my home"},routes_page:{title:"Schools around the world",subtitle:"Local knowledge shared by climbers from across the planet",schools_listed:"schools cataloged worldwide",search_schools:"Search schools",search_placeholder:"Search by name, country, zone or grade…",search_non_member:"Search by name, country or zone…",clear_search:"
64Clear search",directory_members_only:"Directory is for members only",directory_desc:"Over 700 climbing schools worldwide, with sectors, reviews and community tips. Sign up free to access.",create_account:"Create account free",already_have_account:"Already have an account — sign in",loading:"Loading…",error_loading:"Couldn't load content. Check your connection.",retry:"Retry",no_results:"No schools match your search.",clear_filters:"Clear filters",schools_on_map:"Schools on the map",community_recommendations:"Community recommendations",view_on_map:"View on map →",view_school:"View school →",view_reviews:"Reviews →"},comunidad:{badge:"Climbing community",hero_title:"WE ARE CLIMBERS",hero_subtitle:"WHO TRAVEL TOGETHER",hero_desc:"Here every member contributes something real: a review, a topo, a roof to stay under. What you know about the rock matters a lot to whoever comes next — and vice versa.",join_cta:"Join me — it's free",view_topos:"View topos",about_us:"About us",join_title:"JOIN THE COMMUNITY",join_desc:"Members can rate routes, respond to reviews and share their own rock experiences.",recent_reviews:"RECENT REVIEWS",recent_reviews_desc:"What the community says about the routes",view_all:"See all"},profile:{my:"My",profile:"profile",identity_desc:"Your identity in the climbing community — what hosts see before accepting your request.",change_photo:"Change profile photo",your_photo:"Your profile photo",upload_photo:"Upload photo",photo_ready:"Photo ready — press 'Save changes' to publish it",climbing_level:"Climbing level",available_to_climb:"Available to share climbs",location:"Location",save_profile:"Save profile",saving:"Saving…",saved:"Profile saved",error:"Error saving. Try again.",guest_ratings:"Ratings as a guest",host_ratings:"Ratings as a host",no_guest_reviews:"No guest ratings yet",no_host_reviews:"No host ratings yet"},home:{headline:`Climb
65and travel`,tagline:"The climbing community",description:"Exchange your home with other climbers. Be part of a global community.",search_crag:"Which climbing school do you want to visit?",browse_homes:"Browse homes",browse_schools:"Browse schools",view_map:"View the map",featured_homes:"Climbers who open their door",featured_homes_desc:"Climbers who open their home and know where to climb",top_destinations:"Top destinations",how_works:"How it works",how_works_subtitle:"More than a home exchange — an exchange of knowledge between climbers.",step1_title:"Join the community",step1_desc:"Create your profile, add your home and describe the climbing zones nearby.",step2_title:"Find a local host",step2_desc:"Search for homes in the destinations you're interested in. The host shares local information about the areas they know.",step3_title:"Share the knowledge",step3_desc:"Share information about the zones and routes you know, as long as its sharing is permitted. A useful complement to existing guides.",grow_cta:"Help us grow",grow_desc:"Publish your home and get 300 additional CP. If you're one of the first 100 founders, add 100 CP more.",publish_home:"Publish my home",stories_title:"This is how we imagine exchanges",stories_subtitle:"Fictional stories that reflect what we want to build together. Yours will come soon.",stories_cta:"Join and share yours →",fictional_badge:"Fictional example",review_question:"Want to leave your own review after your first exchange?",signup_and_review:"Sign up and start →",good_schools_title:"Do you have good climbing schools near your home?",good_schools_desc:"Share your home with the climbing community and in return discover incredible zones with locals.",start_now:"Get started"},dashboard:{reviews:{rating_general:"Overall experience",rating_home:"The accommodation",rating_cleanliness:"Cleanliness and condition",rating_accuracy:"Matched the listing",rating_communication:"Communication",rating_respect:"Respect for home and belongings",rating_cleanliness_guest:"Cleanliness and care when leaving",rating_agreement_guest:"Compliance with agreement",rating_communication_guest:"Communication and behavior",rating_accuracy_host:"Home matched the description",rating_communication_host:"Communication and responsiveness",rating_agreement_host:"Compliance with agreement",rating_condition:"Condition of the home",rating_support:"Support during issues",validate_rating:"Please rate at least the first criteria.",save_error:"Could not save rating.",guest_title:"Rate your experience as a guest",host_title:"Rate your experience as a host",guest_subtitle:"Tell us how the host and house were",host_subtitle:"Tell us how the guest behaved",comment_placeholder:"Tell us how the experience was…",sending:"Sending…",send_rating:"Send rating",sent_success:"Rating sent!",sent_notice:"It will be published when the other party also rates — so no one is conditioned by the other's opinion."},homes:{title_required:"Title is required.",location_required:"Location is required.",must_login:"You must be logged in to add a home.",title_label:"Title of your home *",title_example:"e.g. House in El Chorro",location_label:"Mu
65nicipality *",location_example:"e.g. Valle de Aisa, Arenas de Cabrales, El Chorro…",country_label:"Country",country_example:"Spain",description_label:"Description",description_placeholder:"Tell us about your home and surroundings…",climbing_areas_label:"Climbing schools",climbing_areas_placeholder:"Describe the sectors, approaches, rock type…",max_guests_label:"Maximum number of climbers",max_guests_example:"2",saving:"Saving…",publish_button:"Publish home",accommodation_full:"Entire home",accommodation_full_desc:"The guest has the entire home",accommodation_private:"Private room",accommodation_private_desc:"Room in your home, shared common areas",room_details_title:"Private room details",bed_type_label:"Bed type",bed_double:"Double bed",bed_twin:"Two single beds",bed_single:"Single bed",bed_bunk:"Bunk beds",bath_private:"Private bathroom",kitchen_shared:"Shared kitchen",host_present:"Host present during stay"},extras:{escuela_cercana:"Climbing school within 50 km",parking_bicis:"Parking / garage for bikes and gear",rocodromo_cercano:"Climbing gym within 20 km",wifi:"WiFi",mascotas:"Pets allowed"},difficulties:["Alpine","Classic Climbing","Sport Climbing","Bouldering","Hiking","Mountain Biking","Mountain Biking"]},dashboard:{my_homes:"My homes",add_home:"Add home",reviews:"Reviews",sketches:"Sketches",my_places:"My places",exchanges:"Exchanges",companions:"Partners",requests:"Requests",accommodation_type_label:"Accommodation type *",private_home:"Private home (yours)",private_room:"Private room",shared_room:"Shared room",common_areas_label:"Common areas available",common_areas_placeholder:"e.g. living room, terrace, garden…",house_rules_label:"House rules",house_rules_placeholder:"e.g. no smoking indoors, arrival before 10pm…",description_label:"Description",climbing_areas_label:"Nearby climbing areas",activities_label:"Nearby activities",photos_label:"Photos of your home",photos_hint:"(up to 6 · drag to reorder)",value_in_climbpoints:"Value in ClimbPoints",base_value_desc:"Base by capacity ({guests} CP) + extras marked (max. +40 CP). The platform calculates value — you cannot modify it.",available_for_exchange:"Available for exchange now",sketch_type_label:"Type",sketch_sport:"Sport climbing",sketch_classic:"Classic climbing",sketch_btt:"Mountain biking",sketch_hiking:"Hiking",sketch_croquis:"Sketches / Topo",sketch_photo:"Photo gallery",sketch_sector_label:"Sector / area",sketch_grade_label:"Grade",sketch_description_label:"Description / beta",sketch_photos_label:"Photos or sketches",sketch_photos_hint:"(up to 5)",loading:"Loading…",tip_home_label:"Home it belongs to *",select_home:"Select a home"},homes_page:{title:"Climber homes",subtitle:"Stay by exchanging houses with locals who know the best routes in the area",gate_title:"Houses are for community members only",gate_desc:`Climbers from all over Europe share their home when they go climbing elsewhere.
66Sign up free to see where and when they're available.`,join_free:"Join free — it's instant",already_member:"I already have an account",signup_easy:"Just name, email and password. No card, no extra steps.",search_school:"School, town, zone…",search_placeholder:"School, town, zone…",climbing_zone:"Climbing zone…",num_guests:"Climbers",guest_1:"1 climber",guest_2:"2 climbers",guest_3:"3 or more",guest_4:"4 or more",guest_6:"6 or more",guest_8:"8 or more",arrival_date:"Arrival date",departure_date:"Departure date",pets_only:"Pets",full_house:"Full houses only",private_room:"Private rooms only",sort_by:"Sort by",sort_distance:"Proximity",sort_newest:"Newest",sort_highest_rated:"Best rated",no_results:"No results for these filters",try_wider_dates:"Try different dates",try_wider_radius:"Try a wider radius",loading:"Loading homes…",error:"We couldn't load the homes. Try again later.",search_btn:"Search",loading_dots:"…",show_result:"Showing {count} home",show_results:"Showing {count} homes",no_homes_title:"Be the first here",no_homes_desc:"Publish your home so other climbers can visit you when you're away.",publish_home:"Publish my home",no_homes:"You haven't published any homes yet",no_requests:"No pending requests",no_reviews:"No reviews yet",no_places:"No saved places",exchange_status_pending:"Pending",exchange_status_accepted:"Accepted",exchange_status_declined:"Declined",exchange_from:"From",exchange_to:"To",exchange_message:"Requester's message",publish_home:"Publish home",update_home:"Update home",delete_home:"Delete home",add_review:"Add review",add_sketch:"Add sketch",add_tip:"Add information",accept_exchange:"Accept exchange",decline_exchange:"Decline",publish_review:"Publish review",review_as_host:"As a host",review_as_guest:"As a guest",rating_label:"Rating",review_text_label:"Your review",publish_both:"Publish both reviews",field_required:"Field required",max_chars:"Maximum {max} characters"},dashboard:{add_home:"Add home",my_homes:"My homes",my_places:"My places",exchanges:"Exchanges",reviews:"Reviews",sketches:"Sketches",cordada_page:{title:"Find a climbing partner",subtitle:"Find your next rope party",publish_search:"+ Publish rope party search",cancel:"✕ Cancel",zone_label:"Zone or school *",zone_placeholder:"e.g. Atxarte, Siurana, Mallorca…",level_label:"Approximate level",any_level:"Any level",from_label:"From",to_label:"To",modality_label:"Modality",message_label:"Message (optional)",message_placeholder:"Tell us more about what you're looking for…",publish_button:"Publish",publishing:"Publishing…",signup_prompt:"Sign up to publish your rope party search",create_account:"Create free account",filter_by_zone:"Filter by zone…",all_levels:"All levels",loading:"Loading…",no_results:"No results",member_badge:"Member",reopen:"Reopen",delete:"Delete",level_iniciacion:"Beginner",level_intermedio:"Intermediate",level_avanzado:"Advanced",level_experto:"Expert",modality_deportiva:"Sport climbing",modality_clasica:"Classic climbing",modality_bulder:"Bouldering",modality_montana:"Mountain",modality_viaferrata:"Via ferrata",modality_btt:"Mountain biking",modality_senderismo:"Hiking"},topos_page:{title:"Climbing Topos",subtitle:"Upload and view route maps",search_placeholder:"Search by route, zone, sector or grade…",all_styles:"All",close:"Close",previous:"Previous",next:"Next",login_to_view:"Route — sign in to view",viewing_topo:"View topo for {{name}}",topo_title:"Topo: {{name}}",loading:"Loading…",error_loading:"Error loading topos",no_topos:"No topos available",style_filter:"Style",member_only:"Members only"},manifesto_page:{title:"About Us",subtitle:"The community of climbers who stay together",hero_description:"Climb & Home connects climbers worldwide to exchange houses and unique climbing experiences.",values_title:"Our values",value_1_title:"Community first",value_1_desc:"We believe in the strength of climbers united, sharing routes and homes.",value_2_title:"Total transparency",value_2_desc:"No middlemen. Directly between members, with verified trust.",value_3_title:"Sustainable climbing",value_3_desc:"Less mass tourism, more local connection with the communities we host.",value_4_title:"Real inclusion",value_4_desc:"For all levels: from beginners to experienced alpinists.",timeline_title:"Our journey",timeline_2024:"The idea is born: connecting European climbers",timeline_2025:"First beta platform with 50 members",timeline_2026:"Global expansion and 500+ registered houses",team_title:"The team",team_description:"We are climbers, developers and designers passionate about community.",join_cta:"Join our community of climbers",houses_cta:"Publish your house now"},select_home:"Select a home",sketch_sport:"Sport climbing",sketch_classic:"Classic climbing",sketch_btt:"Mountain bike route",sketch_hiking:"Hiking",sketch_croquis:"Sketch / Topo",sketch_photo:"Photo",homes:{title_label:"Title *",title_example:"Eg: House with river views",title_required:"Title is required",description_label:"Description",location_label:"Location *",location_example:"Eg: Potes, Cantabria",location_required:"Location is required",country_label:"Country *",country_example:"Spain",max_guests_label:"Max guests",max_guests_example:"Eg: 4",accommodation_full:"Entire home",accommodation_full_desc:"Everything for you: bedrooms, kitchen, bathroom",accommodation_private:"Private room",accommodation_private_desc:"Your own space; shared common areas",room_details_title:"Room details",bed_type_label:"Bed type",bed_single:"Single bed",bed_double:"Double bed",bed_twin:"Twin beds",bed_bunk:"Bunk bed",bath_private:"Private bathroom",kitchen_shared:"Shared kitchen",host_present:"Host present",publish_button:"Publish home",saving:"Saving…",must_login:"You must log in to publish a home"},reviews:{rating_general:"Overall experience",rating_home:"Home description",rating_cleanliness:"Cleanliness",rating_accuracy:"Accuracy",rating_communication:"Communication",rating_respect:"Rule compliance",rating_cleanliness_guest:"Guest cleanliness",rating_agreement_guest:"Condition agreement",rating_communication_guest:"Guest communication",rating_accuracy_host:"Host accuracy",rating_communication_host:"Host communication",rating_agreement_host:"Agreement compliance",rating_condition:"Home condition",rating_support:"Support received",guest_title:"Rate your host",guest_subtitle:"What did you think of your host?",host_title:"Rate your guest",host_subtitle:"What did you think of your guest?",comment_placeholder:"Tell us about your experience (optional)…",send_rating:"Send rating",sending:"Sending…",sent_success:"Rating sent!",sent_notice:"Your rating will show after the other user responds (blind system)",validate_rating:"Please select at least one rating",save_error:"Error saving rating"},extras:{wifi:"WiFi",parking_bicis:"Bike parking",rocodromo_cercano:"Nearby climbing gym",escuela_cercana:"Nearby climbing school",mascotas:"Pets allowed"}},admin_page:{tabs:{resumen:"Summary",usuarios:"Users",escaladores:"Climbers",casas:"Homes",intercambios:"Exchanges",climbpoints:"ClimbPoints",estadisticas:"Statistics",promociones:"Promotions",escuelas:"Schools",moderacion:"Moderation",guias_pro:"Pro Guides"},stats:{visitas_sesiones:"Visits / Sessions",paginas_vistas:"Page views in period",visitantes_unicos:"Unique visitors (est.)",estimado_sesion:"Estimated by session fingerprint",nuevos_miembros:"New members",registros_totales:"Total records",casas_publicadas:"Published homes",alojamientos_activos:"Active accommodations",solicitudes_intercambio:"E
66xchange requests",pendientes:"pending",intercambios_confirmados:"Confirmed exchanges",estado_aceptado:"Status: accepted",total_miembros:"Total members",miembros_fundadores:"Founder members",consentimiento_marketing:"Marketing consent",con_ubicacion_gps:"With GPS location",disponibles_ahora:"Available now",no_disponibles:"Not available",escaladores_disponibles:"Available climbers"},resumen_tab:{visitantes:"Visitors",miembros:"Members",casas:"Homes",solicitudes:"Requests",confirmados:"Confirmed exchanges",funnel_title:"Conversion funnel",funnel_registro:"Registration",funnel_perfil:"Profile",funnel_casa:"Home",funnel_solicitud:"Request"},usuarios_tab:{nombre:"Name",email:"Email",ubicacion:"Location",fecha_registro:"Registration date",zonas_habituales:"Usual zones",estilo_escalada:"Climbing style",nivel_escalada:"Climbing level",accion_borrar:"Delete",borrando:"Deleting…",seguro:"Sure?",sin_nombre:"No name",error_borrar:"Could not delete: ",buscar_nombre_pais:"Search by name or country…"},escaladores_tab:{activos:"Available climbers",nombre:"Name",ubicacion:"Location",pais:"Country",nivel:"Level",zonas:"Usual zones",estilos:"Styles",disponibilidad:"Availability"},casas_tab:{nombre:"Home",ubicacion:"Location",pais:"Country",abierta:"Open for exchanges",solicitudes_pendientes:"Requests",fecha_publicacion:"Published",detalles:"Details"},intercambios_tab:{desde:"From",hasta_casa:"To home",estado:"Status",fecha:"Date",pendiente:"Pending",aceptado:"Accepted",rechazado:"Rejected",nota:"Note or incident",anadir_nota:"Add note or incident…",guardar_nota:"Save",eliminar_nota:"Delete note",sin_solicitudes:"No exchange requests yet.",sin_notas:"No notes"},climbpoints_tab:{miembros:"Total members",fundadores:"Founder members",marketing:"Marketing consent",entregadas:"Delivered: {count}/100",saldo:"CP Balance",badge_fundador:"Founder Member",fecha_asignacion:"Assignment date"},estadisticas_tab:{canales:"Referral channels",navegador:"Browser",dispositivo:"Device",sistema:"Operating system",desktop:"Desktop",mobile:"Mobile",tablet:"Tablet"},promociones_tab:{estado:"Status",activa:"Active",inactiva:"Inactive",titulo:"Title",puntos:"Points",plazas_totales:"Total slots",plazas_libres:"Free slots",cupo_lleno:"Full quota",inicia:"Starts",termina:"Ends",plazas_ocupadas:"slots used",condiciones:"Conditions"},escuelas_tab:{escuelas_activas:"Active schools",sin_escuelas:"No active schools",con_filtros:"with that filter",base_propia:"Own base",aportadas_comunidad:"Community-contributed",total:"Total",sectores:"Sectors",vias:"Routes",zona:"Zone",pais:"Country",continente:"Continent",nivel:"Level",tipo:"Type",resumen:"Summary",coordenadas:"Coordinates",sin_coordenadas:"no coordinates",eliminar:"Delete",eliminar_escuela:"Delete this school",confirmar_fusionar:"Confirm merge",escuela_canonica:"Canonical school",fusionando:"Merging…",fusion_completada:"Merge completed!"},moderacion_tab:{resenas_marcadas:"Flagged reviews",contenido_ilegal:"Illegal content / inappropriate photos",contenido_ofensivo:"Offensive content",acceso_incorrecto:"Incorrect access or safety",duplicado:"Duplicate",otros:"Other reason",descartar:"Dismiss",descartado:"Dismissed",ocultar:"Hide",restaurar:"Restore",duplicados_escuelas:"School duplicates",duplicado_de:"Duplicate of",pendientes:"Pending",resueltos:"Resolved/Dismissed"},guias_tab:{sin_solicitudes:"No guide requests yet.",nombre:"Name",estado:"Status",fecha_solicitud:"Request date",aprobada:"Approved",preaprobada:"Pre-approved",en_curso:"In progress",finalizado:"Completed",confirmar:"Confirm",rechazar:"Reject"},email_queue:{cola_pendiente:"Pending queue",enviar_correos:"Send {count} pending email(s)",cola_marcada:"Queue marked — run the send script from the server to complete sending.",enviando:"Sending…",enviados:"{count} email(s) sent!",error_envio:"Error sending emails: "},common:{buscar:"Search…",sin_resultados:"No results",cargando:"Loading…",error:"Error",cerrar:"Close",cancelar:"Cancel",guardar:"Save",eliminar:"Delete",editar:"Edit",detalles:"Details",volver:"Back"}},reviews_page:{hero_subtitle:"Climbing Community",hero_title:"Route Reviews",hero_description:"When you upload a review or a sketch, think about the route setter who opened that climb. Their work deserves to be described with respect — real conditions, honest grade, and the credit they deserve.",publish_review_btn:"Publish Review",register_to_publish:"Sign up to publish",safety_warnings:"warning{plural}s about safety or access in the community",filter_safety_access:'Filter by "Safety" or "Access" to see them first.',reviews_published:"review{plural}s published",of_total:"of {total} total",gate_title:"Reviews are for the community",gate_description:"Create a free account to read and publish reviews, vote on grades, and share what you know about each route.",create_account:"Create free account",already_have_account:"I already have an account",search_placeholder:"Search by route, school, sector, zone or municipality…",filter_all:"All",f
66ilter_personal:"Personal experience",filter_safety:"⚠️ Safety / equipment",filter_access:"🚧 Access / restriction",filter_conditions:"🌦 Current conditions",style_all:"All",style_sport:"Sport",style_classic:"Traditional",style_boulder:"Boulder",style_psicobloc:"Psicobloc",style_alpine:"Alpine",style_hiking:"Hiking",style_ski:"Ski",style_btt:"MTB",no_results:"No reviews match your search.",no_reviews_yet:"No reviews published yet.",clear_filters:"Clear filters →",be_first:"Be the first to review →",loading_reviews:"Loading reviews",error_loading:"Could not load reviews.",retry:"Try again",stars_label:"out of 5 stars",stars_one:"1 star",stars_many:"{n} stars",report_review:"Report this review",report_title:"Report Review",report_description:"Select a reason. It won't be deleted automatically — a moderator will review it.",report_reason:"Reason",report_spam:"Spam or irrelevant content",report_incorrect:"Incorrect information",report_offensive:"Offensive content",report_safety:"Real safety issue",report_other:"Other reason",report_details:"Additional details (optional)",report_details_placeholder:"Briefly explain the problem…",report_send:"Send report",report_sent:"Reported ✓",debates:"discussion{plural}s",open_discussion:"Open to discussion",close_discussion:"Close discussion",discu
66ssions_title:"Discuss / comment",discussions_tooltip:"Discuss this review",add_comment:"Add a comment…",reply_text:"Write your reply…",comment_button:"Comment",register_to_comment:"to comment",ascent_title:"Mark as ascent",ascent_remove:"Remove from my ascents",ascent_label:"I've climbed it",ascent_removed:"Climbed",save_title:"Save",save_remove:"Remove from saved",save_label:"Save",save_saved:"Saved",community_grade:"Community:",total_votes_one:"1 vote",total_votes_many:"{n} votes",grade_proposal_title:"See grade proposal distribution",grade_votes_title:"See vote distribution",topos_button:"View or upload sketches for this route",edit_my_review:"Edit my review",close_form:"Close form",rock_condition_label:"Rock condition",best_season_label:"Best season",rock_info_dry:"Dry, perfect",rock_info_example:"Oct–Apr",location:"Location",uploaded_by:"Uploaded by",form_title:"Write a Review",step_1:"1. Where did you climb?",step_2:"2. Your experience",step_3:"3. Type of contribution",school_label:"School / Zone *",school_placeholder:"e.g. Siurana, Atxarte, El Chorro…",sector_label:"Sector",sector_placeholder:"No sector / I don't know",sector_select:"Select…",route_name_label:"Route Name *",route_name_placeholder:"e.g. Rabadá-Navarro, La Rambla…",grade_label:"Grade",grade_placeholder:"e.g. 7c+, 6a, V7, MD…",style_label:"Style",rating_label:"Rating *",review_text_label:"Your review",review_text_description:"Description",review_text_placeholder:"Share your experience: key moves, atmosphere, rock quality, access, route setter…",review_text_safety:"Describe the safety issue or equipment condition…",review_text_access:"Describe the access, restriction, or current situation…",review_text_conditions:"Describe current rock and weather conditions…",conditions_label:"Rock condition",conditions_placeholder:"e.g. Dry, perfect…",best_season:"Best season",best_season_placeholder:"e.g. Oct–Apr…",photos_label:"Photos (up to 3, optional)",form_publish:"Publish Review",form_publishing:"Publishing…",form_cancel:"Cancel",form_error:"Could not save. Please try again.",add_school_title:"Create New School",school_name_label:"School Name",school_country_label:"Country",school_country_placeholder:"e.g. Spain",school_region_label:"Region",school_municipality_label:"Municipality",school_type_label:"Type",school_type_sport:"Sport",school_location_label:"Location (if known)",school_location_searching:"Searching on the map…",school_location_success:"✓ {lat}, {lng}",school_location_error:"Could not geocode",school_summary_label:"Summary",school_season_label:"Season",school_save_error:"Could not save",select_route:"Select existing route…",add_new_route:"Create new route",styles_all:"All",styles_options:"Sport|Traditional|Boulder|Psicobloc|Alpine|Hiking|Ski|MTB",required_field:"Field is required",zone_required:"Zone / school is required",route_name_required:"Route name is required",rating_required:"Rating is required",review_text_required:"Review is required"}},fr:{buttons:{cancel:"Annuler",edit:"Modifier",delete:"Supprimer",save:"Enregistrer",save_route:"Enregistrer la voie",close:"Fermer",reopen:"Rouvrir",next:"Suivant →",prev:"← Précédent",confirm:"Oui, confirmer",send:"→",clear_filters:"Effacer les filtres",select:"Sélectionner…"},common:{not_linked:"Non lié",not_specified:"Non spécifié",no_grade:"Pas de cotation"},nav:{home:"Accueil",community:"Communauté",crags:"Écoles",homes:"Maisons",map:"Carte",topos:"Topos",reviews:"Critiques de voies",guides:"Guides",about:"Qui sommes-nous",help:"Aide",profile:"Mon profil",dashboard:"Mon tableau",admin:"Admin",login:"Connexion",signup:"Rejoindre",logout:"Déconnexion",language:"Sélectionner la langue",explore:"Explorer",find_partner:"Trouver un partenaire"},buttons:{save:"Enregistrer",cancel:"Annuler",delete:"Supprimer",edit:"Modifier",publish:"Publier",close:"Fermer",submit:"Soumettre",send:"Envoyer",search:"Rechercher",filter:"Filtrer",clear:"Effacer",more:"Plus",less:"Moins",loading:"Chargement...",retry:"Réessayer",confirm:"Confirmer",reject:"Rejeter",approve:"Approuver",preapprove:"Pré-approuver",contact:"Contacter",message:"Message",reply:"Répondre",view_croquis:"Voir ou uploader des topos",
66share_climb:"Partager une ascension",join_free:"Rejoindre gratuitement",already_have_account:"J'ai déjà un compte"},forms:{required_field:"Champ obligatoire",invalid_email:"Email invalide",password_too_short:"Le mot de passe doit contenir au moins 8 caractères",passwords_dont_match:"Les mots de passe ne correspondent pas",error_saving:"Erreur lors de l'enregistrement. Réessayez.",success:"Enregistré avec succès",confirm_delete:"Êtes-vous sûr de vouloir supprimer ceci ?",name:"Nom",email:"Email",password:"Mot de passe",confirm_password:"Confirmer le mot de passe",description:"Description",location:"Localisation",country:"Pays",province:"Province",municipality:"Commune"},homes:{title:"Maisons",my_homes:"Mes maisons",add_home:"Ajouter une maison",edit_home:"Modifier la maison",delete_home:"Supprimer la maison",publish_home:"Publier la maison",available:"Disponible",not_available:"Non disponible",complete_house:"Maison entière",private_room:"Chambre privée",capacity:"Capacité",guests:"personnes",dates:"Dates",check_in:"Arrivée",check_out:"Départ",amenities:"Équipements",rules:"Règles",nearby_crags:"Écoles d'escalade à proximité",difficulty_levels:"Niveaux de difficulté",climbing_types:"Types d'escalade",climbing_area:"Zone d'escalade",about_home:"À propos de cette maison",contact_host:"Contacter l'hôte",no_homes:"Aucune maison dans cette zone pour l'instant",empty_state_cta:"Publier ma maison ici"},exchange:{exchange_request:"Demande d'échange",send_request:"Envoyer une demande",pending:"En attente",preapproved:"Pré-approuvée",approved:"Approuvée",completed:"Complétée",declined:"Refusée",my_exchanges:"Mes échanges",requests_sent:"Demandes envoyées",requests_received:"Demandes reçues",preapproved_exchanges:"Échanges pré-approuvés",upcoming:"Échanges à venir",past:"Échanges passés",exchange_details:"Détails de l'échange",message_to_host:"Message à l'hôte",view_request:"Voir la demande et répondre",confirm_exchange:"Confirmer l'échange",decline_exchange:"Refuser l'échange",preapprove_exchange:"Pré-approuver l'échange",guest_reviews:"Évaluations en tant qu'invité",host_reviews:"Évaluations en tant qu'hôte"},climbing:{crags:"Écoles d'escalade",sectors:"Secteurs",routes:"Voies",grade:"Niveau",style:"Style",sport:"Sport",boulder:"Boulder",classic:"Classique",reviews:"Critiques",ratings:"Évaluations",conditions:"Conditions",best_season:"Meilleure saison",dry:"Sec",wet:"Mouillé",community_grade:"Niveau communautaire",i_climbed_it:"Je l'ai escaladé",save:"Enregistrer",view_reviews:"Voir les critiques",add_review:"Ajouter une critique",saved_items:"Voies enregistrées",ascents:"Ascensions",comments:"Commentaires",no_comments:"Pas encore de commentaires",register_to_comment:"Inscrivez-vous pour commenter"},topos:{title:"Topos",add_topo:"Uploader un topo",school:"École",sector:"Secteur",route:"Voie",images:"Images",description:"Description",my_topos:"Mes topos",public_gallery:"Galerie publique",upload_images:"Uploader des images",max_images:"Maximum 3 images",no_download:"Les images ne peuvent pas être téléchargées"},map:{title:"Carte",be_first_here:"Soyez le premier ici",publish_your_house:"Publiez votre maison",available_climbers:"Grimpeurs disponibles",available_houses:"Maisons disponibles",climbing_schools:"Écoles d'escalade",guides:"Guides",filter:"Filtrer",zones_without_house:"Zones sans maison",zoom_in:"Zoom pour les détails",legend:"Légende",search_location:"Rechercher un lieu",no_results:"Aucun résultat"},climb_points:{title:"ClimbPoints",balance:"Solde",earned:"Gagnés",spent:"Dépensés",bonus:"Bonus",founder_bonus:"Bonus fondateur",welcome_bonus:"Bonus de bienvenue",publish_home:"Publier une maison",share_knowledge:"Partager des connaissances",exchange_system:"Système d'échange",how_it_works:"Comment ça marche",points_rules:"Règles des ClimbPoints",availability:"Disponibilité",accommodation:"Hébergement",exchange_cost:"Coût de l'échange",transaction_history:"Historique des transactions"},messages:{title:"Messages",new_message:"Nouveau message",private_messages:"Messages privés",conversations:"Conversations",no_messages:"Vous n'avez pas encore de messages",unread:"Non lu",mark_as_read:"Marquer comme lu",type_message:"Tapez votre message...",send:"Envoyer",find_member:"Trouver un membre",chat_with:"Chat avec"},profile:{my_profile:"Mon profil",edit_profile:"Modifier le profil",avatar:"Avatar",bio:"Biographie",location:"Localisation",climbing_level:"Niveau d'escalade",favorite_zones:"Zones préférées",available_to_climb:"Disponible pour escalader",styles:"Styles préférés",preferences:"Préférences",safety_verification:"Vérification de sécurité",privacy_settings:"Paramètres de confidentialité",account_settings:"Paramètres du compte",change_password:"Changer le mot de passe",delete_account:"Supprimer le compte",export_data:"Exporter les données",blocked_users:"Utilisateurs bloqués",marketing_consent:"Recevoir des actualités et des mises à jour"},admin:{title:"Administration",dashboard:"Tableau de bord admin",users:"Utilisateurs",homes:"Maisons",schools:"Écoles",reports:"Rapports",moderation:"Modération",escalators:"Grimpeurs",climb_points_tab:"ClimbPoints",stats:"Statistiques",settings:"Paramètres",pending_reports:"Rapports en attente",resolved:"Résolu",declined:"Refusé",duplicate_schools:"Écoles en doublon",merge_schools:"Fusionner les écoles",block_user:"Bloquer l'utilisateur",delete_review:"Supprimer l'avis"},errors:{not_found:"Non trouvé",unauthorized:"Non autorisé",forbidden:"Accès refusé",server_error:"Erreur serveur. Réessayez.",network_error:"Erreur réseau. Vérifiez votre connexion.",must_login:"Vous devez vous connecter",must_register:"Vous devez vous inscrire",email_not_verified:"Vérifiez votre email pour continuer",email_already_in_use:"Cet email est déjà enregistré",invalid_credentials:"Email ou mot de passe invalide",no_results:"Aucun résultat",empty_state:"Aucun contenu ici pour l'instant",try_again:"Réessayez",loading_error:"Erreur de chargement. Réessayez.",save_error:"Erreur lors de l'enregistrement",delete_error:"Erreur lors de la suppression"},signup:{title:"Rejoignez-nous gratuitement",subtitle:"Maisons, écoles et communauté",name_label:"Votre nom ou surnom",name_placeholder:"Comment tu t'appelles à la paroi",email_label:"Email",email_placeholder:"[email protected]",password_label:"Mot de passe",password_placeholder:"Au moins 8 caractères",show_password:"afficher",hide_password:"masquer",submit:"Créer compte gratuitement",submitting:"Création de votre compte…",legal_accept:"J'ai lu et j'accepte les",terms_of_use:"Conditions d'utilisation",and:"et la",privacy_policy:"Politique de confidentialité",already_member:"
66Vous avez déjà un compte ?",login_link:"Se connecter"},login:{title:"Se connecter",subtitle:"Continuez avec votre compte",email_label:"Email",email_placeholder:"[email protected]",password_label:"Mot de passe",password_placeholder:"Votre mot de passe",show_password:"afficher",hide_password:"masquer",submit:"Se connecter",submitting:"Connexion en cours…",no_account:"Pas encore de compte ?",signup_link:"S'inscrire gratuitement"},footer:{copyright:"© 2026 CLIMB & HOME — Échange de maisons pour grimpeurs",about:"À propos de nous",homes:"Maisons",schools:"Écoles",topos:"Topos",community:"Communauté",help:"Aide",contact:"Contact",terms:"Conditions",privacy:"Confidentialité",legal:"Informations légales",presentation:"Voir la présentation CLIMB & HOME"},homes_page:{title:"Maisons de grimpeurs",subtitle:"Logez-vous en échangeant des maisons avec des locaux qui connaissent les meilleures voies de la région",gate_title:"Les maisons sont réservées à la communauté",gate_desc:`Des grimpeurs du monde entier partagent leur maison quand ils vont grimper ailleurs.
67Inscrivez-vous gratuitement pour voir où et quand ils sont disponibles.`,gate_signup:"Créer un compte",gate_login:"J'ai déjà un compte",zone_filter:"Zone de grimpe…",climbers_filter:"Grimpeurs",climber_1:"1 grimpeur",climber_2:"2 grimpeurs",climber_3:"3 ou plus",climber_4:"4 ou plus",climber_6:"6 ou plus",climber_8:"8 ou plus",from_date:"Date d'arrivée",to_date:"Date de départ",pets_allowed:"Animaux acceptés",clear_filters:"Effacer les filtres",nights:"nuit",guests:"hôtes",balance:"Solde:",available_homes:"maison",available:"disponible",calculating_for:"en calculant pour",no_homes_title:"Soyez le premier ici",no_homes_desc:"Aucune maison disponible dans cette zone. Inscrivez-vous et publiez votre maison.",no_homes_zone:"Cette zone a une escalade incroyable mais il n'y a pas encore d'hôtes. Si vous habitez à proximité, publier votre maison ici a beaucoup de valeur pour la communauté.",no_homes_expand:"Essayez d'élargir vos filtres ou recherchez dans une autre zone.",no_homes_growing:"La communauté grandit. Publiez votre maison et soyez le premier hôte — cela a beaucoup de valeur pour les grimpeurs qui recherchent dans votre zone.",remove_filters:"Supprimer les filtres et voir tout",publish_home:"Publier ma maison"},routes_page:{title:"Écoles du monde",subtitle:"Connaissance locale partagée par les grimpeurs de toute la planète",schools_listed:"écoles cataloguées dans le monde entier",search_schools:"Rechercher des écoles",search_placeholder:"Recherchez par nom, pays, zone ou niveau…",search_non_member:"Recherchez par nom, pays ou zone…",clear_search:"Effacer la recherche",directory_members_only:"L'annuaire est réservé aux membres",directory_desc:"Plus de 700 écoles d'escalade dans le monde entier, avec secteurs, avis et conseils communautaires. Inscrivez-vous gratuitement pour accéder.",create_account:"Créer un compte gratuitement",already_have_account:"J'ai déjà un compte — se connecter",loading:"Chargement…",error_loading:"Impossible de charger le contenu. Vérifiez votre connexion.",retry:"Réessayer",no_results:"Aucune école ne correspond à votre recherche.",clear_filters:"Effacer les filtres",schools_on_map:"Écoles sur la carte",community_recommendations:"Recommandations de la communauté",view_on_map:"Voir sur la carte →",view_school:"Voir l'école →",view_reviews:"Avis →"},comunidad:{badge:"Communauté d'escalade",hero_title:"NOUS SOMMES DES GRIMPEURS",hero_subtitle:"QUI VOYAGENT ENSEMBLE",hero_desc:"Ici chaque membre apporte quelque chose de réel : un avis, un topo, un toit où dormir. Ce que vous savez du rocher a beaucoup de valeur pour celui qui vient après — et vice versa.",join_cta:"Rejoins-moi — c'est gratuit",view_topos:"Voir les topos",about_us:"Qui sommes-nous",join_title:"REJOIGNEZ LA COMMUNAUTÉ",join_desc:"Les membres peuvent évaluer les voies, répondre aux avis et partager leurs propres expériences d'escalade.",recent_reviews:"AVIS RÉCENTS",recent_reviews_desc:"Ce que la communauté dit des voies",view_all:"Voir tous"},profile:{my:"Mon",profile:"profil",identity_desc:"Votre identité dans la communauté d'escalade — ce que les hôtes voient avant d'accepter votre demande.",change_photo:"Changer la photo de profil",your_photo:"Votre photo de profil",upload_photo:"Télécharger une photo",photo_ready:"Photo prête — appuyez sur « Enregistrer les modifications » pour la publier",climbing_level:"Niveau d'escalade",available_to_climb:"Disponible pour partager des escalades",location:"Localisation",save_profile:"Enregistrer le profil",saving:"Enregistrement…",saved:"Profil enregistré",error:"Erreur lors de l'enregistrement. Réessayez.",guest_ratings:"Évaluations en tant que client",host_ratings:"Évaluations en tant qu'hôte",no_guest_reviews:"Pas encore d'évaluations en tant que client",no_host_reviews:"Pas encore d'évaluations en tant qu'hôte"},auth:{sign_up:"S'inscrire",sign_in:"Se connecter",sign_out:"Se déconnecter",forgot_password:"Vous avez oublié votre mot de passe ?",reset_password:"Réinitialiser le mot de passe",verify_email:"Vérifier l'email",email_verification_sent:"Nous vous avons envoyé un email de vérification",check_inbox:"Vérifiez votre boîte de réception",click_link_verify:"Cliquez sur le lien pour vérifier votre compte",resend_verification:"Renvoyer l'email de vérification",account_created:"Compte créé ! Bienvenue sur Climb & Home.",password_reset_sent:"Nous vous avons envoyé un lien de réinitialisation",password_changed:"Mot de passe modifié avec succès",terms_accepted:"J'ai lu et j'accepte les Conditions d'utilisation et la Politique de confidentialité",marketing_signup:"Recevoir des actualités sur Climb & Home",onboarding_welcome:"Bienvenue sur Climb & Home",onboarding_step1:"Complétez votre profil",onboarding_step2:"Ajoutez votre maison",onboarding_step3:"Explorez la communauté"},admin_page:{tabs:{resumen:"Résumé",usuarios:"Utilisateurs",escaladores:"Grimpeurs",casas:"Maisons",intercambios:"Échanges",climbpoints:"ClimbPoints",estadisticas:"Statistiques",promociones:"Promotions",escuelas:"É
67coles",moderacion:"Modération",guias_pro:"Guides Pro"},stats:{visitas_sesiones:"Visites / Sessions",paginas_vistas:"Pages vues dans la période",visitantes_unicos:"Visiteurs uniques (est.)",estimado_sesion:"Estimé par empreinte de session",nuevos_miembros:"Nouveaux membres",registros_totales:"Enregistrements totaux",casas_publicadas:"Maisons publiées",alojamientos_activos:"Hébergements actifs",solicitudes_intercambio:"Demandes d'échange",pendientes:"en attente",intercambios_confirmados:"Échanges confirmés",estado_aceptado:"Statut : accepté",total_miembros:"Membres totaux",miembros_fundadores:"Membres fondateurs",consentimiento_marketing:"Consentement marketing",con_ubicacion_gps:"Avec localisation GPS",disponibles_ahora:"Disponibles maintenant",no_disponibles:"Non disponibles",escaladores_disponibles:"Grimpeurs disponibles"},resumen_tab:{visitantes:"Visiteurs",miembros:"Membres",casas:"Maisons",solicitudes:"Demandes",confirmados:"Échanges confirmés",funnel_title:"Entonnoir de conversion",funnel_registro:"Inscription",funnel_perfil:"Profil",funnel_casa:"Maison",funnel_solicitud:"Demande"},usuarios_tab:{nombre:"Nom",email:"E-mail",ubicacion:"Localisation",fecha_registro:"Date d'inscription",zonas_habituales:"Zones habituelles",estilo_escalada:"Style d'escalade",nivel_escalada:"Niveau d'escalade",accion_borrar:"Supprimer",borrando:"Suppression…",seguro:"Êtes-vous sûr ?",sin_nombre:"Pas de nom",error_borrar:"Impossible de supprimer : ",buscar_nombre_pais:"Rechercher par nom ou pays…"},escaladores_tab:{activos:"Grimpeurs disponibles",nombre:"Nom",ubicacion:"Localisation",pais:"Pays",nivel:"Niveau",zonas:"Zones habituelles",estilos:"Styles",disponibilidad:"Disponibilité"},casas_tab:{nombre:"Maison",ubicacion:"Localisation",pais:"Pays",abierta:"Ouverte aux échanges",solicitudes_pendientes:"Demandes",fecha_publicacion:"Publiée",detalles:"Détails"},intercambios_tab:{desde:"De",hasta_casa:"À la maison",estado:"Statut",fecha:"Date",pendiente:"En attente",aceptado:"Accepté",rechazado:"Rejeté",nota:"Note ou incident",anadir_nota:"Ajouter une note ou un incident…",guardar_nota:"Enregistrer",eliminar_nota:"Supprimer la note",sin_solicitudes:"Aucune demande d'échange pour le moment.",sin_notas:"Pas de notes"},climbpoints_tab:{miembros:"Membres totaux",fundadores:"Membres fondateurs",marketing:"Consentement marketing",entregadas:"Livré : {count}/100",saldo:"Solde CP",badge_fundador:"Membre Fondateur",fecha_asignacion:"Date d'assignation"},estadisticas_tab:{canales:"Canaux de référence",navegador:"Navigateur",dispositivo:"Appareil",sistema:"Système d'exploitation",desktop:"Bureau",mobile:"Mobile",tablet:"Tablette"},promociones_tab:{estado:"Statut",activa:"Active",inactiva:"Inactive",titulo:"Titre",puntos:"Points",plazas_totales:"Places totales",plazas_libres:"Places libres",cupo_lleno:"Quota plein",inicia:"Commence",termina:"Se termine",plazas_ocupadas:"places utilisées",condiciones:"Conditions"},escuelas_tab:{escuelas_activas:"Écoles actives",sin_escuelas:"Pas d'écoles actives",con_filtros:"avec ce filtre",base_propia:"Base propre",aportadas_comunidad:"Contribué par la communauté",total:"Total",sectores:"Secteurs",vias:"Voies",zona:"Zone",pais:"Pays",continente:"Continent",nivel:"Niveau",tipo:"Type",resumen:"Résumé",coordenadas:"Coordonnées",sin_coordenadas:"pas de coordonnées",eliminar:"Supprimer",eliminar_escuela:"Supprimer cette école",confirmar_fusionar:"Confirmer la fusion",escuela_canonica:"École canonique",fusionando:"Fusion…",fusion_completada:"Fusion terminée !"},moderacion_tab:{resenas_marcadas:"Avis signalés",contenido_ilegal:"Contenu illégal / photos inappropriées",contenido_ofensivo:"Contenu offensant",acceso_incorrecto:"Accès ou sécurité incorrects",duplicado:"Doublon",otros:"Autre raison",descartar:"Rejeter",descartado:"Rejeté",ocultar:"Masquer",restaurar:"Restaurer",duplicados_escuelas:"Doublons d'écoles",duplicado_de:"Doublon de",pendientes:"En attente",resueltos:"Résolu/Rejeté"},guias_tab:{sin_solicitudes:"Aucune demande de guide pour le moment.",nombre:"Nom",estado:"Statut",fecha_solicitud:"Date de la demande",aprobada:"Approuvé",preaprobada:"Pré-approuvé",en_curso:"En cours",finalizado:"Terminé",confirmar:"Confirmer",rechazar:"Rejeter"},email_queue:{cola_pendiente:"File d'attente en attente",enviar_correos:"Envoyer {count} email(s) en attente",cola_marcada:"File d'attente marquée — exécutez le script d'envoi depuis le serveur pour terminer l'envoi.",enviando:"Envoi…",envi
67ados:"{count} email(s) envoyé(s) !",error_envio:"Erreur lors de l'envoi des emails : "},common:{buscar:"Rechercher…",sin_resultados:"Aucun résultat",cargando:"Chargement…",error:"Erreur",cerrar:"Fermer",cancelar:"Annuler",guardar:"Enregistrer",eliminar:"Supprimer",editar:"Éditer",detalles:"Détails",volver:"Retour"}},cordada_page:{title:"Trouver un partenaire d'escalade",subtitle:"Trouvez votre prochaine cordée",publish_search:"+ Publier une recherche de cordée",cancel:"✕ Annuler",zone_label:"Zone ou école *",zone_placeholder:"p.ex. Atxarte, Siurana, Majorque…",level_label:"Niveau approximatif",any_level:"Tous niveaux",from_label:"De",to_label:"À",modality_label:"Modalité",message_label:"Message (optionnel)",message_placeholder:"Dites-nous plus sur ce que vous recherchez…",publish_button:"Publier",publishing:"Publication en cours…",signup_prompt:"Inscrivez-vous pour publier votre recherche de cordée",create_account:"Créer un compte gratuit",filter_by_zone:"Filtrer par zone…",all_levels:"Tous les niveaux",loading:"Chargement…",no_results:"Aucun résultat",member_badge:"Membre",reopen:"Rouvrir",delete:"Supprimer",level_iniciacion:"Débutant",level_intermedio:"Intermédiaire",level_avanzado:"Avancé",level_experto:"Expert",modality_deportiva:"Escalade sportive",modality_clasica:"Escalade classique",modality_bulder:"Bloc",modality_montana:"Montagne",modality_viaferrata:"Via ferrata",modality_btt:"VTT",modality_senderismo:"Randonnée"},legal:{terms:"Conditions d'utilisation",privacy:"Politique de confidentialité",cookies:"Politique relative aux cookies",legal_notice:"Avis juridique",gdpr:"RGPD",cancellation_policy:"Politique d'annulation",i_accept:"J'accepte",i_decline:"Je refuse"},home:{headline:`Escaladez
68et voyagez`,tagline:"La communauté des grimpeurs",description:"Échangez votre maison avec d'autres grimpeurs. Faites partie d'une communauté mondiale.",search_crag:"Quelle école de grimpe voulez-vous visiter ?",browse_homes:"Parcourir les maisons",browse_schools:"Parcourir les écoles",view_map:"Voir la carte",featured_homes:"Des grimpeurs qui ouvrent leur porte",featured_homes_desc:"Des grimpeurs qui ouvrent leur maison et savent où escalader",top_destinations:"Destinations principales",how_works:"Comment ça marche",how_works_subtitle:"Plus qu'un échange de maisons — un échange de connaissances entre grimpeurs.",step1_title:"Rejoignez la communauté",step1_desc:"Créez votre profil, ajoutez votre maison et décrivez les zones d'escalade à proximité.",step2_title:"Trouvez un hôte local",step2_desc:"Recherchez des maisons dans les destinations qui vous intéressent. L'hôte partage les informations locales sur les zones qu'il connaît.",step3_title:"Partagez le savoir",step3_desc:"Partagez les informations sur les zones et les voies que vous connaissez, dans la mesure où leur partage est autorisé. Un complément utile aux guides existants.",grow_cta:"Aidez-nous à grandir",grow_desc:"Publiez votre maison et obtenez 300 CP supplémentaires. Si vous êtes parmi les 100 premiers fondateurs, ajoutez 100 CP de plus.",publish_home:"Publier ma maison",stories_title:"Voici comment nous imaginons les échanges",stories_subtitle:"Des histoires fictives qui reflètent ce que nous voulons construire ensemble. Les vôtres viendront bientôt.",stories_cta:"Rejoignez-nous et partagez la vôtre →",fictional_badge:"Exemple fictif",review_question:"Voulez-vous laisser votre propre avis après votre premier échange ?",signup_and_review:"S'inscrire et commencer →",good_schools_title:"Avez-vous de bonnes écoles d'escalade près de chez vous ?"},manifesto_page:{title:"Qui sommes-nous",subtitle:"La communauté des grimpeurs qui se logent ensemble",hero_description:"Climb & Home connecte les grimpeurs du monde entier pour échanger des maisons et des expériences d'escalade uniques.",values_title:"Nos valeurs",value_1_title:"La communauté avant tout",value_1_desc:"Nous croyons à la force des grimpeurs unis, partageant des voies et des maisons.",value_2_title:"Transparence totale",value_2_desc:"Pas d'intermédiaires. Directement entre membres, avec une confiance vérifiée.",value_3_title:"Escalade durable",value_3_desc:"Moins de tourisme de masse, plus de connexion locale avec les communautés que nous accueillons.",value_4_title:"Inclusion réelle",value_4_desc:"Pour tous les niveaux : des débutants aux alpinistes expérimentés.",timeline_title:"Notre parcours",t
68imeline_2024:"L'idée naît : connecter les grimpeurs européens",timeline_2025:"Première plateforme bêta avec 50 membres",timeline_2026:"Expansion mondiale et 500+ maisons enregistrées",team_title:"L'équipe",team_description:"Nous sommes des grimpeurs, des développeurs et des designers passionnés par la communauté.",join_cta:"Rejoignez notre communauté de grimpeurs",houses_cta:"Publiez votre maison maintenant"},homes_page:{title:"Maisons d'escaladeurs",subtitle:"Loger en échangeant des maisons avec des locaux qui connaissent les meilleures voies de la région",gate_title:"Les maisons sont réservées à la communauté",gate_desc:`Des grimpeurs de toute l'Europe partagent leur maison lorsqu'ils vont grimper ailleurs.
69Inscrivez-vous gratuitement pour voir où et quand elles sont disponibles.`,join_free:"Me joindre gratuitement — c'est instantané",already_member:"J'ai déjà un compte",signup_easy:"Juste un nom, un e-mail et un mot de passe. Pas de carte, pas d'étapes supplémentaires.",search_school:"École, ville, zone…",search_placeholder:"École, ville, zone…",climbing_zone:"Zone de grimpe…",num_guests:"Grimpeurs",guest_1:"1 grimpeur",guest_2:"2 grimpeurs",guest_3:"3 ou plus",guest_4:"4 ou plus",guest_6:"6 ou plus",guest_8:"8 ou plus",arrival_date:"Date d'arrivée",departure_date:"Date de départ",pets_only:"Animaux",full_house:"Maisons complètes uniquement",private_room:"Chambres privées uniquement",sort_by:"Trier par",sort_distance:"Proximité",sort_newest:"Plus récent",sort_highest_rated:"Le mieux évalué",no_results:"Aucun résultat pour ces filtres",try_wider_dates:"Essayez d'autres dates",try_wider_radius:"Essayez un rayon plus large",loading:"Chargement des maisons…",error:"Nous n'avons pas pu charger les maisons. Réessayez plus tard.",search_btn:"Rechercher",loading_dots:"…",show_result:"Affichage {count} maison",show_results:"Affichage {count} maisons",no_homes_title:"Soyez le premier ici",no_homes_desc:"Publiez votre maison pour que d'autres grimpeurs puissent vous visiter quand vous êtes absent.",publish_home:"Publier ma maison",good_schools_desc:"Partagez votre maison avec la communauté des grimpeurs et découvrez en retour des zones incroyables avec les habitants.",start_now:"Commencer maintenant"},dashboard:{reviews:{rating_general:"Expérience globale",rating_home:"Le logement",rating_cleanliness:"Propreté et état",rating_accuracy:"Conforme à l'annonce",rating_communication:"Communication",rating_respect:"Respect du logement et des affaires",rating_cleanliness_guest:"Propreté et soin au départ",rating_agreement_guest:"Respect de l'accord",rating_communication_guest:"Communication et comportement",rating_accuracy_host:"Le logement correspondait à la description",rating_communication_host:"Communication et réactivité",rating_agreement_host:"Respect de l'accord",rating_condition:"État du logement",rating_support:"Soutien en cas de problème",validate_rating:"Veuillez évaluer au moins le premier critère.",save_error:"Impossible d'enregistrer l'évaluation.",guest_title:"Évaluez votre expérience en tant qu'invité",host_title:"Évaluez votre expérience en tant qu'hôte",guest_subtitle:"Dites-nous comment étaient l'hôte et la maison",host_subtitle:"Dites-nous comment s'est comporté l'invité",comment_placeholder:"Dites-nous comment s'est déroulée l'expérience…",sending:"Envoi…",send_rating:"Envoyer l'évaluation",sent_success:"Évaluation envoyée !",sent_notice:"Elle sera publiée quand l'autre partie aura également évalué — ainsi personne n'est influencé par l'avis d'autrui."},homes:{title_required:"Le titre est obligatoire.",location_required:"L'emplacement est obligatoire.",must_login:"Vous devez être connecté pour ajouter un logement.",title_label:"Titre de votre logement *",title_example:"p.ex. Maison à El Chorro",location_label:"Municipalité *",location_example:"p.ex. Valle de Aisa, Arenas de Cabrales, El Chorro…",country_label:"Pays",country_example:"Espagne",description_label:"Description",description_placeholder:"Parlez-nous de votre maison et ses environs…",climbing_areas_label:"Écoles d'escalade",climbing_areas_placeholder:"Décrivez les secteurs, accès, type de roche…",max_guests_label:"Nombre maximum de grimpeurs",max_guests_example:"2",saving:"Enregistrement…",publish_button:"Publier le logement",accommodation_full:"Maison entière",accommodation_full_desc:"L'invité dispose de toute la maison",accommodation_private:"Chambre privée",accommodation_private_desc:"Chambre dans votre maison, zones communes partagées",room_details_title:"Détails de la chambre privée",bed_type_label:"Type de lit",bed_double:"Lit double",bed_twin:"Deux lits simples",bed_single:"Lit simple",bed_bunk:"Lits superposés",bath_private:"Salle de bain privée",kitchen_shared:"Cuisine partagée",host_present:"Hôte présent pendant le séjour"},extras:{escuela_cercana:"École d'escalade à moins de 50 km",parking_bicis:"Parking / garage pour vélos et équipement",rocodromo_cercano:"Salle d'escalade à moins de 20 km",wifi:"WiFi",mascotas:"Animaux autorisés"},difficulties:["Alpinisme","Escalade Classique","Escalade Sportive","Bloc","Randonnée","Vélo de Montagne","Vélo de Montagne"]},dashboard:{my_homes:"Mes maisons",add_home:"Ajouter une maison",reviews:"Avis",sketches:"Croquis",my_places:"Mes lieux",exchanges:"Échanges",requests:"Demandes",accommodation_type_label:"Type d'hébergement *",private_home:"Maison privée (la vôtre)",private_room:"Chambre privée",shared_room:"Chambre partagée",common_areas_label:"Espaces communs disponibles",common_areas_placeholder:"ex. salon, terrasse, jardin…",house_rules_label:"Règles de cohabitation",house_rules_placeholder:"ex. interdiction de fumer à l'intérieur, arrivée avant 22h…",description_label:"Description",climbing_areas_label:"Zones d'escalade à proximité",activities_label:"Activités à proximité",photos_label:"Photos de votre maison",photos_hint:"(jusqu'à 6 · glissez pour réordonner)",value_in_climbpoints:"V
69aleur en ClimbPoints",base_value_desc:"Base selon la capacité ({guests} CP) + extras cochés (max. +40 CP). La plateforme calcule la valeur — vous ne pouvez pas la modifier.",available_for_exchange:"Disponible pour échange maintenant",sketch_type_label:"Type",sketch_sport:"Escalade sportive",sketch_classic:"Escalade classique",sketch_btt:"Sortie en VTT",sketch_hiking:"Randonnée",sketch_croquis:"Croquis / Topo",sketch_photo:"Galerie photos",sketch_sector_label:"Secteur / zone",sketch_grade_label:"Cotation",sketch_description_label:"Description / bêta",sketch_photos_label:"Photos ou croquis",sketch_photos_hint:"(jusqu'à 5)",loading:"Chargement…",tip_home_label:"Maison à laquelle cela appartient *",select_home:"Sélectionnez une maison",no_homes:"Vous n'avez pas encore publié de maison",no_requests:"Pas de demandes en attente",no_reviews:"Pas d'avis pour le moment",no_places:"Aucun lieu enregistré",exchange_status_pending:"En attente",exchange_status_accepted:"Acceptée",exchange_status_declined:"Refusée",exchange_from:"De",exchange_to:"Vers",exchange_message:"Message du demandeur",publish_home:"Publier la maison",update_home:"Mettre à jour la maison",delete_home:"Supprimer la maison",add_review:"Ajouter un avis",add_sketch:"Ajouter un croquis",add_tip:"Ajouter des informations",accept_exchange:"Accepter l'échange",decline_exchange:"Refuser",publish_review:"Publier l'avis",review_as_host:"En tant qu'hôte",review_as_guest:"En tant qu'invité",rating_label:"Évaluation",review_text_label:"Votre avis",publish_both:"Publier les deux avis",field_required:"Champ obligatoire",max_chars:"Maximum {max} caractères"},dashboard:{add_home:"Ajouter maison",my_homes:"Mes maisons",my_places:"Mes lieux",exchanges:"Échanges",reviews:"Avis",sketches:"Croquis",companions:"Partenaires",select_home:"Sélectionnez une maison",sketch_sport:"Escalade sportive",sketch_classic:"Escalade classique",sketch_btt:"Route VTT",sketch_hiking:"Randonnée",sketch_croquis:"Croquis / Topo",sketch_photo:"Photo",homes:{title_label:"Titre *",title_example:"Ex: Maison avec vue sur la rivière",title_required:"Le titre est requis",description_label:"Description",location_label:"Localité *",location_example:"Ex: Potes, Cantabria",location_required:"La localité est requise",country_label:"Pays *",country_example:"Espagne",max_guests_label:"Max invités",max_guests_example:"Ex: 4",accommodation_full:"Maison entière",accommodation_full_desc:"Tout pour toi: chambres, cuisine, salle de bain",accommodation_private:"Chambre privée",accommodation_private_desc:"Ton propre espace; zones communes partagées",room_details_title:"Détails de la chambre",bed_type_label:"Type de lit",bed_single:"Lit simple",bed_double:"Lit double",bed_twin:"Lits jumeaux",bed_bunk:"Lit superposé",bath_private:"Salle de bain privée",kitchen_shared:"Cuisine partagée",host_present:"Hôte présent",publish_button:"Publier maison",saving:"Enregistrement…",must_login:"Vous devez vous connecter pour publier une maison"},reviews:{rating_general:"Expérience générale",rating_home:"Description de la maison",rating_cleanliness:"Propreté",rating_accuracy:"Exactitude",rating_communication:"Communication",rating_respect:"Respect des règles",rating_cleanliness_guest:"Propreté de l'invité",rating_agreement_guest:"Accord sur les conditions",rating_communication_guest:"Communication de l'invité",rating_accuracy_host:"Exactitude de l'hôte",rating_communication_host:"Communication de l'hôte",rating_agreement_host:"Respect de l'accord",rating_condition:"État de la maison",rating_support:"Support reçu",guest_title:"Évaluer votre hôte",guest_subtitle:"Que penses-tu de ton hôte?",host_title:"Évaluer votre invité",host_subtitle:"Que penses-tu de ton invité?",comment_placeholder:"Raconte-nous ton expérience (optionnel)…",send_rating:"Envoyer l'évaluation",sending:"Envoi…",sent_success:"Évaluation envoyée!",sent_notice:"Ton évaluation s'affichera après la réponse de l'autre utilisateur (système en aveugle)",validate_rating:"Veuillez sélectionner au moins une évaluation",save_error:"Erreur lors de l'enregistrement de l'évaluation"},extras:{wifi:"WiFi",parking_bicis:"Parking vélos",rocodromo_cercano:"Salle d'escalade proche",escuela_cercana:"École d'escalade",mascotas:"Animaux autorisés"}},reviews_page:{hero_subtitle:"Communauté d'escalade",hero_title:"Avis d'escalade",hero_description:"Lorsque vous téléchargez un avis ou un croquis, pensez à l'équipeur qui a ouvert cette voie. Son travail mérite d'être décrit avec respect — conditions réelles, cotation honnête, et le crédit qu'il mérite.",publish_review_btn:"Publier un avis",register_to_publish:"S'inscrire pour publier",safety_warnings:"avertissement{plural}s de sécurité ou d'accès dans la communauté",filter_safety_access:"Filtrer par « Sécurité » ou « Accès » pour les voir d'abord.",reviews_published:"avis publicié{plural}s",of_total:"sur {total} au total",gate_title:"Les avis sont pour la communauté",gate_description:"Créez un compte gratuit pour lire et publier des avis, voter sur les cotations et partager ce que vous savez sur chaque voie.",create_account:"Créer un compte gratuit",already_have_account:"J'ai dé
69jà un compte",search_placeholder:"Rechercher par voie, école, secteur, zone ou municipalité…",filter_all:"Tous",filter_personal:"Expérience personnelle",filter_safety:"⚠️ Sécurité / équipement",filter_access:"🚧 Accès / restriction",filter_conditions:"🌦 Conditions actuelles",style_all:"Tous",style_sport:"Sport",style_classic:"Traditionnel",style_boulder:"Boulder",style_psicobloc:"Psicobloc",style_alpine:"Alpin",style_hiking:"Randonnée",style_ski:"Ski",style_btt:"VTT",no_results:"Aucun avis ne correspond à votre recherche.",no_reviews_yet:"Aucun avis publié pour le moment.",clear_filters:"Effacer les filtres →",be_first:"Soyez le premier à avis →",loading_reviews:"Chargement des avis",error_loading:"Impossible de charger les avis.",retry:"Réessayer",stars_label:"sur 5 étoiles",stars_one:"1 étoile",stars_many:"{n} étoiles",report_review:"Signaler cet avis",report_title:"Signaler un avis",report_description:"Sélectionnez un motif. Il ne sera pas supprimé automatiquement — un modérateur l'examinera.",report_reason:"Motif",report_spam:"Spam ou contenu non pertinent",report_incorrect:"Informations incorrectes",report_offensive:"Contenu offensant",report_safety:"Vrai problème de sécurité",report_other:"Autre motif",report_details:"Détails supplémentaires (optionnel)",report_details_placeholder:"Expliquez brièvement le problème…",report_send:"Envoyer le signalement",report_sent:"Signalé ✓",debates:"discussion{plural}s",open_discussion:"Ouvert à la discussion",close_discussion:"Fermer la discussion",discu
69ssions_title:"Discuter / commenter",discussions_tooltip:"Discuter de cet avis",add_comment:"Ajouter un commentaire…",reply_text:"Écrivez votre réponse…",comment_button:"Commenter",register_to_comment:"pour commenter",ascent_title:"Marquer comme escalade",ascent_remove:"Retirer de mes escalades",ascent_label:"Je l'ai escaladé",ascent_removed:"Escaladé",save_title:"Enregistrer",save_remove:"Retirer des enregistrés",save_label:"Enregistrer",save_saved:"Enregistré",community_grade:"Communauté:",total_votes_one:"1 vote",total_votes_many:"{n} votes",grade_proposal_title:"Voir la distribution des propositions de cotation",grade_votes_title:"Voir la distribution des votes",topos_button:"Afficher ou télécharger des croquis pour cette voie",edit_my_review:"Modifier mon avis",close_form:"Fermer le formulaire",rock_condition_label:"État de la roche",best_season_label:"Meilleure saison",rock_info_dry:"Sèche, parfaite",rock_info_example:"Oct–avr",location:"Lieu",uploaded_by:"Téléchargé par",form_title:"Écrire un avis",step_1:"1. Où avez-vous escaladé?",step_2:"2. Votre expérience",step_3:"3. Type de contribution",school_label:"École / Zone *",school_placeholder:"p.ex. Siurana, Atxarte, El Chorro…",sector_label:"Secteur",sector_placeholder:"Pas de secteur / Je ne sais pas",sector_select:"Sélectionner…",route_name_label:"Nom de la voie *",route_name_placeholder:"p.ex. Rabadá-Navarro, La Rambla…",grade_label:"Cotation",grade_placeholder:"p.ex. 7c+, 6a, V7, MD…",style_label:"Style",rating_label:"Note *",review_text_label:"Votre avis",review_text_description:"Description",review_text_placeholder:"Partagez votre expérience: mouvements clés, ambiance, qualité de la roche, accès, équipeur…",review_text_safety:"Décrivez le problème de sécurité ou l'état de l'équipement…",review_text_access:"Décrivez l'accès, la restriction ou la situation actuelle…",review_text_conditions:"Décrivez les conditions actuelles de la roche et du temps…",conditions_label:"État de la roche",conditions_placeholder:"p.ex. Sèche, parfaite…",best_season:"Meilleure saison",best_season_placeholder:"p.ex. Oct–avr…",photos_label:"Photos (jusqu'à 3, optionnel)",form_publish:"Publier un avis",form_publishing:"Publication…",form_cancel:"Annuler",form_error:"Impossible d'enregistrer. Veuillez réessayer.",add_school_title:"Créer une nouvelle école",school_name_label:"Nom de l'école",school_country_label:"Pays",school_country_placeholder:"p.ex. Espagne",school_region_label:"Région",school_municipality_label:"Municipalité",school_type_label:"Type",school_type_sport:"Sport",school_location_label:"Lieu (si connu)",school_location_searching:"Recherche sur la carte…",school_location_success:"✓ {lat}, {lng}",school_location_error:"Impossible de géocoder",school_summary_label:"Résumé",school_season_label:"Saison",school_save_error:"Impossible d'enregistrer",select_route:"Sélectionner une voie existante…",add_new_route:"Créer une nouvelle voie",styles_all:"Tous",styles_options:"Sport|Traditionnel|Boulder|Psicobloc|Alpin|Randonnée|Ski|VTT",required_field:"Le champ est obligatoire",zone_required:"Zone / école est obligatoire",route_name_required:"Le nom de la voie est obligatoire",rating_required:"La note est obligatoire",review_text_required:"L'avis est obligatoire"}},de:{buttons:{cancel:"Abbrechen",edit:"Bearbeiten",delete:"Löschen",save:"Speichern",save_route:"Route speichern",close:"Schließen",reopen:"Erneut öffnen",next:"Weiter →",prev:"← Zurück",confirm:"Ja, bestätigen",send:"→",clear_filters:"Filter löschen",select:"Auswählen…"},common:{not_linked:"Nicht verlinkt",not_specified:"Nicht angegeben",no_grade:"Kein Schwierigkeitsgrad"},nav:{home:"Startseite",community:"Gemeinschaft",crags:"Schulen",homes:"Häuser",map:"Karte",topos:"Topos",reviews:"Streckenberichte",guides:"Führer",about:"Über uns",help:"Hilfe",profile:"Mein Profil",dashboard:"Mein Panel",admin:"Admin",login:"Anmelden",signup:"Beitreten",logout:"Abmelden",language:"Sprache auswählen",explore:"Erkunden",find_partner:"Partner finden"},buttons:{save:"Speichern",cancel:"Abbrechen",delete:"Löschen",edit:"Bearbeiten",publish:"Veröffentlichen",close:"Schließen",submit:"Absenden",send:"Senden",search:"Suchen",filter:"Filtern",clear:"Löschen",more:"Mehr anzeigen",less:"Weniger anzeigen",loading:"Wird geladen...",retry:"Erneut versuchen",confirm:"Bestätigen",reject:"Ablehnen",approve:"Genehmigen",preapprove:"Vorab genehmigen",contact:"Kontaktieren",message:"Nachricht",reply:"Antworten",view_croquis:"Topos anzeigen oder hochladen",share_climb:"Besteigung teilen",join_free:"Kostenlos beitreten",already_have_account:"Ich habe bereits ein Konto"}
69,forms:{required_field:"Erforderliches Feld",invalid_email:"Ungültige E-Mail",password_too_short:"Das Passwort muss mindestens 8 Zeichen lang sein",passwords_dont_match:"Passwörter stimmen nicht überein",error_saving:"Fehler beim Speichern. Versuchen Sie es erneut.",success:"Erfolgreich gespeichert",confirm_delete:"Möchten Sie dies wirklich löschen?",name:"Name",email:"E-Mail",password:"Passwort",confirm_password:"Passwort bestätigen",description:"Beschreibung",location:"Standort",country:"Land",province:"Provinz",municipality:"Gemeinde"},homes:{title:"Häuser",my_homes:"Meine Häuser",add_home:"Haus hinzufügen",edit_home:"Haus bearbeiten",delete_home:"Haus löschen",publish_home:"Haus veröffentlichen",available:"Verfügbar",not_available:"Nicht verfügbar",complete_house:"Ganzes Haus",private_room:"Privates Zimmer",capacity:"Kapazität",guests:"Gäste",dates:"Daten",check_in:"Ankunft",check_out:"Abreise",amenities:"Ausstattung",rules:"Regeln",nearby_crags:"Klettergebiete in der Nähe",difficulty_levels:"Schwierigkeitsstufen",climbing_types:"Kletterarten",climbing_area:"Klettergebiet",about_home:"Über dieses Haus",contact_host:"Gastgeber kontaktieren",no_homes:"Noch keine Häuser in dieser Gegend",empty_state_cta:"Mein Haus hier veröffentlichen"},exchange:{exchange_request:"Tauschrequest",send_request:"Anfrage senden",pending:"Ausstehend",preapproved:"Vorab genehmigt",approved:"Genehmigt",completed:"Abgeschlossen",declined:"Abgelehnt",my_exchanges:"Meine Tausche",requests_sent:"Gesendete Anfragen",requests_received:"Eingangene Anfragen",preapproved_exchanges:"Vorab genehmigte Tausche",upcoming:"Bevorstehende Tausche",past:"Vergangene Tausche",exchange_details:"Tauschdetails",message_to_host:"Nachricht an Gastgeber",view_request:"Anfrage anzeigen und beantworten",confirm_exchange:"Tausch bestätigen",decline_exchange:"Tausch ablehnen",preapprove_exchange:"Tausch vorab genehmigen",guest_reviews:"Gäste-Bewertungen",host_reviews:"Gastgeber-Bewertungen"},climbing:{crags:"Kletterschulen",sectors:"Sektoren",routes:"Routen",grade:"Grad",style:"Stil",sport:"Sport",boulder:"Boulder",classic:"Klassisch",reviews:"Berichte",ratings:"Bewertungen",conditions:"Bedingungen",best_season:"Beste Jahreszeit",dry:"Trocken",wet:"Nass",community_grade:"Community-Grad",i_climbed_it:"Ich bin es geklettert",save:"Speichern",view_reviews:"Berichte anzeigen",add_review:"Bericht hinzufügen",saved_items:"Gespeicherte Routen",ascents:"Besteigungen",comments:"Kommentare",no_comments:"Noch keine Kommentare",register_to_comment:"Registrieren Sie sich zum Kommentieren"},topos:{title:"Topos",add_topo:"Topo hochladen",school:"Schule",sector:"Sektor",route:"Route",images:"Bilder",description:"Beschreibung",my_topos:"Meine Topos",public_gallery:"Öffentliche Galerie",upload_images:"Bilder hochladen",max_images:"Maximal 3 Bilder",no_download:"Bilder können nicht heruntergeladen werden"},map:{title:"Karte",be_first_here:"Seien Sie der Erste hier",publish_your_house:"Veröffentlichen Sie Ihr Haus",available_climbers:"Verfügbare Kletterer",available_houses:"Verfügbare Häuser",climbing_schools:"Kletterschulen",guides:"Führer",filter:"Filtern",zones_without_house:"Zonen ohne Haus",zoom_in:"Zoomen Sie für Details",legend:"Legende",search_location:"Standort suchen",no_results:"Keine Ergebnisse"},climb_points:{title:"ClimbPoints",balance:"Saldo",earned:"Verdient",spent:"Ausgegeben",bonus:"Bonus",founder_bonus:"Gründer-Bonus",welcome_bonus:"Willkommensbonus",publish_home:"Haus veröffentlichen",share_knowledge:"Wissen teilen",exchange_system:"Tauschsystem",how_it_works:"Wie es funktioniert",points_rules:"ClimbPoints-Regeln",availability:"Verfügbarkeit",accommodation:"Unterkunft",exchange_cost:"Tauschkosten",transaction_history:"Transaktionsverlauf"},messages:{title:"Nachrichten",new_message:"Neue Nachricht",private_messages:"Private Nachrichten",conversations:"Unterhaltungen",no_messages:"Sie haben noch keine Nachrichten",unread:"Ungelesen",mark_as_read:"Als gelesen markieren",type_message:"Tippen Sie Ihre Nachricht...",send:"Senden",find_member:"Mitglied finden",chat_with:"Chat mit"},profile:{my_profile:"Mein Profil",edit_profile:"Profil bearbeiten",avatar:"Avatar",bio:"Biografie",location:"Standort",climbing_level:"Kletterlevel",favorite_zones:"Lieblingszonen",available_to_climb:"Zum Klettern verfügbar",styles:"Lieblingsstile",preferences:"Einstellungen",safety_verification:"Sicherheitsüberprüfung",privacy_settings:"Datenschutzeinstellungen",account_settings:"Kontoeinstellungen",change_password:"Passwort ändern",delete_account:"Konto löschen",export_data:"Daten exportieren",blocked_users:"Blockierte Benutzer",marketing_consent:"Nachrichten und Updates erhalten"},admin:{title:"Verwaltung",dashboard:"Admin-Dashboard",users:"Benutzer",homes:"Häuser",schools:"Schulen",reports:"Beric
69hte",moderation:"Moderation",escalators:"Kletterer",climb_points_tab:"ClimbPoints",stats:"Statistiken",settings:"Einstellungen",pending_reports:"Ausstehende Berichte",resolved:"Gelöst",declined:"Abgelehnt",duplicate_schools:"Doppelte Schulen",merge_schools:"Schulen zusammenführen",block_user:"Benutzer blockieren",delete_review:"Bewertung löschen"},errors:{not_found:"Nicht gefunden",unauthorized:"Nicht autorisiert",forbidden:"Zugriff verweigert",server_error:"Serverfehler. Versuchen Sie es erneut.",network_error:"Netzwerkfehler. Überprüfen Sie Ihre Verbindung.",must_login:"Sie müssen sich anmelden",must_register:"Sie müssen sich registrieren",email_not_verified:"Überprüfen Sie Ihre E-Mail, um fortzufahren",email_already_in_use:"Diese E-Mail ist bereits registriert",invalid_credentials:"Ungültige E-Mail oder Passwort",no_results:"Keine Ergebnisse",empty_state:"Noch kein Inhalt hier",try_again:"Versuchen Sie es erneut",loading_error:"Fehler beim Laden. Versuchen Sie es erneut.",save_error:"Fehler beim Speichern",delete_error:"Fehler beim Löschen"},auth:{sign_up:"Registrieren",sign_in:"Anmelden",sign_out:"Abmelden",forgot_password:"Passwort vergessen?",reset_password:"Passwort zurücksetzen",verify_email:"E-Mail überprüfen",email_verification_sent:"Wir haben Ihnen eine Überprüfungs-E-Mail gesendet",check_inbox:"Überprüfen Sie Ihren Posteingang",click_link_verify:"Klicken Sie auf den Link, um Ihr Konto zu überprüfen",resend_verification:"Überprüfungs-E-Mail erneut senden",account_created:"Konto erstellt! Willkommen bei Climb & Home.",password_reset_sent:"Wir haben Ihnen einen Passwort-Zurücksetzen-Link gesendet",password_changed:"Passwort erfolgreich geändert",terms_accepted:"Ich habe die Nutzungsbedingungen und die Datenschutzrichtlinie gelesen und akzeptiert",marketing_signup:"Erhalten Sie Nachrichten über Climb & Home",onboarding_welcome:"Willkommen bei Climb & Home",onboarding_step1:"Vervollständigen Sie Ihr Profil",onboarding_step2:"Fügen Sie Ihr Haus hinzu",onboarding_step3:"Erkunden Sie die Gemeinschaft"},admin_page:{tabs:{resumen:"Zusammenfassung",usuarios:"Benutzer",escaladores:"Kletterer",casas:"Häuser",intercambios:"Austausch",climbpoints:"ClimbPoints",estadisticas:"Statistiken",promociones:"Förderungen",escuelas:"Schulen",moderacion:"Moderation",guias_pro:"Pro-Leitfäden"},stats:{visitas_sesiones:"Besuche / Sitzungen",paginas_vistas:"Aufrufe im Zeitraum",visitantes_unicos:"Eindeutige Besucher (geschätzt)",estimado_sesion:"Geschätzt nach Sitzungs-Fingerprint",nuevos_miembros:"Neue Mitglieder",registros_totales:"Gesamtdatensätze",casas_publicadas:"Veröffentlichte Häuser",alojamientos_activos:"Aktive Unterkünfte",solicitudes_intercambio:"Austauschanfragen",pendientes:"Ausstehend",intercambios_confirmados:"Bestätigte Austausche",estado_aceptado:"Status: Akzeptiert",total_miembros:"Gesamtmitglieder",miembros_fundadores:"Gründungsmitglieder",consentimiento_marketing:"Marketingzustimmung",con_ubicacion_gps:"Mit GPS-Standort",disponibles_ahora:"Jetzt verfügbar",no_disponibles:"Nicht verfügbar",escaladores_disponibles:"Verfügbare Kletterer"},resumen_tab:{visitantes:"Besucher",miembros:"Mitglieder",casas:"Häuser",solicitudes:"Anfragen",confirmados:"Bestätigte Austausche",funnel_title:"Konversionstrichter",funnel_registro:"Registrierung",funnel_perfil:"Profil",funnel_casa:"Haus",funnel_solicitud:"Anfrage"},usuarios_tab:{nombre:"Name",email:"E-Mail",ubicacion:"Standort",fecha_registro:"Registrierungsdatum",zonas_habituales:"Übliche Zonen",estilo_escalada:"Kletteranforderung",nivel_escalada:"Kletterstärke",accion_borrar:"Löschen",borrando:"Löschen…",seguro:"Sicher?",sin_nombre:"Kein Name",error_borrar:"Konnte nicht gelöscht werden: ",buscar_nombre_pais:"Nach Name oder Land suchen…"},escaladores_tab:{activos:"Verfügbare Kletterer",nombre:"Name",ubicacion:"Standort",pais:"Land",nivel:"Stärke",zonas:"Übliche Zonen",estilos:"Anforderungen",disponibilidad:"Verfügbarkeit"},casas_tab:{nombre:"Haus",ubicacion:"Standort",pais:"Land",abierta:"Offen zum Austausch",solicitudes_pendientes:"Anfragen",fecha_publicacion:"Veröffentlicht",detalles:"Details"},intercambios_tab:{desde:"Von",hasta_casa:"Zum Haus",estado:"Status",fecha:"Datum",pendiente:"Ausstehend",aceptado:"Akzeptiert",rechazado:"Abgelehnt",nota:"Notiz oder Vorfall",anadir_nota:"Notiz oder Vorfall hinzufügen…",guardar_nota:"Speichern",eliminar_nota:"Notiz löschen",sin_solicitudes:"Noch keine Austauschanfragen.",sin_notas:"Keine Notizen"},climbpoints_tab:{miembros:"Gesamtmitglieder",fundadores:"Gründungsmitglieder",marketing:"Marketingzustimmung",entregadas:"Geliefert: {count}/100",saldo:"CP-Guthaben",badge_fundador:"Gründungsmitglied",fecha_asignacion:"Zuweisungsdatum"},estadisticas_tab:{canales:"Verweiskanäle",navegador:"Browser",dis
69positivo:"Gerät",sistema:"Betriebssystem",desktop:"Desktop",mobile:"Mobil",tablet:"Tablet"},promociones_tab:{estado:"Status",activa:"Aktiv",inactiva:"Inaktiv",titulo:"Titel",puntos:"Punkte",plazas_totales:"Gesamtplätze",plazas_libres:"Freie Plätze",cupo_lleno:"Volle Quote",inicia:"Startet",termina:"Endet",plazas_ocupadas:"Plätze verwendet",condiciones:"Bedingungen"},escuelas_tab:{escuelas_activas:"Aktive Schulen",sin_escuelas:"Keine aktiven Schulen",con_filtros:"mit diesem Filter",base_propia:"Eigene Basis",aportadas_comunidad:"Von der Gemeinschaft beigetragen",total:"Gesamt",sectores:"Sektoren",vias:"Routen",zona:"Zone",pais:"Land",continente:"Kontinent",nivel:"Stärke",tipo:"Typ",resumen:"Zusammenfassung",coordenadas:"Koordinaten",sin_coordenadas:"keine Koordinaten",eliminar:"Löschen",eliminar_escuela:"Diese Schule löschen",confirmar_fusionar:"Verschmelzung bestätigen",escuela_canonica:"Kanonische Schule",fusionando:"Verschmelzung…",fusion_completada:"Verschmelzung abgeschlossen!"},moderacion_tab:{resenas_marcadas:"Gekennzeichnete Bewertungen",contenido_ilegal:"Illegaler Inhalt / unangemessene Fotos",contenido_ofensivo:"Anstößiger Inhalt",acceso_incorrecto:"Falscher Zugang oder Sicherheit",duplicado:"Duplikat",otros:"Anderer Grund",descartar:"Verwerfen",descartado:"Verworfen",ocultar:"Ausblenden",restaurar:"Wiederherstellen",duplicados_escuelas:"Schulduplikate",duplicado_de:"Duplikat von",pendientes:"Ausstehend",resueltos:"Gelöst/Verworfen"},guias_tab:{sin_solicitudes:"Noch keine Leitfadenanfragen.",nombre:"Name",estado:"Status",fecha_solicitud:"Anfragedatum",aprobada:"Genehmigt",preaprobada:"Vorab genehmigt",en_curso:"Im Gange",finalizado:"Abgeschlossen",confirmar:"Bestätigen",rechazar:"Ablehnen"},email_queue:{cola_pendiente:"Warteschlange ausstehend",enviar_correos:"{count} ausstehende(n) E-Mail(s) senden",cola_marcada:"Warteschlange markiert — führen Sie das Sendescript vom Server aus, um das Senden zu beendigen.",enviando:"Sendung läuft…",enviados:"{count} E-Mail(s) gesendet!",error_envio:"Fehler beim Senden von E-Mails: "},common:{buscar:"Suchen…",sin_resultados:"Keine Ergebnisse",cargando:"Lädt…",error:"Fehler",cerrar:"Schließen",cancelar:"Abbrechen",guardar:"Speichern",eliminar:"Löschen",editar:"Bearbeiten",detalles:"Details",volver:"Zurück"}},cordada_page:{title:"Kletterpartner finden",subtitle:"Finden Sie Ihr nächstes Seil",publish_search:"+ Seilsuche veröffentlichen",cancel:"✕ Abbrechen",zone_label:"Zone oder Schule *",zone_placeholder:"z.B. Atxarte, Siurana, Mallorca…",level_label:"Ungefähres Niveau",any_level:"Alle Niveaus",from_label:"Von",to_label:"Bis",modality_label:"Modalität",message_label:"Nachricht (optional)",message_placeholder:"Erzählen Sie uns mehr über das, was Sie suchen…",publish_button:"Veröffentlichen",publishing:"Veröffentlichung läuft…",signup_prompt:"Melden Sie sich an, um Ihre Seilsuche zu veröffentlichen",create_account:"Kostenlos registrieren",filter_by_zone:"Nach Zone filtern…",all_levels:"Alle Niveaus",loading:"Lädt…",no_results:"Keine Ergebnisse",member_badge:"Mitglied",reopen:"Wiedereröffnen",delete:"Löschen",level_iniciacion:"Anfänger",level_intermedio:"Mittelstufe",level_avanzado:"Fortgeschrittener",level_experto:"Experte",modality_deportiva:"Sportklettern",modality_clasica:"Klassisches Klettern",modality_bulder:"Bouldern",modality_montana:"Berg",modality_viaferrata:"Klettersteig",modality_btt:"Mountainbiking",modality_senderismo:"Wandern"},legal:{terms:"Nutzungsbedingungen",privacy:"Datenschutzrichtlinie",cookies:"Cookie-Richtlinie",legal_notice:"Rechtliche Mitteilung",gdpr:"DSGVO",cancellation_policy:"Stornierungsrichtlinie",i_accept:"Ich akzeptiere",i_decline:"Ich lehne ab"},home:{headline:`Klettern
70und reisen`,tagline:"Die Klettergemeinschaft",description:"Tauschen Sie Ihr Haus mit anderen Kletterern. Seien Sie Teil einer globalen Gemeinschaft.",search_crag:"Welche Kletterschule möchten Sie besuchen?",browse_homes:"Häuser durchsuchen",browse_schools:"Schulen durchsuchen",view_map:"Karte anzeigen",featured_homes:"Kletterer, die ihre Tür öffnen",featured_homes_desc:"Kletterer, die ihr Haus öffnen und wissen, wo man klettern kann",top_destinations:"Top-Ziele",how_works:"Wie es funktioniert",how_works_subtitle:"Mehr als ein Haugustausch — ein Wissensaustausch unter Kletterern.",step1_title:"Treten Sie der Gemeinschaft bei",step1_desc:"Erstellen Sie Ihr Profil, fügen Sie Ihr Haus hinzu und beschreiben Sie die nahegelegenen Klettergebiete.",step2_title:"Finden Sie einen lokalen Gastgeber",step2_desc:"Suchen Sie nach Häusern in de
70n Zielen, die Sie interessieren. Der Gastgeber teilt lokale Informationen über die Gebiete, die er kennt.",step3_title:"Teilen Sie das Wissen",step3_desc:"Teilen Sie Informationen über die Gebiete und Routen, die Sie kennen, soweit deren Weitergabe zulässig ist. Eine nützliche Ergänzung zu bestehenden Führern.",grow_cta:"Helfen Sie uns zu wachsen",grow_desc:"Veröffentlichen Sie Ihr Haus und erhalten Sie 300 zusätzliche CP. Wenn Sie einer der ersten 100 Gründer sind, addieren Sie 100 weitere CP.",publish_home:"Mein Haus veröffentlichen",stories_title:"So stellen wir uns Austausche vor",stories_subtitle:"Fiktive Geschichten, die widerspiegeln, was wir zusammen aufbauen möchten. Deine kommen bald.",stories_cta:"Tritt bei und teile deine →",fictional_badge:"Fiktives Beispiel",review_question:"Möchten Sie nach Ihrem ersten Austausch Ihre eigene Bewertung hinterlassen?",signup_and_review:"Registrieren und anfangen →",good_schools_title:"Haben Sie gute Kletterschulen in der Nähe Ihres Hauses?",good_schools_desc:"Teilen Sie Ihr Haus mit der Klettergemeinschaft und entdecken Sie im Gegenzug unglaubliche Gebiete mit Einheimischen.",start_now:"Jetzt anfangen"},dashboard:{reviews:{rating_general:"Gesamterfahrung",rating_home:"Die Unterkunft",rating_cleanliness:"Sauberkeit und Zustand",rating_accuracy:"Stimmte mit dem Angebot überein",rating_communication:"Kommunikation",rating_respect:"Respekt für Haus und Eigentum",rating_cleanliness_guest:"Sauberkeit beim Auschecken",rating_agreement_guest:"Einhaltung der Vereinbarung",rating_communication_guest:"Kommunikation und Verhalten",rating_accuracy_host:"Haus stimmte mit der Beschreibung überein",rating_communication_host:"Kommunikation und Erreichbarkeit",rating_agreement_host:"Einhaltung der Vereinbarung",rating_condition:"Zustand des Hauses",rating_support:"Unterstützung bei Problemen",validate_rating:"Bitte bewerten Sie mindestens das erste Kriterium.",save_error:"Bewertung konnte nicht gespeichert werden.",guest_title:"Bewerten Sie Ihre Erfahrung als Gast",host_title:"Bewerten Sie Ihre Erfahrung als Gastgeber",guest_subtitle:"Sagen Sie uns, wie der Gastgeber und das Haus waren",host_subtitle:"Sagen Sie uns, wie sich der Gast verhalten hat",comment_placeholder:"Erzählen Sie uns, wie die Erfahrung war…",sending:"Wird gesendet…",send_rating:"Bewertung senden",sent_success:"Bewertung gesendet!",sent_notice:"Sie wird veröffentlicht, wenn die andere Partei auch bewertet — damit niemand von der Meinung des anderen beeinflusst wird."},homes:{title_required:"Der Titel ist erforderlich.",location_required:"Der Standort ist erforderlich.",must_login:"Sie müssen angemeldet sein, um ein Haus hinzuzufügen.",title_label:"Titel Ihres Hauses *",title_example:"z.B. Haus in El Chorro",location_label:"Gemeinde *",location_example:"z.B. Valle de Aisa, Arenas de Cabrales, El Chorro…",country_label:"Land",country_example:"Spanien",description_label:"Beschreibung",description_placeholder:"Erzählen Sie uns von Ihrem Haus und der Umgebung…",climbing_areas_label:"Kletterschulen",climbing_areas_placeholder:"Beschreiben Sie die Sektoren, Zugänge, Gesteinstyp…",max_guests_label:"Maximale Anzahl von Kletterern",max_guests_example:"2",saving:"Wird gespeichert…",publish_button:"Haus veröffentlichen",accommodation_full:"Ganzes Haus",accommodation_full_desc:"Der Gast hat das ganze Haus",accommodation_private:"Privatzimmer",accommodation_private_desc:"Zimmer in Ihrem Haus, gemeinsam genutzte Bereiche",room_details_title:"Details des Privatzimmers",bed_type_label:"Betttyp",bed_double:"Doppelbett",bed_twin:"Zwei Einzelbetten",bed_single:"Einzelbett",bed_bunk:"Etagenbetten",bath_private:"Privates Badezimmer",kitchen_shared:"Gemeinsam genutzte Küche",host_present:"Gastgeber während des Aufenthalts anwesend"},extras:{escuela_cercana:"Kletterschule innerhalb von 50 km",parking_bicis:"Parkplatz / Garage für Fahrräder und Ausrüstung",rocodromo_cercano:"Kletterhalle innerhalb von 20 km",wifi:"WiFi",mascotas:"Haustiere erlaubt"},difficulties:["Alpinismus","Klettern Klassisch","Sportklettern","Bouldern","Wandern","Mountainbiking","Mountainbiking"]},dashboard:{my_homes:"Meine Häuser",add_home:"Haus hinzufügen",reviews:"Bewertungen",sketches:"Skizzen",my_places:"Meine Orte",exchanges:"Austausche",requests:"Anfragen",accommodation_type_label:"Unterkunftstyp *",private_home:"Privates Haus (deines)",private_room:"Privatzimmer",shared_room:"Gemeinsames Zimmer",common_areas_label:"Verfügbare Gemeinschaftsbereiche",common_areas_placeholder:"z.B. Wohnzimmer, Terrasse, Garten…",house_rules_label:"Hausregeln",house_rules_placeholder:"z.B. Rauchen im Haus verboten, Ankunft vor 22 Uhr…",description_label:"Beschreibung",climbing_areas_label:"Nahegelegene Kletterzonen",activities_label:"Nahegelegene Aktivitäten",photos_label:"Fotos deines Hauses",photos_hint:"(bis zu 6 · zum Neuordnen ziehen)",value_in_climbpoints:"Wert in ClimbPoints",base_value_desc:"Basis nach Kapazität ({guests} CP) + markierte Extras (max. +40 CP). Die Plattform berechnet den Wert — du kannst ihn nicht ändern.",available_for_exch
70ange:"Jetzt für Austausch verfügbar",sketch_type_label:"Typ",sketch_sport:"Sportklettern",sketch_classic:"Klassisches Klettern",sketch_btt:"Mountainbike-Tour",sketch_hiking:"Wandern",sketch_croquis:"Skizzen / Topo",sketch_photo:"Fotogalerie",sketch_sector_label:"Sektor / Zone",sketch_grade_label:"Schwierigkeitsgrad",sketch_description_label:"Beschreibung / Beta"},homes_page:{title:"Kletter-Häuser",subtitle:"Unterkunft durch Hausaustausch mit Einheimischen, die die besten Routen in der Gegend kennen",gate_title:"Häuser sind nur für Community-Mitglieder",gate_desc:`Kletterer aus ganz Europa teilen ihr Haus, wenn sie woanders klettern gehen.
71Melden Sie sich kostenlos an, um zu sehen, wo und wann sie verfügbar sind.`,join_free:"Kostenfrei beitreten — sofort",already_member:"Ich habe bereits ein Konto",signup_easy:"Nur Name, E-Mail und Passwort. Keine Karte, keine zusätzlichen Schritte.",search_school:"Schule, Stadt, Gebiet…",search_placeholder:"Schule, Stadt, Gebiet…",climbing_zone:"Klettergebiet…",num_guests:"Kletterer",guest_1:"1 Kletterer",guest_2:"2 Kletterer",guest_3:"3 oder mehr",guest_4:"4 oder mehr",guest_6:"6 oder mehr",guest_8:"8 oder mehr",arrival_date:"Ankunftsdatum",departure_date:"Abreisedatum",pets_only:"Haustiere",full_house:"Nur ganze Häuser",private_room:"Nur private Zimmer",sort_by:"Sortieren nach",sort_distance:"Nähe",sort_newest:"Neuste",sort_highest_rated:"Am besten bewertet",no_results:"Keine Ergebnisse für diese Filter",try_wider_dates:"Versuchen Sie andere Termine",try_wider_radius:"Versuchen Sie einen größeren Radius",loading:"Häuser laden…",error:"Wir konnten die Häuser nicht laden. Versuchen Sie es später erneut.",search_btn:"Suchen",loading_dots:"…",show_result:"Zeigt {count} Haus",show_results:"Zeigt {count} Häuser",no_homes_title:"Seien Sie der Erste hier",no_homes_desc:"Veröffentlichen Sie Ihr Haus, damit andere Kletterer Sie besuchen können, wenn Sie weg sind.",publish_home:"Mein Haus veröffentlichen",sketch_photos_label:"Fotos oder Skizzen",sketch_photos_hint:"(bis zu 5)",loading:"Lädt…",tip_home_label:"Haus, zu dem dies gehört *",select_home:"Wähle ein Haus",no_homes:"Du hast noch keine Häuser veröffentlicht",no_requests:"Keine ausstehenden Anfragen",no_reviews:"Noch keine Bewertungen",no_places:"Keine gespeicherten Orte",exchange_status_pending:"Ausstehend",exchange_status_accepted:"Akzeptiert",exchange_status_declined:"Abgelehnt",exchange_from:"Von",exchange_to:"Zu",exchange_message:"Nachricht des Antragstellers",publish_home:"Haus veröffentlichen",update_home:"Haus aktualisieren",delete_home:"Haus löschen",add_review:"Bewertung hinzufügen",add_sketch:"Skizze hinzufügen",add_tip:"Information hinzufügen",accept_exchange:"Austausch akzeptieren",decline_exchange:"Ablehnen",publish_review:"Bewertung veröffentlichen",review_as_host:"Als Gastgeber",review_as_guest:"Als Gast",rating_label:"Bewertung",review_text_label:"Deine Bewertung",publish_both:"Beide Bewertungen veröffentlichen",field_required:"Feld erforderlich",max_chars:"Maximal {max} Zeichen"},dashboard:{add_home:"Haus hinzufügen",my_homes:"Meine Häuser",my_places:"Meine Orte",exchanges:"Austausche",reviews:"Bewertungen",sketches:"Skizzen",select_home:"Wähle ein Haus",sketch_sport:"Sportklettern",sketch_classic:"Klassisches Klettern",sketch_btt:"Mountainbike-Strecke",sketch_hiking:"Wandern",sketch_croquis:"Skizze / Topo",sketch_photo:"Foto",homes:{title_label:"Titel *",title_example:"Z.B: Haus mit Flussblick",title_required:"Titel ist erforderlich",description_label:"Beschreibung",location_label:"Ort *",location_example:"Z.B: Potes, Kantabrien",location_required:"Ort ist erforderlich",country_label:"Land *",country_example:"Spanien",max_guests_label:"Max Gäste",max_guests_example:"Z.B: 4",accommodation_full:"Ganzes Haus",accommodation_full_desc:"Alles für dich: Schlafzimmer, Küche, Bad",accommodation_private:"Privates Zimmer",accommodation_private_desc:"Dein eigener Raum; geteilte Gemeinschaftsbereiche",room_details_title:"Zimmerdetails",bed_type_label:"Betttyp",bed_single:"Einzelbett",bed_double:"Doppelbett",bed_twin:"Zwei Einzelbetten",bed_bunk:"Etagenbett",bath_private:"Privates Bad",kitchen_shared:"Gemeinschaftsküche",host_present:"Gastgeber anwesend",publish_button:"Haus veröffentlichen",saving:"Speichern…",must_login:"Du musst dich anmelden, um ein Haus zu veröffentlichen"},reviews:{rating_general:"Gesamterlebnis",rating_home:"Hausbeschreibung",rating_cleanliness:"Sauberkeit",rating_accuracy:"Genauigkeit",rating_communication:"Kommunikation",rating_respect:"Regelbeachtung",rating_cleanliness_guest:"Sauberkeit des Gastes",rating_agreement_guest:"Vereinbarungseinhaltung",rating_communication_guest:"Gästekommunikation",rating_accuracy_host:"Genauigkeit des Gastgebers",rating_communication_host:"Kommunikation des Gastgebers",rating_agreement_host:"Vereinbarungseinhaltung",rating_condition:"Hauszustand",rating_support:"Erhaltene Unterstützung",guest_title:"Bewerte deinen Gastgeber",guest_subtitle:"Wie hat dir dein Gastgeber gefallen?",host_title:"Bewerte deinen Gast",host_subtitle:"Wie hat dir dein Gast gefallen?",comment_placeholder:"Erzähle uns von deinem Erlebnis (optional)…",send_rating:"Bewertung senden",sending:"Wird gesendet…",sent_success:"Bewertung gesendet!",sent_notice:"De
71ine Bewertung wird angezeigt, nachdem der andere Benutzer reagiert hat (blindes System)",validate_rating:"Bitte wähle mindestens eine Bewertung",save_error:"Fehler beim Speichern der Bewertung"},extras:{wifi:"WiFi",parking_bicis:"Fahrradparkplatz",rocodromo_cercano:"Nahegelegene Kletterhalle",escuela_cercana:"Kletterschule",mascotas:"Haustiere erlaubt"}},reviews_page:{hero_subtitle:"Klettergemeinschaft",hero_title:"Kletterrouten-Bewertungen",hero_description:"Wenn du eine Bewertung oder eine Skizze hochlädst, denke an den Routensetzer, der diese Route eröffnet hat. Seine Arbeit verdient es, mit Respekt beschrieben zu werden — echte Bedingungen, ehrliche Bewertung und die verdiente Anerkennung.",publish_review_btn:"Bewertung veröffentlichen",register_to_publish:"Melden Sie sich an, um zu veröffentlichen",safety_warnings:"Warnung{plural}en zur Sicherheit oder zum Zugang in der Gemeinschaft",filter_safety_access:'Filtern nach "Sicherheit" oder "Zugang", um sie zuerst zu sehen.',reviews_published:"Bewertung{plural}en veröffentlicht",of_total:"von {total} insgesamt",gate_title:"Bewertungen sind für die Gemeinschaft",gate_description:"Erstellen Sie ein kostenloses Konto, um Bewertungen zu lesen und zu veröffentlichen, über Bewertungen abzustimmen und zu teilen, was Sie über jede Route wissen.",create_account:"Kostenloses Konto erstellen",already_have_account:"Ich habe bereits ein Konto",search_placeholder:"Suchen nach Route, Schule, Sektor, Zone oder Gemeinde…",filter_all:"Alle",filter_personal:"Persönliche Erfahrung",filter_safety:"⚠️ Sicherheit / Ausrüstung",filter_access:"🚧 Zugang / Beschränkung",filter_conditions:"🌦 Aktuelle Bedingungen",style_all:"Alle",style_sport:"Sport",style_classic:"Klassisch",style_boulder:"Boulder",style_psicobloc:"Psicobloc",style_alpine:"Alpin",style_hiking:"Wandern",style_ski:"Ski",style_btt:"MTB",no_results:"Keine Bewertungen passen zu Ihrer Suche.",no_reviews_yet:"Noch keine Bewertungen veröffentlicht.",clear_filters:"Filter löschen →",be_first:"Seien Sie der Erste, der eine Bewertung abgibt →",loading_reviews:"Bewertungen werden geladen",error_loading:"Bewertungen konnten nicht geladen werden.",retry:"Erneut versuchen",stars_label:"von 5 Sternen",stars_one:"1 Stern",stars_many:"{n} Sterne",report_review:"Diese Bewertung melden",report_title:"Bewertung melden",report_description:"Wählen Sie einen Grund. Sie wird nicht automatisch gelöscht — ein Moderator wird sie überprüfen.",report_reason:"Grund",report_spam:"Spam oder irrelevanter Inhalt",report_incorrect:"Falsche Informationen",report_offensive:"Beleidigender Inhalt",report_safety:"Echtes Sicherheitsproblem",report_other:"Anderer Grund",report_details:"Zusätzliche Details (optional)",report_details_placeholder:"Erklären Sie kurz das Problem…",report_send:"Meldung senden",report_sent:"Gemeldet ✓",debates:"Diskussion{plural}en",open_discussion:"Offen für Diskussion",close_discussion:"Diskussion schließen",discussions_title:"Diskutieren / kommentieren",discussions_tooltip:"Diese Bewertung diskutieren",add_comment:"Kommentar hinzufügen…",reply_text:"Schreiben Sie Ihre Antwort…",comment_button:"Kommentieren",register_to_comment:"zum Kommentieren",ascent_title:"Als Aufstieg markieren",ascent_remove:"Aus meinen Aufstigen entfernen",ascent_label:"Ich bin sie geklettert",ascent_removed:"Geklettert",save_title:"Speichern",save_remove:"Aus den gespeicherten entfernen",save_label:"Speichern",save_saved:"Gespeichert",community_grade:"Gemeinschaft:",total_votes_one:"1 Stimme",total_votes_many:"{n} Stimmen",grade_proposal_title:"Siehe Verteilung der Bewertungsvorschläge",grade_votes_title:"Siehe Stimmverteilung",topos_button:"Skizzen für diese Route anzeigen oder hochladen",edit_my_review:"Meine Bewertung bearbeiten",close_form:"Formular schließen",rock_condition_label:"Felszustand",best_season_label:"Beste Jahreszeit",rock_info_dry:"Trocken, perfekt",rock_info_example:"Okt–Apr",location:"Ort",uploaded_by:"Hochgeladen von",form_title:"Eine Bewertung schreiben",step_1:"1. Wo bist du geklettert?",step_2:"2. Deine Erfahrung",step_3:"3. Art des Beitrags",school_label:"Schule / Zone *",school_placeholder:"z.B. Siurana, Atxarte, El Chorro…",sector_label:"Sektor",sector_placeholder:"Kein Sektor / ich weiß nicht",sector_select:"Wählen…",route_name_label:"Routennamen *",route_name_placeholder:"z.B. Rabadá-Navarro, La Rambla…",grade_label:"Bewertung",grade_placeholder:"z.B. 7c+, 6a, V7, MD…",style_label:"Stil",rating_label:"Bewertung *",review_text_label:"Deine Bewertung",review_text_description:"Beschreibung",review_text_placeholder:"Teile deine Erfahrung: Schlüsselbewegungen, Atmosphäre, Felsenqualität, Zugang, Routensetzer…",review_text_safety:"Beschreiben Sie das Sicherheitsproblem oder den Zustand der Ausrüstung…",review_text_access:"Beschreiben Sie den Zugang, die Beschränkung oder die aktuelle Situation…",review_text_conditions:"Beschreiben Sie aktuelle Fels- und Wetterbedingungen…",conditions_label:"Felszustand",conditions_placeholder:"z.B. Trocken, perfekt…",best_season:"Beste Jahreszeit",best_season_placeholder:"z.B. Okt–Apr…",photos_label:"Fotos (bis zu 3, optional)",form_publish:"Bewertung veröffentlichen",form_publishing:"Wird veröffentlicht…",form_c
71ancel:"Abbrechen",form_error:"Konnte nicht gespeichert werden. Bitte versuchen Sie es erneut.",add_school_title:"Neue Schule erstellen",school_name_label:"Schulname",school_country_label:"Land",school_country_placeholder:"z.B. Spanien",school_region_label:"Region",school_municipality_label:"Gemeinde",school_type_label:"Typ",school_type_sport:"Sport",school_location_label:"Ort (falls bekannt)",school_location_searching:"Auf der Karte suchen…",school_location_success:"✓ {lat}, {lng}",school_location_error:"Konnte nicht geocodiert werden",school_summary_label:"Zusammenfassung",school_season_label:"Saison",school_save_error:"Konnte nicht gespeichert werden",select_route:"Existierende Route auswählen…",add_new_route:"Neue Route erstellen",styles_all:"Alle",styles_options:"Sport|Klassisch|Boulder|Psicobloc|Alpin|Wandern|Ski|MTB",required_field:"Feld erforderlich",zone_required:"Zone / Schule erforderlich",route_name_required:"Routenname erforderlich",rating_required:"Bewertung erforderlich",review_text_required:"Bewertung erforderlich"},topos_page:{title:"Gemeinschaftsskizzen",description:"Von lokalen Kletterern dokumentierte Routen — Wissen, das in keinem kommerziellen Führer zu finden ist.",upload_button:"Meine Skizze hochladen",sign_up_to_view:"um alle Skizzen anzuzeigen",search_placeholder:"Nach Route, Zone, Sektor oder Grad suchen…",topos_published:"Von der Gemeinschaft veröffentlichte Skizzen",preview_only:"• Vorschau — Registrieren Sie sich, um alle zu sehen",example_label:"Beispiel",no_results_title:"Seien Sie der Erste, der eine echte Skizze hochlädt.",no_results_login:"Meine Skizze hochladen →",no_results_signup:"Registrieren und zuerst hochladen →",lightbox_prev:"Zurück",lightbox_next:"Weiter",photo_label:"Foto {n}",download_button:"Download",members_count:"{n} Fotos",locked_message:"Route — zum Anmelden",see_full_sketches:"Möchten Sie alle Skizzen sehen?",join_community:"Treten Sie der Klettergemeinde bei, laden Sie Ihre eigenen Skizzen hoch und erhalten Sie Zugriff auf alle, die die Mitglieder teilen.",create_account:"Kostenloses Konto erstellen",already_have_account:"Ich habe bereits ein Konto"},map_page:{title:"Interaktive Karte",subtitle:"Schulen, Häuser und Gemeinschaft",climbing_school:"Kletturschule",sector:"Sektor",cluster_tooltip:"Cluster — zum Vergrößern klicken",school_marker:"Schule — Sektoren anzeigen",home_available:"Haus verfügbar",first_here:"Seien Sie der Erste hier",no_results:'Keine Ergebnisse für "{query}"',search_placeholder:"Schule oder Sektor suchen…",search_school_placeholder:"Schule oder Sektor…",create_account_to_search:"Konto erstellen, um auf der Karte zu suchen",create_account:"Konto erstellen",loading_map:"Karte wird geladen…",loading_error:"Karte konnte nicht geladen werden. Überprüfen Sie Ihre Verbindung.",show_list:"Listenansicht",hide_list:"Listenansicht schließen",list_of_view:"Listenansicht",close_panel:"Panel schließen",no_homes_title:"Keine Häuser in diesem Bereich",no_homes_message:"Seien Sie der Erste, der Ihr Haus hinzufügt",go_to_dashboard:"Zum Dashboard",zones_without_homes:"Zonen ohne Haus",filter_homes:"Häuser",filter_schools:"Schulen",country:"Land",region:"Region",zone:"Zone",coordinates:"Koordinaten",difficulty:"Schwierigkeit",views:"Aufrufe",walls:"Wände"},topos_page:{title:"Croquis de escalada",subtitle:"Sube y consulta mapas de vías",search_placeholder:"Buscar por vía, zona, sector o grado…",all_styles:"Todos",close:"Cerrar",previous:"Anterior",next:"Siguiente",login_to_view:"Vía — inicia sesión para verla",viewing_topo:"Ver croquis de {{name}}",topo_title:"Croquis: {{name}}",loading:"Cargando…",error_loading:"Error al cargar los croquis",no_topos:"No hay croquis disponibles",style_filter:"Estilo",member_only:"Solo para miembros"},manifesto_page:{title:"Quiénes somos",subtitle:"La comunidad de escaladores que se alojan juntos",hero_description:"Climb & Home conecta a escaladores de todo el mund
71o para intercambiar casas y experiencias únicas de escalada.",values_title:"Nuestros valores",value_1_title:"Comunidad ante todo",value_1_desc:"Creemos en la fuerza de los escaladores unidos compartiendo rutas y casas.",value_2_title:"Transparencia total",value_2_desc:"Sin intermediarios. Directamente entre miembros, con confianza verificada.",value_3_title:"Escalada sostenible",value_3_desc:"Menos turismo de masas, más conexión local con las comunidades que acogemos.",value_4_title:"Inclusión real",value_4_desc:"Para todos los niveles: desde iniciantes hasta alpinistas experimentados.",timeline_title:"Nuestro recorrido",timeline_2024:"Nace la idea: conectar escaladores europeos",timeline_2025:"Primera plataforma beta con 50 miembros",timeline_2026:"Expansión global y 500+ casas registradas",team_title:"El equipo",team_description:"Somos escaladores, desarrolladores y diseñadores apasionados por la comunidad.",join_cta:"Únete a nuestra comunidad de escaladores",houses_cta:"Publica tu casa ahora"},manifesto_page:{title:"Wer wir sind",subtitle:"Die Gemeinschaft der Kletterer, die zusammen übernachten",hero_description:"Climb & Home verbindet Kletterer aus der ganzen Welt, um Häuser und einzigartige Klettererfahrungen auszutauschen.",values_title:"Unsere Werte",value_1_title:"Gemeinschaft an erster Stelle",value_1_desc:"Wir glauben an die Kraft vereinter Kletterer, die Routen und Häuser teilen.",value_2_title:"Vollständige Transparenz",value_2_desc:"Keine Vermittler. Direkt zwischen Mitgliedern, mit verifiziertem Vertrauen.",value_3_title:"Nachhaltiges Klettern",value_3_desc:"Weniger Massentourismus, mehr lokale Verbindung mit den Gemeinden, die wir beherbergen.",value_4_title:"Echte Inklusion",value_4_desc:"Für alle Stufen: von Anfängern bis zu erfahrenen Alpinisten.",timeline_title:"Unsere Reise",timeline_2024:"Die Idee wird geboren: Verbindung europÃ
71¤ischer Kletterer",timeline_2025:"Erste Beta-Plattform mit 50 Mitgliedern",timeline_2026:"Globale Expansion und 500+ registrierte Häuser",team_title:"Das Team",team_description:"Wir sind Kletterer, Entwickler und Designer, die sich für die Gemeinschaft begeistern.",join_cta:"Treten Sie unserer Klettergemeinschaft bei",houses_cta:"Veröffentlichen Sie Ihr Haus jetzt"},help_page:{title:"Hilfezentrum",description:"Alles, was Sie über die Klettergemeinde von Climb & Home wissen müssen",welcome:"Willkommen zum Hilfezentrum",faq_title:"Häufig gestellte Fragen",how_it_works:"Wie es funktioniert",account_section:"Konto und Tarife",points_section:"ClimbPoints System",houses_section:"Häuser und Austausch",community_section:"Gemeinschaft und Regeln",step_1_title:"Schritt 1: Registrieren",step_1_desc:"Erstellen Sie ein Konto mit E-Mail und Passwort",step_2_title:"Schritt 2: Profil ausfüllen",step_2_desc:"Fügen Sie Ihr Foto, Kletterniveau und Lieblingsstile hinzu",step_3_title:"Schritt 3: Häuser erkunden",step_3_desc:"Durchsuchen Sie verfügbare Häuser und senden Sie eine Austauschanfrage",step_4_title:"Schritt 4: Austauschanfrage bestätigen",step_4_desc:"Der Gastgeber genehmigt oder lehnt ab — Sie erhalten eine Benachrichtigung",step_5_title:"Schritt 5: Klettern und teilen",step_5_desc:"Genießen Sie den Austausch und teilen Sie Ihre Erfahrungen mit der Gemeinschaft",faq_what_is:"Was ist Climb & Home?",faq_what_is_desc:"Eine Gemeinschaft von Kletterer aus ganz Europa, die ihre Häuser austauschen, um an verschiedenen Klettergebieten zu klettern.",faq_getting_started:"Wie fange ich an?",faq_getting_started_desc:"Erstelle dein Konto, fülle dein Profil aus (Foto, Kletterniveau, Stile), und veröffentliche dein Haus mit Fotos und den umliegenden Klettergebieten. Wenn du eine andere Unterkunft findest, die dir gefällt, stelle eine Austauschanfrage.",faq_search_homes:"Wie suche ich nach Häusern?",faq_search_homes_desc:"Verwende die Filter nach Ort oder Aktivität und durchsuche die verfügbaren Häuser. Wenn eines dir gefällt, klicke auf die Schaltfläche, um eine Austauschanfrage zu stellen.",faq_points_what:"Was sind ClimbPoints?",faq_points_what_desc:"Eine lokale Währung für Austausche — keine echten Euros. Mit deinen CP kannst du andere Häuser in der Gemeinschaft buchen. Im Durchschnitt kostet eine Nacht 100 CP.",faq_points_earn:"Wie verdiene ich Punkte?",faq_points_earn_desc:"Wenn jemand in deinem Haus übernachtet und du bestätigst, gehen die CP von seinem Konto auf deins. Gründungsmitglieder erhalten 500 CP Willkommensbonus.",faq_points_value:"Was sind meine Punkte wert?",faq_points_value_desc:"Im Durchschnitt entspricht eine Nacht 100 CP. Der genaue Wert hängt von der Größe deines Hauses und der Nähe zu beliebten Klettergebieten ab.",founder_bonus:"Gründermitglieder (erste 100 neuen Mitglieder) erhalten 500 CP bei der Registrierung.",response_time:"Anfragefristen",response_time_desc:"Jede Anfrage hat eine Frist von 5 Tagen, um eine Antwort zu erhalten. Wenn der Gastgeber nicht antwortet, wird die Anfrage automatisch geschlossen.",before_request:"Was sollte ich vor einer Anfrage wissen?",before_request_desc:"Überprüfe die Ausstattung des Hauses, die maximale Anzahl der Gäste und die Verfügbarkeitsdaten. Wenn du Fragen hast, stelle sie in deiner Anfrage.",safety_sensitivities:"Umweltgerechtes Klettern",safety_desc:"Einige Sektoren sind empfindlich: Schutzgebiete, Vogelkolonien oder private Vereinbarungen mit Grundeigentümern. Wir bieten allgemeine Hinweise, und der Gastgeber teilt lokales Wissen direkt.",community_rules:"Gemeinschaftsregeln",rules_clarity:"Klarheit und echte Beschreibung des Hauses",rules_conditions:"Bedingungen für das Angebot der Unterkunft",rules_communication:"Kommunikation und Verhalten in allgemeinen Fragen",rules_support:"Kommunikation und Unterstützung bei Vorfällen",rules_profile:"Ein vollständiges Profil fördert Vertrauen und mehr Anfragen",rating_criteria:"Bewertungskriterien",rating_as_host:"Als Gastgeber bewerten",rating_clarity:"Klarheit der Informationen",rating_conditions:"Zustand der angebotenen Unterkunft",rating_communication:"Kommunikation und Kundenservice",rating_as_guest:"Als Gast bewerten",rating_cleanliness:"Sauberkeit des Gastes"},cordada_page:{title:"Kletterpartner finden",subtitle:"Finden Sie Ihr nächstes Seil",publish_search:"+ Seilsuche veröffentlichen",cancel:"✕ Abbrechen",zone_label:"Zone oder Schule *",zone_placeholder:"z.B. Atxarte, Siurana, Mallorca…",level_label:"Ungefähres Niveau",any_level:"Alle Niveaus",from_label:"Von",to_label:"Bis",modality_label:"Modalität",message_label:"Nachricht (optional)",message_placeholder:"Erzählen Sie uns mehr über das, was Sie suchen…",publish_button:"Veröffentlichen",publishing:"Veröffentlichung läuft…",signup_prompt:"Melden Sie sich an, um Ihre Seilsuche zu veröffentlichen",create_account:"Kostenlos registrieren",filter_by_zone:"Nach Zone filtern…",all_levels:"Alle Niveaus",loading:"Lädt…",no_results:"Keine Ergebnisse",member_badge:"Mitglied",reopen:"Wiedereröffnen",delete:"Löschen",level_iniciacion:"Anfänger",level_intermedio:"Mittelstufe",level_avanzado:"Fortgeschrittener",level_experto:"Experte",modality_deportiva:"Sportklettern",modality_clasica:"Klassisches Klettern",modality_bulder:"Bouldern",modality_montana:"Berg",modality_viaferrata:"Klettersteig",modality_btt:"Mountainbiking",modality_senderismo:"Wandern",rating_agreement:"Einhaltung der Vereinbarung",rating_behavior:"Gästeverhalten",edit_profile:"Profil bearbeiten",open_map:"Karte öffnen",find_partner:"Kletterpartner suchen"}}},wr=Lj,k0=b.createContext(null);function Rj({children:l}){const[i,r]=b.useState(()=>{try{const f=localStorage.getItem("cah_lang");if(f)return f;const x=navigator.language.split("-")[0];return Object.keys(wr).includes(x)?x:"es"}catch{return"es"}}),d=b.useCallback(f=>{r(f);try{localStorage.setItem("cah_lang",f)}catch{}},[]),m=b.useCallback(f=>{const x=f.split(".");let h=wr[i]||wr.es;for(const j of x)if(h=h==null?void 0:h[j],h===void 0)break;if(h===void 0){let j=wr.es;for(const g of x)if(j=j==null?void 0:j[g],j===void 0)break;return j??f}return h},[i]),p={lang:i,switchLang:d,t:m,AVAILABLE_LANGS:kr};return e.jsx(k0.Provider,{value:p,children:l})}function Lt(){const l=b.useContext(k0);if(!l)throw new Error("useLang must be used inside LangProvider");return l}const kr=[{code:"es",label:"ES",full:"Español"},{code:"en",label:"EN",full:"English"},{code:"fr",label:"FR",full:"Français"},{code:"de",label:"DE",full:"Deutsch"}];/**
72 * @license lucide-react v1.47.0 - ISC
73 *
74 * This source code is licensed under the ISC license.
75 * See the LICENSE file in the root directory of this source tree.
76 */const qj=l=>l==null?void 0:l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
77 * @license lucide-react v1.47.0 - ISC
78 *
79 * This source code is licensed under the ISC license.
80 * See the LICENSE file in the root directory of this source tree.
81 */function Dj(l,i,r=[]){if(i==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:qj(l),size:24,node:i,...r.length>0?{aliases:r}:{}}}/**
82 * @license lucide-react v1.47.0 - ISC
83 *
84 * This source code is licensed under the ISC license.
85 * See the LICENSE file in the root directory of this source tree.
86 */const Oj=l=>{let i="",r=!1;for(const d of l){if(d==="-"||d==="_"||d<=" "){r=i.length>0;continue}i.length===0?i+=d.toLowerCase():i+=r?d.toUpperCase():d,r=!1}return i};/**
87 * @license lucide-react v1.47.0 - ISC
88 *
89 * This source code is licensed under the ISC license.
90 * See the LICENSE file in the root directory of this source tree.
91 */const Bj=l=>{const i=Oj(l);return i.charAt(0).toUpperCase()+i.slice(1)};/**
92 * @license lucide-react v1.47.0 - ISC
93 *
94 * This source code is licensed under the ISC license.
95 * See the LICENSE file in the root directory of this source tree.
96 */const Tu=(...l)=>l.filter((i,r,d)=>!!i&&i.trim()!==""&&d.indexOf(i)===r).join(" ").trim();/**
97 * @license lucide-react v1.47.0 - ISC
98 *
99 * This source code is licensed under the ISC license.
100 * See the LICENSE file in the root directory of this source tree.
101 */const Hn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
102 * @license lucide-react v1.47.0 - ISC
103 *
104 * This source code is licensed under the ISC license.
105 * See the LICENSE file in the root directory of this source tree.
106 */function _u(l){return l!=null}function Pj(l,i={}){var S,N;const r=i.attributeNames??{},d=_=>r[_]??_,m=l.size??l.width??Hn.width,p=l.size??l.height??Hn.height,f=((S=l.aliases)==null?void 0:S.filter(_=>typeof _=="string"&&_.trim()!=="").map(_=>`lucide-${_}`))??[],x=[...l.name?[`lucide-${l.name}`]:[],...f],h=((N=i.className)==null?void 0:N.split(" ").filter(Boolean))??[],j=i.includeDefaultClasses===!1?Tu(...h):Tu("lucide",...x,...h),g=i.absoluteStrokeWidth?Number(i.strokeWidth??Hn["stroke-width"])*Number(l.size??l.width??Hn.width)/Number(i.size??i.width??Hn.width):i.strokeWidth??Hn["stroke-width"];return["svg",{...Object.entries(Hn).reduce((_,[z,C])=>(_[d(z)]=C,_),{}),..."color"in i&&i.color&&{[d("stroke")]:i.color},..."size"in i&&_u(i.size)&&{[d("width")]:i.size,[d("height")]:i.size},..."width"in i&&_u(i.width)&&{[d("width")]:i.width},..."height"in i&&_u(i.height)&&{[d("height")]:i.height},[d("stroke-width")]:g,...j&&{[d("class")]:j},[d("viewBox")]:`0 0 ${m} ${p}`,...i.hasA11yProp===!1?{[d("aria-hidden")]:"true"}:{},..."attributes"in i&&i.attributes},l.node.map(_=>{const[z,C,k]=_,T=i.nonScalingStroke?{[d("vector-effect")]:"non-scaling-stroke",...C}:C;return k?[z,T,k]:[z,T]})]}/**
107 * @license lucide-react v1.47.0 - ISC
108 *
109 * This source code is licensed under the ISC license.
110 * See the LICENSE file in the root directory of this source tree.
111 */function Uj(l,i={}){return Pj(l,{...i,attributeNames:{...i.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
112 * @license lucide-react v1.47.0 - ISC
113 *
114 * This source code is licensed under the ISC license.
115 * See the LICENSE file in the root directory of this source tree.
116 */const Hj=l=>{for(const i in l)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},Vj=b.createContext({}),Gj=()=>b.useContext(Vj),Fj=b.forwardRef(({color:l,size:i,width:r,height:d,strokeWidth:m,absoluteStrokeWidth:p,nonScalingStroke:f,className:x="",children:h,iconNode:j=[],icon:g={node:j,aliases:[],size:24},...v},S)=>{const{size:N=24,strokeWidth:_=2,absoluteStrokeWidth:z=!1,nonScalingStroke:C=!1,color:k="currentColor",className:T=""}=Gj()??{},w=!!h||Hj(v),[A,L,q=[]]=Uj(g,{color:l??k,width:r??i??N,height:d??i??N,strokeWidth:m??_,absoluteStrokeWidth:p??z,nonScalingStroke:f??C,className:Tu(T,x),hasA11yProp:w,attributes:v});return b.createElement(A,{ref:S,...L},[...q.map(([H,F])=>b.createElement(H,F)),...Array.isArray(h)?h:[h]])});/**
117 * @license lucide-react v1.47.0 - ISC
118 *
119 * This source code is licensed under the ISC license.
120 * See the LICENSE file in the root directory of this source tree.
121 */function Ie(l,i=[],r=[]){const d=typeof l=="string"?Dj(l,i,r):l,m=b.forwardRef(({className:p,...f},x)=>b.createElement(Fj,{ref:x,icon:d,className:p,...f}));return d.name&&(m.displayName=Bj(d.name)),m}/**
122 * @license lucide-react v1.47.0 - ISC
123 *
124 * This source code is licensed under the ISC license.
125 * See the LICENSE file in the root directory of this source tree.
126 */const A0={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};A0.node;const $j=Ie(A0);/**
127 * @license lucide-react v1.47.0 - ISC
128 *
129 * This source code is licensed under the ISC license.
130 * See the LICENSE file in the root directory of this source tree.
131 */const M0={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}
131],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};M0.node;const _t=Ie(M0);/**
132 * @license lucide-react v1.47.0 - ISC
133 *
134 * This source code is licensed under the ISC license.
135 * See the LICENSE file in the root directory of this source tree.
136 */const T0={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};T0.node;const Ko=Ie(T0);function Ux(){const{lang:l,switchLang:i,t:r}=Lt(),[d,m]=b.useState(!1),p=b.useRef(null);b.useEffect(()=>{if(!d)return;const x=h=>{p.current&&!p.current.contains(h.target)&&m(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[d]);const f=kr.find(x=>x.code===l)||kr[0];return e.jsxs("div",{className:"relative",ref:p,children:[e.jsxs("button",{onClick:()=>m(x=>!x),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg text-xs font-semibold text-stone-400 hover:text-white border border-stone-700 hover:border-stone-500 transition-all min-h-[36px]","aria-haspopup":"listbox","aria-expanded":d,"aria-label":r("nav.language")||"Seleccionar idioma",children:[e.jsx("span",{children:f.label}),e.jsx(Ko,{className:`w-3 h-3 transition-transform ${d?"rotate-180":""}`})]}),d&&e.jsx("div",{className:"absolute top-full right-0 mt-1.5 w-32 bg-stone-900 border border-stone-700 rounded-xl shadow-xl py-1 z-50",role:"listbox",children:kr.map(x=>e.jsxs("button",{role:"option","aria-selected":x.code===l,onClick:()=>{i(x.code),m(!1)},className:`w-full text-left px-3 py-2 text-sm rounded-lg mx-0.5 transition-colors flex items-center gap-2 ${x.code===l?"text-[#e8ff4a] bg-stone-800 font-semibold":"text-stone-300 hover:text-white hover:bg-stone-800"}`,children:[e.jsx("span",{className:"font-mono text-xs font-bold w-5",children:x.label}),e.jsx("span",{className:"text-stone-400 text-xs",children:x.full})]},x.code))})]})}function Ij({onLogoClick:l}){const{user:i,logout:r}=oa(),{alertCount:d}=z0(),{lang:m,t:p}=Lt(),f=["1s8q8wzteyh2fiq","jefdvdav9a1knh5"],h=["[email protected]","[email protected]"].includes(i==null?void 0:i.email)||f.includes(i==null?void 0:i.id),[j,g]=b.useState(!1),[v,S]=b.useState(!1),N=b.useRef(null),_=C=>p(`nav.${C}`);b.useEffect(()=>{if(!v)return;const C=k=>{N.current&&!N.current.contains(k.target)&&S(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[v]);const z=({isActive:C})=>C?"text-[#e8ff4a] font-semibold border-b-2 border-[#e8ff4a] pb-0.5 py-3 block":"text-stone-200 hover:text-white transition-colors py-3 block";return e.jsxs("header",{className:"fixed top-0 left-0 right-0 z-50 bg-stone-950/90 backdrop-blur-md border-b border-stone-800",style:{WebkitBackdropFilter:"blur(12px)"},children:[e.jsx("div",{className:"max-w-7xl mx-auto px-3 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsx("div",{className:"flex items-center ml-4",children:e.jsx("button",{onClick:()=>{l&&l()},className:"cursor-pointer focus:outline-none","aria-label":"Ver presentación de CLIMB & HOME",title:"Presentación",children:e.jsx("img",{src:"/static/logo-climb-home.jpg",alt:"CLIMB & HOME — Intercambio de casas para escaladores",className:"h-10 w-auto hover:opacity-90 transition-opacity"})})}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6 lg:gap-8",children:[e.jsx(wa,{to:"/",end:!0,className:z,children:_("home")}),e.jsxs("div",{className:"relative",ref:N,children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(wa,{to:"/comunidad",className:({isActive:C})=>`pl-3 pr-2 py-2 text-sm font-bold tracking-wide transition-colors ${C||v?"text-[#e8ff4a]":"text-white hover:text-[#e8ff4a]"}`,children:_("community")}),e.jsx("span",{className:"w-0.5 h-5 bg-stone-500 mx-1 rounded-full","aria-hidden":"true"}),e.jsx("button",{onClick:()=>S(C=>!C),"aria-haspopup":"true","aria-expanded":v,"aria-label":_("community"),className:`px-2 py-2 rounded-md transition-colors focus:outline-hidden ${v?"bg-stone-800 text-[#e8ff4a]":"text-stone-400 hover:text-white hover:bg-stone-800/60"}`,children:e.jsx(Ko,{className:`w-4 h-4 transition-transform duration-200 ${v?"rotate-180":""}`})})]}),v&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 top-[57px] bg-black/40 z-40",onClick:()=>S(!1),"aria-hidden":"true"}),e.jsxs("div",{className:"absolute top-full left-0 mt-1 w-56 bg-stone-900 border border-stone-700 rounded-xl shadow-2xl py-2 z-50",children:[e.jsx("p",{className:"px-4 pt-1 pb-1.5 text-[10px] uppercase tracking-widest text-stone-500 font-semibold",children:_("explore")}),e.jsxs(wa,{to:"/routes",className:"flex items-center gap-2.5 px-4 py-2 text-sm text-stone-300 hover:text-white hover:bg-stone-800 rounded-lg mx-1 transition-colors",onClick:()=>S(!1),children:[e.jsx("span",{className:"text-base",children:"🧗"})," ",_("crags")]}),e.jsxs(wa,{to:"/mapa",className:"flex items-center gap-2.5 px-4 py-2 text-sm text-stone-300 hover:text-white hover:bg-stone-800 rounded-lg mx-1 transition-colors",onClick:()=>S(!1),children:[e.jsx("span",{className:"text-base",children:"🗺️"})," ",_("map")]}),e.jsx("div",{className:"border-t border-stone-700/60 my-1.5 mx-3"}),e.jsx("p",{className:"px-4 pb-1.5 text-[10px] uppercase tracking-widest text-stone-500 font-semibold",children:_("community")}),e.jsxs(wa,{to:"/resenas",className:"flex items-center gap-2.5 px-4 py-2 text-sm text-stone-300 hover:text-white hover:bg-stone-800 rounded-lg mx-1 transition-colors",onClick:()=>S(!1),children:[e.jsx("span",{className:"text-base",children:"⭐"})," ",_("reviews")]}),e.jsxs(wa,{to:"/croquis",className:"flex items-center gap-2.5 px-4 py-2 text-sm text-stone-300 hover:text-white hover:bg-stone-800 rounded-lg mx-1 transition-colors",onClick:()=>S(!1),children:[e.jsx("span",{className:"text-base",children:"📐"})," ",_("topos")]}),e.jsxs(wa,{to:"/companero",className:"flex items-center gap-2.5 px-4 py-2 text-sm text-stone-300 hover:text-white hover:bg-stone-800 rounded-lg mx-1 transition-colors",onClick:()=>S(!1),children:[e.jsx("span",{className:"text-base",children:"🤝"})," ",_("find_partner")]}),e.jsxs(wa,{to:"/nosotros",className:"flex items-center gap-2.5 px-4 py-2 text-sm text-stone-300 hover:text-white hover:bg-stone-800 rounded-lg mx-1 transition-colors",onClick:()=>S(!1),children:[e.jsx("span",{className:"text-base",children:"👥"})," ",_("about")]})]})]})]}),e.jsx(wa,{to:"/routes",className:z,children:_("crags")}),e.jsx(wa,{to:"/homes",className:z,children:_("homes")}),e.jsx(wa,{to:"/mapa",className:z,children:_("map")}),e.jsx(wa,{to:"/ayuda",className:z,children:_("help")}),i&&e.jsxs(wa,{to:"/dashboard",className:`${z}
136 relative`,title:_("dashboard"),children:[_("dashboard"),d>0&&e.jsx("span",{className:"absolute -top-1.5 -right-3 flex items-center justify-center w-5 h-5 rounded-full bg-red-500 text-white text-[10px] font-bold leading-none animate-pulse shadow-lg shadow-red-500/40",children:d>9?"9+":d})]}),h&&e.jsx(wa,{to:"/admin",className:z,title:"Panel de administración",children:e.jsxs("svg",{viewBox:"0 0 36 36",className:"w-7 h-7",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Panel de administración",children:[e.jsx("circle",{cx:"16",cy:"13",r:"8.5",fill:"currentColor",opacity:"0.15",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M7.5 13 Q7.5 3.5 16 3.5 Q24.5 3.5 24.5 13",fill:"currentColor",opacity:"0.85"}),e.jsx("path",{d:"M6.5 13 Q6.5 12 7.5 12 L24.5 12 Q25.5 12 25.5 13",fill:"currentColor",opacity:"0.6",stroke:"currentColor",strokeWidth:"0.5"}),e.jsx("line",{x1:"8",y1:"13",x2:"7",y2:"16",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",opacity:"0.6"}),e.jsx("line",{x1:"24",y1:"13",x2:"25",y2:"16",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",opacity:"0.6"}),e.jsx("rect",{x:"9",y:"11",width:"5.5",height:"3.5",rx:"1.75",stroke:"currentColor",strokeWidth:"1.3",fill:"none"}),e.jsx("rect",{x:"17",y:"11",width:"5.5",height:"3.5",rx:"1.75",stroke:"currentColor",strokeWidth:"1.3",fill:"none"}),e.jsx("line",{x1:"14.5",y1:"12.75",x2:"17",y2:"12.75",stroke:"currentColor",strokeWidth:"1.1"}),e.jsx("line",{x1:"9",y1:"12.75",x2:"7",y2:"12.5",stroke:"currentColor",strokeWidth:"1.1"}),e.jsx("line",{x1:"22.5",y1:"12.75",x2:"24.5",y2:"12.5",stroke:"currentColor",strokeWidth:"1.1"}),e.jsx("path",{d:"M12.5 18 Q14 20 16 19 Q18 20 19.5 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",fill:"none"}
136),e.jsx("path",{d:"M6 33 Q6 25 16 25 Q26 25 26 33",fill:"currentColor",opacity:"0.2"}),e.jsx("line",{x1:"24",y1:"28",x2:"34",y2:"18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"34",cy:"18",r:"1.2",fill:"currentColor"}),e.jsx("line",{x1:"34",y1:"15",x2:"34",y2:"14",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),e.jsx("line",{x1:"34",y1:"21",x2:"34",y2:"22",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),e.jsx("line",{x1:"31",y1:"18",x2:"30",y2:"18",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),e.jsx("line",{x1:"37",y1:"18",x2:"36.5",y2:"18",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),e.jsx("line",{x1:"32",y1:"15.5",x2:"31.3",y2:"14.8",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round"}),e.jsx("line",{x1:"36",y1:"20.5",x2:"36.7",y2:"21.2",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round"})]})})]}),e.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[e.jsx(Ux,{}),i?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{to:"/perfil",className:"text-stone-300 text-sm hover:text-[#e8ff4a] transition-colors",children:i.name||"escalador"}),e.jsx("button",{onClick:r,className:"px-4 py-1.5 rounded-full text-sm border border-stone-600 text-stone-300 hover:border-[#e8ff4a] hover:text-[#e8ff4a] transition-colors",children:_("logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(ne,{to:"/login",className:"px-4 py-1.5 rounded-full text-sm font-semibold border border-stone-600 text-stone-300 hover:border-white hover:text-white active:bg-stone-700 transition-colors",children:_("login")}),e.jsx(ne,{to:"/signup",className:"px-4 py-1.5 rounded-full text-sm font-semibold bg-[#e8ff4a] text-stone-950 border border-[#e8ff4a] hover:bg-[#f0ff70] hover:border-[#f0ff70] active:bg-[#d4e840] transition-colors",children:_("signup")})]})]}),e.jsx("button",{className:"md:hidden text-stone-300 hover:text-white p-2 -mr-2 min-h-[44px] min-w-[44px] flex items-center justify-center",onClick:()=>g(!j),"aria-label":j?"Cerrar menú":"Abrir menú",children:j?e.jsx(_t,{className:"w-6 h-6"}):e.jsx($j,{className:"w-6 h-6"})})]})}),j&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 top-16 bg-black/50 md:hidden z-40",onClick:()=>g(!1),"aria-hidden":"true"}),e.jsxs("div",{className:"md:hidden absolute top-full left-0 right-0 bg-stone-900 border-b border-stone-700 px-4 py-4 flex flex-col gap-1 overflow-y-auto z-50 shadow-2xl max-h-[calc(100vh-65px)]",style:{WebkitOverflowScrolling:"touch"},children:[e.jsx(wa,{to:"/",end:!0,className:z,onClick:()=>g(!1),children:"Inicio"}),e.jsx(wa,{to:"/comunidad",className:z,onClick:()=>g(!1),children:"Comunidad"}),e.jsxs("div",{className:"pl-3 flex flex-col gap-0.5 border-l border-stone-800 ml-1",children:[e.jsx(wa,{to:"/croquis",className:({isActive:C})=>`text-sm ${C?"text-[#e8ff4a] font-semibold":"text-stone-400 hover:text-stone-200"} py-1.5 block transition-colors`,onClick:()=>g(!1),children:"Croquis"}),e.jsx(wa,{to:"/resenas",className:({isActive:C})=>`text-sm ${C?"text-[#e8ff4a] font-semibold":"text-stone-400 hover:text-stone-200"} py-1.5 block transition-colors`,onClick:()=>g(!1),children:_("reviews")}),e.jsx(wa,{to:"/companero",className:({isActive:C})=>`text-sm ${C?"text-[#e8ff4a] font-semibold":"text-stone-400 hover:text-stone-200"} py-1.5 block transition-colors`,onClick:()=>g(!1),children:_("find_partner")}),e.jsx(wa,{to:"/nosotros",className:({isActive:C})=>`text-sm ${C?"text-[#e8ff4a] font-semibold":"text-stone-400 hover:text-stone-200"} py-1.5 block transition-colors`,onClick:()=>g(!1),children:_("about")})]}),e.jsx(wa,{to:"/routes",className:z,onClick:()=>g(!1),children:_("crags")}),e.jsx(wa,{to:"/homes",className:z,onClick:()=>g(!1),children:_("homes")}),e.jsx(wa,{to:"/mapa",className:z,onClick:()=>g(!1),children:_("map")}),e.jsx(wa,{to:"/ayuda",className:z,onClick:()=>g(!1),children:_("help")}),i&&e.jsxs(wa,{to:"/dashboard",className:`${z} relative`,onClick:()=>g(!1),children:[_("dashboard"),d>0&&e.jsx("span",{className:"ml-2 inline-flex items-center justify-center w-5 h-5 rounded-full bg-red-500 text-white text-[10px] font-bold animate-pulse",children:d>9?"9+":d})]}),i&&e.jsx(wa,{to:"/perfil",className:z,onClick:()=>g(!1),children:_("profile")}),h&&e.jsx(wa,{to:"/admin",className:z,onClick:()=>g(!1),children:"Admin"}),e.jsx("hr",{className:"border-stone-800"}),e.jsx("div",{className:"py-1",children:e.jsx(Ux,{})}),e.jsx("hr",{className:"border-stone-800"}),i?e.jsx("button",{onClick:()=>{r(),g(!1)},className:"text-left text-sm text-stone-300 hover:text-white",children:"Cerrar sesión"}):e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(ne,{to:"/login",className:"px-4 py-2 rounded-full text-sm font-semibold border border-stone-600 text-stone-300 text-center",onClick:()=>g(!1),children:"Entrar"}),e.jsx(ne,{to:"/signup",className:"px-4 py-2 rounded-full text-sm font-semibold bg-[#e8ff4a] text-stone-950 border border-[#e8ff4a] text-center hover:bg-[#f0ff70] transition-colors",onClick:()=>g(!1),children:"Unirse"})]})]})]})]})}const Sr=[{icon:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-10 h-10 text-[#e8ff4a]",children:[e.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),e.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]}),title:"Por qué existe esto",text:"Los escaladores tenemos algo que la mayoría de viajeros no tiene: una casa cerca de una pared extraordinaria. CLIMB & HOME nació para conectar esas casas — y a las personas que viven en ellas. No somos una plataforma de alquiler. Somos una red de escaladores que se abren la puerta."},{icon:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-10 h-10 text-[#e8ff4a]",children:e.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3m8 0h3a2 2 0 0 0 2-2v-3"})}),title:"Una opción más, no la única",text:"La furgoneta, el camping, el refugio — todo tiene su lugar. CLIMB & HOME aparece cuando quieres algo distinto: ducharte en condiciones, dejar el material organizado, y que alguien que conoce cada fisura de la zona te diga dónde ir mañana. Una alternativa más para el escalador que viaja."},{icon:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-10 h-10 text-[#e8ff4a]",children:[e.jsx("path",{d:"M17 1l4 4-4 4"}),e.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),e.jsx("path",{d:"M7 23l-4-4 4-4"}),e.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]}),title:"El intercambio",text:"Simultáneo: tú en su casa mientras él en la tuya. O diferido: alojas a alguien hoy, acumulas Climbpoints y los usas cuando quieras viajar. En ambos casos los puntos circulan en las dos direcciones — no es gratuito, es recíproco. La diferencia importa."},{icon:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-10 h-10 text-[#e8ff4a]",children:[e.jsx("path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"}),e.jsx("path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"})]}),title:"El conocimiento local",text:"El anfitrión sabe dónde aparcar sin molestar a nadie, qué sector no publicar para protegerlo, cuándo merece la pena ir y cuándo no. Comparte lo que puede y lo que está permitido compartir — como complemento a las guías existentes, no como sustituto. Eso no tiene precio."},{icon:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-10 h-10 text-[#e8ff4a]",children:[e.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"9",cy:"7",r:"4"}),e.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),e.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}),title:"Una comunidad real",text:"Aquí no entran los que buscan un piso barato. Entran los que entienden que abrir tu puerta es un acto de confianza, y que llegar a casa de alguien es un privilegio. Escaladores que cuidan la montaña, respetan al siguiente y prefieren compartir antes que invadir. Si eres uno de ellos, bienvenido."}];function Zj({externalOpen:l=!1,onClose:i}){const[r,d]=b.useState(!1),[m,p]=b.useState(0),[f,x]=b.useState(!1);b.useEffect(()=>{if(!localStorage.getItem("climbandhome_welcome_seen")){const _=setTimeout(()=>d(!0),600);return()=>clearTimeout(_)}},[]),b.useEffect(()=>{l&&(p(0),x(!1),d(!0))},[l]);function h(){x(!0),localStorage.setItem("climbandhome_welcome_seen","1"),setTimeout(()=>{d(!1),i&&i()},400)}function j(){m<Sr.length-1&&p(N=>N+1)}function g(){m>0&&p(N=>N-1)}if(!r)return null;const v=Sr[m],S=m===Sr.length-1;return e.jsxs("div",{className:`fixed inset-0 z-[999] flex items-center justify-center p-4 transition-opacity duration-400 ${f?"opacity-0":"opacity-100"}`,style:{backgroundColor:"rgba(12,10,9,0.85)"},children:[e.jsx("img",{src:"/static/welcome-bg.jpg",alt:"","aria-hidden":"true",className:"absolute inset-0 w-full h-full object-cover object-center opacity-30"}),e.jsxs("div",{className:"relative z-10 w-full max-w-lg bg-stone-900/95 border border-stone-700 rounded-3xl overflow-hidden shadow-2xl",children:[e.jsxs("div",{className:"relative h-48 overflow-hidden",children:[e.jsx("img",{src:"/static/welcome-bg.jpg",alt:"Paisaje de montaña",className:"w-full h-full object-cover object-center"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent to-stone-900/95"}),e.jsx("div",{className:"absolute top-4 left-1/2 -translate-x-1/2",children:e.jsx("img",{src:"/static/logo-climb-home.jpg",alt:"CLIMB & HOME",className:"h-10 w-auto rounded-lg shadow-lg"})}),e.jsx("button",{onClick:h,"aria-label":"Cerrar",className:"absolute top-3 right-3 w-8 h-8 flex items-center justify-center rounded-full bg-stone-900/70 text-stone-400 hover:text-white hover:bg-stone-800 transition-colors",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-4 h-4",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:"px-8 py-7",children:[e.jsx("div",{className:"flex justify-center gap-2 mb-6",children:Sr.map((N,_)=>e.jsx("button",{onClick:()=>p(_),className:`rounded-full transition-all duration-300 ${_===m?"w-6 h-2 bg-[#e8ff4a]":"w-2 h-2 bg-stone-700 hover:bg-stone-500"}`,"aria-label":`Paso ${_+1}`},_))}),e.jsxs("div",{className:"flex flex-col items-center text-center min-h-[140px]",children:[e.jsx("div",{className:"mb-4",children:v.icon}),e.jsx("h2",{className:"font-display text-2xl sm:text-3xl font-bold text-white mb-3",children:v.title}),e.jsx("p",{className:"text-stone-300 text-base leading-relaxed max-w-sm",children:v.text})]}),e.jsxs("div",{className:"flex items-center justify-between mt-8 gap-3",children:[m>0?e.jsx("button",{onClick:g,className:"px-5 py-2.5 rounded-full border border-stone-600 text-stone-300 hover:border-stone-400 hover:text-white transition-colors text-sm",children:"← Anterior"}):e.jsx("div",{}),S?e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 flex-1 sm:justify-end",children:[e.jsx(ne,{to:"/signup",onClick:h,className:"inline-flex items-center justify-center px-6 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors text-sm",children:"Unirse a la comunidad"}),e.jsx(ne,{to:"/login",onClick:h,className:"inline-flex items-center justify-center px-6 py-2.5 rounded-full border border-stone-600 text-stone-300 hover:border-stone-400 hover:text-white transition-colors text-sm",children:"Ya tengo cuenta"})]}):e.jsx("button",{onClick:j,className:"ml-auto px-6 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors text-sm",children:"Siguiente →"})]}),!S&&e.jsx("div",{className:"text-center mt-4",children:e.jsx("button",{onClick:h,className:"text-stone-600 hover:text-stone-400 text-xs transition-colors",children:"Saltar introducción"})})]})]})]})}const at=[{id:"and01",zona:"El Chorro",pais:"España",continente:"Europa",lat:36.924,lng:-4.748,nivel:"4a–9a",tipo:"deportiva",temporada:"oct–may",resumen:"Desfiladero de Málaga con más de 700 vías en caliza compacta. Referente absoluto de la escalada andaluza."},{id:"and02",zona:"Desplomilandia",pais:"España",continente:"Europa",lat:37.038,lng:-4.551,nivel:"6a–9a",tipo:"deportiva",temporada:"oct–abr",resumen:"Techos y desplomes de caliza. Uno de los sectores más exigentes de la provincia de Granada."}
136,{id:"and03",zona:"Valle de Abdalajís",pais:"España",continente:"Europa",lat:36.963,lng:-4.705,nivel:"5a–8c",tipo:"deportiva",temporada:"sep–jun",resumen:"Caliza junto al Guadalhorce con vistas al Torcal. Sectores variados para todos los niveles."},{id:"and04",zona:"Cahorros de Monachil",pais:"España",continente:"Europa",lat:37.098,lng:-3.553,nivel:"5b–8c",tipo:"deportiva",temporada:"sep–jun",resumen:"Gargantas bajo Sierra Nevada. Caliza con colgantes y ambiente de alta montaña a pocos km de Granada."},{id:"and05",zona:"Grazalema",pais:"España",continente:"Europa",lat:36.76,lng:-5.37,nivel:"4a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza en el Parque Natural de la Sierra de Grazalema. Escalada entre rapaces y pueblo blanco."},{id:"and06",zona:"Manilva",pais:"España",continente:"Europa",lat:36.378,lng:-5.259,nivel:"5a–8b",tipo:"deportiva",temporada:"nov–mar",resumen:"Caliza costera en la Costa del Sol. Ideal en invierno con el Mediterráneo como telón de fondo."},{id:"and07",zona:"El Torcal",pais:"España",continente:"Europa",lat:36.95,lng:-4.543,nivel:"4b–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Paisaje kárstico único cerca de Antequera. Escalada en torres y agujas de caliza rodeadas de naturaleza."},{id:"and08",zona:"Maro – Nerja",pais:"España",continente:"Europa",lat:36.752,lng:-3.859,nivel:"5a–8c",tipo:"deportiva",temporada:"oct–abr",resumen:"Acantilados de caliza frente al Mediterráneo en la Costa de Granada. Ambiente único con vistas al mar."},{id:"and09",zona:"Sorbas",pais:"España",continente:"Europa",lat:37.099,lng:-2.108,nivel:"5b–8b",tipo:"deportiva",temporada:"sep–jun",resumen:"Paraje yesoso en el desierto de Almería. Escalada en paredes compactas de un entorno muy singular."},{id:"and10",zona:"Huebro",pais:"España",continente:"Europa",lat:36.975,lng:-2.354,nivel:"5a–8a",tipo:"deportiva",temporada:"sep–jun",resumen:"Caliza en la Sierra Alhamilla, Almería. Vías deportivas con vistas al mar y ambiente tranquilo."},{id:"and11",zona:"Chirivel",pais:"España",continente:"Europa",lat:37.663,lng:-2.235,nivel:"5b–8c",tipo:"deportiva",temporada:"mar–nov",resumen:"Sector almeriense poco masificado con buen calizo y proyectos de alta dificultad."},{id:"and12",zona:"La Muela de Albox",pais:"España",continente:"Europa",lat:37.38,lng:-2.15,nivel:"5a–8a",tipo:"deportiva",temporada:"sep–jun",resumen:"Muela calcárea en el interior de Almería. Vías clásicas y deportivas en ambiente solitario."},{id:"and13",zona:"Cerro de los Enamorados",pais:"España",continente:"Europa",lat:37.143,lng:-4.614,nivel:"4a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Monolito calizo junto a Antequera. Vías cortas con historia y vistas panorámicas a la Vega."},{id:"and14",zona:"Archidona",pais:"España",continente:"Europa",lat:37.098,lng:-4.395,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Peñón sobre la localidad malagueña. Vías bien chapeadas en caliza de calida
136d, fácil acceso."},{id:"and15",zona:"Cabra",pais:"España",continente:"Europa",lat:37.472,lng:-4.441,nivel:"5b–8c",tipo:"deportiva",temporada:"oct–may",resumen:"Sierra Subbética cordobesa. Caliza de alta calidad con proyectos de dificultad en un entorno natural protegido."},{id:"and16",zona:"Almogía",pais:"España",continente:"Europa",lat:36.846,lng:-4.548,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Peñas calcáreas en el interior de Málaga. Sectores variados, ideal para días de semana sin aglomeraciones."},{id:"and17",zona:"Los Cahorros del Río Verde",pais:"España",continente:"Europa",lat:36.878,lng:-3.734,nivel:"4b–7c",tipo:"deportiva",temporada:"sep–jun",resumen:"Gargantas del Río Verde en Otívar, Granada. Caliza con ríos y cascadas, ambiente salvaje."},{id:"and18",zona:"Ronda",pais:"España",continente:"Europa",lat:36.742,lng:-5.162,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza sobre el Tajo de Ronda. Escalada urbana con vistas épicas al puente y la serranía."},{id:"and19",zona:"Las Encantadas",pais:"España",continente:"Europa",lat:37.382,lng:-3.84,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Sector granadino poco conocido en la comarca de Guadix. Caliza compacta y ambiente desértico."},{id:"and20",zona:"Villanueva del Rosario",pais:"España",continente:"Europa",lat:37.007,lng:-4.388,nivel:"5b–8c",tipo:"deportiva",temporada:"oct–jun",resumen:"Caliza malagueña de alta calidad. Sectores variados con vías desde iniciación hasta alta dificultad."},{id:"and21",zona:"Fuente de Piedra",pais:"España",continente:"Europa",lat:37.119,lng:-4.739,nivel:"4a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Pequeño cantil calizo junto a la laguna de flamencos. Ideal para iniciarse cerca de Antequera."},{id:"and22",zona:"La Peña de los Enamorados",pais:"España",continente:"Europa",lat:37.166,lng:-4.571,nivel:"4b–7c",tipo:"multi",temporada:"oct–may",resumen:"Monolito volcánico icónico de la Vega de Antequera. Vías de múltiples largos con historia legendaria."},{id:"and23",zona:"Gibraltar – La Línea",pais:"España",continente:"Europa",lat:36.14,lng:-5.348,nivel:"5a–8a",tipo:"deportiva",temporada:"nov–abr",resumen:"Caliza al pie del Peñón. Escalada con vistas al Estrecho y al continente africano."},{id:"and24",zona:"Valle del Genal",pais:"España",continente:"Europa",lat:36.6,lng:-5.25,nivel:"4b–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Serranía de Ronda malagueña. Cortados sobre el río Genal rodeados de castaños y bosques."},{id:"ara01",zona:"Rodellar",pais:"España",continente:"Europa",lat:42.266,lng:-.038,nivel:"6a–9a",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Cañón del Mascún con tufas espectaculares. Pueblo de escaladores con ambiente propio e inigualable."},{id:"ara02",zona:"Alquézar",pais:"España",continente:"Europa",lat:42.179,lng:-.013,nivel:"5a–8c",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Caliza sobre las hoces del río Vero. Uno de los pueblos más bellos de Aragón rodeado de escalada."},{id:"ara03",zona:"Riglos",pais:"España",continente:"Europa",lat:42.37,lng:-.753,nivel:"5a–8c",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Mallos de conglomerado verticales e imponentes. Clásicos de la escalada española en paredes de 300 m."},{id:"ara04",zona:"Albarracín",pais:"España",continente:"Europa",lat:40.411,lng:-1.433,nivel:"3–8b",tipo:"bloque",temporada:"abr–jun / sep–nov",resumen:"Bosque de piedras areniscas naranjas. El bloque más famoso de Europa en un entorno medieval."},{id:"ara05",zona:"Benasque",pais:"España",continente:"Europa",lat:42.606,lng:.522,nivel:"5a–8b",tipo:"clásica",temporada:"jun–sep",resumen:"Granito pirenaico del valle de Benasque. Base ideal para escalada y alpinismo de altura."},{id:"ara06",zona:"Peña Montañesa",pais:"España",continente:"Europa",lat:42.449,lng:.281,nivel:"5b–8b",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Torre de caliza sobre el Cinca. Sectores orientados al sur con vistas al Pirineo central y al embalse de Mediano."},{id:"ara07",zona:"Muro de Roda",pais:"España",continente:"Europa",lat:42.296,lng:.288,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Murallón calizo sobre el embalse de El Grado en la Hoya de Huesca. Sectores amplios y bien equipados."},{id:"ara08",zona:"Lecina",pais:"España",continente:"Europa",lat:42.235,lng:-.038,nivel:"5b–8c",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Paredes sobre el río Vero, vecina de Alquézar. Caliza de alta calidad con rutas largas y comprometidas."},{id:"ara09",zona:"Santa Liestra",pais:"España",continente:"Europa",lat:42.325,lng:.389,nivel:"5a–7c",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Caliza sobre el Ésera. Ambiente tranquilo y poco frecuentado, ideal para días entre semana."},{id:"ara10",zona:"Peña Rueba",pais:"España",continente:"Europa",lat:42.471,lng:-.638,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Conglomerado de las Sierras Exteriores. Ambiente solitario y sectores variados entre Huesca y Jaca."},{id:"ara11",zona:"Aguarón",pais:"España",continente:"Europa",lat:41.333,lng:-1.302,nivel:"5a–7c",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Caliza en la ribera del Jalón, Zaragoza. Sectores cortos y polivalentes para escaladores de la capital aragonesa."},{id:"ara12",zona:"Agüero",pais:"España",continente:"Europa",lat:42.386,lng:-.756,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Mallos de arenisca junto a la ermita de Santiago. Comparte zona con Riglos y tiene su propio carácter."},{id:"ara13",zona:"Los Meses",pais:"España",continente:"Europa",lat:42.752,lng:-.514,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Caliza pirenaica sobre el valle de Canfranc. Sectores variados con vistas al Pirineo y al histórico paso de montaña."},{id:"ara14",zona:"Esposa",pais:"España",continente:"Europa",lat:42.637,lng:-.682,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Pequeña escuela de caliza en el valle de Aisa, Huesca. Ambiente tranquilo, sectores para todos los niveles y entorno pirenaico privilegiado."},{id:"ara15",zona:"Calcena",pais:"España",continente:"Europa",lat:41.793,lng:-1.692,nivel:"5b–8b",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Escuela de caliza en la Sierra del Moncayo, Zaragoza. Sectores con vistas al valle del Huecha, muy frecuentada por escaladores del entorno."},{id:"ast01",zona:"Arenas de Cabrales",pais:"España",continente:"Europa",lat:43.286,lng:-4.847,nivel:"5b–8c",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Caliza de los Picos de Europa con el macizo nevado de fondo. Escalada alpina de primer nivel."},{id:"ast02",zona:"Teverga",pais:"España",continente:"Europa",lat:43.163,lng:-6.104,nivel:"5b–8b",tipo:"deportiva",temporada:"may–oct",resumen:"Caliza asturiana en el Parque Natural de Las Ubiñas. Ambiente verde y rutas largas."},{id:"ast03",zona:"Cabo Peñas",pais:"España",continente:"Europa",lat:43.662,lng:-5.842,nivel:"5a–7c",tipo:"deportiva",temporada:"may–sep",resumen:"Acantilados de arenisca frente al Cantábrico. Escalada con el mar batiendo abajo."},{id:"ast04",zona:"Manzaneda – El Laboratorio",pais:"España",continente:"Europa",lat:43.241,lng:-5.891,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona Centro de la guía asturiana. Caliza con sectores variados: El Laboratorio, Annie, Central, Cantera y más. Referente en el centro de Asturias."},{id:"ast05",zona:"El Condado Nuevo – Rioseco",pais:"España",continente:"Europa",lat:43.198,lng:-5.943,nivel:"5b–8b",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona Centro. Sectores Quintos, Cuentos de Hadas, Pasajero de 
136Viento, Monstruos, Amagestú, Cadillac Solitario, Aguja y Rioseco. Gran variedad de estilos."},{id:"ast06",zona:"Cueva Devoyu",pais:"España",continente:"Europa",lat:43.167,lng:-5.672,nivel:"6a–9a",tipo:"deportiva/cueva",temporada:"todo el año",resumen:"Cueva espectacular en los Picos de Europa. Referente asturiano para grados altos. Protegida de la lluvia, abierta todo el año."},{id:"ast07",zona:"Aller – Valles del Nalón",pais:"España",continente:"Europa",lat:43.178,lng:-5.701,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–oct",resumen:"Gran zona con múltiples sectores: La Collada, Gris, Rosa de Mayo, La Leona, La Cubana, Invisible Nuevo, Asterix, Las Ardillas, La Selva, Escalón, Eclipse, Pingadura, Ventolín, El Llano/La Amarilla, Candela y Alcotán."},{id:"ast08",zona:"Oriente Asturiano – La Forcada",pais:"España",continente:"Europa",lat:43.352,lng:-4.812,nivel:"5b–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona Oriente de la guía. El Bosque, La Cruz, Insatisfecho, La Forcada, El Callejón y sectores del área oriental. Caliza con ambiente de Picos."},{id:"ast09",zona:"Las Cábadas – La Hermiga",pais:"España",continente:"Europa",lat:43.312,lng:-4.621,nivel:"5a–7c+",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona Oriente. Sectores Chorrerías, Corralito, Prima Jauna. Caliza de Asturias Oriental próxima a los límites con Cantabria."},{id:"ast10",zona:"Puentecesures – Occidente",pais:"España",continente:"Europa",lat:43.421,lng:-6.712,nivel:"5a–7b",tipo:"deportiva",temporada:"may–sep",resumen:"Zona Occidente asturiana. Caliza y cuarcita en el litoral occidental. Buen complemento para los que visitan la costa verde."},{id:"can01",zona:"La Hermida",pais:"España",continente:"Europa",lat:43.229,lng:-4.59,nivel:"5b–8c",tipo:"deportiva",temporada:"todo el año",resumen:"Desfiladero del río Deva. Caliza vertical entre Asturias y Cantabria con paredes enormes. Muy accesible desde el pueblo."},{id:"can02",zona:"Ramales de la Victoria",pais:"España",continente:"Europa",lat:43.25,lng:-3.463,nivel:"5a–8b",tipo:"deportiva",temporada:"todo el año",resumen:"Caliza cántabra en el valle del Asón, cerca del límite con Vizcaya. Sectores variados para todos los niveles."},{id:"cyl01",zona:"Hoces del Duratón",pais:"España",continente:"Europa",lat:41.336,lng:-3.814,nivel:"5a–8a",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Caliza en el cañón del Duratón con buitres leonados sobrevolando las paredes. Paisaje único."},{id:"cyl02",zona:"Las Tuerces",pais:"España",continente:"Europa",lat:42.775,lng:-4.332,nivel:"4a–7c",tipo:"deportiva",temporada:"abr–oct",resumen:"Arenisca de Palencia. Bloques y paredes singulares en un paisaje de páramo castellano."},{id:"cat01",zona:"Siurana",pais:"España",continente:"Europa",lat:41.261,lng:.928,nivel:"5a–9b",tipo:"deportiva",temporada:"sep–jun",resumen:"Caliza proyectada sobre el río Siurana. Cuna de los grados extremos con Adam Ondra y Sharma como habituales."},{id:"cat02",zona:"Margalef",pais:"España",continente:"Europa",lat:41.322,lng:.762,nivel:"6a–9b",tipo:"deportiva",temporada:"sep–jun",resumen:"Caliza de la Terra Alta con vías largas y tufas. El templo del 9 en España."},{id:"cat03",zona:"Montserrat",pais:"España",continente:"Europa",lat:41.593,lng:1.837,nivel:"4a–8c",tipo:"clásica",temporada:"oct–jun",resumen:"Conglomerado sagrado a 50 km de Barcelona. Vías clásicas en agujas de roca entre monasterio y montaña."},{id:"cat04",zona:"Sant Llorenç de Munt",pais:"España",continente:"Europa",lat:41.64,lng:1.952,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Conglomerado catalán en el Parc Natural. Sectores variados con buen acceso desde el área metropolitana."},{id:"cat05",zona:"Terradets",pais:"España",continente:"Europa",lat:42.039,lng:.868,nivel:"5a–8b",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Caliza del Prepirineo sobre el embalse de Terradets. Vías largas con ambiente de lago."},{id:"cat06",zona:"Oliana",pais:"España",continente:"Europa",lat:42.095,lng:1.311,nivel:"6a–9b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza de Lleida con algunas de las rutas más duras del mundo. Referente mundial del deporte."},{id:"cat08",zona:"Tavertet",pais:"España",continente:"Europa",lat:41.996,lng:2.418,nivel:"5a–8b",tipo:"deportiva",temporada:"mar–nov",resumen:"Espadañas basálticas sobre el Collsacabra. Escalada en columnas volcánicas con vistas al Pirineo."},{id:"cat09",zona:"El Cogul",pais:"España",continente:"Europa",lat:41.467,lng:.689,nivel:"6a–8c",tipo:"deportiva",temporada:"oct–abr",resumen:"Caliza del secano leridano. Sectores muy soleados, ideal en invierno y primavera temprana."},{id:"cat10",zona:"Congost de Mont-rebei",pais:"España",continente:"Europa",lat:42.081,lng:.682,nivel:"5b–8a",tipo:"multi",temporada:"abr–nov",resumen:"Garganta espectacular entre Huesca y Lleida. Múltiples largos en caliza sobre el embalse de Canelles."},{id:"cat11",zona:"Camarasa",pais:"España",continente:"Europa",lat:41.988,lng:.879,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza del Prepirineo leridano sobre el embalse de Camarasa. Área 1 de la guía de Lleida. Sectores variados con buena orientación al sol en invierno."},{id:"cat12",zona:"St. Llorenç de Montgai",pais:"España",continente:"Europa",lat:41.958,lng:.897,nivel:"5b–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza sobre el canal de Urgell. Zona tranquila con vías de todos los niveles, muy frecuentada por escaladores locales de Lleida."},{id:"cat13",zona:"Cubelis",pais:"España",continente:"Europa",lat:41.935,lng:.882,nivel:"5c–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Pequeña zona cerca de Camarasa con caliza de calida
136d y ambiente familiar. Ideal para grupos y jornadas de iniciación."},{id:"cat14",zona:"Alòs de Balaguer",pais:"España",continente:"Europa",lat:41.942,lng:.912,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza prepirenaica en las Garrigues altas. Sectores bien equipados y muy accesibles desde Balaguer y Lleida."},{id:"cat15",zona:"La Pauta",pais:"España",continente:"Europa",lat:41.965,lng:.862,nivel:"5b–7c+",tipo:"deportiva",temporada:"oct–may",resumen:"Zona del Área 1 de Lleida con caliza vertical. Buen complemento a Camarasa para jornadas largas."},{id:"cat16",zona:"Santa Ana – Os de Balaguer",pais:"España",continente:"Europa",lat:41.899,lng:.698,nivel:"5a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Sectores en las hoces del Segre. Caliza accesible con mucha luz solar en los meses fríos."},{id:"cat17",zona:"Tartareu",pais:"España",continente:"Europa",lat:41.873,lng:.781,nivel:"5b–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona tranquila de la Noguera leridana. Buen ambiente y caliza sólida sin aglomeraciones."},{id:"cat18",zona:"Santa Linya",pais:"España",continente:"Europa",lat:41.862,lng:.742,nivel:"6b–9a+",tipo:"deportiva",temporada:"oct–may",resumen:"Una de las cuevas más espectaculares de Europa para escalada de resistencia. Referente mundial en grados altos. Caliza de Lleida en estado puro."},{id:"cat19",zona:"Vilanova de Meià",pais:"España",continente:"Europa",lat:41.987,lng:1.019,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Área 2 de la guía de Lleida. Caliza del Prepirineo con sectores variados cerca de Àger."},{id:"cat20",zona:"Abella de la Conca",pais:"España",continente:"Europa",lat:42.073,lng:1.124,nivel:"5b–8a",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Caliza del Pallars Jussà en el Área 2. Zona con mucho potencial y pocos masificaciones."},{id:"cat21",zona:"Collegats",pais:"España",continente:"Europa",lat:42.235,lng:.982,nivel:"5a–8b",tipo:"deportiva/multi",temporada:"abr–oct",resumen:"Congost espectacular del Pallars Jussà. Vías de un largo y vías largas en caliza sobre el río Noguera Pallaresa."},{id:"cat22",zona:"Coll de Nargó",pais:"España",continente:"Europa",lat:42.193,lng:1.298,nivel:"5b–8a",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Área 3. Caliza del Alt Urgell con sectores bien equipados. Complemento perfecto a Oliana."},{id:"cat23",zona:"Perles",pais:"España",continente:"Europa",lat:42.151,lng:1.336,nivel:"5a–7c",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Zona del Área 3 cerca de Oliana. Caliza con buena orientación y ambiente de montaña media."},{id:"cat24",zona:"Canelles",pais:"España",continente:"Europa",lat:42.081,lng:.682,nivel:"5b–8b",tipo:"multi/deportiva",temporada:"abr–nov",resumen:"Embalse de Canelles en el Área 3. Vías largas sobre el agua y deportivas en los alrededores. Zona de gran belleza."},{id:"cat25",zona:"Fígols",pais:"España",continente:"Europa",lat:42.214,lng:1.674,nivel:"5a–7b+",tipo:"deportiva",temporada:"abr–oct",resumen:"Caliza del Berguedà en el Área 3. Zona poco masificada con buen ambiente y fácil acceso desde Berga."},{id:"cat26",zona:"Tres Ponts",pais:"España",continente:"Europa",lat:41.925,lng:1.207,nivel:"5b–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona del Área 3 al sur de Lleida. Caliza cálida con excelente orientación invernal."},{id:"cat27",zona:"Cavallers",pais:"España",continente:"Europa",lat:42.538,lng:.897,nivel:"4a–7b",tipo:"clásica/granito",temporada:"jun–sep",resumen:"Granito del Pallars Sobirà a más de 2.000 m. Escalada clásica en las cumbres pirenaicas, lejos del mundo deportivo. Solo en verano."},{id:"cat28",zona:"La Cova de Juncosa",pais:"España",continente:"Europa",lat:41.384,lng:.489,nivel:"6a–8c",tipo:"deportiva",temporada:"oct–may",resumen:"Cueva espectacular en las Garrigues de Lleida. Caliza muy inclinada con vías de resistencia. Zona independiente al sur de la provincia."},{id:"val01",zona:"Chulilla",pais:"España",continente:"Europa",lat:39.656,lng:-.904,nivel:"5a–8c",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza sobre el Turia. Gran ambiente de comunidad escaladora internacional en un pueblo pequeño."},{id:"val02",zona:"Eslida",pais:"España",continente:"Europa",lat:39.896,lng:-.266,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza castellonense con sectores variados. Ambiente tranquilo en plena Sierra de Espadà."},{id:"val03",zona:"Gandia / La Safor",pais:"España",continente:"Europa",lat:38.963,lng:-.18,nivel:"4a–7c",tipo:"deportiva",temporada:"oct–abr",resumen:"Caliza costera valenciana. Sectores cerca del mar para inviernos suaves y sol garantizado."},{id:"val04",zona:"Montanejos",pais:"España",continente:"Europa",lat:40.069,lng:-.539,nivel:"5a–8c",tipo:"deportiva",temporada:"sep–jun",resumen:"Caliza del Alto Mijares con aguas termales. Sectores variados y ambiente relajado en el Maestrazgo."},{id:"val06",zona:"Sella",pais:"España",continente:"Europa",lat:38.608,lng:-.272,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Pared caliza sobre la Marina Baixa alicantina. Sectores orientados al sur, muy soleados en invierno."},{id:"val07",zona:"Polop",pais:"España",continente:"Europa",lat:38.623,lng:-.128,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza alicantina sobre la Huerta de Polop. Fácil acceso desde Benidorm y la costa levantina."},{id:"val08",zona:"Agres",pais:"España",continente:"Europa",lat:38.782,lng:-.523,nivel:"5a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Paredes calizas en el interior de la Marina Alta. Tranquilo y poco frecuentado."},{id:"val09",zona:"Aixortà",pais:"España",continente:"Europa",lat:38.699,lng:-.066,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza compacta cerca de Altea. Sectores variados con buenas vistas al mar."},{id:"val10",zona:"Alcalalí",pais:"España",continente:"Europa",lat:38.748,lng:.038,nivel:"5b–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona caliza de la Marina Alta con ambiente tranquilo y fácil acceso."},{id:"val11",zona:"Alcoy",pais:"España",continente:"Europa",lat:38.695,lng:-.474,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona clásica del interior alicantino con múltiples sectores en caliza."},{id:"val12",zona:"Altea",pais:"España",continente:"Europa",lat:38.597,lng:-.059,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Paredes sobre el municipio de Altea. Buenas vistas al Mediterráneo."},{id:"val13",zona:"Baladar",pais:"España",continente:"Europa",lat:38.817,lng:.002,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Zona caliza de la Marina Alta cercana a Dénia. Muy completa."},{id:"val14",zona:"Barranc de Sanxet",pais:"España",continente:"Europa",lat:38.678,lng:-.048,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–jun",resumen:"Barranco con paredes verticales en la Marina Baixa."},{id:"val15",zona:"Barranco de los Molinos",pais:"España",continente:"Europa",lat:38.652,lng:-.762,nivel:"5a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza en el interior valenciano, sector recogido con buen ambiente."},{id:"val16",zona:"Benialí – Cova d'en Moragues",pais:"España",continente:"Europa",lat:38.755,lng:-.241,nivel:"5b–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Cueva y paredes calizas en el Valle de Gallinera. Sectores desplomados."},{id:"val17",zona:"Benifato – Font de Partegat",pais:"España",continente:"Europa",lat:38.665,lng:-.231,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona caliza sobre la Sierra de Aitana. Ambiente de montaña."},{id:"val18",zona:"Bernia",pais:"España",continente:"Europa",lat:38.659,lng:-.028,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Sierra de Bernia. Clásica alicantina con múltiples sectores y vistas al mar."},{id:"val19",zona:"Busot",pais:"España",continente:"Europa",lat:38.529,lng:-.376,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza muy trabajada cerca de Alicante. Popular y accesible."},{id:"val20",zona:"Cabeçó d'Or",pais:"España",continente:"Europa",lat:38.558,lng:-.297,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Cima caliza sobre la Marina Baixa. Rutas clásicas con vistas panorámicas."},{id:"val21",zona:"Cabreras – Sax",pais:"España",continente:"Europa",lat:38.545,lng:-.818,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona interior del Vinalopó con caliza compacta y poco concurrida."},{id:"val22",zona:"Cala Les Rotes",pais:"España",continente:"Europa",lat:38.819,lng:.104,nivel:"5a–7b",tipo:"deportiva",temporada:"sep–jun",resumen:"Escalada junto al mar en Dénia. Caliza marina con chapas."},{id:"val23",zona:"Carlos Moro",pais:"España",continente:"Europa",lat:38.581,lng:-.619,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona del interior alicantino, sectores variados en caliza gris."},{id:"val24",zona:"Castellet de Calp",pais:"España",continente:"Europa",lat:38.643,lng:.057,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Junto al Peñón de Ifach. Caliza compacta con rutas deportivas de todos los niveles."},{id:"val25",zona:"Castellets",pais:"España",continente:"Europa",lat:38.741,lng:-.145,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Pequeña zona caliza en la Marina Alta, tranquila y poco masificada."},{id:"val26",zona:"Cocentaina",pais:"España",continente:"Europa",lat:38.747,lng:-.449,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona del interior alicantino sobre el municipio de Cocentaina."},{id:"val27",zona:"Covatelles",pais:"España",continente:"Europa",lat:38.612,lng:-.187,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Pequeños techos y planchas calizas en la Marina Baixa."},{id:"val28",zona:"Coves Roges",pais:"España",continente:"Europa",lat:38.558,lng:-.218,nivel:"5a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza rojiza cerca de Altea. Ambiente familiar y accesible."},{id:"val29",zona:"Crevillent",pais:"España",continente:"Europa",lat:38.254,lng:-.817,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Sierra de Crevillent en el Baix Vinalopó. Caliza compacta."},{id:"val30",zona:"Cumbre del Sol – Benitatxell",pais:"España",continente:"Europa",lat:38.743,lng:.106,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Acantilados calizos sobre el Mediterráneo en Benitatxell."},{id:"val31",zona:"El Cepellar",pais:"España",continente:"Europa",lat:38.612,lng:-.542,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona interior de la Hoya de Alcoy con paredes verticales."},{id:"val32",zona:"Elche",pais:"España",continente:"Europa",lat:38.267,lng:-.698,nivel:"5a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza en los alrededores de Elche, zona poco conocida."},{id:"val33",zona:"Elda – Petrer",pais:"España",continente:"Europa",lat:38.473,lng:-.797,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona del Vinalopó Mitja con paredes calizas de acceso fácil."},{id:"val34",zona:"Escurines",pais:"España",continente:"Europa",lat:38.702,lng:-.058,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza cercana a Altea Hills. Sectores cortos y técnicos."},{id:"val35",zona:"Foradà",pais:"España",continente:"Europa",lat:38.773,lng:-.234,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Arco natural espectacular en el Valle de Gallinera. Zona de referencia."},{id:"val36",zona:"Gata de Gorgos",pais:"España",continente:"Europa",lat:38.776,lng:.073,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza de la Marina Alta. Ambiente tranquilo y fácil acceso desde la costa."},{id:"val37",zona:"Granadella",pais:"España",continente:"Europa",lat:38.742,lng:.138,nivel:"5a–8a",tipo:"deportiva",temporada:"sep–jun",resumen:"Acantilados calizos sobre el mar en Xàbia. Una de las joyas de la Marina Alta."},{id:"val38",zona:"Guadalest – Abdet",pais:"España",continente:"Europa",lat:38.672,lng:-.198,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza sobre el embalse de Guadalest. 
136Vistas espectaculares y varios sectores."},{id:"val39",zona:"Jávea – Cala Ambolo",pais:"España",continente:"Europa",lat:38.748,lng:.178,nivel:"5a–8a",tipo:"deportiva",temporada:"sep–jun",resumen:"Escalada en acantilados marinos en Xàbia. Caliza de mar compacta."},{id:"val40",zona:"La Solana",pais:"España",continente:"Europa",lat:38.634,lng:-.198,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona soleada en la Marina Baixa. Ideal para días de invierno."},{id:"val41",zona:"Llíber – Penya Roja",pais:"España",continente:"Europa",lat:38.752,lng:.028,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Penya Roja de Llíber: caliza roja compacta en la Marina Alta."},{id:"val42",zona:"Loja",pais:"España",continente:"Europa",lat:38.612,lng:-.423,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona interior caliza cercana a Alcoy, poco conocida y tranquila."},{id:"val43",zona:"Lorcha",pais:"España",continente:"Europa",lat:38.779,lng:-.289,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza en el Valle del Serpis. Zona con mucho potencial sin masificar."},{id:"val44",zona:"Los Pinos",pais:"España",continente:"Europa",lat:38.489,lng:-.752,nivel:"5a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Pequeña zona caliza del Vinalopó, apta para iniciación."},{id:"val45",zona:"Mascarat",pais:"España",continente:"Europa",lat:38.618,lng:-.034,nivel:"5a–8b",tipo:"deportiva",temporada:"sep–jun",resumen:"Desfiladero calizo entre Calpe y Altea. Vías cortas y deportivas junto al mar."},{id:"val46",zona:"Millena",pais:"España",continente:"Europa",lat:38.737,lng:-.408,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Pequeño pueblo con buenas paredes calizas en el interior de Alcoy."},{id:"val47",zona:"Moraira",pais:"España",continente:"Europa",lat:38.692,lng:.127,nivel:"5a–7c",tipo:"deportiva",temporada:"sep–jun",resumen:"Escalada costera en el Cap d'Or de Moraira. Caliza marina."},{id:"val48",zona:"Murla",pais:"España",continente:"Europa",lat:38.765,lng:.012,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona caliza en la Marina Alta cercana a Pedreguer."},{id:"val49",zona:"Muro d'Alcoi",pais:"España",continente:"Europa",lat:38.779,lng:-.434,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza sobre el municipio de Muro d'Alcoi. Ambiente tranquilo."},{id:"val50",zona:"Olta",pais:"España",continente:"Europa",lat:38.658,lng:.03,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Monte Olta sobre Calpe. Vistas al Peñón de Ifach, caliza compacta."},{id:"val51",zona:"Onil",pais:"España",continente:"Europa",lat:38.617,lng:-.664,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona del interior alicantino en la Hoya de Castalla."},{id:"val52",zona:"Orihuela",pais:"España",continente:"Europa",lat:38.085,lng:-.944,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Sierra de Orihuela: caliza con vistas al Vega Baja. Zona clásica del sur valenciano."},{id:"val53",zona:"Pedreguer",pais:"España",continente:"Europa",lat:38.789,lng:.033,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona caliza de la Marina Alta cercana al casco urbano de Pedreguer."},{id:"val54",zona:"Pego",pais:"España",continente:"Europa",lat:38.844,lng:-.119,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza en la Marjal de Pego. Zona tranquila y poco concurrida."},{id:"val55",zona:"Penya del Corb",pais:"España",continente:"Europa",lat:38.521,lng:-.712,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona del Vinalopó. Pared vertical compacta, referente local."},{id:"val56",zona:"Penya Roc",pais:"España",continente:"Europa",lat:38.678,lng:-.012,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Pequeña zona caliza entre Altea y Calpe con buenas vistas."},{id:"val57",zona:"Peñón de Ifach",pais:"España",continente:"Europa",lat:38.639,lng:.067,nivel:"5a–8c",tipo:"deportiva/clasica",temporada:"sep–jun",resumen:"Monumento natural y clásico de la escalada española. Vías clásicas y deportivas en caliza vertical sobre el mar."},{id:"val58",zona:"Placas del Eco",pais:"España",continente:"Europa",lat:38.712,lng:-.192,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona con planchas técnicas en la Marina Baixa."},{id:"val59",zona:"Ponoig",pais:"España",continente:"Europa",lat:38.637,lng:-.151,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Monte Ponoig sobre la Marina Baixa. Vistas al mar, caliza sólida."},{id:"val60",zona:"Puig Campana",pais:"España",continente:"Europa",lat:38.588,lng:-.188,nivel:"5a–8c",tipo:"deportiva/clasica",temporada:"oct–may",resumen:"Cumbre más prominente de la Marina Baixa. Vías clásicas y deportivas de todos los niveles."},{id:"val61",zona:"Racó de Cortés",pais:"España",continente:"Europa",lat:38.911,lng:-.247,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona caliza en la comarca de la Safor, norte de Alicante."},{id:"val62",zona:"Reconco",pais:"España",continente:"Europa",lat:38.544,lng:-.789,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona del Vinalopó con paredes verticales. Referente local."},{id:"val63",zona:"Redován",pais:"España",continente:"Europa",lat:38.105,lng:-.907,nivel:"5a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza en el Bajo Vinalopó, zona pequeña y accesible."},{id:"val64",zona:"Rincón Bello",pais:"España",continente:"Europa",lat:38.512,lng:-.778,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona interior del Vinalopó. Ambiente tranquilo."},{id:"val65",zona:"Salinas",pais:"España",continente:"Europa",lat:38.497,lng:-.963,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Sierra de Salinas. Caliza gris compacta en el Alto Vinalopó."},{id:"val66",zona:"Serra de Segaria",pais:"España",continente:"Europa",lat:38.829,lng:-.052,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Sierra litoral entre Dénia y Ondara. Caliza con sectores variados."},{id:"val67",zona:"Sierra de Enmedio – La Ofra",pais:"España",continente:"Europa",lat:38.488,lng:-.734,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona del Vinalopó. Pared de referencia local con vías deportivas."},{id:"val68",zona:"Sierra de Toix",pais:"España",continente:"Europa",lat:38.632,lng:.012,nivel:"5a–7c",tipo:"deportiva",temporada:"sep–jun",resumen:"Acantilados calizos sobre el Mediterráneo entre Calpe y Altea."},{id:"val69",zona:"Tàrbena",pais:"España",continente:"Europa",lat:38.698,lng:-.105,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona caliza sobre el municipio de Tàrbena. Varios sectores bien equipados."},{id:"val70",zona:"Tormos",pais:"España",continente:"Europa",lat:38.803,lng:-.086,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza en la Marina Alta cercana a Pego."}
136,{id:"val71",zona:"Valle de Guadar – Barranc de Gulapdar",pais:"España",continente:"Europa",lat:38.783,lng:-.201,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Barrancos y paredes calizas en el interior de la Marina Alta."},{id:"val72",zona:"Xorret de Catí – Castalla",pais:"España",continente:"Europa",lat:38.574,lng:-.681,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona de Castalla con caliza compacta y buenas rutas deportivas."},{id:"val73",zona:"Villajoyosa",pais:"España",continente:"Europa",lat:38.505,lng:-.237,nivel:"5a–7c",tipo:"deportiva",temporada:"sep–jun",resumen:"Caliza y conglomerado junto al mar en La Vila Joiosa."},{id:"val74",zona:"Villena – Peña Rubia",pais:"España",continente:"Europa",lat:38.638,lng:-.868,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Peña Rubia sobre Villena. Zona clásica del Alto Vinalopó."},{id:"val75",zona:"Xixona – Cabeç dels Nanos",pais:"España",continente:"Europa",lat:38.528,lng:-.506,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza interior entre Alicante y Alcoy. Zona tranquila y poco conocida."},{id:"val76",zona:"Vallada",pais:"España",continente:"Europa",lat:38.882,lng:-.692,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza compacta en la Canal de Navarrés, comarca de La Costera. Zona de referencia del interior valenciano con sectores variados y buen equipamiento."},{id:"cas01",zona:"Jérica",pais:"España",continente:"Europa",lat:39.921,lng:-.572,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona 1 de la guía de Castellón. Caliza del Alto Palancia. Sectores variados con buen equipamiento y fácil acceso desde Valencia."},{id:"cas02",zona:"Peñas Aragonesas",pais:"España",continente:"Europa",lat:40.012,lng:-.498,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona 2. Caliza del interior castellonense cerca de la frontera con Teruel. Ambiente de montaña media con vistas espectaculares."},{id:"cas03",zona:"Tales",pais:"España",continente:"Europa",lat:39.961,lng:-.318,nivel:"5a–7b+",tipo:"deportiva",temporada:"oct–may",resumen:"Zona 3. Caliza del río Mijares. Zona tranquila y accesible desde Onda y Castellón de la Plana."},{id:"cas04",zona:"Fuentes de Ayodar",pais:"España",continente:"Europa",lat:39.984,lng:-.368,nivel:"5b–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona 4. Caliza castellonense con sectores bien equipados en el entorno del río Mijares."},{id:"cas05",zona:"Llavalasar",pais:"España",continente:"Europa",lat:40.021,lng:-.341,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zona 5. Caliza del interior de Castellón. Zona poco masificada y de fácil acceso."},{id:"cas06",zona:"Vallat",pais:"España",continente:"Europa",lat:40.002,lng:-.285,nivel:"5a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Zona 6. Caliza de las Ribesesques. Zona tranquila con buen ambiente y vías accesibles."},{id:"cas07",zona:"El Castellet",pais:"España",continente:"Europa",lat:40.018,lng:-.112,nivel:"5b–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Zona 7. Caliza castellonense con líneas verticales de buena calidad."},{id:"cas08",zona:"La Cantera – Borriol",pais:"España",continente:"Europa",lat:40.063,lng:-.071,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Zonas 8 y 9. La Cantera y Borriol, cerca de Castellón de la Plana. Zonas urbanas accesibles para jornadas rápidas."},{id:"cas09",zona:"Orpesa – La Rambla",pais:"España",continente:"Europa",lat:40.085,lng:.123,nivel:"5a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Zonas 10 y 11. Orpesa del Mar y La Rambla. Caliza costera con vistas al Mediterráneo."},{id:"cas10",zona:"Atzeneta del Maestrat",pais:"España",continente:"Europa",lat:40.273,lng:-.214,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Zona 12. Caliza del Maestrat. Zona interior con gran potencial y sectores bien equipados."},{id:"cas11",zona:"Penyagolosa",pais:"España",continente:"Europa",lat:40.225,lng:-.352,nivel:"4a–7c",tipo:"multi/clasica",temporada:"may–oct",resumen:"Zona 13. El techo de Castellón a 1.814 m. Escalada clásica en la montaña sagrada del Paí
136s Valenciano."},{id:"cas12",zona:"Barranc de la Guitarra",pais:"España",continente:"Europa",lat:40.183,lng:-.298,nivel:"5b–8b",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona 14. Caliza del interior castellonense. Zona referente del Maestrat con sectores deportivos de calidad."},{id:"cas13",zona:"Culla",pais:"España",continente:"Europa",lat:40.363,lng:-.171,nivel:"5a–7c",tipo:"deportiva",temporada:"may–oct",resumen:"Zona 16. Caliza del Alt Maestrat. Entorno medieval espectacular con el pueblo de Culla en lo alto."},{id:"cas14",zona:"Cingle Redó",pais:"España",continente:"Europa",lat:40.412,lng:-.138,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona 17. Caliza del Maestrat con grandes paredes verticales. Zona de referencia en el norte de Castellón."},{id:"cas15",zona:"Murs",pais:"España",continente:"Europa",lat:40.481,lng:-.102,nivel:"5b–7c+",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona 18. Caliza castellonense en el norte del Maestrat. Zona tranquila con buen ambiente."},{id:"cas16",zona:"Torre Badún",pais:"España",continente:"Europa",lat:40.512,lng:.021,nivel:"5a–7b",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona 19. Caliza costera del norte de Castellón. Vistas al Mediterráneo."},{id:"cas17",zona:"Penyíscola",pais:"España",continente:"Europa",lat:40.359,lng:.412,nivel:"5a–7a",tipo:"deportiva",temporada:"oct–may",resumen:"Zona 20. Caliza costera junto al castillo del Papa Luna. Ambiente histórico y marítimo único."},{id:"cas18",zona:"La Pedrera",pais:"España",continente:"Europa",lat:40.482,lng:.112,nivel:"5b–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona 21. Caliza del norte de Castellón. Zona de referencia local con buenos sectores deportivos."},{id:"cas19",zona:"Morral de l'Àngel",pais:"España",continente:"Europa",lat:40.521,lng:.198,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona 22. Caliza castellonense del norte. Ambiente tranquilo con vistas al mar."},{id:"cas20",zona:"Xert",pais:"España",continente:"Europa",lat:40.544,lng:.112,nivel:"5a–7b+",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona 23. Caliza del Baix Maestrat. Zona poco frecuentada con buena roca y entorno natural."},{id:"cas21",zona:"Rosell",pais:"España",continente:"Europa",lat:40.612,lng:.202,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona 24. Caliza del norte del Baix Maestrat. Zona tranquila en la frontera con Tarragona."},{id:"cas22",zona:"Morella – Forcall",pais:"España",continente:"Europa",lat:40.619,lng:-.098,nivel:"5a–7b",tipo:"deportiva/multi",temporada:"may–oct",resumen:"Zona 25. Caliza del Els Ports de Morella. Escalada con el telón de fondo de la ciudad medieval de Morella."},{id:"cas23",zona:"La Gotera",pais:"España",continente:"Europa",lat:40.582,lng:-.112,nivel:"5b–8b",tipo:"deportiva",temporada:"may–oct",resumen:"Zona 26. Caliza de Els Ports. Zona de referencia del norte de Castellón para grados medios y altos."},{id:"mad01",zona:"La Pedriza",pais:"España",continente:"Europa",lat:40.734,lng:-3.958,nivel:"3–8a",tipo:"clásica",temporada:"abr–oct",resumen:"Granito del Guadarrama. El patio de escalada de Madrid con centenares de rutas en un paisaje lunar."},{id:"mad02",zona:"El Yelmo / La Cabrera",pais:"España",continente:"Europa",lat:40.884,lng:-3.617,nivel:"5a–8b",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Granito del noreste madrileño. Paredes verticales con ambiente de sierra castiza."},{id:"mad03",zona:"Patones",pais:"España",continente:"Europa",lat:40.855,lng:-3.484,nivel:"5a–8b",tipo:"deportiva",temporada:"sep–jun",resumen:"Caliza junto al embalse del Atazar. Varios sectores con vistas al embalse y buen microclima."},{id:"mad04",zona:"Puerto de Canencia",pais:"España",continente:"Europa",lat:40.91,lng:-3.738,nivel:"5b–8a",tipo:"deportiva",temporada:"may–oct",resumen:"Granito en el Puerto de Canencia, Sierra de Guadarrama. Escalada clásica en el entorno del Paular."},{id:"mur01",zona:"Los Alcázares",pais:"España",continente:"Europa",lat:37.75,lng:-.855,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–abr",resumen:"Caliza murciana con inviernos suaves. El refugio de los escaladores del norte durante los meses fríos."},{id:"mur03",zona:"La Panocha",pais:"España",continente:"Europa",lat:37.943,lng:-1.088,nivel:"5a–8c",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza murciana al este de Murcia capital. Sectores muy frecuentados por escaladores locales, con vías de todos los niveles."},{id:"mur04",zona:"Sierra de Ricote",pais:"España",continente:"Europa",lat:38.069,lng:-1.39,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–abr",resumen:"Caliza del cañón del Segura al interior de Murcia. Pequeños sectores de escalada deportiva en un entorno natural muy bien conservado."},{id:"nav01",zona:"Etxauri – Gradas de Ciriza",pais:"España",continente:"Europa",lat:42.813,lng:-1.836,nivel:"5a–8c",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"La escuela clásica de Navarra. Caliza de primera calidad con más de 200 vías. Sectores: Bordillos/Peñ
136a Garbatxabal, Axenbaldi y Kale Borroka (Izq. y Dch.), Peña de las Trampas (Izq. y Dch.), Arrano Beltza, Iniciación, Ilusioa (Izq. y Dch.), Jessica Oeste, Jessica, Central y Espolón del Indio."},{id:"nav02",zona:"Etxauri – El Torreón",pais:"España",continente:"Europa",lat:42.81,lng:-1.826,nivel:"5b–8b",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Zona de Etxauri con carácter propio. Sectores Caña España y El Torreón. Vías verticales en caliza compacta."},{id:"nav02b",zona:"Etxauri – Pared de la Sierra",pais:"España",continente:"Europa",lat:42.808,lng:-1.829,nivel:"5a–8a",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Sectores Pirulo, Pirulo y Emilio Castiella, Callejón de las Trampas, Tótem, Javier Olagüe y Pequeño Circo. Gran variedad de orientaciones."},{id:"nav02c",zona:"Etxauri – Cantero (Peña de los Canteros)",pais:"España",continente:"Europa",lat:42.812,lng:-1.833,nivel:"5b–7c+",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Sectores Javier Auzmendi Norte, Stop Norte, Cara Este y Cara Sur. Caliza con vías de media montaña y buenas vistas."},{id:"nav02d",zona:"Etxauri – Kiriako",pais:"España",continente:"Europa",lat:42.811,lng:-1.835,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–oct",resumen:"Cuatro caras: Norte, Oeste, Ditusuaien Sur y Este. Sector muy completo para trabajar todos los estilos en caliza."},{id:"nav02e",zona:"Etxauri – El Balcón",pais:"España",continente:"Europa",lat:42.814,lng:-1.831,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–oct",resumen:"Sectores Africanito y Cuestas, Pared del Refugio, Cara Sur, Cara Este y Cara Norte. El sector más alto de la zona con vistas panorámicas."},{id:"nav02f",zona:"Etxauri – El Mogollón",pais:"España",continente:"Europa",lat:42.809,lng:-1.828,nivel:"5b–7b",tipo:"deportiva",temporada:"abr–oct",resumen:"Sector Mogollón. Caliza compacta ideal para nivel medio-alto."},{id:"nav02g",zona:"Etxauri – El Huso y La Rueca",pais:"España",continente:"Europa",lat:42.807,lng:-1.832,nivel:"5a–7c",tipo:"deportiva",temporada:"mar–nov",resumen:"El Huso con cuatro caras (Este, Norte, Oeste y Sur) y La Rueca (Sur, Norte y Oeste). Sectores menos concurridos y muy completos."},{id:"nav02h",zona:"Etxauri – Pared de la Sierra / Cervinico",pais:"España",continente:"Europa",lat:42.806,lng:-1.83,nivel:"5a–7b+",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Sectores Pared del Boj, La Mano, Pared de Los Maños y El Pie y El Dedo. El Cervinico con Cara Este y Norte. Zona ideal para iniciación."},{id:"nav03",zona:"Arbayún",pais:"España",continente:"Europa",lat:42.72,lng:-1.26,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Cañón calizo en las Navascués navarro. Espectacular desfiladero con escalada deportiva de calidad en un entorno protegido."},{id:"nav04",zona:"Lumbier",pais:"España",continente:"Europa",lat:42.651,lng:-1.3,nivel:"5a–8a",tipo:"deportiva",temporada:"sep–jun",resumen:"Hoces del río Irati en Navarra. Caliza con sectores variados y el famoso buitre leonado sobrevolando las paredes."},{id:"nav05",zona:"El Garrafón – Peña del Zorro",pais:"España",continente:"Europa",lat:42.741,lng:-1.952,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Caliza navarra con dos sectores clásicos: Izquierdo y Derecho. Ambiente tranquilo y buenas vistas."},{id:"nav06",zona:"Las Rayas",pais:"España",continente:"Europa",lat:42.722,lng:-1.934,nivel:"5b–7b",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Sector compacto y bien equipado en el prepirineo navarro."},{id:"nav07",zona:"Peñartea",pais:"España",continente:"Europa",lat:42.698,lng:-1.768,nivel:"4c–8c+",tipo:"deportiva/clásica",temporada:"abr–jun / sep–nov",resumen:"La escuela de escalada más grande de Navarra. Más de 300 vías en caliza, todos los niveles. Sectores: El Portillo, La Y y Quesos, Estella, Rabo de León, Piedra del Camino, Pacha, Orraun Sur, Orraun Este, La Placa y La Cueva, El Cilindro, La Cobra, El Elefante Grande, La Lagartija, El Lagarto, Aguja Putreen Haitza y Panorámica."},{id:"nav08",zona:"Peña Unzue",pais:"España",continente:"Europa",lat:42.618,lng:-1.582,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–nov",resumen:"Caliza navarra con dos caras y sectores orientados al sur. Ideal para temporada larga."},{id:"nav09",zona:"Dos Hemanas – Biaizpe",pais:"España",continente:"Europa",lat:42.882,lng:-1.455,nivel:"5b–8a",tipo:"deportiva",temporada:"may–oct",resumen:"Paredes pirinaicas con múltiples caras: Sur, Este, Oeste, Norte. Sectores de la Plataforma y Balcón de los Buitres."},{id:"nav10",zona:"Aiztondo",pais:"España",continente:"Europa",lat:43.112,lng:-2.015,nivel:"5a–7c+",tipo:"deportiva",temporada:"sep–jun",resumen:"Caliza guipuzcoana cerca de la frontera navarra. Sectores Makurketa y Aiztondo. Buen refugio de lluvia."},{id:"nav11",zona:"Laieneko Haitza – Sarabé",pais:"España",continente:"Europa",lat:42.901,lng:-1.512,nivel:"5b–8b",tipo:"deportiva",temporada:"may–oct",resumen:"Sector Jentilena y El Morro. 
136Caliza pirenaica de excelente calidad."},{id:"nav12",zona:"Puerto de Urbasa – El Boquete y Bargagorri",pais:"España",continente:"Europa",lat:42.868,lng:-2.161,nivel:"5a–8a",tipo:"deportiva",temporada:"may–sep",resumen:"Conglomerado y caliza en la sierra de Urbasa. Sector El Boquete y paredes de Bargagorri."},{id:"nav13",zona:"La Sima",pais:"España",continente:"Europa",lat:42.856,lng:-2.142,nivel:"5a–7c",tipo:"deportiva",temporada:"may–sep",resumen:"Sectores Pared de la Sima y Sotokua. Muy recomendable combinado con Urbasa."},{id:"nav14",zona:"Lezaia",pais:"España",continente:"Europa",lat:42.965,lng:-2.098,nivel:"5a–7b",tipo:"deportiva",temporada:"abr–oct",resumen:"Sector La Peña. Caliza alavesa cerca del límite navarro."},{id:"nav15",zona:"Errekagaitzeta",pais:"España",continente:"Europa",lat:43.074,lng:-1.891,nivel:"5b–7c",tipo:"deportiva",temporada:"sep–jun",resumen:"Sectores Behikua y Goikua, Txintxurrinea y Ustelkeria. Caliza húmeda con buenas vías medias."},{id:"nav16",zona:"Mantxola y Miraldea",pais:"España",continente:"Europa",lat:43.038,lng:-2.251,nivel:"5a–8a+",tipo:"deportiva",temporada:"abr–oct",resumen:"Sectores Mantxola Central y La Cueva. Zona clásica alavesa con proyectos difíciles."},{id:"nav17",zona:"La Chimenea – Monolito de Leire",pais:"España",continente:"Europa",lat:42.617,lng:-1.188,nivel:"5a–7b+",tipo:"clásica/deportiva",temporada:"abr–nov",resumen:"Paredes conglomeráticas en el macizo de Leire. Cara Sur, Oeste y Norte."},{id:"nav18",zona:"Foz de Burgui – Espolón de Burgui",pais:"España",continente:"Europa",lat:42.752,lng:-.952,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Cara Oeste, Cara Sur y 2º Espolón. Caliza pirenaica en las Roncalesas."},{id:"nav19",zona:"Santierra de Isca",pais:"España",continente:"Europa",lat:42.626,lng:-1.061,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–nov",resumen:"Sectores Olatuak, La Cara del Hombre, La Palomera, La Garona e Incógnitas. Zona extensa con mucha variedad."},{id:"nav20",zona:"Belozkarre",pais:"España",continente:"Europa",lat:42.983,lng:-1.735,nivel:"5b–8b+",tipo:"deportiva",temporada:"sep–jun",resumen:"Sector Isaba. Caliza de alta calidad en el pirineo navarro."},{id:"nav21",zona:"Eraize",pais:"España",continente:"Europa",lat:42.872,lng:-2.013,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–oct",resumen:"Caliza navarra con sector propio. Ideal para nivel medio."},{id:"nav22",zona:"San Fausto",pais:"España",continente:"Europa",lat:43.175,lng:-1.788,nivel:"5a–8a",tipo:"deportiva",temporada:"sep–jun",resumen:"Mapa de carreteras y sectores variados. Una de las zonas más activas del norte de Navarra."},{id:"nav23",zona:"Lepia",pais:"España",continente:"Europa",lat:43.148,lng:-1.756,nivel:"5a–7b",tipo:"deportiva",temporada:"sep–jun",resumen:"Sector Erreka. Caliza húmeda con buen ambiente."},{id:"nav24",zona:"Penatxabala",pais:"España",continente:"Europa",lat:43.227,lng:-1.832,nivel:"5b–7c",tipo:"deportiva",temporada:"sep–jun",resumen:"Sector Txiki Parc. Buenas vías cortas cerca de la frontera vasconavarra."},{id:"nav25",zona:"Bargagorria",pais:"España",continente:"Europa",lat:42.876,lng:-2.154,nivel:"5a–7a",tipo:"deportiva",temporada:"may–oct",resumen:"Sectores Berria y Akerzulo. Conglomerado con vistas a la sierra de Urbasa."},{id:"nav26",zona:"Altikogana",pais:"España",continente:"Europa",lat:43.103,lng:-1.968,nivel:"5a–7c+",tipo:"deportiva",temporada:"sep–jun",resumen:"Sectores Bota, Urtxintxa y Oeste, Caracola, Eoceno y Prehistoria."},{id:"nav27",zona:"Lazkua",pais:"España",continente:"Europa",lat:42.984,lng:-2.223,nivel:"5a–7b",tipo:"deportiva",temporada:"abr–oct",resumen:"Sector Pikutxis. Caliza alavesa accesible."},{id:"nav28",zona:"Peñaguda",pais:"España",continente:"Europa",lat:42.635,lng:-1.212,nivel:"5b–8a",tipo:"deportiva",temporada:"abr–nov",resumen:"Sector Peñaguda. Una de las zonas más cómodas del sur de Navarra."},{id:"nav29",zona:"Axkin Arrondo",pais:"España",continente:"Europa",lat:43.121,lng:-2.052,nivel:"5a–7c",tipo:"deportiva",temporada:"sep–jun",resumen:"Sectores Ibaiondo, Oguiazutik, Untzaleku y Belekaka, Diedro-Turrón-La Cabra y Zulutziki."},{id:"nav30",zona:"Aiako Harria – Kopako Harri",pais:"España",continente:"Europa",lat:43.28
1361,lng:-1.874,nivel:"5a–8b",tipo:"deportiva/clásica",temporada:"may–oct",resumen:"Sectores Tartalo, Bordillos-Eguzkilore y Brisa Kale. Granito en el macizo de Aiako Harria, frontera guipuzcoana."},{id:"nav32",zona:"Larraona",pais:"España",continente:"Europa",lat:42.817,lng:-2.228,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Caliza navarra en el valle de Lana, prepirineo occidental. Sectores poco masificados con buena roca y ambiente tranquilo."},{id:"nav33",zona:"Eulate",pais:"España",continente:"Europa",lat:42.793,lng:-2.186,nivel:"5a–7b+",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Pared caliza en el valle de Améscoa Baja, muy cerca de Larraona. Ideal para combinar en una jornada de escalada en el corazón navarro."},{id:"nav31",zona:"Sierra de Cantabria – Peña Roja",pais:"España",continente:"Europa",lat:42.548,lng:-2.652,nivel:"5a–7c+",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Sectores Gore, Piolin y Placa, Peña Roja, Pedralta, Franivern y Nievias. Caliza alavesa con gran panorámica sobre La Rioja."},{id:"pvs01",zona:"Baltzola",pais:"España",continente:"Europa",lat:43.13,lng:-2.78,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Caliza vizcaína cerca de Dima. Sectores familiares y ambiente de escalada local muy activo."},{id:"pvs02",zona:"Atxarte",pais:"España",continente:"Europa",lat:43.113,lng:-2.637,nivel:"5a–8c",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Cañón de caliza en Abadiño, Bizkaia. Uno de los sectores más emblemáticos del País Vasco con vías de todos los niveles."},{id:"pvs03",zona:"Pagasarri",pais:"España",continente:"Europa",lat:43.232,lng:-2.939,nivel:"4a–7b",tipo:"deportiva",temporada:"todo el año",resumen:"Monte sobre Bilbao con escalada accesible. Ideal para iniciarse con vistas a la ría."},{id:"pvs04",zona:"Mugarra",pais:"España",continente:"Europa",lat:43.098,lng:-2.61,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Caliza del Duranguesado en Bizkaia. Sector con carácter propio y buena roca."},{id:"pvs05",zona:"Txindoki",pais:"España",continente:"Europa",lat:43.063,lng:-2.257,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Agujas calcáreas de la Sierra de Aralar, Gipuzkoa. Escalada clásica vasca con vistas impresionantes."},{id:"pvs06",zona:"Aiako Harria",pais:"España",continente:"Europa",lat:43.281,lng:-1.874,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–oct",resumen:"Macizo granítico en la frontera con Francia, Gipuzkoa. Escalada variada en roca sólida y ambiente salvaje."},{id:"pvs07",zona:"Uzturre",pais:"España",continente:"Europa",lat:43.131,lng:-2.183,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Caliza de Gipuzkoa. Sector tranquilo con vías bien equipadas y acceso cómodo."},{id:"pvs08",zona:"Lizarrusti",pais:"España",continente:"Europa",lat:43.046,lng:-2.222,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–oct",resumen:"Puerto de montaña entre Gipuzkoa y Navarra. Caliza con sectores variados y ambiente de montaña."},{id:"pvs09",zona:"Adarra",pais:"España",continente:"Europa",lat:43.222,lng:-1.962,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–oct",resumen:"Monte de Gipuzkoa con escalada asequible. Ambiente local y vistas al golfo de Bizkaia."},{id:"pvs10",zona:"Aizkorri",pais:"España",continente:"Europa",lat:42.96,lng:-2.33,nivel:"5b–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Macizo calizo entre Gipuzkoa y Álava. Escalada con entorno de montaña vasca muy frecuentada."},{id:"pvs11",zona:"Sobrón",pais:"España",continente:"Europa",lat:42.76,lng:-3.06,nivel:"5a–8c",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Cañón calcáreo en Álava sobre el pantano del Ebro. Uno de los grandes sectores del País Vasco con vías de alta dificultad."},{id:"pvs12",zona:"Sierra de Cantabria",pais:"España",continente:"Europa",lat:42.62,lng:-2.68,nivel:"5a–8b",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Caliza alavesa al sur del territorio. Sectores variados con clima más seco que la costa."},{id:"pvs13",zona:"Apellániz",pais:"España",continente:"Europa",lat:42.714,lng:-2.519,nivel:"5a–8a",tipo:"deportiva",temporada:"mar–nov",resumen:"Caliza de la Montaña Alavesa. Zona poco masificada con roca de calida
136d y ambiente rural."},{id:"pvs14",zona:"Valdegovía",pais:"España",continente:"Europa",lat:42.81,lng:-3.12,nivel:"5a–8a",tipo:"deportiva",temporada:"mar–nov",resumen:"Cañón del río Omecillo en Álava. Caliza con vías deportivas y entorno natural muy bien conservado."},{id:"pvs15",zona:"Atauri",pais:"España",continente:"Europa",lat:42.715,lng:-2.398,nivel:"5a–8b",tipo:"deportiva",temporada:"mar–nov",resumen:"Caliza de la Llanada Alavesa. Sector histórico con vías clásicas del escalada vasca."},{id:"pvs16",zona:"Subijana",pais:"España",continente:"Europa",lat:42.817,lng:-2.747,nivel:"5a–7c",tipo:"deportiva",temporada:"mar–nov",resumen:"Caliza alavesa de acceso sencillo. Ideal para días entre semana sin aglomeraciones."},{id:"pvs17",zona:"Orbara",pais:"España",continente:"Europa",lat:42.874,lng:-1.37,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–oct",resumen:"Valle navarro cercano al País Vasco. Caliza con sectores variados y ambiente de escalada familiar."},{id:"pvs57",zona:"Iwak Climbing",pais:"España",continente:"Europa",lat:43.302,lng:-2.938,nivel:"5a–8b",tipo:"deportiva",temporada:"todo el año",resumen:"Zona de escalada en Derio, Bizkaia. Sector activo próximo a Bilbao."},{id:"pvs61",zona:"Cabo Ogoño",pais:"España",continente:"Europa",lat:43.395,lng:-2.642,nivel:"5a–7c",tipo:"deportiva",temporada:"todo el año",resumen:"Caliza costera en Ibarrangelu, Bizkaia. Vistas al Cantábrico, ambiente único entre mar y roca."},{id:"pvs60",zona:"La Mindao",pais:"España",continente:"Europa",lat:43.127,lng:-2.776,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Caliza bizkaína en Dima, Bizkaia. Sector local con buena roca a pocos minutos de Baltzola."},{id:"pvs62",zona:"Apellaniz",pais:"España",continente:"Europa",lat:42.731,lng:-2.475,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:`Caliza alavesa en la Montaña Alavesa. Zona Eskalerria nº01. Coordenadas exactas: N42°43'53" W2°28'46,86".`},{id:"pvs63",zona:"Araotz",pais:"España",continente:"Europa",lat:43.038,lng:-2.447,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–oct",resumen:`Caliza guipuzcoana en el Geoparque de Araotz-Arantzazu. Zona Eskalerria nº02. Coordenadas: N43°0'2,3" W2°26'8,5".`},{id:"pvs64",zona:"Galdames",pais:"España",continente:"Europa",lat:43.271,lng:-3.101,nivel:"5a–7b+",tipo:"deportiva",temporada:"sep–jun",resumen:`Caliza bizkaína en las Encartaciones. Zona Eskalerria nº07. Coordenadas: N43°16'14,54" W3°6'10,1".`},{id:"pvs65",zona:"Itoitz",pais:"España",continente:"Europa",lat:42.858,lng:-1.372,nivel:"5b–8a",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:`Caliza navarra en el embalse de Itoiz, Navarra. Zona Eskalerria nº08. Coordenadas: N42°51,5'16" W1°22'31,98".`},{id:"pvs66",zona:"Putreen Behatokia",pais:"España",continente:"Europa",lat:42.917,lng:-1.822,nivel:"5b–7c",tipo:"deportiva",temporada:"abr–oct",resumen:`Caliza navarra en la zona de Peñártea. Zona Eskalerria nº13. Coordenadas: N42°55'10" W1°49'22,4".`},{id:"pvs67",zona:"Salvatierra de Esca",pais:"España",continente:"Europa",lat:42.66,lng:-1.317,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–nov",resumen:`Caliza pirenaica en las Cinco Villas navarras. Zona Eskalerria nº14. Coordenadas: N42°39,6'19" W21°0'40,76".`},{id:"pvs68",zona:"Valdegovia",pais:"España",continente:"Europa",lat:42.843,lng:-3.086,nivel:"5a–7c+",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:`Caliza alavesa en el valle de Valdegovia, Álava. Zona Eskalerria nº17. Coordenadas: N42°50'50,8" W3°5'55,1".`},{id:"bal01",zona:"Sa Gubia (Mallorca)",pais:"España",continente:"Europa",lat:39.776,lng:2.561,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza mallorquina en el corazón de la Serra de Tramuntana. Ambiente mediterráneo único."},{id:"bal02",zona:"Cala Magraner",pais:"España",continente:"Europa",lat:39.542,lng:3.378,nivel:"5a–8c",tipo:"deportiva",temporada:"oct–may",resumen:"Acantilados de caliza sobre el mar en el este de Mallorca. Acceso a pie o en barco."},{id:"bal03",zona:"S'Estret (Mallorca)",pais:"España",continente:"Europa",lat:39.876,lng:2.752,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Cañón calcáreo en el interior de Mallorca. Sectores variados con ambiente tranquilo y escalada de calida
136d."},{id:"bal04",zona:"Cap de Formentor",pais:"España",continente:"Europa",lat:39.963,lng:3.215,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–may",resumen:"Acantilados en el extremo norte de Mallorca. Escalada sobre el Mediterráneo con vistas únicas al Cap de Formentor."},{id:"bal05",zona:"Cala en Porter (Menorca)",pais:"España",continente:"Europa",lat:39.863,lng:4.128,nivel:"4a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza costera en el sur de Menorca. Sectores asequibles y fácil acceso desde Alaior."},{id:"bal06",zona:"Valldemossa – Es Verger",pais:"España",continente:"Europa",lat:39.714,lng:2.622,nivel:"5a–8b",tipo:"deportiva/multi",temporada:"oct–may",resumen:"Zona Valldemossa Area (pág. 82 guía). Es Verger, Penyal d'es Grau, S'Estret y Valldemossa. Caliza de la Serra de Tramuntana. Temporada otoño-primavera."},{id:"bal07",zona:"Bunyola – Sa Gubia – Fraguell",pais:"España",continente:"Europa",lat:39.757,lng:2.681,nivel:"5a–8a",tipo:"deportiva/multi",temporada:"oct–may",resumen:"Bunyola Area (pág. 118). Fraguell y Sa Gubia. Caliza de gran calidad en la cara norte de la Tramuntana. Vías largas y deportivas."},{id:"bal08",zona:"North of Mountains – C'an Nyic – Gorg Blau",pais:"España",continente:"Europa",lat:39.795,lng:2.794,nivel:"5a–8a",tipo:"deportiva/multi",temporada:"oct–may",resumen:"North of Mountains (pág. 150). C'an Nyic, Gorg Blau, Port de Sóller. Caliza del norte de la Serra de Tramuntana. Ambiente alpino y paisajístico."},{id:"bal09",zona:"Southwest – C'an Formiga – Calvia – Ca's Català",pais:"España",continente:"Europa",lat:39.532,lng:2.489,nivel:"4a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Southwest (pág. 38). C'an Formiga, Calvia, Ca's Català, Cala Llamp, Can Ortigues, La Vall Verde, Puig de Garrafa, Sa Cantera, Santa Ponça. Zona sur con fácil acceso desde Palma."},{id:"bal10",zona:"South of Mountains – Alaró – Caimari",pais:"España",continente:"Europa",lat:39.698,lng:2.877,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"South of Mountains (pág. 166). Alaró, Caimari, Grau des Ruc. Caliza interior con grandes paredes verticales en el corazón de la Serra."},{id:"bal11",zona:"Pollença – Formentor – El Fumat",pais:"España",continente:"Europa",lat:39.904,lng:3.018,nivel:"5a–8a",tipo:"deportiva/multi",temporada:"oct–may",resumen:"Pollença & Formentor (pág. 196). El Fumat, La Creveta, Puig St. Martí, Xon Xanquete. Caliza del extremo norte de Mallorca. Vistas al mar, ambiente único."},{id:"bal12",zona:"Artà – El Calo de Betlem – Son Servera",pais:"España",continente:"Europa",lat:39.694,lng:3.349,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–may",resumen:"Artà Area (pág. 218). El Calo de Betlem, Ermita de Betlem, Son Servera. 
136Caliza oriental de Mallorca, zona tranquila y poco masificada."},{id:"bal13",zona:"Felanitx – Castell de Santueri – Sa Mola",pais:"España",continente:"Europa",lat:39.468,lng:3.148,nivel:"5a–7b",tipo:"deportiva",temporada:"oct–may",resumen:"Felanitx Area (pág. 232). Castell de Santueri y Sa Mola de Felanitx. Caliza del sur-este con vías asequibles y gran belleza paisajística."},{id:"bal14",zona:"East Coast Sport – Tijuana – Torre d'en Beu",pais:"España",continente:"Europa",lat:39.521,lng:3.334,nivel:"5b–8b",tipo:"deportiva",temporada:"oct–may",resumen:"East Coast Sport (pág. 244). Cala Magraner, Tijuana, Torre d'en Beu. Caliza costera del levante mallorquín. Incluye Deep Water Soloing."},{id:"bal15",zona:"Deep Water Solo – Cala Barques – Porto Cristo",pais:"España",continente:"Europa",lat:39.612,lng:3.358,nivel:"5a–8a",tipo:"DWS",temporada:"may–oct",resumen:"Deep Water Soloing (pág. 270). Cala Barques, Cala Brafia, Cala Estreta, Cala Llombards, Cala Marçal, Cala Mitjana, Cala Sa Nau, Cala Serena, Cova des Burador, Porto Cristo, Sa Calobra, Santanyí. El paraíso mundial del DWS."},{id:"cnr01",zona:"Guía de Isora",pais:"España",continente:"Europa",lat:28.209,lng:-16.77,nivel:"5a–8b",tipo:"deportiva",temporada:"todo el año",resumen:"Basalto volcánico en Tenerife occidental. Clima perfecto durante todo el año y comunidad local muy activa."},{id:"cnr02",zona:"Roque Nublo (Gran Canaria)",pais:"España",continente:"Europa",lat:27.969,lng:-15.61,nivel:"4a–7b",tipo:"clásica",temporada:"todo el año",resumen:"Basalto en el centro de Gran Canaria. Escalada clásica con vistas al Teide en días despejados."},{id:"cnr03",zona:"Los Órganos (La Gomera)",pais:"España",continente:"Europa",lat:28.175,lng:-17.309,nivel:"5a–7c",tipo:"deportiva",temporada:"todo el año",resumen:"Basalto columnar único en el norte de La Gomera. Escalada singular en formaciones geológicas que recuerdan a un órgano de tubos."},{id:"cnr04",zona:"Famara (Lanzarote)",pais:"España",continente:"Europa",lat:29.113,lng:-13.578,nivel:"5a–8b",tipo:"deportiva",temporada:"todo el año",resumen:"Acantilados volcánicos de 600 metros sobre el Atlántico en el norte de Lanzarote. Vistas al archipiélago chinijo."},{id:"rio01",zona:"Peña Isasa",pais:"España",continente:"Europa",lat:42.298,lng:-2.193,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Caliza riojana en las sierras del norte. Escalada poco masificada con vistas al Ebro."},{id:"fra01",zona:"Fontainebleau",pais:"Francia",continente:"Europa",lat:48.401,lng:2.7,nivel:"1–8c",tipo:"bloque",temporada:"sep–jun",resumen:"El bosque del bloque por excelencia. Arenisca de grano único cerca de París, cuna del boulder moderno."},{id:"fra02",zona:"Gorges du Verdon",pais:"Francia",continente:"Europa",lat:43.745,lng:6.386,nivel:"5a–8b",tipo:"clásica",temporada:"abr–jun / sep–oct",resumen:"Gran cañón de caliza en la Provenza. Vías largas en paredes de 300 m sobre aguas turquesas."},{id:"fra03",zona:"Céüse",pais:"Francia",continente:"Europa",lat:44.421,lng:5.996,nivel:"6b–9a",tipo:"deportiva",temporada:"jun–sep",resumen:"Caliza proyectada de los Alpes franceses. Uno de los mejores sectores del mundo para grados altos."},{id:"fra04",zona:"Buoux",pais:"Francia",continente:"Europa",lat:43.824,lng:5.43,nivel:"5a–8c",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Caliza de la Provenza. Pionero de la escalada deportiva moderna en los años 80 con Jibé Tribout."},{id:"fra05",zona:"Millau / Gorges de la Jonte",pais:"Francia",continente:"Europa",lat:44.1,lng:3.08,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Caliza de Aveyron con vías largas sobre el viaducto más alto del mundo. Cultura escaladora local fuerte."},{id:"ita01",zona:"Arco",pais:"Italia",continente:"Europa",lat:45.918,lng:10.887,nivel:"4a–9a",tipo:"deportiva",temporada:"mar–nov",resumen:"La capital europea de la escalada deportiva. Caliza del lago de Garda con clima casi mediterráneo."},{id:"ita02",zona:"Finale Ligure",pais:"Italia",continente:"Europa",lat:44.17,lng:8.341,nivel:"5a–8c",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza sobre el mar de Liguria. Ambiente de festival escalador permanente en un pueblo precioso."}
136,{id:"ita03",zona:"Val di Mello",pais:"Italia",continente:"Europa",lat:46.284,lng:9.63,nivel:"5b–8b",tipo:"clásica",temporada:"jun–sep",resumen:"Granito alpino en el corazón de los Alpes italianos. Valle sin carreteras con grandes paredes verticales."},{id:"ita04",zona:"Dolomiti di Brenta",pais:"Italia",continente:"Europa",lat:46.15,lng:10.95,nivel:"5a–8a",tipo:"alpina",temporada:"jun–sep",resumen:"Caliza dolomítica de las Brenta. Vías largas y ferrattes en un paisaje de película de aventuras."},{id:"gre01",zona:"Kalymnos",pais:"Grecia",continente:"Europa",lat:36.949,lng:26.984,nivel:"5a–9a",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Caliza de la isla del Dodecaneso. El destino de escalada en roca más popular del Mediterráneo oriental."},{id:"gre02",zona:"Meteora",pais:"Grecia",continente:"Europa",lat:39.722,lng:21.63,nivel:"5a–8a",tipo:"clásica",temporada:"abr–jun / sep–oct",resumen:"Torres de conglomerado con monasterios colgados. Escalada entre historia, espiritualidad y verticalidad."},{id:"svn01",zona:"Osp / Lipica",pais:"Eslovenia",continente:"Europa",lat:45.572,lng:13.855,nivel:"5a–9a",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Caliza del Karst esloveno. Área con algunos de los sectores más difíciles del mundo en roca perfecta."},{id:"svn02",zona:"Misja Pec",pais:"Eslovenia",continente:"Europa",lat:45.534,lng:13.873,nivel:"6a–9b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza de techo en el Karst. Uno de los sectores más duros del planeta con vías icónicas de grado extremo."},{id:"hrv01",zona:"Paklenica",pais:"Croacia",continente:"Europa",lat:44.361,lng:15.471,nivel:"4a–8c",tipo:"clásica",temporada:"abr–jun / sep–oct",resumen:"Cañones de caliza del Parque Nacional de Paklenica. Vías largas y ambiente alpino en la costa dálmata."},{id:"hrv02",zona:"Istria",pais:"Croacia",continente:"Europa",lat:45.231,lng:13.857,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–jun / sep–oct",resumen:"Caliza de la península istria. Muchos sectores poco masificados con el Adriático como fondo."},{id:"che01",zona:"Charmey",pais:"Suiza",continente:"Europa",lat:46.621,lng:7.178,nivel:"5a–8b",tipo:"deportiva",temporada:"may–oct",resumen:"Caliza y conglomerado friburguense. Ambiente alpino suizo con sectores variados en un valle verde."},{id:"che02",zona:"Magic Wood",pais:"Suiza",continente:"Europa",lat:46.535,lng:9.202,nivel:"5–8c",tipo:"bloque",temporada:"jun–sep",resumen:"Bosque de granito en los Alpes grisones. Uno de los mejores destinos de boulder en Europa."},{id:"aut01",zona:"Nassereith",pais:"Austria",continente:"Europa",lat:47.317,lng:10.832,nivel:"5a–8c",tipo:"deportiva",temporada:"may–oct",resumen:"Caliza del Tirol austríaco. Sectores variados con ambiente alpino auténtico y acceso fácil."},{id:"deu01",zona:"Frankenjura",pais:"Alemania",continente:"Europa",lat:49.679,lng:11.464,nivel:"5a–9c",tipo:"deportiva",temporada:"abr–oct",resumen:"Caliza de Baviera. La cuna del 9a con Alexander Huber y Wolfgang Güllich. Miles de vías en roca compacta."},{id:"deu02",zona:"Elbsandstein",pais:"Alemania",continente:"Europa",lat:50.914,lng:14.058,nivel:"4–8b",tipo:"clásica",temporada:"abr–oct",resumen:"Arenisca del Elba sajón. Sistema de escalada propio y ético con reglas centenarias. Patrimonio escalador único."},{id:"nor01",zona:"Flatanger",pais:"Noruega",continente:"Europa",lat:64.503,lng:10.99,nivel:"7a–9b",tipo:"deportiva",temporada:"jun–sep",resumen:"Cueva de caliza en los fiordos noruegos. Magnus Midtbø y Adam Ondra la pusieron en el mapa mundial."},{id:"nor02",zona:"Lysefjord",pais:"Noruega",continente:"Europa",lat:59.012,lng:6.152,nivel:"4a–8a",tipo:"clásica",temporada:"may–sep",resumen:"Granito sobre el fiordo del Preikestolen. Alpinismo y gran pared en uno de los paisajes más impresionantes de Europa."},{id:"swe01",zona:"Bohuslän",pais:"Suecia",continente:"Europa",lat:58.43,lng:11.52,nivel:"4a–8b",tipo:"clásica",temporada:"may–sep",resumen:"Granito pulido por los glaciares en la costa sueca. Escalada clásica en un archipiélago único."},{id:"gbr01",zona:"Peak District",pais:"UK",continente:"Europa",lat:53.35,lng:-1.8,nivel:"4a–8b",tipo:"clásica",temporada:"abr–oct",resumen:"Gritstone y caliza del corazón de Inglaterra. La cuna del alpinismo moderno con sectores históricos míticos."},{id:"gbr02",zona:"Pembroke",pais:"UK",continente:"Europa",lat:51.654,lng:-5.059,nivel:"4a–8c",tipo:"deportiva",temporada:"abr–oct",resumen:"Acantilados de caliza en Gales. Escalada en mar con aves marinas y ambiente de aventura puro."},{id:"gbr03",zona:"Gower Peninsula",pais:"UK",continente:"Europa",lat:51.579,lng:-4.156,nivel:"4a–7c",tipo:"clásica",temporada:"abr–oct",resumen:"Caliza y arenisca de la Península de Gower. Escalada costera galesa en el primer Área de Belleza Natural del Reino Unido."},{id:"prt01",zona:"Sintra",pais:"Portugal",continente:"Europa",lat:38.791,lng:-9.393,
136nivel:"4a–8a",tipo:"clásica",temporada:"oct–may",resumen:"Granito entre bosque y océano. Escalada clásica a pocos kilómetros de Lisboa con vistas al Atlántico."},{id:"prt02",zona:"Portela de Sintra",pais:"Portugal",continente:"Europa",lat:38.75,lng:-9.42,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza del extremo occidental de Europa. Escalada sobre el océano en el fin del mundo conocido."},{id:"cze01",zona:"Adrspach-Teplice",pais:"Rep. Checa",continente:"Europa",lat:50.612,lng:16.124,nivel:"4a–8a",tipo:"clásica",temporada:"abr–oct",resumen:"Torres de arenisca bohemia. Las chimeneas rocosas más altas de Europa central en un parque natural único."},{id:"svk01",zona:"Súľov",pais:"Eslovaquia",continente:"Europa",lat:49.122,lng:18.532,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Caliza en los Cárpatos eslovacos. Sectores variados en un parque natural con historia medieval."},{id:"rou01",zona:"Bicaz Gorge",pais:"Rumanía",continente:"Europa",lat:46.795,lng:25.855,nivel:"5a–8a",tipo:"deportiva",temporada:"may–sep",resumen:"Cañón de caliza en los Cárpatos orientales. Paredes sobre la carretera más espectacular de Rumanía."},{id:"isl01",zona:"Stóri-Dímon",pais:"Islandia",continente:"Europa",lat:63.98,lng:-20.29,nivel:"5a–7c",tipo:"aventura",temporada:"jun–ago",resumen:"Basalto islandés entre géiseres y auroras boreales. Escalada de aventura en el destino más extremo de Europa."},{id:"mar01",zona:"Todra Gorge",pais:"Marruecos",continente:"África",lat:31.591,lng:-5.592,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–abr",resumen:"Cañón de caliza en el Alto Atlas. Paredes de 300 m sobre el río Todra. El destino estrella del Magreb."},{id:"mar02",zona:"Taghia",pais:"Marruecos",continente:"África",lat:31.786,lng:-5.779,nivel:"5c–8c",tipo:"clásica",temporada:"may–jun / sep–oct",resumen:"Aldea bereber en el corazón del Atlas. Grandes paredes de caliza accesibles solo a pie. Aventura pura."},{id:"zaf01",zona:"Rocklands",pais:"Sudáfrica",continente:"África",lat:-32.342,lng:19.071,nivel:"4–8c",tipo:"bloque",temporada:"jun–ago",resumen:"Bloques de arenisca de El Cabo. El mejor destino de boulder del hemisferio sur entre flores de fynbos."},{id:"zaf02",zona:"Montagu",pais:"Sudáfrica",continente:"África",lat:-33.781,lng:20.119,nivel:"5a–8b",tipo:"deportiva",temporada:"may–sep",resumen:"Caliza del Western Cape. Escalada deportiva en la región de los vinos con excelente infraestructura."},{id:"mdg01",zona:"Tsaranoro",pais:"Madagascar",continente:"África",lat:-22.107,lng:46.93,nivel:"5.10–5.14a",tipo:"gran pared",temporada:"abr–nov",resumen:"Grandes paredes de granito en la meseta malgache. La verticalidad más grande de África entre lémures y baobabs."},{id:"tha01",zona:"Railay / Tonsai",pais:"Tailandia",continente:"Asia",lat:8.012,lng:98.834,nivel:"5a–8c",tipo:"deportiva",temporada:"nov–abr",resumen:"Caliza tropical sobre playas de arena blanca. Ambiente relajado con escalada de calidad y mar turquesa."},{id:"tha02",zona:"Crazy Horse Buttress",pais:"Tailandia",continente:"Asia",lat:18.637,lng:99.02,nivel:"5a–8b",tipo:"deportiva",temporada:"nov–abr",resumen:"Caliza cerca de Chiang Mai. Alternativa norteña con menos masificación y ambiente cultural riquísimo."},{id:"chn01",zona:"Yangshuo",pais:"China",continente:"Europa",lat:24.777,lng:110.491,nivel:"5a–8b",tipo:"deportiva",temporada:"oct–abr",resumen:"Torres kársticas sobre el río Li. El destino de escalada más famoso de China con ambiente cosmopolita."},{id:"jpn01",zona:"Ogawayama",pais:"Japón",continente:"Asia",lat:35.856,lng:138.386,nivel:"5a–8b",tipo:"bloque",temporada:"may–nov",resumen:"Granito de los Alpes Japoneses. Bloques y vías largas en un bosque de cedros con ambiente de refugio alpino."},{id:"jpn02",zona:"Jōshinetsu",pais:"Japón",continente:"Asia",lat:36.578,lng:138.232,nivel:"5a–8a",tipo:"deportiva",temporada:"may–oct",resumen:"Caliza volcánica del Parque Nacional de Jōshinetsu. Escalada poco conocida en un entorno natural privilegiado."},{id:"ind01",zona:"Badami",pais:"India",continente:"Asia",lat:15.921,lng:75.686,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–mar",resumen:"Arenisca roja de Karnataka. Escalada entre templos rupestres del siglo VI. Cultura e historia en cada vía."},{id:"ind02",zona:"Hampi",pais:"India",continente:"Asia",lat:15.335,lng:76.462,nivel:"4a–7c",tipo:"bloque",temporada:"oct–mar",resumen:"Bloques de granito en las ruinas del Imperio Vijayanagara. Boulder entre templos y elefantes."},{id:"isr01",zona:"Nahal Darga",pais:"Israel",continente:"Asia",lat:31.63,lng:35.43,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–abr",resumen:"Caliza en el desierto de Judea. Cañones con agua y escalada en un entorno bíblico cerca del Mar Muerto."},{id:"jor01",zona:"Wadi Rum",pais:"Jordania",continente:"Asia",lat:29.575,lng:35.412,nivel:"4a–8a",tipo:"aventura",temporada:"mar–may / sep–nov",resumen:"Arenisca rojiza del desierto árabe con torres de 300 m. Aventura y cultura beduina en un paisaje marciano."},{id:"tur01",zona:"Geyikbayiri",pais:"Turquía",continente:"Asia",lat:36.96,lng:30.54,nivel:"5a–9a",tipo:"deportiva",temporada:"oct–may",resumen:"Caliza mediterránea cerca de Antalya. Miles de vías deportivas con el mar Egeo de fondo."},{id:"tur02",zona:"Kapadokya",pais:"Turquía",continente:"Asia",lat:38.643,lng:34.857,nivel:"4a–7c",tipo:"aventura",temporada:"abr–jun / sep–oct",resumen:"Chimeneas de hadas de toba volcánica en la Anatolia central. Escalada en un paisaje de otro mundo."},{id:"vnm01",zona:"Halong Bay",pais:"Vietnam",continente:"Asia",lat:20.91,lng:107.184,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–abr",resumen:"Torres kársticas emergiendo del mar. Escalada desde kayak o barco en la bahía más bella de Asia."},{id:"npl01",zona:"Hattiban",pais:"Nepal",continente:"Asia",lat:27.647,lng:85.265,nivel:"5a–7c",tipo:"deportiva",temporada:"oct–dic / mar–may",resumen:"Caliza a las afueras de Katmandú. La mejor introducción a la escalada nepalesa con vistas al Himalaya."},{id:"omn01",zona:"Musandam",pais:"Omán",continente:"Asia",lat:26.137,lng:56.244,nivel:"5a–8a",tipo:"deportiva",temporada:"oct–mar",resumen:"Caliza en los fiordos del Golfo Pérsico. Clima seco e inviernos perfectos con vistas al Índico."},{id:"aus01",zona:"Grampians",pais:"Australia",continente:"Oceanía",lat:-37.14,lng:142.52,nivel:"4–8c",tipo:"bloque",temporada:"mar–nov",resumen:"Arenisca de Victoria. La meca del boulder austral entre canguros y eucaliptos."},{id:"aus02",zona:"Blue Mountains",pais:"Australia",continente:"Oceanía",lat:-33.718,lng:150.311,nivel:"5a–8b",tipo:"clásica",temporada:"abr–oct",resumen:"Arenisca de los Montes Azules cerca de Sídney. Vías largas en un parque nacional declarado Patrimonio Mundial."},{id:"nzl01",zona:"Whanganui Bay",pais:"Nueva Zelanda",continente:"Oceanía",lat:-41.042,lng:172.91,nivel:"5a–8b",tipo:"deportiva",temporada:"nov–abr",resumen:"Caliza sobre el Estrecho de Cook. Escalada frente al mar en la punta norte de la Isla Sur."},{id:"usa01",zona:"Yosemite Valley",pais:"EEUU",continente:"América del Norte",lat:37.742,lng:-119.604,nivel:"5.5–5.15d",tipo:"gran pared",temporada:"may–jun / sep–oct",resumen:"El Capitán y Half Dome. La catedral del alpinismo moderno. Todo escalador debería estar aquí una vez."},{id:"usa02",zona:"Red Rock Canyon",pais:"EEUU",continente:"América del Norte",lat:36.135,lng:-115.428,nivel:"5.5–5.14b",tipo:"clásica",temporada:"oct–abr",resumen:"Arenisca roja del desierto de Nevada. Miles de vías cerca de Las Vegas con colores que quitan el aliento."},{id:"usa03",zona:"Bishop / Buttermilks",pais:"EEUU",continente:"América del Norte",lat:37.378,lng:-118.579,nivel:"V0–V16",tipo:"bloque",temporada:"oct–abr",resumen:"Bloques de granito bajo Sierra Nevada. La referencia mundial del boulder duro con temperaturas perfectas."},{id:"usa04",zona:"Smith Rock",pais:"EEUU",continente:"América del Norte",lat:44.367,lng:-121.14,nivel:"5.5–5.14c",tipo:"deportiva",temporada:"mar–jun / sep–nov",resumen:"Brecha volcánica de Oregón. El lugar donde nació la escalada deportiva americana en los años 80."},{id:"usa05",zona:"New River Gorge",pais:"EEUU",continente:"América del Norte",lat:37.871,lng:-81.074,nivel:"5.5–5.14b",tipo:"deportiva",temporada:"abr–jun / sep–nov",resumen:"Arenisca de Virginia Occidental. Parque Nacional con centenares de vías en el corazón de los Apalaches."},{id:"ctb01",zona:"Asón",pais:"España",continente:"Europa",lat:43.262,lng:-3.461,nivel:"4a–8a",tipo:"deportiva",temporada:"todo el año",resumen:"Zona caliza en el valle del Asón, Cantabria. Sectores variados con vías de todos los niveles."},{id:"ctb03",zona:"La Hermida – Lebeña",pais:"España",continente:"Europa",lat:43.21,lng:-4.595,nivel:"5a–8a",tipo:"deportiva",temporada:"todo el año",resumen:"Caliza del desfiladero del río Deva, sector de Lebeña. Vías en la parte baja del cañón, más accesibles que la zona alta."},{id:"ctb05",zona:"Matienzo",pais:"España",continente:"Europa",lat:43.308,lng:-3.614,nivel:"5a–8a",tipo:"deportiva",temporada:"todo el año",resumen:"Valle kárstico con sectores de caliza en el municipio de Ruesga. Popular entre escaladores del norte."},{id:"ctb06",zona:"Liendo",pais:"España",continente:"Europa",lat:43.387,lng:-3.384,nivel:"5a–7c",tipo:"deportiva",temporada:"primavera-otoño",resumen:"Zona costera en el municipio de Liendo, al oriente de Cantabria. Caliza cerca del mar Cantábrico."},{id:"ctb07",zona:"Oriñón",pais:"España",continente:"Europa",lat:43.395,lng:-3.342,nivel:"4c–7b",tipo:"deportiva",temporada:"primavera-otoño",resumen:"Sector calizo en la costa oriental de Cantabria, próximo a la playa de Oriñón."},{id:"ctb08",zona:"Pechón",pais:"España",continente:"Europa",lat:43.389,lng:-4.512,nivel:"4a–7a",tipo:"deportiva",temporada:"primavera-otoño",resumen:"Zona de escalada en el municipio de Val de San Vicente, costa occidental de Cantabria."},{id:"ctb09",zona:"Cabo Mayor",pais:"España",continente:"Europa",lat:43.493,lng:-3.79,nivel:"4a–6c",tipo:"deportiva",temporada:"primavera-verano",resumen:"Acantilados calizos frente al Cantábrico, al norte de Santander. Vistas espectaculares al mar."},{id:"ctb10",zona:"La Arnía",pais:"España",continente:"Europa",lat:43.459,lng:-3.966,nivel:"4a–6b",tipo:"deportiva",temporada:"primavera-verano",resumen:"Costa quebrada al oeste de Santander con escalada en acantilados sobre el mar Cantábrico."},{id:"ctb11",zona:"Ranero",pais:"España",continente:"Europa",lat:43.272,lng:-3.519,nivel:"5a–8b",tipo:"deportiva",temporada:"todo el año",resumen:"Zona caliza en el valle de Carranza, Bizkaia, muy frecuentada por escaladores cantábricos."},{id:"ctb12",zona:"Socueva",pais:"España",continente:"Europa",lat:43.262,lng:-3.58,nivel:"5a–7c",tipo:"deportiva",temporada:"todo el año",resumen:"Sector calizo en Arredondo, Cantabria. Zona tranquila con buenas vías de varios niveles."},{id:"ctb13",zona:"Silió",pais:"España",continente:"Europa",lat:43.183,lng:-4.008,nivel:"5a–8a",tipo:"deportiva",temporada:"primavera-otoño",resumen:"Caliza en el municipio de Molledo, valle del Besaya. Uno de los sectores más activos del interior de Cantabria."},{id:"ctb14",zona:"Caldas de Besaya",pais:"España",continente:"Europa",lat:43.226,lng:-4.046,nivel:"4b–7b",tipo:"deportiva",temporada:"primavera-otoño",resumen:"Sector calizo en el valle del Besaya, entre Torrelavega y Reinosa."},{id:"ctb15",zona:"Cosgaya",pais:"España",continente:"Europa",lat:43.143,lng:-4.751,nivel:"5a–7c",tipo:"deportiva",temporada:"primavera-otoño",resumen:"Zona caliza en el acceso al macizo central de Picos de Europa, municipio de Camaleño."},{id:"ctb16",zona:"Cueto Anjero",pais:"España",continente:"Europa",lat:43.388,lng:-3.999,nivel:"5a–8a",tipo:"deportiva",temporada:"todo el año",resumen:"Sector calizo en la costa central de Cantabria, próximo a Suances."},{id:"ctb17",zona:"Santa Gadea",pais:"España",continente:"Europa",lat:43.207,lng:-3.753,nivel:"4c–7c",tipo:"deportiva",temporada:"todo el año",resumen:"Zona caliza en el municipio de Santa Gadea, interior de Cantabria."},{id:"ctb18",zona:"Peña del Cigal",pais:"España",continente:"Europa",lat:43.096,lng:-4.182,nivel:"5a–7b",tipo:"deportiva",temporada:"primavera-otoño",resumen:"Sector en el macizo de Peña Sagra, sur de Cantabria."},{id:"cnd01",zona:"Squamish",pais:"Canadá",continente:"América del Norte",lat:49.7,lng:-123.155,nivel:"5.5–5.14b",tipo:"clásica",temporada:"may–oct",resumen:"Granito de la Costa de la Columbia Británica. El Chief y sus grandes paredes, a una hora de Vancouver."},{id:"cnd02",zona:"Skaha Bluffs",pais:"Canadá",continente:"América del Norte",lat:49.448,lng:-119.571,nivel:"5.5–5.13c",tipo:"deportiva",temporada:"abr–oct",resumen:"Granito del interior de BC. Soleado y seco cuando la costa está nublada. Destino familiar excelente."},{id:"mex01",zona:"El Potrero Chico",pais:"México",continente:"América del Norte",lat:26.29,lng:-100.34,nivel:"5.7–5.14c",tipo:"deportiva",temporada:"oct–abr",resumen:"Caliza del norte de México con vías largas de hasta 20 largos. Destino invernal muy popular entre americanos."},{id:"per01",zona:"Hatun Machay",pais:"Perú",continente:"América del Sur",lat:-10.204,lng:-76.935,nivel:"5a–8a",tipo:"deportiva",temporada:"may–oct",resumen:"Bosque de piedras areniscas de los Andes peruanos a 4.200 m. Escalada de altura entre tradición andina."},{id:"bra01",zona:"Pedra Riscada",pais:"Brasil",continente:"América del Sur",lat:-13.572,lng:-40.868,nivel:"5a–8b",tipo:"gran pared",temporada:"abr–oct",resumen:"Monolito de granito de 1.000 m en el interior de Bahía. La gran pared más alta de Latinoamérica."},{id:"arg01",zona:"El Chaltén",pais:"Argentina",continente:"América del Sur",lat:-49.331,lng:-72.886,nivel:"5.8–5.14a",tipo:"alpina",temporada:"nov–mar",resumen:"Fitz Roy y Cerro Torre en la Patagonia. El alpinismo más mítico del planeta al borde del fin del mundo."},{id:"chl01",zona:"Cochamo",pais:"Chile",continente:"América del Sur",lat:-41.541,lng:-72.322,nivel:"5.8–5.13c",tipo:"gran pared",temporada:"dic–mar",resumen:"Granito patagónico en el Lake District chileno. El Yosemite de Sudamérica en un entorno selvático."},{id:"chi01",zona:"Cajón del Maipo",pais:"Chile",continente:"América del Sur",lat:-33.812,lng:-70.212,nivel:"4a-8a",tipo:"deportiva",temporada:"Oct-May",resumen:"El cañón de escalada más accesible de Chile, a 50 km de Santiago. Granito y roca volcánica con buen nivel técnico."},{id:"chi02",zona:"Cochamó Valle",pais:"Chile",continente:"América del Sur",lat:-41.499,lng:-72.312,nivel:"5c-9a",tipo:"clasica",temporada:"Nov-Mar",resumen:"Grandes paredes de granito en la selva valdiviana. El Yosemite de Sudamérica con a
136proximaciones de varios días."},{id:"arg02",zona:"Piedra Parada",pais:"Argentina",continente:"América del Sur",lat:-42.432,lng:-70.218,nivel:"5a-8b",tipo:"clasica",temporada:"Nov-Mar",resumen:"Aguja volcánica en la estepa patagónica. Escalada clásica en un entorno desértico y salvaje único."},{id:"arg03",zona:"Los Gigantes / Córdoba",pais:"Argentina",continente:"América del Sur",lat:-31.432,lng:-64.712,nivel:"4a-8a",tipo:"deportiva",temporada:"Abr-Nov",resumen:"Las sierras de Córdoba con escalada deportiva y clásica. Zona accesible con gran variedad de sectores."},{id:"mex02",zona:"El Potrero Chico",pais:"México",continente:"América del Norte",lat:26.019,lng:-100.434,nivel:"5a-9a",tipo:"deportiva",temporada:"Nov-Mar",resumen:"Paredes de caliza de hasta 400m cerca de Monterrey. Una de las mejores zonas de multipitch deportivo de América."},{id:"mex03",zona:"Peña de Bernal",pais:"México",continente:"América del Norte",lat:20.742,lng:-99.943,nivel:"5a-8a",tipo:"deportiva",temporada:"Nov-May",resumen:"El monolito más grande del mundo. Escalada deportiva y clásica en una roca icónica del centro de México."},{id:"col01",zona:"Suesca",pais:"Colombia",continente:"América del Sur",lat:5.099,lng:-73.799,nivel:"4a-8a",tipo:"deportiva",temporada:"Todo el año",resumen:"La zona de escalada más importante de Colombia. Arenisca rojiza a 45 min de Bogotá con más de 400 vías."},{id:"col02",zona:"La Mojarra",pais:"Colombia",continente:"América del Sur",lat:6.234,lng:-75.587,nivel:"5a-8b",tipo:"deportiva",temporada:"Dic-Mar/Jul-Ago",resumen:"Zona emergente en Antioquia con caliza de calida
136d. Sector en desarrollo con buenas perspectivas."},{id:"por01",zona:"Sintra",pais:"Portugal",continente:"Europa",lat:38.797,lng:-9.391,nivel:"4a-7c",tipo:"clasica",temporada:"Oct-Jun",resumen:"Granito histórico entre palacios y bosques. Escalada clásica con ambiente único cerca de Lisboa."},{id:"por02",zona:"Arrábida",pais:"Portugal",continente:"Europa",lat:38.481,lng:-8.971,nivel:"5a-8b",tipo:"deportiva",temporada:"Oct-Jun",resumen:"Acantilados calcáreos sobre el Atlántico. Uno de los paisajes más bellos de Portugal con escalada deportiva de calidad."},{id:"por03",zona:"Sagres",pais:"Portugal",continente:"Europa",lat:37.011,lng:-8.945,nivel:"4c-8a",tipo:"deportiva",temporada:"Oct-May",resumen:"El extremo suroeste de Europa. Escalada en acantilados sobre el Atlántico con el faro de Sagres como telón de fondo."},{id:"por04",zona:"Serra da Estrela",pais:"Portugal",continente:"Europa",lat:40.321,lng:-7.611,nivel:"4a-7b",tipo:"clasica",temporada:"Abr-Oct",resumen:"La sierra más alta de Portugal continental. Escalada en granito con ambiente de alta montaña."},{id:"esl01",zona:"Osp",pais:"Eslovenia",continente:"Europa",lat:45.562,lng:13.874,nivel:"5c-9b",tipo:"deportiva",temporada:"Mar-Nov",resumen:"La zona deportiva más importante de Eslovenia. Caliza de alta calidad con vías de referencia mundial cerca del Adriático."},{id:"esl02",zona:"Mišja Peč",pais:"Eslovenia",continente:"Europa",lat:45.563,lng:13.871,nivel:"6a-9b",tipo:"deportiva",temporada:"Mar-Nov",resumen:"A pocos metros de Osp, con algunas de las vías más duras de Europa. Meca del redpoint mundial."},{id:"esl03",zona:"Črni Kal",pais:"Eslovenia",continente:"Europa",lat:45.547,lng:13.874,nivel:"5a-8c",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Zona familiar con variedad de vías. Buen complemento a Osp para escaladores de todos los niveles."},{id:"cro01",zona:"Paklenica",pais:"Croacia",continente:"Europa",lat:44.302,lng:15.473,nivel:"4a-8c",tipo:"clasica",temporada:"Abr-Nov",resumen:"Cañones espectaculares en el Parque Nacional. Escalada clásica y deportiva con grandes paredes de caliza."},{id:"cro02",zona:"Istria / Rovinj",pais:"Croacia",continente:"Europa",lat:45.081,lng:13.634,nivel:"4c-8b",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Acantilados calcáreos en la costa de Istria. Escalada deportiva con vistas al Adriático y acceso fácil."},{id:"cro03",zona:"Omiš",pais:"Croacia",continente:"Europa",lat:43.443,lng:16.688,nivel:"5a-8b",tipo:"deportiva",temporada:"Abr-Nov",resumen:"Paredes en el cañón del río Cetina cerca de Split. Escalada deportiva con ambiente de pueblo dálmata."},{id:"sui01",zona:"Magic Wood",pais:"Suiza",continente:"Europa",lat:46.482,lng:9.112,nivel:"5c-9a",tipo:"bloque",temporada:"Jun-Sep",resumen:"El bosque mágico del boulder. Granito excepcional en el valle de Avers con algunos de los bloques más famosos del mundo."},{id:"sui02",zona:"Gastlosen",pais:"Suiza",continente:"Europa",lat:46.601,lng:7.192,nivel:"4a-7c",tipo:"clasica",temporada:"Jun-Sep",resumen:"Torres calcáreas en los Prealpes friburgueses. Escalada clásica en un entorno alpino de gran belleza."},{id:"sui03",zona:"Ticino",pais:"Suiza",continente:"Europa",lat:46.332,lng:8.799,nivel:"5a-8c",tipo:"deportiva",temporada:"Mar-Nov",resumen:"El cantón italiano de Suiza. Granito de alta calidad con escalada deportiva y clásica en ambiente mediterráneo."},{id:"sui04",zona:"Grimsel",pais:"Suiza",continente:"Europa",lat:46.572,lng:8.332,nivel:"5a-8b",tipo:"clasica",temporada:"Jun-Sep",resumen:"Granito alpino en el corazón de los Alpes berneses. Escalada clásica y deportiva con paisajes de alta montaña."},{id:"aut02",zona:"Zillertal",pais:"Austria",continente:"Europa",lat:47.232,lng:11.874,nivel:"4a-8a",tipo:"clasica",temporada:"Jun-Sep",resumen:"Valle alpino con escalada en granito y caliza. Combinación perfecta de escalada y turismo de montaña."},{id:"aut03",zona:"Maltatal",pais:"Austria",continente:"Europa",lat:46.981,lng:13.512,nivel:"5a-8b",tipo:"deportiva",temporada:"Jun-Sep",resumen:"Valle secreto en Carintia con caliza de alta calidad. Zona tranquila con buen nivel técnico."}
136,{id:"aut04",zona:"Ötztal",pais:"Austria",continente:"Europa",lat:46.866,lng:10.987,nivel:"4c-8a",tipo:"clasica",temporada:"Jun-Sep",resumen:"Valle del Ötzi con escalada alpina y deportiva. Granito y caliza en un entorno glaciar impresionante."},{id:"fra06",zona:"Les Calanques",pais:"Francia",continente:"Europa",lat:43.215,lng:5.432,nivel:"5a-8b",tipo:"deportiva",temporada:"Oct-May",resumen:"Acantilados calcáreos sobre el Mediterráneo cerca de Marsella. Escalada deportiva y clásica con vistas al mar."},{id:"fra07",zona:"Orpierre",pais:"Francia",continente:"Europa",lat:44.314,lng:5.694,nivel:"4a-8b",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Pueblo medieval rodeado de paredes calcáreas. Ideal para familias y escaladores de todos los niveles."},{id:"fra08",zona:"Gorges du Tarn",pais:"Francia",continente:"Europa",lat:44.208,lng:3.214,nivel:"4c-8a",tipo:"deportiva",temporada:"Abr-Oct",resumen:"Cañón espectacular con escalada deportiva y clásica. Gran variedad de vías en caliza."},{id:"fra09",zona:"Briançon – Vallée de la Clarée",pais:"Francia",continente:"Europa",lat:44.976,lng:6.627,nivel:"4–8b",tipo:"deportiva/clasica",temporada:"jun–sep",resumen:"Vallée de la Clarée y Vallée Étroite. Escalada en caliza y granito en alta montaña, con sectores como La Bruza, Le Sapet, Falaise des Écureuils y la Grotte de Plampinet."},{id:"fra11",zona:"Briançon – Vallée de la Guisane",pais:"Francia",continente:"Europa",lat:44.978,lng:6.522,nivel:"4–8a",tipo:"deportiva/clasica",temporada:"jun–sep",resumen:"Valle de la Guisane con sectores como Rocher du Baz, Le Pimai, Rocher du Pantalon, Rocher Maubert, La Mandette y Les Enfetchores en La Grave."},{id:"fra12",zona:"Briançon – Sectores urbanos",pais:"Francia",continente:"Europa",lat:44.897,lng:6.641,nivel:"5a–8b",tipo:"deportiva",temporada:"may–oct",resumen:"Sectores junto a la ciudad: La Croix de Toulouse, les Salettes, Randouillet, Laus de Cervières, Rocher Gafouille, Rocher de l'Ollivier, Les Ayes, Chamandrin, Rocher Baron y Casse de Prelles."},{id:"fra13",zona:"Vallée de Vallouise",pais:"Francia",continente:"Europa",lat:44.844,lng:6.498,nivel:"4–8a",tipo:"deportiva/clasica",temporada:"jun–sep",resumen:"Vallouise y l'Argentière-la-Bessée. Sectores clásicos: Bouchier, Fessonier, Tournoux, Grand Bois, Entraygues, Ailefroide, Rif d'Oriol, Beauregard y Gorges de la Durance."},{id:"fra14",zona:"La Roche de Rame",pais:"Francia",continente:"Europa",lat:44.762,lng:6.572,nivel:"4–8a",tipo:"deportiva",temporada:"may–oct",resumen:"Zona caliza del Alto Durance. Sectores: Falaise de Géro, Centre Village, Le Bathéoud, La Carrière, Pilier de Rame, Conduite à gauche, Voies sur berge, Rive gauche y rive droite Biaysse."},{id:"fra15",zona:"Freissinières",pais:"Francia",continente:"Europa",lat:44.729,lng:6.478,nivel:"5a–8c",tipo:"deportiva",temporada:"may–oct",resumen:"La grande falaise de Freissinières, Le Bec de l'Ase y Dalles magiques. Una de las zonas más duras del Briançonnais."},{id:"fra16",zona:"Vallée de Tramouillon – Saint Crépin",pais:"Francia",continente:"Europa",lat:44.714,lng:6.558,nivel:"4–8b",tipo:"deportiva",temporada:"abr–oct",resumen:"Saint Crépin y alrededores: Le Chambon, Le Pointel, Paroi des Lys, Le Pouit, Goua, Le Cola, Chanteloube y Saint Crépin. Muy soleada y accesible."},{id:"fra17",zona:"Guillestre",pais:"Francia",continente:"Europa",lat:44.656,lng:6.638,nivel:"4–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Mont-Dauphin, Rue des Masques, Simoust, Ractier, Roche Charnière y Panocelle. Caliza compacta en el Queyras."},{id:"fra18",zona:"Queyras",pais:"Francia",continente:"Europa",lat:44.657,lng:6.918,nivel:"4–7c",tipo:"deportiva/clasica",temporada:"jun–sep",resumen:"La Saume, Clapeyto, La Taillante, La Blanche, Nourouichou y Le Rouchon. Escalada de alta montaña en el corazón del Parque Natural del Queyras."},{id:"fra19",zona:"Embrunais",pais:"Francia",continente:"Europa",lat:44.564,lng:6.497,nivel:"4–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Roche Rousse – Chateauroux y La Rochette – Savines-le-Lac. Caliza sobre el lago de Serre-Ponçon."},{id:"fra20",zona:"Cauterets – Gèdre",pais:"Francia",continente:"Europa",lat:42.888,lng:-.112,nivel:"3–7a",tipo:"deportiva/clasica",temporada:"may–oct",resumen:"Valle d'Aure y Cinca. Caliza pirenaica en el corazón del Parque Nacional de los Pirineos. Pène de la Soula y sectores clásicos."}
136,{id:"fra21",zona:"Gavarnie – Cirque",pais:"Francia",continente:"Europa",lat:42.735,lng:-.013,nivel:"4–8a",tipo:"multi/clasica",temporada:"jun–sep",resumen:"El circo de Gavarnie, referente mundial del alpinismo y la escalada clásica. Grandes paredes calcáreas en el corazón de los Pirineos franceses."},{id:"fra22",zona:"Sirque de las Arees",pais:"Francia",continente:"Europa",lat:42.812,lng:-.085,nivel:"5a–7c",tipo:"deportiva",temporada:"may–oct",resumen:"Valle d'Aure. Sector deportivo bien equipado en caliza gris. Temporada primavera-otoño."},{id:"fra23",zona:"Ouelh Lussent",pais:"Francia",continente:"Europa",lat:42.821,lng:-.092,nivel:"5b–8a",tipo:"deportiva",temporada:"may–oct",resumen:"Zona del Valle d'Aure. Caliza compacta con líneas deportivas de buena calidad."},{id:"fra24",zona:"Grezian",pais:"Francia",continente:"Europa",lat:42.871,lng:.131,nivel:"5a–8b",tipo:"deportiva",temporada:"abr–oct",resumen:"Referente del Valle d'Aure marcado en azul en la guía. Gran número de vías en todos los niveles. Caliza pirenaica de primer nivel."},{id:"fra25",zona:"Beños – Balnéaire",pais:"Francia",continente:"Europa",lat:42.897,lng:.144,nivel:"4–7c",tipo:"deportiva",temporada:"may–oct",resumen:"Zona de Beños en el Valle d'Aure. Caliza accesible con buenas vías de iniciación y nivel medio."},{id:"fra26",zona:"Le Spot – Arreau",pais:"Francia",continente:"Europa",lat:42.901,lng:.351,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Sector principal de Arreau en el Valle d'Aure. Referente local con vías bien equipadas."},{id:"fra27",zona:"Lortet",pais:"Francia",continente:"Europa",lat:43.071,lng:.312,nivel:"5b–7c+",tipo:"deportiva",temporada:"abr–oct",resumen:"Caliza del piedemonte pirenaico cerca de Lannemezan. Zona tranquila con buena roca."},{id:"fra28",zona:"Pène Haute – Pène Basse",pais:"Francia",continente:"Europa",lat:42.944,lng:.288,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Dos sectores complementarios en el Valle d'Aure. Pène Haute más vertical y exigente, Pène Basse más asequible."},{id:"fra29",zona:"Piau Engaly",pais:"Francia",continente:"Europa",lat:42.789,lng:.163,nivel:"4–7b",tipo:"deportiva",temporada:"jun–sep",resumen:"Zona de alta montaña en el puerto de Piau. Caliza pirenaica a más de 1.800 m. Solo en verano."},{id:"fra30",zona:"Sarrancolin",pais:"Francia",continente:"Europa",lat:43.074,lng:.352,nivel:"5a–8a",tipo:"deportiva",temporada:"abr–oct",resumen:"Valle d'Aure. Mármol y caliza con sectores variados. Una de las zonas más completas del valle."},{id:"fra31",zona:"Ris",pais:"Francia",continente:"Europa",lat:43.021,lng:.387,nivel:"5b–7c",tipo:"deportiva",temporada:"abr–oct",resumen:"Sector de Ris en el Valle d'Aure. Caliza con buena roca y ambiente tranquilo."},{id:"fra32",zona:"Subervigne",pais:"Francia",continente:"Europa",lat:43.112,lng:.421,nivel:"5a–7b+",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona del piedemonte pirenaico francés. Caliza accesible con vías de nivel medio."},{id:"fra33",zona:"Belsa – Tou de la Canal",pais:"Francia",continente:"Europa",lat:42.753,lng:.212,nivel:"5b–8b",tipo:"deportiva",temporada:"may–oct",resumen:"Referente marcado en naranja en la guía. Gran zona del Valle d'Aure con sectores deportivos de alta calidad en caliza compacta."},{id:"fra34",zona:"Tella",pais:"España",continente:"Europa",lat:42.571,lng:.218,nivel:"5a–7c",tipo:"deportiva",temporada:"abr–oct",resumen:"Caliza del Sobrarbe aragonés, en el lado español del eje Cinca-Aure. Zona de gran belleza paisajística en el Parque Nacional de Ordesa."},{id:"fra35",zona:"Revilla – Cinca",pais:"España",continente:"Europa",lat:42.564,lng:.231,nivel:"5a–7b",tipo:"deportiva",temporada:"abr–oct",resumen:"Zona del valle del Cinca, lado español. Caliza pirenaica accesible desde Bielsa."},{id:"fra36",zona:"Super Devouas – Las Devouas",pais:"Francia",continente:"Europa",lat:42.891,lng:.198,nivel:"6a–9a+",tipo:"deportiva",temporada:"may–oct",resumen:"Referente del Valle d'Aure para grados altos. Caliza compacta con líneas muy duras. Zona de referencia en los Pirineos franceses."},{id:"fra10",zona:"Pic Saint-Loup",pais:"Francia",continente:"Europa",lat:43.741,lng:3.839,nivel:"5a-8b",tipo:"deportiva",temporada:"Oct-Jun",resumen:"Icónica silueta calcárea al norte de Montpellier. Gran variedad de sectores para todos los niveles."},{id:"ita05",zona:"Sardegna / Cerdeña",pais:"Italia",continente:"Europa",lat:40.123,lng:9.012,nivel:"5a-9a",tipo:"deportiva",temporada:"Oct-May",resumen:"La meca de la escalada deportiva en caliza. Cala Gonone, Ulassai y Baunei entre los sectores más famosos del mundo."},{id:"ita06",zona:"Sperlonga",pais:"Italia",continente:"Europa",lat:41.257,lng:13.434,nivel:"5a-8b",tipo:"deportiva",temporada:"Oct-May",resumen:"Falesia sobre el mar Tirreno cerca de Roma. Caliza con vías cortas y técnicas, ambiente mediterráneo."}
136,{id:"ita07",zona:"Valle dell'Orco",pais:"Italia",continente:"Europa",lat:45.521,lng:7.321,nivel:"5c-8b",tipo:"clasica",temporada:"Jun-Sep",resumen:"Cañón de granito en los Alpes piamonteses. Escalada clásica de alta calidad con largos multipitch."},{id:"ita08",zona:"Dolomiti / Dolomitas",pais:"Italia",continente:"Europa",lat:46.499,lng:11.987,nivel:"5a-9a",tipo:"clasica",temporada:"Jun-Sep",resumen:"Las torres de roca más bellas de los Alpes. Escalada clásica, deportiva y vías ferratas en un paisaje único."},{id:"ita09",zona:"Muzzerone",pais:"Italia",continente:"Europa",lat:44.054,lng:9.731,nivel:"5a-8b",tipo:"deportiva",temporada:"Oct-May",resumen:"Acantilados sobre el mar de Liguria cerca de Cinque Terre. Escalada deportiva con vistas espectaculares al Mediterráneo."},{id:"gre03",zona:"Leonidio",pais:"Grecia",continente:"Europa",lat:37.162,lng:22.859,nivel:"5a-9b",tipo:"deportiva",temporada:"Oct-May",resumen:"Paredes de conglomerado rojo sobre el pueblo. Una de las mejores zonas deportivas de Europa con vías de todos los niveles."},{id:"gre04",zona:"Kyparissi",pais:"Grecia",continente:"Europa",lat:37.001,lng:22.983,nivel:"6a-9a",tipo:"deportiva",temporada:"Oct-May",resumen:"Pueblo pesquero escondido con paredes impresionantes. Destino de escalada de alta calidad con ambiente tranquilo."},{id:"tur03",zona:"Geyikbayiri",pais:"Turquía",continente:"Asia",lat:36.942,lng:30.542,nivel:"5a-9b",tipo:"deportiva",temporada:"Oct-May",resumen:"La zona deportiva más importante de Turquía. Caliza de alta calidad con más de 300 vías cerca de Antalya."},{id:"tur04",zona:"Olympos / Çıralı",pais:"Turquía",continente:"Asia",lat:36.399,lng:30.473,nivel:"4c-8b",tipo:"deportiva",temporada:"Oct-May",resumen:"Escalada entre ruinas licas y playa. Ambiente único con la llama eterna de la Quimera cerca."},{id:"mar03",zona:"Tafraoute",pais:"Marruecos",continente:"África",lat:29.723,lng:-8.976,nivel:"4a-7c",tipo:"clasica",temporada:"Nov-Mar",resumen:"Bloques de granito rosa en el Anti-Atlas. Escalada en bloque y clásica en un paisaje desértico único."},{id:"usa06",zona:"Tuolumne Meadows",pais:"EEUU",lat:37.876,lng:-119.364,nivel:"5.6-5.13",tipo:"clasica",temporada:"Jul-Oct",resumen:"Granito de alta montaña en el corazón de Yosemite. Placas y fisuras de ensoñación a 2600m."},{id:"usa07",zona:"Joshua Tree National Park",pais:"EEUU",lat:34.013,lng:-116.166,nivel:"5.4-5.13",tipo:"clasica",temporada:"Oct-May",resumen:"Monzogranito único en el desierto de Mojave. Miles de rutas en formaciones bulbosas icónicas."},{id:"usa08",zona:"Lake Tahoe / Lover's Leap",pais:"EEUU",lat:38.831,lng:-120.137,nivel:"5.6-5.12",tipo:"clasica",temporada:"May-Oct",resumen:"Granito de Sierra Nevada con grandes paredes y multipitchs clásicos junto al lago."},{id:"usa09",zona:"Owens River Gorge",pais:"EEUU",lat:37.45,lng:-118.567,nivel:"5.9-5.13",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Cañón volcánico con deportivas cortas y duras en toba. Cerca de Bishop, CA."},{id:"usa10",zona:"Tahquitz & Suicide Rocks",pais:"EEUU",lat:33.766,lng:-116.682,nivel:"5.4-5.13",tipo:"clasica",temporada:"Abr-Nov",resumen:"Granito histórico de Idyllwild donde nació la escala Yosemite Decimal System."},{id:"usa11",zona:"The Needles / Sequoia",pais:"EEUU",lat:36.046,lng:-118.601,nivel:"5.8-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Torres de granito en el bosque de sequoias gigantes. Multipitchs remotos y comprometidos."},{id:"usa12",zona:"Mount Charleston",pais:"EEUU",lat:36.272,lng:-115.641,nivel:"5.6-5.12",tipo:"clasica",temporada:"Abr-Nov",resumen:"Caliza alpina a 45 minutos de Las Vegas. Escape perfecto del calor del desierto."},{id:"usa13",zona:"Indian Creek",pais:"EEUU",lat:38.001,lng:-109.601,nivel:"5.9-5.13",tipo:"clasica",temporada:"Mar-May/Sep-Nov",resumen:"La meca mundial de las fisuras en arenisca. Crack paralelos perfectos en Bears Ears."},{id:"usa14",zona:"Moab / Wall Street",pais:"EEUU",lat:38.573,lng:-109.549,nivel:"5.8-5.13",tipo:"clasica",temporada:"Mar-May/Sep-Nov",resumen:"Arenisca roja junto al río Colorado. Fisuras y deportivas en paisaje de otro planeta."},{id:"usa15",zona:"Maple Canyon",pais:"EEUU",lat:39.633,lng:-111.567,nivel:"5.10-5.14",tipo:"deportiva",temporada:"May-Oct",resumen:"Conglomerado único en Utah. Presas naturales de guijarro en techos y placas."},{id:"usa16",zona:"Joe's Valley",pais:"EEUU",lat:39.35,lng:-111.133,nivel:"V0-V14",tipo:"bloque",temporada:"Sep-Nov/Mar-May",resumen:"Uno de los mejores destinos de bloque de América. Arenisca de alta calidad en un valle remoto."},{id:"usa17",zona:"Little Cottonwood Canyon",pais:"EEUU",lat:40.559,lng:-111.795,nivel:"5.7-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Granito de Salt Lake con clasicos multipitch y deportivas cerca de la ciudad."},{id:"usa18",zona:"American Fork Canyon",pais:"EEUU",lat:40.437,lng:-111.716,nivel:"5.10-5.14",tipo:"deportiva",temporada:"Abr-Nov",resumen:"Caliza de Utah con rutas de resistencia dura. Concentración de 5.14 impresionante."},{id:"usa19",zona:"Zion National Park",pais:"EEUU",lat:37.298,lng:-113.026,nivel:"5.7-5.13",tipo:"clasica",temporada:"Mar-May/Sep-Nov",resumen:"Paredes de arenisca de 600m en uno de los parques más bellos de América."},{id:"usa20",zona:"St. George / Chuckwalla",pais:"EEUU",lat:37.108,lng:-113.583,nivel:"5.9-5.13",tipo:"deportiva",temporada:"Oct-Abr",resumen:"Caliza y arenisca del sur de Utah. Temporada de invierno perfecta."},{id:"usa21",zona:"Rifle Mountain Park",pais:"EEUU",lat:39.651,lng:-107.718,nivel:"5.11-5.15",tipo:"deportiva",temporada:"May-Oct",resumen:"Cañón de caliza con la mayor concentración de rutas 5.14 y 5.15 de EEUU."},{id:"usa22",zona:"Shelf Road",pais:"EEUU",lat:38.516,lng:-105.217,nivel:"5.6-5.13",tipo:"deportiva",temporada:"Abr-Nov",resumen:"Caliza del centro de Colorado con cientos de deportivas en ambiente desértico."},{id:"usa23",zona:"Eldorado Canyon",pais:"EEUU",lat:39.932,lng:-105.291,nivel:"5.5-5.13",tipo:"clasica",temporada:"Mar-Nov",resumen:"Cañón histórico de Boulder. Clasicos de arenisca que definieron el alpinismo americano."}
136,{id:"usa24",zona:"Boulder Canyon",pais:"EEUU",lat:40.014,lng:-105.399,nivel:"5.7-5.13",tipo:"clasica",temporada:"Mar-Nov",resumen:"Granito y gneis junto a Boulder Creek. Centenares de rutas a 20 minutos del centro."},{id:"usa25",zona:"Rocky Mountain National Park",pais:"EEUU",lat:40.343,lng:-105.683,nivel:"5.6-5.13",tipo:"clasica",temporada:"Jun-Sep",resumen:"Granito alpino sobre los 3000m. Diamond, Lumpy Ridge y Long's Peak entre otros."},{id:"usa26",zona:"Black Canyon of the Gunnison",pais:"EEUU",lat:38.574,lng:-107.721,nivel:"5.8-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Una de las paredes más impresionantes de América. Gneis oscuro y comprometido."},{id:"usa27",zona:"Garden of the Gods",pais:"EEUU",lat:38.873,lng:-104.886,nivel:"5.4-5.12",tipo:"clasica",temporada:"Mar-Nov",resumen:"Formaciones de arenisca roja en Colorado Springs. Espectacular y accesible."},{id:"usa28",zona:"Ten Sleep Canyon",pais:"EEUU",lat:44.033,lng:-107.45,nivel:"5.10-5.14",tipo:"deportiva",temporada:"May-Oct",resumen:"Caliza de Wyoming con deportivas de resistencia. Ambiente de rodeo y grandes cielos."},{id:"usa29",zona:"Wild Iris",pais:"EEUU",lat:42.617,lng:-108.883,nivel:"5.10-5.14",tipo:"deportiva",temporada:"Jun-Sep",resumen:"Caliza de alta montaña en Wyoming con vistas infinitas. Deportivas duras en ambiente alpino."},{id:"usa30",zona:"Devils Tower",pais:"EEUU",lat:44.591,lng:-104.715,nivel:"5.7-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Monolito volcánico icónico. Fisuras de fonolita en la primera área protegida de EEUU."},{id:"usa31",zona:"Vedauwoo",pais:"EEUU",lat:41.157,lng:-105.368,nivel:"5.6-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Granito offwidth y fisuras en Wyoming. Brutal y técnico. Imprescindible para fisureros."},{id:"usa32",zona:"Grand Teton National Park",pais:"EEUU",lat:43.741,lng:-110.803,nivel:"5.6-5.12",tipo:"clasica",temporada:"Jun-Sep",resumen:"Alpinismo clásico americano. El Grand Teton, uno de los objetivos más emblemáticos del país."},{id:"usa33",zona:"Wind River Range",pais:"EEUU",lat:42.867,lng:-109.017,nivel:"5.6-5.12",tipo:"clasica",temporada:"Jul-Sep",resumen:"Granito alpino remoto en el corazón de Wyoming. Cirque of the Towers imprescindible."},{id:"usa34",zona:"Sinks Canyon",pais:"EEUU",lat:42.717,lng:-108.817,nivel:"5.7-5.13",tipo:"deportiva",temporada:"May-Oct",resumen:"Caliza junto a un río que desaparece bajo tierra. Deportivas cortas y duras en Lander, WY."},{id:"usa35",zona:"City of Rocks",pais:"EEUU",lat:42.076,lng:-113.721,nivel:"5.5-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Granito prehistórico en el sur de Idaho. Clasicos de fisura y placas en ambiente único."},{id:"usa36",zona:"Elephant's Perch / Sawtooths",pais:"EEUU",lat:43.917,lng:-114.883,nivel:"5.7-5.12",tipo:"clasica",temporada:"Jul-Sep",resumen:"Granito alpino remoto en las Sawtooth Mountains de Idaho. Aventura pura."},{id:"usa37",zona:"Broughton Bluff",pais:"EEUU",lat:45.529,lng:-122.381,nivel:"5.6-5.12",tipo:"deportiva",temporada:"Abr-Nov",resumen:"Basalto junto al río Columbia en Portland. La zona de escalada urbana del noroeste."},{id:"usa38",zona:"Trout Creek",pais:"EEUU",lat:45.15,lng:-120.883,nivel:"5.7-5.13",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Toba volcánica en el alto desierto de Oregon. Técnica y singularmente bella."},{id:"usa39",zona:"Index",pais:"EEUU",lat:47.817,lng:-121.55,nivel:"5.7-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Granito del Cascades con clasicos históricos. Lower Town Wall y Upper Wall son leyenda."},{id:"usa40",zona:"Leavenworth",pais:"EEUU",lat:47.6,lng:-120.667,nivel:"5.5-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Granito del este de Washington. Icicle Canyon con cientos de rutas en ambiente bávaro."},{id:"usa41",zona:"Frenchman Coulee / Vantage",pais:"EEUU",lat:46.95,lng:-119.983,nivel:"5.7-5.13",tipo:"clasica",temporada:"Mar-Nov",resumen:"Columnas de basalto junto al río Columbia. Fisuras verticales en el desierto del este de WA."},{id:"usa42",zona:"Red River Gorge",pais:"EEUU",lat:37.783,lng:-83.667,nivel:"5.7-5.14",tipo:"deportiva",temporada:"Mar-Nov",resumen:"La meca de la deportiva en el este. Arenisca con techos y bóvedas de Kentucky."},{id:"usa43",zona:"The Gunks / Shawangunks",pais:"EEUU",lat:41.734,lng:-74.083,nivel:"5.3-5.13",tipo:"clasica",temporada:"Abr-Nov",resumen:"Conglomerado horizontal único. Los clasicos de fricción más famosos de la Costa Este."},{id:"usa44",zona:"Adirondacks",pais:"EEUU",lat:44.117,lng:-73.917,nivel:"5.4-5.12",tipo:"clasica",temporada:"May-Oct",resumen:"Granito anortosita en el norte de Nueva York. Barkeater Cliffs y Chapel Pond Slab."},{id:"usa45",zona:"Rumney",pais:"EEUU",lat:43.8,lng:-71.833,nivel:"5.7-5.14",tipo:"deportiva",temporada:"May-Nov",resumen:"Esquisto de New Hampshire con deportivas duras. Uno de los mejores del noreste."},{id:"usa46",zona:"Cathedral Ledge / Whitehorse",pais:"EEUU",lat:44.083,lng:-71.133,nivel:"5.4-5.12",tipo:"clasica",temporada:"May-Oct",resumen:"Granito del White Mountains. Placas y multipitch clasicos en North Conway, NH."},{id:"usa47",zona:"Acadia National Park",pais:"EEUU",lat:44.35,lng:-68.217,nivel:"5.4-5.12",tipo:"clasica",temporada:"May-Oct",resumen:"Granito junto al Atlántico en Maine. Otter Cliffs y las paredes costeras son únicos."},{id:"usa48",zona:"Linville Gorge",pais:"EEUU",lat:35.95,lng:-81.917,nivel:"5.5-5.12",tipo:"clasica",temporada:"Mar-Nov",resumen:"El Gran Cañón del este americano. Paredes de cuarcita comprometidas en Carolina del Norte."},{id:"usa49",zona:"Obed Wild River",pais:"EEUU",lat:36.067,lng:-84.617,nivel:"5.7-5.13",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Arenisca de Tennessee junto al río Obed. Una de las joyas escondidas del este."},{id:"usa50",zona:"Hueco Tanks",pais:"EEUU",lat:31.917,lng:-106.05,nivel:"V0-V15",tipo:"bloque",temporada:"Nov-Mar",resumen:"La meca mundial del bloque. Huecos naturales en sienita en el desierto de Texas."},{id:"usa51",zona:"Enchanted Rock",pais:"EEUU",lat:30.506,lng:-98.818,nivel:"5.4-5.11",tipo:"clasica",temporada:"Oct-Abr",resumen:"Domo de granito rosa en Texas Hill Country. Clasicos de placa en paisaje único."},{id:"usa52",zona:"Mount Lemmon / Tucson",pais:"EEUU",lat:32.417,lng:-110.717,nivel:"5.5-5.13",tipo:"clasica",temporada:"Oct-May",resumen:"Granito en las montañas sobre Tucson. 400+ rutas con vistas al desierto de Sonora."},{id:"usa53",zona:"Sedona",pais:"EEUU",lat:34.867,lng:-111.767,nivel:"5.6-5.12",tipo:"clasica",temporada:"Oct-May",resumen:"Arenisca roja en Arizona. Cathedral Rock y Coffee Pot en un paisaje de película."},{id:"usa54",zona:"Devil's Lake",pais:"EEUU",lat:43.417,lng:-89.733,nivel:"5.4-5.13",tipo:"clasica",temporada:"Abr-Nov",resumen:"Cuarcita de Wisconsin con cientos de clasicos cortos. El área más escalada del Midwest."},{id:"usa55",zona:"Hatcher Pass",pais:"EEUU",lat:61.8,lng:-149.267,nivel:"5.6-5.11",tipo:"clasica",temporada:"Jun-Sep",resumen:"Granito alpino en Alaska. Aventura real en un entorno salvaje de película."},{id:"cnd03",zona:"Bugaboos",pais:"Canadá",lat:50.733,lng:-116.767,nivel:"5.6-5.13",tipo:"clasica",temporada:"Jul-Sep",resumen:"Torres de granito verticales en las Purcell Mountains. Alpinismo y clasicos remotos de leyenda."},{id:"cnd04",zona:"Okanagan",pais:"Canadá",lat:49.883,lng:-119.483,nivel:"5.5-5.13",tipo:"clasica",temporada:"Mar-Nov",resumen:"Granito y gneis en el valle frutal de BC. Kettle River y Skaha Bluffs en el corazón del Okanagan."},{id:"cnd05",zona:"Kootenays",pais:"Canadá",lat:49.517,lng:-117.283,nivel:"5.5-5.12",tipo:"clasica",temporada:"May-Oct",resumen:"Zonas variadas en el sureste de BC. Granito y esquisto con rutas tranquilas y paisaje alpino."},{id:"cnd06",zona:"Fraser Valley",pais:"Canadá",lat:49.117,lng:-121.95,nivel:"5.6-5.12",tipo:"deportiva",temporada:"Abr-Nov",resumen:"Basalto y granito cerca de Vancouver. Zona de entrenamiento clásica del escalador de BC."},{id:"cnd07",zona:"Sea to Sky / Whistler",pais:"Canadá",lat:50.117,lng:-122.95,nivel:"5.5-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Corredor de granito entre Vancouver y Whistler. Murrin Park, Shannon Falls y las paredes del Stawamus Chief."},{id:"cnd08",zona:"Powell River",pais:"Canadá",lat:49.833,lng:-124.533,nivel:"5.4-5.12",tipo:"clasica",temporada:"May-Oct",resumen:"Granito costero en la Sunshine Coast. Accesible en ferry, tranquilo y con vistas al Pacífico."},{id:"cnd09",zona:"Kamloops",pais:"Canadá",lat:50.667,lng:-120.333,nivel:"5.6-5.12",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Basalto volcánico en el interior seco de BC. Hoodoos y columnas en paisaje semidesértico."},{id:"cnd10",zona:"Coast Mountains BC",pais:"Canadá",lat:51.5,lng:-122.5,nivel:"5.6-5.12",tipo:"clasica",temporada:"Jun-Sep",resumen:"Granito alpino remoto en el norte de BC. Expediciones de varios días en un entorno salvaje único."},{id:"cnd11",zona:"Bow Valley / Canmore",pais:"Canadá",lat:51.083,lng:-115.35,nivel:"5.5-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Caliza de las Rocosas cerca de Calgary. Heart Creek, Cougar Canyon y Ghost River entre los favoritos."},{id:"cnd12",zona:"Banff National Park",pais:"Canadá",lat:51.496,lng:-115.928,nivel:"5.5-5.12",tipo:"clasica",temporada:"Jun-Sep",resumen:"Caliza alpina en el parque más famoso de Canadá. Multipitchs con vistas a glaciares y lagos turquesa."},{id:"cnd13",zona:"Kananaskis",pais:"Canadá",lat:50.783,lng:-115.15,nivel:"5.4-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Caliza al sur de Banff. Yamnuska, la gran pared clásica de Alberta, y cientos de rutas en K-Country."},{id:"cnd14",zona:"Jasper National Park",pais:"Canadá",lat:52.883,lng:-118.083,nivel:"5.5-5.12",tipo:"clasica",temporada:"Jun-Sep",resumen:"Caliza alpina en el parque más grande de las Rocosas. Remoto, tranquilo y espectacular."},{id:"cnd15",zona:"Icefields Parkway",pais:"Canadá",lat:52.217,lng:-117.2,nivel:"5.6-5.12",tipo:"clasica",temporada:"Jun-Sep",resumen:"La carretera más bonita de Canadá bordeada de paredes de caliza. Weeping Wall en invierno."},{id:"cnd16",zona:"Crowsnest Pass",pais:"Canadá",lat:49.617,lng:-114.467,nivel:"5.5-5.12",tipo:"clasica",temporada:"May-Oct",resumen:"Caliza en el paso fronterizo Alberta-BC. Zona tranquila con buenas rutas de todos los niveles."},{id:"cnd17",zona:"The Ghost / Waiparous",pais:"Canadá",lat:51.367,lng:-114.917,nivel:"5.5-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Caliza al norte de Calgary. El Ghost River ofrece paredes imponentes en un cañón remoto."},{id:"cnd18",zona:"Waterton Lakes",pais:"Canadá",lat:49.05,lng:-113.9,nivel:"5.4-5.11",tipo:"clasica",temporada:"May-Oct",resumen:"Caliza en el parque transfronterizo con Montana. Ambiente tranquilo y rutas de todos los niveles."},{id:"cnd19",zona:"Niagara Escarpment",pais:"Canadá",lat:43.517,lng:-80.217,nivel:"5.4-5.12",tipo:"clasica",temporada:"Abr-Nov",resumen:"Caliza dolomítica en el escarpad
136o de Ontario. Lion's Head, Rattlesnake Point y Bon Echo son clásicos."},{id:"cnd20",zona:"Lion's Head",pais:"Canadá",lat:44.983,lng:-81.25,nivel:"5.4-5.12",tipo:"clasica",temporada:"May-Oct",resumen:"Caliza junto a la bahía de Georgian. Paredes costeras con vistas al lago Huron."},{id:"cnd21",zona:"Bon Echo Provincial Park",pais:"Canadá",lat:44.9,lng:-77.217,nivel:"5.4-5.11",tipo:"clasica",temporada:"May-Oct",resumen:"Mural Wall, una pared de 100m junto al lago Mazinaw. Clasicos históricos en Ontario."},{id:"cnd22",zona:"Thunder Bay",pais:"Canadá",lat:48.383,lng:-89.25,nivel:"5.4-5.11",tipo:"clasica",temporada:"May-Oct",resumen:"Sienita junto al lago Superior. El Sleeping Giant domina el horizonte desde la ciudad."},{id:"cnd23",zona:"Val-David",pais:"Canadá",lat:46.033,lng:-74.233,nivel:"5.4-5.13",tipo:"clasica",temporada:"May-Oct",resumen:"Gneis de las Laurentides. El centro de la escalada en Quebec con ambiente bohemio y rutas para todos."},{id:"cnd24",zona:"Montreal / Laurentians",pais:"Canadá",lat:45.767,lng:-73.917,nivel:"5.4-5.12",tipo:"clasica",temporada:"Abr-Nov",resumen:"Zonas accesibles desde Montreal. Bromont, Piedmont y las Laurentidas para los escaladores de ciudad."},{id:"cnd25",zona:"Charlevoix",pais:"Canadá",lat:47.533,lng:-70.55,nivel:"5.5-5.11",tipo:"clasica",temporada:"May-Oct",resumen:"Gneis junto al río San Lorenzo. Paisaje espectacular y rutas tranquilas en un entorno único."},{id:"cnd26",zona:"Mont-Orford",pais:"Canadá",lat:45.317,lng:-72.233,nivel:"5.4-5.11",tipo:"clasica",temporada:"May-Oct",resumen:"Granito de los Cantons-de-l'Est. Zona clásica de Quebec con rutas en un parque provincial."},{id:"cnd27",zona:"Welsford / New Brunswick",pais:"Canadá",lat:45.483,lng:-66.067,nivel:"5.4-5.12",tipo:"clasica",temporada:"May-Oct",resumen:"Conglomerado y cuarcita en New Brunswick. La mejor zona de escalada de las Marítimas."},{id:"cnd28",zona:"Cape Breton / Nova Scotia",pais:"Canadá",lat:46.317,lng:-60.483,nivel:"5.4-5.11",tipo:"clasica",temporada:"May-Oct",resumen:"Granito costero en la isla de Cape Breton. Vistas al Atlántico y rutas en un entorno salvaje."},{id:"cnd29",zona:"Cirque of the Unclimbables",pais:"Canadá",lat:62.017,lng:-127.183,nivel:"5.8-5.13",tipo:"clasica",temporada:"Jul-Aug",resumen:"Torres de granito en los Territorios del Noroeste. Expedición pura en uno de los parajes más remotos del planeta."},{id:"cnd30",zona:"Kluane / Yukon",pais:"Canadá",lat:60.717,lng:-138.4,nivel:"5.6-5.12",tipo:"clasica",temporada:"Jun-Aug",resumen:"Granito alpino en el Yukon junto al mayor campo de hielo no polar del mundo. Aventura extrema."},{id:"aus03",zona:"Mount Arapiles",pais:"Australia",lat:-36.75,lng:141.833,nivel:"4–7c",tipo:"clasica",temporada:"Mar-Nov",resumen:"La meca del alpinismo australiano. Miles de rutas en arenisca con historia y tradición."},{id:"aus04",zona:"Point Perpendicular",pais:"Australia",lat:-35.083,lng:150.8,nivel:"5b–7c",tipo:"deportiva",temporada:"Abr-Nov",resumen:"Caliza costera en Jervis Bay. Rutas deportivas sobre el Pacífico con acceso en kayak."},{id:"aus05",zona:"Nowra",pais:"Australia",lat:-34.883,lng:150.6,nivel:"5a–8b",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Arenisca compacta en el sur de NSW. Zona técnica y popular cerca de Sydney."},{id:"aus06",zona:"Warrumbungles",pais:"Australia",lat:-31.283,lng:149.017,nivel:"4–7a",tipo:"clasica",temporada:"Abr-Oct",resumen:"Formaciones volcánicas únicas en el interior de NSW. Rutas largas en entorno salvaje."},{id:"aus07",zona:"Bungonia Gorge",pais:"Australia",lat:-34.817,lng:150.017,nivel:"4–7b",tipo:"clasica",temporada:"Abr-Nov",resumen:"Caliza en un cañón profundo cerca de Goulburn. Rutas técnicas y espeleología combinada."},{id:"aus08",zona:"Frog Buttress",pais:"Australia",lat:-26.983,lng:152.767,nivel:"4–7c",tipo:"clasica",temporada:"Abr-Oct",resumen:"Riolita volcánica en Queensland. La zona más icónica del escalador australiano de clásicos."},{id:"aus09",zona:"Glass House Mountains",pais:"Australia",lat:-26.883,lng:152.95,nivel:"4–7a",tipo:"clasica",temporada:"Abr-Oct",resumen:"Cúpulas volcánicas en Queensland cerca de Brisbane. Rutas cortas y ambiente familiar."},{id:"aus10",zona:"Mount Buffalo",pais:"Australia",lat:-36.717,lng:146.817,nivel:"4–7b",tipo:"clasica",temporada:"Oct-Abr",resumen:"Granito alpino en los Alpes Victorianos. Acceso estacional con rutas largas y vistas espectaculares."},{id:"aus11",zona:"Tasmania",pais:"Australia",lat:-41.883,lng:146.317,nivel:"5a–8a",tipo:"clasica",temporada:"Nov-Mar",resumen:"Dolerita columnar única en el mund
136o. The Organ Pipes y Frenchmans Cap en entorno salvaje e intacto."},{id:"nzl02",zona:"Paynes Ford",pais:"Nueva Zelanda",lat:-40.95,lng:172.717,nivel:"5a–8b",tipo:"deportiva",temporada:"Sep-May",resumen:"Caliza en Nelson. La mejor zona deportiva de Nueva Zelanda con cuevas y techos espectaculares."},{id:"nzl03",zona:"Castle Hill",pais:"Nueva Zelanda",lat:-43.2,lng:171.717,nivel:"3–7b",tipo:"bloque",temporada:"Sep-May",resumen:"Bloques de caliza en la llanura de Canterbury. Paisaje lunar y búlder de todos los niveles."},{id:"nzl04",zona:"Wanaka",pais:"Nueva Zelanda",lat:-44.7,lng:169.15,nivel:"5a–8a",tipo:"clasica",temporada:"Oct-Apr",resumen:"Esquisto junto al lago Wanaka. Rutas clásicas y deportivas con vistas a los Alpes del Sur."},{id:"nzl05",zona:"Queenstown",pais:"Nueva Zelanda",lat:-45.033,lng:168.667,nivel:"5a–7c",tipo:"clasica",temporada:"Oct-Apr",resumen:"Esquisto y granito en la capital de la aventura. Rutas accesibles y paisaje de otro mundo."},{id:"nzl06",zona:"Darran Mountains",pais:"Nueva Zelanda",lat:-44.617,lng:168.033,nivel:"5b–7c",tipo:"clasica",temporada:"Dic-Mar",resumen:"Granito alpino en Fiordland. Expedición pura en uno de los entornos más remotos y lluuviosos del planeta."},{id:"zaf03",zona:"Waterval Boven",pais:"Sudáfrica",lat:-25.667,lng:30.35,nivel:"5a–8c",tipo:"deportiva",temporada:"Abr-Oct",resumen:"Riolita en Mpumalanga. Una de las zonas más técnicas y completas de África."},{id:"zaf04",zona:"Table Mountain",pais:"Sudáfrica",lat:-33.967,lng:18.4,nivel:"4–7b",tipo:"clasica",temporada:"Oct-Mar",resumen:"Arenisca sobre Ciudad del Cabo. Rutas clásicas con vistas al océano y a la ciudad."},{id:"zaf05",zona:"Cederberg",pais:"Sudáfrica",lat:-32.417,lng:19.133,nivel:"4–7c",tipo:"clasica",temporada:"Mar-Nov",resumen:"Arenisca rojiza en el Cape Winelands. Arte rupestre, formaciones únicas y rutas de varios días."},{id:"zaf06",zona:"Magaliesberg",pais:"Sudáfrica",lat:-25.65,lng:27.483,nivel:"4–7b",tipo:"clasica",temporada:"Mar-Nov",resumen:"Cuarcita cerca de Pretoria. La zona de escapada del escalador de Johannesburgo."},{id:"jpn03",zona:"Mizugaki Yama",pais:"Japón",lat:35.883,lng:138.567,nivel:"5b–7c",tipo:"clasica",temporada:"May-Nov",resumen:"Granito alpino en Yamanashi. Rutas clásicas icónicas con el Monte Fuji al fondo."},{id:"jpn04",zona:"Mitake",pais:"Japón",lat:35.783,lng:139.15,nivel:"5a–7b",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Riolita en el valle del río Tama cerca de Tokio. La zona de entrenamiento clásica del escalador de la capital."},{id:"jpn05",zona:"Bichu / Okayama",pais:"Japón",lat:34.7,lng:133.583,nivel:"5a–7c",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Caliza en la región de Chugoku. Zona con buen volumen de rutas deportivas y ambiente tranquilo."},{id:"jpn06",zona:"Maku Iwa / Shizuoka",pais:"Japón",lat:35.1,lng:138.617,nivel:"5b–8a",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Roca compacta cerca del Monte Fuji. Popular entre los escaladores del área de Shizuoka."},{id:"arg04",zona:"Frey / Bariloche",pais:"Argentina",lat:-41.167,lng:-71.383,nivel:"5a–7c",tipo:"clasica",temporada:"Dic-Mar",resumen:"Granito alpino en el Parque Nacional Nahuel Huapi. El refugio Frey rodeado de agujas y torres míticas."},{id:"arg05",zona:"Arenales",pais:"Argentina",lat:-33.95,lng:-70.183,nivel:"5b–7c",tipo:"clasica",temporada:"Dic-Mar",resumen:"Granito en la alta cordillera cerca de Santiago. Acceso desde Argentina por el paso Los Libertadores."},{id:"chi03",zona:"Valle de los Cóndores",pais:"Chile",lat:-33.617,lng:-70.317,nivel:"5a–7b",tipo:"clasica",temporada:"Oct-Mar",resumen:"Granito en la precordillera de Santiago. Zona accesible con rutas clásicas de uno a tres largos."},{id:"per02",zona:"Cordillera Blanca",pais:"Perú",lat:-9.133,lng:-77.617,nivel:"5b–7c",tipo:"clasica",temporada:"May-Sep",resumen:"Granito y caliza a más de 4000m en los Andes. Alpinismo y escalada deportiva con vistas a nevados de 6000m."},{id:"col02",zona:"La Mojarra",pais:"Colombia",lat:6.234,lng:-75.587,nivel:"5a–7b",tipo:"deportiva",temporada:"Todo el año",resumen:"Caliza en Antioquia. Zona cálida y accessible desde Medellín con rutas para todos los niveles."},{id:"bra02",zona:"Serra do Cipó",pais:"Brasil",lat:-19.383,lng:-43.583,nivel:"5a–7c",tipo:"deportiva",temporada:"May-Sep",resumen:"Cuarcita en Minas Gerais. La zona de escalada más popular de Brasil, cerca de Belo Horizonte."},{id:"bra03",zona:"Rio de Janeiro",pais:"Brasil",lat:-22.95,lng:-43.183,nivel:"4–7c",tipo:"clasica",temporada:"Abr-Oct",resumen:"Granito sobre la ciudad más bella del mundo. La Pedra da Gávea, el Corcovado y los Pan de Azúcar icónicos."},{id:"bol01",zona:"La Paz / Andes Bolivia",pais:"Bolivia",lat:-16.5,lng:-68.15,nivel:"5a–7b",tipo:"clasica",temporada:"May-Oct",resumen:"Granito y caliza a más de 3600m. Escalada de altura única en el mund
136o junto a la ciudad más alta del planeta."},{id:"ecu01",zona:"Quito / Andes Ecuador",pais:"Ecuador",lat:-.217,lng:-78.517,nivel:"5a–7b",tipo:"clasica",temporada:"Jun-Sep",resumen:"Roca volcánica en los Andes ecuatoriales. Escalada junto a volcanes activos a más de 3000m de altitud."},{id:"fra11",zona:"Chamonix / Mont Blanc",pais:"Francia",lat:45.924,lng:6.869,nivel:"5a–8b",tipo:"clasica",temporada:"Jun-Sep",resumen:"La capital mundial del alpinismo. Agujas de granito y rutas clásicas bajo el techo de Europa."},{id:"fra12",zona:"Presles",pais:"Francia",lat:45.083,lng:5.517,nivel:"5a–8c",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Caliza en el Vercors. Sector de referencia para la escalada deportiva de grado alto en Francia."},{id:"fra13",zona:"Annot",pais:"Francia",lat:43.967,lng:6.667,nivel:"5a–7c",tipo:"arenisca",temporada:"Mar-Nov",resumen:"Grès d'Annot — arenisca con texturas únicas en los Alpes Marítimos. Rutas de todos los niveles."},{id:"fra14",zona:"Ailefroide",pais:"Francia",lat:44.883,lng:6.433,nivel:"5b–7c",tipo:"clasica",temporada:"Jun-Sep",resumen:"Granito alpino en el macizo de los Écrins. Base de partida para las grandes rutas del Pelvoux."},{id:"fra15",zona:"Saint-Léger-du-Ventoux",pais:"Francia",lat:44.2,lng:5.283,nivel:"5a–8a",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Caliza en el Ventoux. Zona deportiva con buen volumen de rutas y sol casi todo el año."},{id:"fra16",zona:"Corsica",pais:"Francia",lat:42.15,lng:9.1,nivel:"5a–7c",tipo:"clasica",temporada:"May-Oct",resumen:"Granito costero en la Isla de la Belleza. Rutas sobre el Mediterráneo con aguas turquesa al pie."},{id:"ita10",zona:"Cadarese",pais:"Italia",lat:46.15,lng:8.35,nivel:"7a–9a",tipo:"deportiva",temporada:"May-Oct",resumen:"Gneis pulido en el valle Antigorio. Especialidad en grados extremos — uno de los mejores sectores de Europa para 8+."},{id:"ita11",zona:"Sicilia",pais:"Italia",lat:37.6,lng:14,nivel:"5a–8b",tipo:"deportiva",temporada:"Oct-May",resumen:"Caliza mediterránea en Cefalu, San Vito lo Capo y Rocca Busambra. Invierno perfecto con sol garantizado."},{id:"ita12",zona:"Costa Amalfitana",pais:"Italia",lat:40.633,lng:14.6,nivel:"5a–7c",tipo:"clasica",temporada:"Oct-May",resumen:"Caliza sobre el Mediterráneo cerca de Nápoles. Rutas con vistas únicas y ambiente mediterráneo."},{id:"ita13",zona:"Lecco / Grignetta",pais:"Italia",lat:45.85,lng:9.383,nivel:"5a–7c",tipo:"clasica",temporada:"Mar-Nov",resumen:"Caliza lombarda sobre el lago de Como. Cuna del alpinismo italiano con rutas históricas de los grandes maestros."},{id:"ita14",zona:"Ossola / Piedmont",pais:"Italia",lat:46.133,lng:8.283,nivel:"5b–8b",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Gneis en el Piamonte. Varias zonas excelentes: Ornavasso, Candoglia y el valle Ossola con granito de primer nivel."},{id:"gre05",zona:"Atenas / Attika",pais:"Grecia",lat:37.983,lng:23.733,nivel:"5a–8a",tipo:"deportiva",temporada:"Oct-May",resumen:"Caliza cerca de Atenas. Politopo, Agia y Megara son las zonas accesibles para el escalador urbano griego."},{id:"gre06",zona:"Manikia",pais:"Grecia",lat:38.367,lng:22.083,nivel:"5a–8b",tipo:"deportiva",temporada:"Oct-May",resumen:"Caliza en Beocia. Una de las mejores zonas deportivas de Grecia continental con techos y plaquetas."},{id:"gre07",zona:"Creta",pais:"Grecia",lat:35.317,lng:25.133,nivel:"5a–7c",tipo:"deportiva",temporada:"Oct-May",resumen:"Caliza en la isla más grande de Grecia. Arolithos, Agia Triada y las gargantas del interior."},{id:"gre08",zona:"Peloponeso",pais:"Grecia",lat:37.483,lng:22.367,nivel:"5a–8a",tipo:"deportiva",temporada:"Oct-May",resumen:"Caliza en la península histórica. Leonidio, Kastraki y las zonas del Taygeto con vistas al Egeo."},{id:"gre09",zona:"Monte Parnaso",pais:"Grecia",lat:38.533,lng:22.617,nivel:"5a–7c",tipo:"clasica",temporada:"Abr-Nov",resumen:"Caliza alpina bajo el monte sagrado de Delfos. Rutas multipitch con vistas al golfo de Corinto."},{id:"por05",zona:"Reguengo do Fetal",pais:"Portugal",lat:39.617,lng:-8.733,nivel:"5a–8b",tipo:"deportiva",temporada:"Oct-May",resumen:"Caliza en el centro de Portugal. La zona deportiva más activa del país con sectores variados."},{id:"por06",zona:"Rocha da Pena",pais:"Portugal",lat:37.317,lng:-8.05,nivel:"5a–7b",tipo:"deportiva",temporada:"Oct-May",resumen:"Caliza en el Algarve interior. Reserva natural con rutas accesibles y fauna única."},{id:"hrv03",zona:"Split / Dalmatia",pais:"Croacia",lat:43.508,lng:16.44,nivel:"5a–8a",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Caliza dálmata en la región de Split. Znjan, Marjan y las islas cercanas con escalada sobre el Adriático."},{id:"hrv04",zona:"Hvar",pais:"Croacia",lat:43.167,lng:16.617,nivel:"5a–7c",tipo:"deportiva",temporada:"Abr-Nov",resumen:"Caliza en la isla de lavanda. Escalada costera con aguas cristalinas y ambiente mediterráneo único."},{id:"svn03",zona:"Bohinj",pais:"Eslovenia",lat:46.283,lng:13.9,nivel:"5a–7c",tipo:"clasica",temporada:"May-Oct",resumen:"Caliza en el Parque Nacional del Triglav. Rutas alpinas junto al lago más bonito de Eslovenia."},{id:"svn04",zona:"Alpes Julianos",pais:"Eslovenia",lat:46.383,lng:13.767,nivel:"5b–7c",tipo:"clasica",temporada:"Jun-Sep",resumen:"Caliza alpina en la joya de Eslovenia. El Triglav y las agujas del valle de Vrata entre los clásicos imprescindibles."}
136,{id:"che03",zona:"Val Bavona",pais:"Suiza",lat:46.383,lng:8.533,nivel:"6a–8c",tipo:"deportiva",temporada:"May-Oct",resumen:"Granito en el Tesino. Sectores técnicos de grado alto en un valle sin electricidad ni carreteras asfaltadas."},{id:"che04",zona:"Valle Verzasca",pais:"Suiza",lat:46.267,lng:8.85,nivel:"5b–8a",tipo:"clasica",temporada:"May-Oct",resumen:"Gneis junto al río esmeralda del Tesino. Búlder en el río y rutas deportivas en sectores cálidos."},{id:"che05",zona:"Engelberg",pais:"Suiza",lat:46.817,lng:8.4,nivel:"5a–7b",tipo:"clasica",temporada:"Jun-Sep",resumen:"Caliza alpina bajo el Titlis. Rutas clásicas y vistas de glaciares en el corazón de Suiza."},{id:"che06",zona:"Zermatt",pais:"Suiza",lat:46.017,lng:7.75,nivel:"5a–7c",tipo:"clasica",temporada:"Jun-Sep",resumen:"Granito y caliza bajo el Cervino. Alpinismo clásico y rutas de altura en el techo de los Alpes."},{id:"aut05",zona:"Innsbruck / Karwendel",pais:"Austria",lat:47.267,lng:11.383,nivel:"5a–8b",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Caliza tirolesa con sectores deportivos a 15 minutos del centro de Innsbruck. Martinswand y Schleierwasserfall."},{id:"aut06",zona:"Wilder Kaiser",pais:"Austria",lat:47.567,lng:12.233,nivel:"5a–8a",tipo:"clasica",temporada:"May-Oct",resumen:"Caliza alpina en el Tirol. Una de las zonas de escalada clásica más importantes de los Alpes orientales."},{id:"aut07",zona:"Dachstein",pais:"Austria",lat:47.483,lng:13.6,nivel:"5a–7c",tipo:"clasica",temporada:"Jun-Sep",resumen:"Caliza alpina entre Estiria y el Salzkammergut. Rutas largas y ambiente alpino auténtico."},{id:"aut08",zona:"Arlberg",pais:"Austria",lat:47.133,lng:10.217,nivel:"5a–7c",tipo:"clasica",temporada:"Jun-Sep",resumen:"Caliza en el paso del Arlberg entre Vorarlberg y Tirol. Rutas tranquilas en paisaje alpino espectacular."},{id:"deu03",zona:"Pfalz / Palatinate",pais:"Alemania",lat:49.317,lng:7.767,nivel:"4–7b",tipo:"arenisca",temporada:"Mar-Nov",resumen:"Arenisca roja en el bosque del Palatinado. Rutas clásicas cortas con la tradición del escalador alemán."},{id:"deu04",zona:"Alpes Bávaros",pais:"Alemania",lat:47.55,lng:11.1,nivel:"5a–8a",tipo:"clasica",temporada:"May-Oct",resumen:"Caliza alpina en el sur de Baviera. Karwendel, Berchtesgaden y Zugspitze con rutas históricas."},{id:"deu05",zona:"Allgäu",pais:"Alemania",lat:47.7,lng:10.317,nivel:"4–7b",tipo:"clasica",temporada:"May-Oct",resumen:"Caliza en los Alpes del Allgäu cerca de Oberstdorf. Zona familiar con rutas de todos los niveles."},{id:"deu06",zona:"Fichtelgebirge",pais:"Alemania",continente:"Europa",lat:50.017,lng:11.867,nivel:"3–7a",tipo:"granito",temporada:"Abr-Oct",resumen:"Granito del noreste de Baviera. Torres y paredes con escalada tradicional en roca de fricción excelente. Base en Wunsiedel."},{id:"deu07",zona:"Eifel",pais:"Alemania",continente:"Europa",lat:50.333,lng:6.733,nivel:"4–8a",tipo:"basalto/conglomerate",temporada:"Mar-Nov",resumen:"Basalto y conglomerado volcánico en la región de Nordrhein-Westfalen. Zona accesible desde Colonia y Bruselas."},{id:"deu08",zona:"Erzgebirge",pais:"Alemania",continente:"Europa",lat:50.55,lng:13,nivel:"3–7b",tipo:"granito/gneis",temporada:"Abr-Oct",resumen:"Granito y gneis en los Montes Metálicos, en la frontera con la República Checa. Tradición alpina sajona."},{id:"deu09",zona:"Bayerischer Wald",pais:"Alemania",continente:"Europa",lat:48.917,lng:13.233,nivel:"3–6c",tipo:"granito",temporada:"May-Sep",resumen:"Granito del Bosque de Baviera cerca de Passau. Zona tranquila con escalada clásica en bloques y paredes bajas."},{id:"gbr04",zona:"Stanage / Peak District",pais:"Reino Unido",lat:53.35,lng:-1.65,nivel:"4–7a",tipo:"arenisca",temporada:"Mar-Nov",resumen:"Gritstone del Peak District. La cuna del escalador británico — Stanage Edge y sus miles de rutas clásicas."},{id:"gbr05",zona:"Snowdonia / Eryri",pais:"Reino Unido",lat:53.067,lng:-4.067,nivel:"4–7b",tipo:"clasica",temporada:"Abr-Oct",resumen:"Pizarra y riolita en Gales del Norte. Llanberis Pass, Clogwyn Du'r Arddu y las paredes históricas de Joe Brown."},{id:"gbr06",zona:"Lake District",pais:"Reino Unido",lat:54.45,lng:-3.083,nivel:"4–7b",tipo:"clasica",temporada:"Abr-Oct",resumen:"Roca volcánica en Cumbria. Scafell, Dow Crag y Raven Crag — historia viva del alpinismo británico."},{id:"gbr07",zona:"Cornwall",pais:"Reino Unido",lat:50.167,lng:-5.483,nivel:"4–7b",tipo:"granito",temporada:"Mar-Nov",resumen:"Granito costero en el extremo sur de Inglaterra. Bosigran, Chair Ladder y las rutas sobre el Atlántico."},{id:"gbr08",zona:"Yorkshire",pais:"Reino Unido",lat:54.017,lng:-2.1,nivel:"4–7a",tipo:"caliza",temporada:"Mar-Nov",resumen:"Caliza en los Yorkshire Dales. Malham Cove y Kilnsey Crag — escalada deportiva clásica del norte de Inglaterra."},{id:"gbr09",zona:"Scottish Highlands",pais:"Reino Unido",lat:57.117,lng:-5.517,nivel:"4–7c",tipo:"clasica",temporada:"May-Sep",resumen:"Gneis de Torridon y cuarcita de Skye. Alpinismo y escalada en uno de los paisajes más salvajes de Europa."},{id:"gbr10",zona:"Isle of Skye",pais:"Reino Unido",lat:57.283,lng:-6.2,nivel:"4–7b",tipo:"basalto",temporada:"May-Sep",resumen:"El Cuillin Ridge — la travesía más dura de las islas británicas. Gabbro y basalto sobre el Atlántico."},{id:"nor03",zona:"Lofoten",pais:"Noruega",lat:68.15,lng:13.583,nivel:"5a–7c",tipo:"granito",temporada:"Jun-Sep",resumen:"Granito ártico sobre el Ártico. Sol de medianoche y rutas sobre el fiordo en un entorno de otro mundo."},{id:"nor04",zona:"Romsdal",pais:"Noruega",lat:62.533,lng:7.7,nivel:"5a–7c",tipo:"granito",temporada:"Jun-Sep",resumen:"El Trollveggen — la pared vertical más alta de Europa. Granito noruego de leyenda en el valle de Romsdal."},{id:"nor05",zona:"Setesdal",pais:"Noruega",lat:59.05,lng:7.567,nivel:"5a–7b",tipo:"granito",temporada:"May-Oct",resumen:"Granito del sur de Noruega. Zona clásica con rutas largas y ambiente tranquilo."},{id:"nor06",zona:"Nissedal",pais:"Noruega",lat:59.1,lng:8.517,nivel:"5a–8a",tipo:"granito",temporada:"May-Oct",resumen:"Granito en Telemark. Skarvan y otras zonas con excelente roca y poco tráfico."},{id:"nor07",zona:"Kvaløya",pais:"Noruega",lat:69.767,lng:18.6,nivel:"5a–7c",tipo:"granito",temporada:"Jun-Aug",resumen:"Granito ártico en la isla de Tromsø. Escalada de altura con vistas al mar de Noruega y auroras boreales en otoño."}
136,{id:"nor08",zona:"Jotunheimen",pais:"Noruega",lat:61.617,lng:8.3,nivel:"5a–7b",tipo:"granito",temporada:"Jun-Sep",resumen:"Granito alpino en el parque de los gigantes. Rutas en el techo de Noruega rodeadas de glaciares."},{id:"swe02",zona:"Estocolmo",pais:"Suecia",lat:59.333,lng:18.067,nivel:"4–7a",tipo:"granito",temporada:"Abr-Oct",resumen:"Granito pulido cerca de la capital. Nackareservatet y Tyresta con acceso en metro desde Estocolmo."},{id:"swe03",zona:"Kullaberg",pais:"Suecia",lat:56.3,lng:12.45,nivel:"4–7b",tipo:"granito",temporada:"Mar-Nov",resumen:"Granito costero en Skåne. Zona con tradición y vistas al estrecho de Öresund y Dinamarca."},{id:"bel01",zona:"Freyr",pais:"Bélgica",lat:50.233,lng:4.917,nivel:"4–7c",tipo:"caliza",temporada:"Mar-Nov",resumen:"Caliza sobre el Mosa en las Ardenas. La zona de escalada más importante de Bélgica con siglos de tradición."},{id:"lux01",zona:"Berdorf",pais:"Luxemburgo",lat:49.817,lng:6.35,nivel:"3–6c",tipo:"arenisca",temporada:"Mar-Nov",resumen:"Arenisca en el pequeño Luxemburgo. Paseos entre formaciones de piedra arenisca y rutas cortas familiares."},{id:"cze02",zona:"Bohemian Paradise",pais:"Rep. Checa",lat:50.517,lng:15.167,nivel:"4–7a",tipo:"arenisca",temporada:"Mar-Nov",resumen:"Torres de arenisca en Bohemia. El Paraíso Checo con miles de agujas y tradición escaladora única."},{id:"cze03",zona:"Karst de Moravia",pais:"Rep. Checa",lat:49.367,lng:16.717,nivel:"4–7b",tipo:"caliza",temporada:"Mar-Nov",resumen:"Caliza en el Karst Moravo. Rutas en cañones profundos junto a cuevas prehistóricas."}
136,{id:"pol01",zona:"Jura Polaca / Cracovia",pais:"Polonia",lat:50.45,lng:19.533,nivel:"4–7c",tipo:"caliza",temporada:"Mar-Nov",resumen:"Caliza del Jura Krakowsko-Częstochowska. Miles de rutas entre agujas y arcos de roca cerca de Cracovia."},{id:"pol02",zona:"Tatras / Zakopane",pais:"Polonia",lat:49.3,lng:19.95,nivel:"5a–7b",tipo:"granito",temporada:"Jun-Oct",resumen:"Granito alpino en las Tatras — los Alpes polacos. Rutas clásicas con vistas al parque nacional más visitado de Polonia."},{id:"bgr01",zona:"Vratsa",pais:"Bulgaria",lat:43.2,lng:23.55,nivel:"5a–8b",tipo:"caliza",temporada:"Mar-Nov",resumen:"Caliza en los Balcanes occidentales. La mejor zona de escalada de Bulgaria con rutas largas y técnicas."},{id:"bgr02",zona:"Lakatnik",pais:"Bulgaria",lat:43.083,lng:23.417,nivel:"4–7c",tipo:"caliza",temporada:"Mar-Nov",resumen:"Caliza en el cañón del río Iskar. Zona clásica búlgara accesible en tren desde Sofía."},{id:"rou02",zona:"Cheile Turzii",pais:"Rumanía",lat:46.567,lng:23.683,nivel:"4–7c",tipo:"caliza",temporada:"Abr-Nov",resumen:"Caliza en el cañón de Turda, Transilvania. La zona de escalada más popular de Rumanía."},{id:"mne01",zona:"Prokletije",pais:"Montenegro",lat:42.517,lng:19.817,nivel:"5a–7b",tipo:"caliza",temporada:"Jun-Sep",resumen:"Caliza alpina en los Alpes Dináricos. Montenegro salvaje y remoto con escalada de expedición."},{id:"mne02",zona:"Kotor",pais:"Montenegro",lat:42.423,lng:18.771,nivel:"5a–7c",tipo:"caliza",temporada:"Mar-Nov",resumen:"Caliza sobre la bahía de Kotor. Rutas deportivas con vistas al fiordo más meridional de Europa."},{id:"alb01",zona:"Theth",pais:"Albania",lat:42.383,lng:19.767,nivel:"5a–7b",tipo:"caliza",temporada:"Jun-Sep",resumen:"Caliza en los Alpes albaneses. Zona emergente en uno de los valles más espectaculares de los Balcanes."},{id:"alb02",zona:"Brar",pais:"Albania",lat:41.033,lng:20.117,nivel:"5a–7c",tipo:"caliza",temporada:"Mar-Nov",resumen:"Caliza en el sur de Albania. Zona poco conocida con enorme potencial y roca de calidad."},{id:"mlt01",zona:"Malta",pais:"Malta",lat:35.9,lng:14.433,nivel:"4–7b",tipo:"caliza",temporada:"Oct-May",resumen:"Caliza mediterránea con rutas sobre el mar Mediterráneo. Clima ideal en invierno y ambiente único."},{id:"mlt02",zona:"Gozo",pais:"Malta",lat:36.05,lng:14.25,nivel:"5a–7c",tipo:"caliza",temporada:"Oct-May",resumen:"Caliza en la isla hermana de Malta. El Inland Sea y Azure Window — escalada sobre el Mediterráneo más azul."},{id:"ita15",zona:"Oltrefinale",pais:"Italia",lat:44.083,lng:8.2,nivel:"5a–8b",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Caliza al oeste de Finale Ligure. Sectores tranquilos con rutas de calidad y menos afluencia que Finale."},{id:"ita16",zona:"Dolomitas",pais:"Italia",lat:46.5,lng:11.95,nivel:"5a–7c",tipo:"clasica",temporada:"Jun-Sep",resumen:"El paisaje vertical más icónico de Europa. Torres de dolomía con rutas históricas y vías ferratas espectaculares."},{id:"ita17",zona:"Val Masino",pais:"Italia",lat:46.267,lng:9.617,nivel:"5b–8a",tipo:"granito",temporada:"May-Oct",resumen:"Granito en la Valchiavenna. Comparte macizo con Val di Mello — roca pulida y rutas clásicas alpinas."},{id:"ita18",zona:"Valle dell'Orco",pais:"Italia",lat:45.517,lng:7.317,nivel:"5b–8b",tipo:"granito",temporada:"May-Oct",resumen:"Granito piamontés en el Parque Nacional del Gran Paradiso. Escalada de fricción de referencia en Europa."},{id:"ita19",zona:"Chiavenna",pais:"Italia",lat:46.317,lng:9.4,nivel:"5a–8a",tipo:"granito",temporada:"May-Oct",resumen:"Granito en la entrada del lago Como. Settore Qualido y otros sectores con roca compacta de primer nivel."},{id:"ita20",zona:"Bergell / Bregaglia",pais:"Italia",lat:46.317,lng:9.533,nivel:"5b–8b",tipo:"granito",temporada:"Jun-Sep",resumen:"Granito alpino en la frontera italo-suiza. Cima di Castello y Piz Badile entre los grandes clásicos alpinos."},{id:"ita21",zona:"Basso Valtellina",pais:"Italia",lat:46.133,lng:9.867,nivel:"5a–7c",tipo:"deportiva",temporada:"Mar-Nov",resumen:"Caliza y gneis en el bajo Valtellina. Zona accesible con sectores variados cerca de Lecco."},{id:"ita22",zona:"Lecco / Grignetta",pais:"Italia",lat:45.85,lng:9.383,nivel:"5a–7c",tipo:"caliza",temporada:"Mar-Nov",resumen:"Caliza lombarda sobre el lago de Como. Cuna del alpinismo italiano con rutas históricas de los grandes maestros."},{id:"ita23",zona:"Lago de Como",pais:"Italia",lat:45.983,lng:9.25,nivel:"5a–7b",tipo:"granito",temporada:"Mar-Nov",resumen:"Granito y caliza en las orillas del lago. Sasso Rancio, Sasso Pelo y otros sectores con vistas al lago más elegante de Italia."},{id:"ita24",zona:"Costa Amalfitana",pais:"Italia",lat:40.633,lng:14.6,nivel:"5a–7c",tipo:"caliza",temporada:"Oct-May",resumen:"Caliza sobre el Mediterráneo cerca de Nápoles. Rutas con vistas únicas y ambiente mediterráneo inigualable."},{id:"ita25",zona:"Cerdeña",pais:"Italia",lat:40.05,lng:9.217,nivel:"5a–8c",tipo:"caliza",temporada:"Oct-May",resumen:"Caliza mediterránea con DWS y rutas deportivas. Domusnovas, Ulassai y la costa de Ogliastra entre las joyas."},{id:"ita26",zona:"Sicilia",pais:"Italia",lat:37.6,lng:14,nivel:"5a–8b",tipo:"caliza",temporada:"Oct-May",resumen:"Caliza mediterránea en Cefalu, San Vito Lo Capo y Rocca Busambra. Inviern
136o perfecto con sol garantizado."},{id:"ita27",zona:"San Vito Lo Capo",pais:"Italia",lat:38.167,lng:12.733,nivel:"5a–8c",tipo:"caliza",temporada:"Oct-May",resumen:"La Montagna Grande y Monte Monaco — caliza sobre el mar en el extremo noroeste de Sicilia. Zona de referencia mundial."},{id:"ita28",zona:"Cefalù",pais:"Italia",lat:38.033,lng:14.017,nivel:"5a–7c",tipo:"caliza",temporada:"Oct-May",resumen:"Caliza costera cerca de Palermo. La Rocca di Cefalù domina la ciudad medieval y el Mediterráneo."},{id:"ita29",zona:"Cuneo / Piamonte",pais:"Italia",lat:44.383,lng:7.55,nivel:"5a–8a",tipo:"caliza",temporada:"Mar-Nov",resumen:"Caliza en los valles del Piamonte cuneese. Vías Ferratas y escalada deportiva a la sombra de los Alpes Marítimos."},{id:"ita30",zona:"Adamello-Presanella",pais:"Italia",lat:46.167,lng:10.55,nivel:"5a–7c",tipo:"granito",temporada:"Jun-Sep",resumen:"Granito alpino en el grupo del Adamello. Escalada clásica y alpinismo en el parque natural más grande de Lombardía."},{id:"gre10",zona:"Atenas / Attika",pais:"Grecia",lat:37.983,lng:23.733,nivel:"5a–8a",tipo:"deportiva",temporada:"Oct-May",resumen:"Caliza cerca de Atenas. Politopo, Agia y Megara — escalada accesible desde la capital griega."},{id:"gre11",zona:"Creta",pais:"Grecia",lat:35.317,lng:25.133,nivel:"5a–7c",tipo:"deportiva",temporada:"Oct-May",resumen:"Caliza en la isla más grande de Grecia. Arolithos, Agia Triada y las gargantas del interior cretense."},{id:"gre12",zona:"Peloponeso",pais:"Grecia",lat:37.483,lng:22.367,nivel:"5a–8a",tipo:"deportiva",temporada:"Oct-May",resumen:"Caliza en la península histórica. Sector activo con rutas deportivas y vistas al Egeo."},{id:"gre13",zona:"Varasova",pais:"Grecia",lat:38.383,lng:21.733,nivel:"5a–8b",tipo:"caliza",temporada:"Oct-May",resumen:"Caliza sobre el golfo de Corinto. Una de las zonas deportivas más espectaculares de Grecia continental."},{id:"gre14",zona:"Monte Parnaso",pais:"Grecia",lat:38.533,lng:22.617,nivel:"5a–7c",tipo:"caliza",temporada:"Abr-Nov",resumen:"Caliza alpina bajo el monte sagrado de Delfos. Multipitchs con vistas al golfo de Corinto."},{id:"gre15",zona:"Tinos",pais:"Grecia",lat:37.55,lng:25.167,nivel:"5a–7b",tipo:"granito",temporada:"Abr-Nov",resumen:"Granito en las islas Cícladas. Zona emergente con roca excelente y ambiente isleño único."},{id:"gre16",zona:"Symi",pais:"Grecia",lat:36.617,lng:27.833,nivel:"5a–7c",tipo:"caliza",temporada:"Oct-May",resumen:"Caliza en la pequeña isla del Dodecaneso. Escalada sobre el Mediterráneo con el pueblo neoclásico de fondo."}],Kj={es:[{name:"Marta G.",location:"Barcelona",level:"6c+",zone:"Kalymnos, Grecia",style:"Escalada Deportiva",avatar:"MG",color:"#e8ff4a",text:"Imposible describir la semana que pasé en casa de Nikos. Siete días escalando en Kalymnos con un local que me llevó a sectores que no aparecen en ninguna guía. Volvería mil veces.",rating:5,date:"Agosto 2026"},{name:"Jordi P.",location:"Valencia",level:"7a",zone:"Frankenjura, Alemania",style:"Escalada Clásica",avatar:"JP",color:"#60a5fa",text:"La casa de Klaus estaba a 10 minutos en bici de los mejores sectores del Frankenjura. Pero lo que de verdad valió oro fueron sus consejos sobre los pasos clave de cada vía. Intercambio perfecto.",rating:5,date:"Julio 2026"},{name:"Sara M.",location:"Madrid",level:"6a",zone:"Siurana, Tarragona",style:"Escalada Deportiva",avatar:"SM",color:"#f97316",text:"Mi primera experiencia en CLIMB & HOME y no pudo ir mejor. El anfitrión nos hizo un mapa personalizado de las escuelas según nuestro nivel. Encontramos vías que jamás habríamos descubierto solas.",rating:5,date:"Junio 2026"},{name:"Iñaki A.",location:"Bilbao",level:"7b+",zone:"Céüse, Francia",style:"Escalada Deportiva",avatar:"IA",color:"#a78bfa",text:"Céüse en el mejor momento del año gracias a los consejos de Pierre sobre la temporada. Su casa con vistas a la montaña fue la guinda. Los ClimbPoints lo hacen todo muy justo para ambas partes.",rating:5,date:"Septiembre 2026"},{name:"Laura V.",location:"Sevilla",level:"6b",zone:"El Chorro, Málaga",style:"Senderismo + Escalada",avatar:"LV",color:"#34d399",text:"Llevaba años queriendo ir al Chorro y siempre lo dejaba para después. Un intercambio con fam
136ilia local y ahora es mi zona favorita de España. El trato fue increíble y la roca... imposible olvidarla.",rating:5,date:"Mayo 2026"},{name:"Txema O.",location:"San Sebastián",level:"7c",zone:"Margalef, Tarragona",style:"Escalada Deportiva",avatar:"TO",color:"#fb7185",text:"Margalef es otra galaxia y tener a alguien que te explica la historia de cada vía lo transforma todo. Intercambio recíproco, saldo neto cero, dos semanas de escalada legendaria.",rating:5,date:"Abril 2026"}],en:[{name:"Marta G.",location:"Barcelona",level:"6c+",zone:"Kalymnos, Greece",style:"Sport Climbing",avatar:"MG",color:"#e8ff4a",text:"Impossible to describe the week I spent at Nikos' place. Seven days climbing in Kalymnos with a local who took me to sectors that don't appear in any guide. I'd do it a thousand times over.",rating:5,date:"August 2026"},{name:"Jordi P.",location:"Valencia",level:"7a",zone:"Frankenjura, Germany",style:"Trad Climbing",avatar:"JP",color:"#60a5fa",text:"Klaus' house was just 10 minutes by bike from the best sectors in Frankenjura. But what really was worth its weight in gold were his tips about the key moves on each route. Perfect exchange.",rating:5,date:"July 2026"},{name:"Sara M.",location:"Madrid",level:"6a",zone:"Siurana, Tarragona",style:"Sport Climbing",avatar:"SM",color:"#f97316",text:"My first experience with CLIMB & HOME and it couldn't have gone better. The host made us a personalized map of the schools based on our level. We found routes we would never have discovered on our own.",rating:5,date:"June 2026"},{name:"Iñaki A.",location:"Bilbao",level:"7b+",zone:"Céüse, France",style:"Sport Climbing",avatar:"IA",color:"#a78bfa",text:"Céüse at the best time of year thanks to Pierre's advice about the season. His house with mountain views was the cherry on top. ClimbPoints make everything fair for both sides.",rating:5,date:"September 2026"},{name:"Laura V.",location:"Seville",level:"6b",zone:"El Chorro, Málaga",style:"Hiking + Climbing",avatar:"LV",color:"#34d399",text:"I'd been wanting to go to El Chorro for years and kept putting it off. An exchange with a local family and now it's my favorite climbing area in Spain. The treatment was incredible and the rock... unforgettable.",rating:5,date:"May 2026"},{name:"Txema O.",location:"San Sebastián",level:"7c",zone:"Margalef, Tarragona",style:"Sport Climbing",avatar:"TO",color:"#fb7185",text:"Margalef is another world and having someone explain the history of each route changes everything. Reciprocal exchange, net zero balance, two weeks of legendary climbing.",rating:5,date:"April 2026"}],fr:[{name:"Marta G.",location:"Barcelona",level:"6c+",zone:"Kalymnos, Grèce",style:"Escalade Sportive",avatar:"MG",color:"#e8ff4a",text:"Impossible de décrire la semaine passée chez Nikos. Sept jours d'escalade à Kalymnos avec un local qui m'a emmené dans des secteurs qui ne figurent dans aucun guide. Je le ferais mille fois.",rating:5,date:"Août 2026"},{name:"Jordi P.",location:"Valencia",level:"7a",zone:"Frankenjura, Allemagne",style:"Escalade Traditionnelle",avatar:"JP",color:"#60a5fa",text:"La maison de Klaus était à 10 minutes à vélo des meilleurs secteurs du Frankenjura. Mais ce qui valait vraiment de l'or, c'étaient ses conseils sur les mouvements clés de chaque voie. Échange parfait.",rating:5,date:"Juillet 2026"},{name:"Sara M.",location:"Madrid",level:"6a",zone:"Siurana, Tarragona",style:"Escalade Sportive",avatar:"SM",color:"#f97316",text:"Ma première expérience avec CLIMB & HOME et ça ne pouvait pas mieux se passer. L'hôte nous a fait une carte personnalisée des écoles selon notre niveau. Nous avons trouvé des voies que nous n'aurions jamais découvertes seuls.",rating:5,date:"Juin 2026"},{name:"Iñaki A.",location:"Bilbao",level:"7b+",zone:"Céüse, France",style:"Escalade Sportive",avatar:"IA",color:"#a78bfa",text:"Céüse au meilleur moment de l'année grâce aux conseils de Pierre sur la saison. Sa maison avec vue sur la montagne était la cerise sur le gâteau. ClimbPoints rend tout équitable pour les deux côtés.",rating:5,date:"Septembre 2026"},{name:"Laura V.",location:"Séville",level:"6b",zone:"El Chorro, Málaga",style:"Randonnée + Escalade",avatar:"LV",color:"#34d399",text:"Je voulais aller à El Chorro depuis des années et je repoussais toujours. Un échange avec une famille locale et maintenant c'est ma zone d'escalade préférée en Espagne. Le traitement était incroyable et la roche... inoubliable.",rating:5,date:"Mai 2026"},{name:"Txema O.",location:"San Sebastián",level:"7c",zone:"Margalef, Tarragona",style:"Escalade Sportive",avatar:"TO",color:"#fb7185",text:"Margalef est un autre monde et avoir quelqu'un pour expliquer l'histoire de chaque voie change tout. Échange réciproque, solde net zéro, deux semaines d'escalade légendaire.",rating:5,date:"Avril 2026"}],de:[{name:"Marta G.",location:"Barcelona",level:"6c+",zone:"Kalymn
136os, Griechenland",style:"Sportklettern",avatar:"MG",color:"#e8ff4a",text:"Unmöglich, die Woche bei Nikos zu beschreiben. Sieben Tage Klettern auf Kalymnos mit einem Einheimischen, der mich zu Sektoren brachte, die in keinem Führer stehen. Ich würde es tausendmal tun.",rating:5,date:"August 2026"},{name:"Jordi P.",location:"Valencia",level:"7a",zone:"Frankenjura, Deutschland",style:"Traditionelles Klettern",avatar:"JP",color:"#60a5fa",text:"Klaus' Haus war nur 10 Minuten mit dem Rad von den besten Sektoren der Frankenjura entfernt. Aber was wirklich wertvoll war, waren seine Tipps zu den Schlüsselbewegungen jeder Route. Perfekter Austausch.",rating:5,date:"Juli 2026"},{name:"Sara M.",location:"Madrid",level:"6a",zone:"Siurana, Tarragona",style:"Sportklettern",avatar:"SM",color:"#f97316",text:"Meine erste Erfahrung mit CLIMB & HOME und es konnte nicht besser gehen. Der Gastgeber erstellte uns eine personalisierte Karte der Schulen nach unserem Niveau. Wir fanden Routen, die wir alleine nie entdeckt hätten.",rating:5,date:"Juni 2026"},{name:"Iñaki A.",location:"Bilbao",level:"7b+",zone:"Céüse, Frankreich",style:"Sportklettern",avatar:"IA",color:"#a78bfa",text:"Céüse zur besten Jahreszeit dank Pierres Tipps zur Saison. Sein Haus mit Bergblick war das Sahnehäubchen. ClimbPoints machen alles fair für beide Seiten.",rating:5,date:"September 2026"},{name:"Laura V.",location:"Sevilla",level:"6b",zone:"El Chorro, Málaga",style:"Wandern + Klettern",avatar:"LV",color:"#34d399",text:"Ich wollte jahrelang zu El Chorro und schob es immer auf. Ein Austausch mit einer lokalen Familie und jetzt ist es mein liebstes Klettergebiet in Spanien. Die Behandlung war unglaublich und der Fels... unvergesslich.",rating:5,date:"Mai 2026"},{name:"Txema O.",location:"San Sebastián",level:"7c",zone:"Margalef, Tarragona",style:"Sportklettern",avatar:"TO",color:"#fb7185",text:"Margalef ist eine andere Welt und jemanden zu haben, der die Geschichte jeder Route erklärt, ändert alles. Gegenseitiger Austausch, Nettobilanz null, zwei Wochen legendäres Klettern.",rating:5,date:"April 2026"}]};/**
137 * @license lucide-react v1.47.0 - ISC
138 *
139 * This source code is licensed under the ISC license.
140 * See the LICENSE file in the root directory of this source tree.
141 */const L0={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};L0.node;const Yj=Ie(L0);/**
142 * @license lucide-react v1.47.0 - ISC
143 *
144 * This source code is licensed under the ISC license.
145 * See the LICENSE file in the root directory of this source tree.
146 */const R0={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};R0.node;const ya=Ie(R0);/**
147 * @license lucide-react v1.47.0 - ISC
148 *
149 * This source code is licensed under the ISC license.
150 * See the LICENSE file in the root directory of this source tree.
151 */const q0={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};q0.node;const ut=Ie(q0);/**
152 * @license lucide-react v1.47.0 - ISC
153 *
154 * This source code is licensed under the ISC license.
155 * See the LICENSE file in the root directory of this source tree.
156 */const D0={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};D0.node;const Zn=Ie(D0);/**
157 * @license lucide-react v1.47.0 - ISC
158 *
159 * This source code is licensed under the ISC license.
160 * See the LICENSE file in the root directory of this source tree.
161 */const O0={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};O0.node;const vs=Ie(O0),Hx=[{src:"/static/hero1.jpg",pos:"center 30%"},{src:"/static/upload-3c67eee9-IMG20240320161528.jpg",pos:"top center"}];function Qj(){const[l,i]=b.useState(0);return b.useEffect(()=>{const r=setInterval(()=>i(d=>(d+1)%Hx.length),6e3);return()=>clearInterval(r)},[]),e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[Hx.map((r,d)=>e.jsx("div",{"aria-hidden":d!==l,className:"absolute inset-0 transition-opacity duration-1000",style:{opacity:d===l?1:0,backgroundImage:`url("${r.src}")`,backgroundSize:"cover",backgroundPosition:r.pos,filter:"saturate(1.1) contrast(1.05)"}},r.src)),e.jsx("div",{className:"absolute inset-0 bg-stone-950/40"})]})}const bs=[{src:"/static/stock_dest-rodellar-e584c3-0.jpg",caption:"Rodellar · Huesca, España"},{src:"/static/stock_dest-dolomitas-94498c-0.jpg",caption:"Dolomitas · Italia"},{src:"/static/stock_dest-verdon-f6dd4a-0.jpg",caption:"Verdon · Alpes, Francia"},{src:"/static/stock_dest-elchorro-fbc2ee-0.jpg",caption:"El Chorro · Málaga, España"},{src:"/static/stock_dest-yosemite-eae208-0.jpg",caption:"Yosemite · California, EE.UU."},{src:"/static/stock_dest-todra-6789d5-0.jpg",caption:"Gorges du Todra · Marruecos"},{src:"/static/stock_dest-kalymnos-e71c11-0.jpg",caption:"Kalymnos · Grecia"},{src:"/static/stock_dest-squamish-f32bd1-0.jpg",caption:"Squamish · Columbia Británica, Canadá"},{src:"/static/stock_dest-meteora-fa0a9a-0.jpg",caption:"Meteora · Tesalia, Grecia"},{src:"/static/stock_dest-finale-8318db-0.jpg",caption:"Finale Ligure · Liguria, Ital
161ia"},{src:"/static/stock_dest-chalten-ae0dec-0.jpg",caption:"El Chaltén · Patagonia, Argentina"},{src:"/static/stock_dest-redrocks-e454c0-0.jpg",caption:"Red Rocks · Nevada, EE.UU."},{src:"/static/stock_dest-calanques-9ac997-0.jpg",caption:"Calanques · Marsella, Francia"},{src:"/static/stock_dest-smithrock-4761d3-0.jpg",caption:"Smith Rock · Oregón, EE.UU."},{src:"/static/stock_dest-railay-8e7dfb-0.jpg",caption:"Railay · Krabi, Tailandia"},{src:"/static/stock_dest-bluemountains-a9b109-0.jpg",caption:"Blue Mountains · Nueva Gales del Sur, Australia"},{src:"/static/stock_dest-fontainebleau-04835b-0.jpg",caption:"Fontainebleau · Île-de-France, Francia"},{src:"/static/stock_dest-elbsandstein-f8a4c0-0.jpg",caption:"Elbsandstein · Sajonia, Alemania"},{src:"/static/stock_gallery-briancon-67db06-0.jpg",caption:"Briançon · Alpes, Francia"},{src:"/static/stock_gallery-dolomitas-7c818b-1.jpg",caption:"Torres de roca · Dolomitas, Italia"},{src:"/static/stock_gallery-climbing-1-c0f0aa-0.jpg",caption:"Arco · Trentino, Italia"},{src:"/static/gallery-extra-5.jpg",caption:"Riglos · Aragón, España"}];function Jj(){const[l,i]=b.useState(0),[r,d]=b.useState(null),[m,p]=b.useState(!1);b.useEffect(()=>{const x=setInterval(()=>{f((l+1)%bs.length)},5e3);return()=>clearInterval(x)},[l]);function f(x){m||x===l||(d(l),p(!0),i(x),setTimeout(()=>{d(null),p(!1)},700))}return e.jsx("section",{className:"bg-stone-950 py-20 px-4",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 mb-10",children:[e.jsxs("div",{children:[e.jsx("span",{className:"inline-block px-3 py-1 rounded-full border border-[#e8ff4a]/30 text-[#e8ff4a] text-xs font-semibold tracking-widest uppercase mb-3",children:"Destinos de escalada"}),e.jsx("h2",{className:"font-display text-3xl sm:text-5xl font-bold text-white leading-tight",children:"Top Destinos"})]}),e.jsx("p",{className:"text-stone-400 sm:max-w-xs text-sm leading-relaxed",children:"Imágenes de referencia de los destinos más emblemáticos del mundo. Las casas disponibles son las que puedes ver en el catálogo."})]}),e.jsxs("div",{className:"relative w-full rounded-3xl overflow-hidden bg-stone-900 select-none",style:{height:"520px"},children:[r!==null&&e.jsx("img",{src:bs[r].src,alt:"","aria-hidden":"true",className:"absolute inset-0 w-full h-full object-cover",style:{opacity:m?0:1,transition:"opacity 0.7s ease"}},`prev-${r}`),e.jsx("img",{src:bs[l].src,alt:bs[l].caption,className:"absolute inset-0 w-full h-full object-cover",style:{opacity:m?.8:1,transition:"opacity 0.7s ease"}},`curr-${l}`),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-stone-950/80 via-transparent to-transparent"}),e.jsxs("div",{className:"absolute bottom-6 left-6 right-6 flex items-end justify-between",children:[e.jsx("p",{className:"text-white font-semibold text-lg drop-shadow-lg",children:bs[l].caption}),e.jsxs("span",{className:"text-stone-400 text-sm font-mono",children:[String(l+1).padStart(2,"0")," / ",String(bs.length).padStart(2,"0")]})]}),e.jsx("button",{onClick:()=>f((l-1+bs.length)%bs.length),"aria-label":"Imagen anterior",className:"absolute left-4 top-1/2 -translate-y-1/2 w-11 h-11 rounded-full bg-stone-950/60 hover:bg-[#e8ff4a] text-white hover:text-stone-950 flex items-center justify-center transition-all backdrop-blur-sm border border-white/10 hover:border-[#e8ff4a]",children:e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"15 18 9 12 15 6"})})}),e.jsx("button",{onClick:()=>f((l+1)%bs.length),"aria-label":"Imagen siguiente",className:"absolute right-4 top-1/2 -translate-y-1/2 w-11 h-11 rounded-full bg-stone-950/60 hover:bg-[#e8ff4a] text-white hover:text-stone-950 flex items-center justify-center transition-all backdrop-blur-sm border border-white/10 hover:border-[#e8ff4a]",children:e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})})]}),e.jsx("div",{className:"flex gap-2 mt-4 overflow-x-auto pb-1 scrollbar-hide",children:bs.map((x,h)=>e.jsx("button",{onClick:()=>f(h),"aria-label":x.caption,className:`shrink-0 rounded-xl overflow-hidden border-2 transition-all ${h===l?"border-[#e8ff4a] scale-105":"border-transparent opacity-50 hover:opacity-80"}`,style:{width:72,height:48},children:e.jsx("img",{src:x.src,alt:x.caption,className:"w-full h-full object-cover"})},h))})]})})}function Xj({home:l}){return e.jsxs(ne,{to:`/homes/${l.id}`,className:"group block bg-stone-900 rounded-2xl overflow-hidden border border-stone-800 hover:border-[#e8ff4a]/50 transition-all hover:-translate-y-1 hover:shadow-xl hover:shadow-black/40",children:[e.jsxs("div",{className:"h-48 bg-stone-800 relative overflow-hidden",children:[l.photos&&l.photos[0]?e.jsx("img",{src:D.files.getURL(l,l.photos[0],{thumb:"400x300"}),alt:l.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-stone-600",children:e.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("title",{children:"Sin foto"}),e.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"}),e.jsx("path",{d:"M12 8v8m-4-4h8"})]})}),l.available&&e.jsx("span",{className:"absolute top-3 right-3 bg-[#e8ff4a] text-stone-950 text-xs font-bold px-2 py-0.5 rounded-full",children:"Disponible"})]}),e.jsxs("div",{className:"p-5",children:[e.jsx("h3",{className:"font-display text-lg font-bold text-white group-hover:text-[#e8ff4a] transition-colors line-clamp-1",children:l.title}),e.jsxs("p",{className:"flex items-center gap-1.5 text-stone-400 text-sm mt-1",children:[e.jsx(ya,{className:"w-3.5 h-3.5"}),l.location,l.country?`, ${l.country}`:""]}),l.climbing_areas&&e.jsx("p",{className:"text-stone-500 text-sm mt-2 line-clamp-2",children:l.climbing_areas}),l.difficulty_levels&&l.difficulty_levels.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-3",children:l.difficulty_levels.slice(0,3).map(i=>e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-stone-800 text-stone-300 border border-stone-700",children:i},i))})]})]})}function Wj(){const[l,i]=b.useState(""),r=Za(),{t:d}=Lt();function m(p){p.preventDefault();const f=l.trim();f&&r(`/routes?q=${encodeURIComponent(f)}`)}return e.jsx("form",{onSubmit:m,className:"w-full max-w-xl mx-auto mt-8",children:e.jsxs("div",{className:"flex items-stretch rounded-2xl overflow-hidden border border-white/20 bg-black/40 backdrop-blur-md shadow-2xl",children:[e.jsx("label",{htmlFor:"hero-search",className:"sr-only",children:d("home.search_crag")||"¿A qué escuela quieres ir?"}
161),e.jsx("input",{id:"hero-search",type:"text",value:l,onChange:p=>i(p.target.value),placeholder:d("home.search_crag")||"¿A qué escuela quieres ir?",className:"flex-1 bg-transparent px-5 py-4 text-white placeholder-white/50 text-base focus:outline-hidden"}),e.jsxs("button",{type:"submit",className:"px-5 py-4 bg-[#e8ff4a] text-stone-950 font-bold flex items-center gap-2 hover:bg-[#f0ff70] transition-colors shrink-0",children:[e.jsx(vs,{className:"w-5 h-5"}),e.jsx("span",{className:"hidden sm:inline",children:d("buttons.search")||"Buscar"})]})]})})}function e4({onWelcomeOpen:l}){const{user:i}=oa(),{t:r,lang:d}=Lt(),[m,p]=b.useState([]),[f,x]=b.useState(!0);return b.useEffect(()=>{if(!i){x(!1);return}const h=new AbortController;return D.collection("homes").getList(1,6,{sort:"-created",signal:h.signal}).then(j=>{p(j.items),x(!1)}).catch(j=>{j!=null&&j.isAbort||(p([]),x(!1))}),()=>h.abort()},[i]),e.jsxs("main",{children:[e.jsxs("section",{className:"relative min-h-screen flex items-center justify-center overflow-hidden",children:[e.jsx(Qj,{}),e.jsxs("div",{className:"relative z-10 text-center px-4 max-w-4xl mx-auto",children:[e.jsx("div",{className:"flex justify-center items-center mb-8",style:{filter:"drop-shadow(0 4px 24px rgba(0,0,0,0.8))"},children:e.jsx("button",{onClick:()=>l&&l(),"aria-label":"Ver presentación de CLIMB & HOME",className:"focus:outline-hidden focus-visible:ring-2 focus-visible:ring-[#e8ff4a] rounded-lg",children:e.jsx("img",{src:"/static/logo-climb-home.jpg",alt:"Climb & HOME",className:"h-12 sm:h-16 w-auto cursor-pointer hover:opacity-80 transition-opacity"})})}),e.jsx("p",{className:"text-[#e8ff4a] text-sm font-semibold tracking-[0.2em] mb-6",style:{textShadow:"0 1px 8px rgba(0,0,0,0.9)"},children:r("home.subtitle")||"La comunidad escaladora"}),e.jsx("h1",{className:"font-sans text-7xl sm:text-8xl md:text-9xl font-bold text-[#e8ff4a] leading-[0.95] mb-3",style:{textShadow:"0 2px 24px rgba(0,0,0,0.95)"},children:r("home.headline")||`Escala
162y viaja.`}),e.jsx("p",{className:"text-stone-300 text-base sm:text-lg font-medium tracking-wide mb-6",style:{textShadow:"0 1px 6px rgba(0,0,0,0.9)",letterSpacing:"0.04em"},children:r("home.tagline")||"Intercambia tu casa · Vive la escalada como un local"}),e.jsx(Wj,{}),e.jsx("p",{className:"text-white text-lg sm:text-xl max-w-2xl mx-auto mb-6 mt-8 leading-relaxed px-6 py-4 rounded-2xl",style:{textShadow:"0 1px 8px rgba(0,0,0,0.9)",background:"rgba(0,0,0,0.35)",backdropFilter:"blur(4px)"},children:r("home.description")||"Descubre destinos, escuelas y escaladores locales. La comunidad que comparte el conocimiento que ninguna guía tiene."}),i?e.jsxs("div",{className:"grid grid-cols-2 gap-3 justify-center max-w-sm sm:max-w-2xl mx-auto w-full px-4",children:[e.jsxs(ne,{to:"/homes",className:"flex items-center justify-center gap-2 px-4 py-4 bg-[#e8ff4a] text-stone-950 font-bold text-sm sm:text-base rounded-xl hover:bg-[#f0ff70] transition-colors text-center leading-tight",children:["🏠 ",r("home.browse_homes")||"Busca casas"]}),e.jsxs(ne,{to:"/routes",className:"flex items-center justify-center gap-2 px-4 py-4 bg-[#e8ff4a] text-stone-950 font-bold text-sm sm:text-base rounded-xl hover:bg-[#f0ff70] transition-colors text-center leading-tight",children:["🧗 ",r("home.browse_schools")||"Busca escuelas"]}),e.jsxs(ne,{to:"/mapa",className:"flex items-center justify-center gap-2 px-4 py-4 bg-[#e8ff4a] text-stone-950 font-bold text-sm sm:text-base rounded-xl hover:bg-[#f0ff70] transition-colors text-center leading-tight",children:["🗺️ ",r("home.view_map")||"Ver el mapa"]}),e.jsxs(ne,{to:"/comunidad",className:"flex items-center justify-center gap-2 px-4 py-4 bg-[#e8ff4a] text-stone-950 font-bold text-sm sm:text-base rounded-xl hover:bg-[#f0ff70] transition-colors text-center leading-tight",children:["👥 ",r("nav.community")||"Comunidad"]})]}):e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center max-w-sm sm:max-w-xl mx-auto w-full px-4",children:[e.jsx(ne,{to:"/signup",className:"flex items-center justify-center gap-2 px-6 py-4 bg-[#e8ff4a] text-stone-950 font-bold text-base sm:text-lg rounded-xl hover:bg-[#f0ff70] transition-colors text-center leading-tight flex-1",children:"Unirme gratis"}),e.jsx(ne,{to:"/login",className:"flex items-center justify-center gap-2 px-6 py-4 bg-stone-900/80 text-white font-semibold text-base rounded-xl hover:bg-stone-800 transition-colors border border-stone-700/60 text-center leading-tight",children:r("nav.login")||"Entrar"})]})]}),e.jsxs("div",{className:"absolute bottom-8 left-1/2 -translate-x-1/2 flex flex-col items-center gap-2 text-stone-400",children:[e.jsx("div",{className:"w-px h-12 bg-gradient-to-b from-transparent to-stone-400"}),e.jsx("span",{className:"text-xs tracking-widest uppercase",children:"Descubre"})]})]}),i&&!f&&m.length>0&&e.jsx("section",{className:"bg-stone-950 pb-24 px-4",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsxs("div",{className:"mb-10",children:[e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-white",children:r("home.featured_homes")||"Escaladores que abren su casa"}),e.jsx("p",{className:"text-stone-400 mt-2",children:r("home.featured_homes_desc")||"Escaladores que comparten su casa y su conocimiento local."})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:[m.map(h=>e.jsx(Xj,{home:h}
162,h.id)),e.jsxs(ne,{to:"/registro",className:"group flex flex-col items-center justify-center bg-stone-900 rounded-2xl overflow-hidden border border-stone-700 border-dashed hover:border-[#e8ff4a]/60 transition-all hover:-translate-y-1 min-h-[280px] p-8 text-center gap-4",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/30 flex items-center justify-center",children:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"#e8ff4a",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("title",{children:"Publicar casa"}),e.jsx("path",{d:"M12 5v14M5 12h14"})]})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-display text-lg font-bold text-white group-hover:text-[#e8ff4a] transition-colors",children:r("home.grow_cta")||"Ayúdanos a crecer"}),e.jsx("p",{className:"text-stone-400 text-sm mt-1 leading-relaxed",children:r("home.grow_desc")||"Publica tu casa y consigue 300 CP extra. Si eres de los primeros 100 miembros fundadores, súmale otros 100 CP más."})]}),e.jsx("span",{className:"inline-flex items-center gap-1.5 px-5 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 text-sm font-bold mt-1 group-hover:scale-105 transition-transform",children:r("home.publish_home")||"Publicar mi casa"})]})]})]})}),e.jsxs("section",{className:"bg-stone-950 py-24 px-4 relative overflow-hidden",children:[e.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 pointer-events-none select-none",style:{backgroundImage:"url('/static/croquis-bg.jpg')",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",filter:"blur(0px) grayscale(100%) invert(1) brightness(0.15) contrast(1.1)",opacity:.18,transform:"scale(1.08)"}}),e.jsxs("div",{className:"max-w-5xl mx-auto relative z-10",children:[e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-white drop-shadow-[0_2px_6px_rgba(0,0,0,0.9)] text-center mb-4",children:r("home.how_works")}),e.jsx("p",{className:"text-white font-medium drop-shadow-[0_1px_4px_rgba(0,0,0,0.8)] text-center text-lg mb-16 max-w-xl mx-auto",children:r("home.how_works_subtitle")}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-8",children:[{icon:e.jsx(ut,{className:"w-7 h-7"}),title:r("home.step1_title"),desc:r("home.step1_desc")},{icon:e.jsx(ya,{className:"w-7 h-7"}),title:r("home.step2_title"),desc:r("home.step2_desc")},{icon:e.jsx(Zn,{className:"w-7 h-7"}),title:r("home.step3_title"),desc:r("home.step3_desc")}].map((h,j)=>e.jsxs("div",{className:"group text-center p-8 rounded-2xl bg-stone-900 border border-stone-800 hover:border-[#e8ff4a]/40 transition-colors",children:[e.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#e8ff4a]/10 flex items-center justify-center mx-auto mb-5 text-[#e8ff4a] group-hover:bg-[#e8ff4a]/20 transition-colors",children:h.icon}),e.jsx("h3",{className:"font-display text-xl font-bold text-white drop-shadow-[0_1px_4px_rgba(0,0,0,0.9)] mb-3",children:h.title}),e.jsx("p",{className:"text-white font-medium drop-shadow-[0_1px_3px_rgba(0,0,0,0.8)] leading-relaxed",children:h.desc})]},j))})]})]}),e.jsx("section",{className:"bg-stone-900 py-24 px-4",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between mb-12 gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-white",children:r("home.stories_title")}),e.jsx("p",{className:"text-stone-400 mt-2",children:r("home.stories_subtitle")})]}),e.jsx(ne,{to:"/signup",className:"shrink-0 text-sm font-semibold text-[#e8ff4a] hover:underline flex items-center gap-1",children:r("home.stories_cta")})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:Kj[d].map((h,j)=>e.jsxs("article",{className:"bg-stone-950 border border-stone-800 rounded-2xl p-6 flex flex-col gap-4 hover:border-stone-700 transition-colors",children:[e.jsx("span",{className:"self-start text-[10px] px-2 py-0.5 rounded-full bg-stone-800 text-stone-500 border border-stone-700 font-medium tracking-wide uppercase",children:r("home.fictional_badge")}),e.jsx("div",{className:"flex gap-1",children:[...Array(h.rating)].map((g,v)=>e.jsx("svg",{viewBox:"0 0 16 16",className:"w-4 h-4 fill-[#e8ff4a]",children:e.jsx("path",{d:"M8 1l1.8 3.6L14 5.3l-3 2.9.7 4.1L8 10.4l-3.7 1.9.7-4.1-3-2.9 4.2-.7z"})},v))}),e.jsxs("p",{className:"text-stone-300 text-sm leading-relaxed flex-1",children:["“",h.text,"”"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3.5 h-3.5 text-stone-500 shrink-0",children:[e.jsx("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z"}),e.jsx("circle",{cx:"12",cy:"10",r:"3"})]}),e.jsx("span",{className:"text-stone-500 text-xs",children:h.zone}),e.jsx("span",{className:"ml-auto text-xs px-2 py-0.5 rounded-full border font-semibold",style:{borderColor:h.color+"50",color:h.color},children:h.style})]}),e.jsxs("div",{className:"flex items-center gap-3 pt-3 border-t border-stone-800",children:[e.jsx("div",{className:"w-9 h-9 rounded-full flex items-center justify-center text-xs font-bold text-stone-950 shrink-0",style:{backgroundColor:h.color},children:h.avatar}),e.jsxs("div",{children:[e.jsx("p",{className:"text-white text-sm font-semibold",children:h.name}),e.jsxs("p",{className:"text-stone-500 text-xs",children:[h.location," · Grado ",h.level," · ",h.date]})]})]})]},j))}),e.jsxs("div",{className:"mt-12 text-center",children:[e.jsx("p",{className:"text-stone-400 mb-4",children:r("home.review_question")}),e.jsx(ne,{to:"/signup",className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:r("home.signup_and_review")})]})]})}),e.jsx(Jj,{}),e.jsx("section",{className:"bg-[#e8ff4a] py-20 px-4",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsx("h2",{className:"font-display text-4xl sm:text-5xl font-bold text-stone-950 mb-4",children:r("home.good_schools_title")}),e.jsx("p",{className:"text-stone-700 text-lg mb-8 max-w-xl mx-auto",children:r("home.good_schools_desc")}),e.jsxs(ne,{to:"/signup",className:"inline-flex items-center gap-2 px-8 py-4 rounded-full bg-stone-950 text-white font-bold text-lg hover:bg-stone-800 transition-colors",children:[r("home.start_now"),e.jsx(Yj,{className:"w-5 h-5"})]})]})}),e.jsx("footer",{className:"bg-stone-950 border-t border-stone-800 py-10 px-4",children:e.jsxs("div",{className:"max-w-7xl mx-auto flex flex-col gap-8",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-6",children:[e.jsx("button",{onClick:()=>l&&l(),"aria-label":r("footer.presentation"),className:"focus:outline-hidden focu
162s-visible:ring-2 focus-visible:ring-[#e8ff4a] rounded",children:e.jsx("img",{src:"/static/logo-climb-home.jpg",alt:"Climb & HOME",className:"h-8 w-auto cursor-pointer hover:opacity-80 transition-opacity"})}),e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx("a",{href:"https://www.facebook.com/profile.php?id=61595029974647&locale=es_ES",target:"_blank",rel:"noopener noreferrer","aria-label":"Facebook",className:"text-stone-500 hover:text-[#e8ff4a] transition-colors",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"})})}),e.jsx("a",{href:"https://www.instagram.com/climbandhome/",target:"_blank",rel:"noopener noreferrer","aria-label":"Instagram",className:"text-stone-500 hover:text-[#e8ff4a] transition-colors",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"5",ry:"5"}),e.jsx("path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"}),e.jsx("line",{x1:"17.5",y1:"6.5",x2:"17.51",y2:"6.5"})]})}),e.jsx("a",{href:"https://www.tiktok.com/@climbandhome",target:"_blank",rel:"noopener noreferrer","aria-label":"TikTok",className:"text-stone-500 hover:text-[#e8ff4a] transition-colors",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-2.88 2.5 2.89 2.89 0 0 1-2.89-2.89 2.89 2.89 0 0 1 2.89-2.89c.28 0 .54.04.79.1V9.01a6.27 6.27 0 0 0-.79-.05 6.34 6.34 0 0 0-6.34 6.34 6.34 6.34 0 0 0 6.34 6.34 6.34 6.34 0 0 0 6.33-6.34V8.69a8.18 8.18 0 0 0 4.78 1.52V6.75a4.85 4.85 0 0 1-1.01-.06z"})})}),e.jsx("a",{href:"https://www.youtube.com/@ClimbHome",target:"_blank",rel:"noopener noreferrer","aria-label":"YouTube",className:"text-stone-500 hover:text-[#e8ff4a] transition-colors",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[e.jsx("path",{d:"M22.54 6.42a2.78 2.78 0 0 0-1.95-1.96C18.88 4 12 4 12 4s-6.88 0-8.59.46a2.78 2.78 0 0 0-1.95 1.96A29 29 0 0 0 1 12a29 29 0 0 0 .46 5.58A2.78 2.78 0 0 0 3.41 19.6C5.12 20 12 20 12 20s6.88 0 8.59-.46a2.78 2.78 0 0 0 1.95-1.95A29 29 0 0 0 23 12a29 29 0 0 0-.46-5.58z"}),e.jsx("polygon",{points:"9.75 15.02 15.5 12 9.75 8.98 9.75 15.02",fill:"white"})]})}),e.jsx("a",{href:"https://www.google.com/search?q=Climb+%26+Home",target:"_blank",rel:"noopener noreferrer","aria-label":"Google",className:"text-stone-500 hover:text-[#e8ff4a] transition-colors",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M21.35 11.1H12.18V13.83H18.69C18.36 17.64 15.19 19.27 12.19 19.27C8.36 19.27 5 16.25 5 12C5 7.9 8.2 4.73 12.2 4.73C15.29 4.73 17.1 6.7 17.1 6.7L19 4.72C19 4.72 16.56 2 12.1 2C6.42 2 2.03 6.8 2.03 12C2.03 17.05 6.16 22 12.25 22C17.6 22 21.5 18.33 21.5 12.91C21.5 11.76 21.35 11.1 21.35 11.1Z"})})})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 border-t border-stone-800 pt-6",children:[e.jsx("p",{className:"text-stone-500 text-sm text-center",children:r("footer.copyright")}),e.jsxs("nav",{className:"flex flex-wrap gap-6 text-sm text-stone-400 justify-center",children:[e.jsx(ne,{to:"/nosotros",className:"hover:text-white transition-colors",children:r("footer.about")}),e.jsx(ne,{to:"/homes",className:"hover:text-white transition-colors",children:r("footer.homes")}),e.jsx(ne,{to:"/routes",className:"hover:text-white transition-colors",children:r("footer.schools")}),e.jsx(ne,{to:"/croquis",className:"hover:text-white transition-colors",children:r("footer.topos")}),e.jsx(ne,{to:"/comunidad",className:"hover:text-white transition-colors",children:r("footer.community")}),e.jsx(ne,{to:"/ayuda",className:"hover:text-white transition-colors",children:r("footer.help")}),e.jsx("a",{href:"mailto:[email protected]",className:"hover:text-white transition-colors",children:r("footer.contact")}),e.jsx(ne,{to:"/terminos",className:"hover:text-white transition-colors",children:r("footer.terms")}),e.jsx(ne,{to:"/privacidad",className:"hover:text-white transition-colors",children:r("footer.privacy")}),e.jsx(ne,{to:"/legal",className:"hover:text-white transition-colors",children:r("footer.legal")})]})]})]})})]})}/**
163 * @license lucide-react v1.47.0 - ISC
164 *
165 * This source code is licensed under the ISC license.
166 * See the LICENSE file in the root directory of this source tree.
167 */const B0={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};B0.node;const xn=Ie(B0);function Vx(l,i,r,d){const p=(r-l)*Math.PI/180,f=(d-i)*Math.PI/180,x=Math.sin(p/2)**2+Math.cos(l*Math.PI/180)*Math.cos(r*Math.PI/180)*Math.sin(f/2)**2;return 6371*2*Math.atan2(Math.sqrt(x),Math.sqrt(1-x))}function Gx(l){if(!l||l.length<2)return[];const i=l.toLowerCase();return at.filter(r=>r.zona.toLowerCase().includes(i)||r.pais.toLowerCase().includes(i)||r.resumen&&r.resumen.toLowerCase().includes(i)).slice(0,6).map(r=>({label:`${r.zona} — ${r.pais}`,lat:r.lat,lng:r.lng,tipo:"escuela",zona:r.zona}))}function a4(l,i){if(!l||!i)return 0;const r=new Date(i)-new Date(l);return Math.max(0,Math.round(r/864e5))}function t4(l){if(l.cp_value&&l.cp_value>0)return l.cp_value;const i=l.max_guests||1;return i<=2?100:i<=4?120:i<=6?150:i<=8?180:200}function s4({active:l}){const i=l?"#0c0a09":"#e8ff4a",r=l?"#0c0a09":"#c8df30",d=l?"#292524":"#b5a99a",m=l?"#1c1917":"#9c8f82",p=l?"#1c1917":"#8c7b6e",f=l?"#e8ff4a":"#1c1917",x=l?"#e8ff4a":"#1c1917",h=l?"#0c0a09":"#c8df30",j=l?"#0c0a09":"#e8ff4a";return e.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 48 48",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M24 3 Q30 3 30 8 Q30 12 24 12 Q18 12 18 8 Q18 3 24 3Z",stroke:j,strokeWidth:"1.8",fill:"none",strokeLinecap:"round"}),e.jsx("path",{d:"M13 22 Q13 10 24 10 Q35 10 35 22 L35 25 Q35 27 33 27 L15 27 Q13 27 13 25Z",fill:i}),e.jsx("rect",{x:"11",y:"26",width:"26",height:"3.5",rx:"1.75",fill:r}),e.jsx("path",{d:"M15 29 Q12 33 15 36",stroke:h,strokeWidth:"1.4",fill:"none",strokeLinecap:"round"}),e.jsx("path",{d:"M33 29 Q36 33 33 36",stroke:h,strokeWidth:"1.4",fill:"none",strokeLinecap:"round"}),e.jsx("path",{d:"M15 36 Q19 38 24 38 Q29 38 33 36",stroke:h,strokeWidth:"1.4",fill:"none",strokeLinecap:"round"}),e.jsx("ellipse",{cx:"24",cy:"34",rx:"10",ry:"9",fill:d}),e.jsx("ellipse",{cx:"24",cy:"39",rx:"6",ry:"4",fill:m}),e.jsx("path",{d:"M14 30 Q9 32 10 40 Q11 44 15 43 Q17 42 16 38 Q15 33 14 30Z",fill:p}),e.jsx("path",{d:"M34 30 Q39 32 38 40 Q37 44 33 43 Q31 42 32 38 Q33 33 34 30Z",fill:p}),e.jsx("ellipse",{cx:"20",cy:"32",rx:"2",ry:"2.2",fill:f}),e.jsx("ellipse",{cx:"28",cy:"32",rx:"2",ry:"2.2",fill:f}),e.jsx("circle",{cx:"20.6",cy:"31.4",r:"0.7",fill:l?"#e8ff4a":"white",opacity:"0.7"}),e.jsx("circle",{cx:"28.6",cy:"31.4",r:"0.7",fill:l?"#e8ff4a":"white",opacity:"0.7"}),e.jsx("ellipse",{cx:"24",cy:"37.5",rx:"2.8",ry:"1.8",fill:x}),e.jsx("path",{d:"M17 44 Q20 41 24 41 Q28 41 31 44",stroke:j,strokeWidth:"1.6",fill:"none",strokeLinecap:"round"}),e.jsx("path",{d:"M20 41 L22 46",stroke:j,strokeWidth:"1.4",fill:"none",strokeLinecap:"round"}),e.jsx("path",{d:"M28 41 L26 46",stroke:j,strokeWidth:"1.4",fill:"none",strokeLinecap:"round"})]})}function Fx({home:l,nights:i,huespedes:r,memberBalance:d,searchAnchor:m}){const p=t4(l),f=i>
1670?p*i:null,x=d!==null&&f!==null?f-d:null,h=l._distKm!=null?Math.round(l._distKm):null;return e.jsxs(ne,{to:`/homes/${l.id}`,className:"group block bg-stone-900 rounded-2xl overflow-hidden border border-stone-800 hover:border-[#e8ff4a]/50 transition-all hover:-translate-y-1 hover:shadow-xl hover:shadow-black/40",children:[e.jsxs("div",{className:"h-52 bg-stone-800 relative overflow-hidden",children:[l.photos&&l.photos[0]?e.jsx("img",{src:D.files.getURL(l,l.photos[0],{thumb:"600x400"}),alt:l.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-stone-600 text-sm",children:"Sin foto aún"}),l.available&&e.jsx("span",{className:"absolute top-3 right-3 bg-[#e8ff4a] text-stone-950 text-xs font-bold px-2 py-0.5 rounded-full",children:"Disponible"}),h!==null&&(m==null?void 0:m.lat)&&e.jsx("span",{className:"absolute top-3 left-3 bg-stone-950/80 backdrop-blur-sm text-stone-200 text-xs px-2.5 py-0.5 rounded-full border border-stone-600",children:h<=1?"En la zona":`≈ ${h} km de ${m.zona||m.label.split("—")[0].trim()}`}),e.jsxs("span",{className:"absolute bottom-3 left-3 bg-stone-950/80 backdrop-blur-sm text-[#e8ff4a] text-xs font-bold px-2.5 py-1 rounded-full border border-[#e8ff4a]/30",children:[p," CP/noche"]})]}),e.jsxs("div",{className:"p-5",children:[l.accommodation_type==="habitacion_privada"&&e.jsx("span",{className:"inline-block text-xs font-medium px-2 py-0.5 rounded-full bg-amber-500/15 text-amber-400 border border-amber-500/20 mb-2",children:"Habitación privada"}),e.jsx("h3",{className:"font-display text-lg font-bold text-white group-hover:text-[#e8ff4a] transition-colors line-clamp-1",children:l.title}),e.jsxs("p",{className:"flex items-center gap-1.5 text-stone-400 text-sm mt-1",children:[e.jsx(ya,{className:"w-3.5 h-3.5"}),l.location,l.country?`, ${l.country}`:""]}),l.climbing_areas&&e.jsx("p",{className:"text-stone-500 text-sm mt-2 line-clamp-2",children:l.climbing_areas}),f!==null?e.jsxs("div",{className:"mt-3 bg-stone-800/60 rounded-xl p-3 border border-stone-700/60",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 flex-wrap",children:[e.jsxs("span",{className:"text-stone-400 text-xs",children:[p," CP/noche × ",i," noche",i!==1?"s":"",r?` · ${r} huésp.`:""]}),e.jsxs("span",{className:"text-[#e8ff4a] font-bold text-sm",children:["= ",f," CP"]})]}),d!==null&&e.jsxs("div",{className:"mt-1.5 flex items-center justify-between text-xs",children:[e.jsxs("span",{className:"text-stone-500",children:["Tu saldo: ",d," CP"]}),x!==null&&x>0?e.jsxs("span",{className:"text-red-400 font-medium",children:["Te faltan ",x," CP"]}):e.jsx("span",{className:"text-green-400 font-medium",children:"Tienes suficiente ✓"})]})]}):e.jsxs("div",{className:"mt-3 flex items-center justify-between flex-wrap gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[l.max_guests>0&&e.jsxs("span",{className:"text-stone-500 text-xs",children:["Hasta ",l.max_guests," escaladores"]}),l.pets&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-amber-500/15 text-amber-400 border border-amber-500/30 font-medium",children:[e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 36 36",fill:"none","aria-hidden":"true",children:[e.jsx("ellipse",{cx:"18",cy:"10",rx:"9",ry:"5",fill:"#e8ff4a"}),e.jsx("rect",{x:"11",y:"13",width:"14",height:"2.5",rx:"1.25",fill:"#e8ff4a"}),e.jsx("ellipse",{cx:"18",cy:"22",rx:"7",ry:"6",fill:"#d6d3d1"}),e.jsx("ellipse",{cx:"11",cy:"20",rx:"2.5",ry:"4",fill:"#a8a29e"}),e.jsx("ellipse",{cx:"25",cy:"20",rx:"2.5",ry:"4",fill:"#a8a29e"}),e.jsx("circle",{cx:"15",cy:"21",r:"1",fill:"#292524"}),e.jsx("circle",{cx:"21",cy:"21",r:"1",fill:"#292524"}),e.jsx("ellipse",{cx:"18",cy:"25",rx:"2",ry:"1.2",fill:"#292524"})]}),"Mascotas"]})]}),e.jsx("span",{className:"text-stone-600 text-xs italic",children:"Elige fechas para ver el total"})]}),f!==null&&l.pets&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-amber-500/15 text-amber-400 border border-amber-500/30 font-medium mt
167-2",children:[e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 36 36",fill:"none","aria-hidden":"true",children:[e.jsx("ellipse",{cx:"18",cy:"10",rx:"9",ry:"5",fill:"#e8ff4a"}),e.jsx("rect",{x:"11",y:"13",width:"14",height:"2.5",rx:"1.25",fill:"#e8ff4a"}),e.jsx("ellipse",{cx:"18",cy:"22",rx:"7",ry:"6",fill:"#d6d3d1"}),e.jsx("ellipse",{cx:"11",cy:"20",rx:"2.5",ry:"4",fill:"#a8a29e"}),e.jsx("ellipse",{cx:"25",cy:"20",rx:"2.5",ry:"4",fill:"#a8a29e"}),e.jsx("circle",{cx:"15",cy:"21",r:"1",fill:"#292524"}),e.jsx("circle",{cx:"21",cy:"21",r:"1",fill:"#292524"}),e.jsx("ellipse",{cx:"18",cy:"25",rx:"2",ry:"1.2",fill:"#292524"})]}),"Mascotas"]}),l.difficulty_levels&&l.difficulty_levels.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-3",children:l.difficulty_levels.slice(0,3).map(j=>e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-green-500/15 text-green-400 border border-green-500/40 font-medium",children:j},j))})]})]})}function $x(l,i,r){if(!i||!r)return!0;let d=new Set;try{if(l.blocked_dates){const f=typeof l.blocked_dates=="string"?JSON.parse(l.blocked_dates):l.blocked_dates;Array.isArray(f)?f.forEach(x=>{typeof x=="string"?d.add(x):x.state==="blocked"&&d.add(x.date)}):f&&typeof f=="object"&&(f.blocked||[]).forEach(x=>d.add(x))}}catch{d=new Set}if(d.size===0)return!0;const m=new Date(i),p=new Date(r);for(let f=new Date(m);f<=p;f.setDate(f.getDate()+1)){const x=f.toISOString().slice(0,10);if(d.has(x))return!1}return!0}function n4(){const{user:l}=oa(),i=Za(),{t:r}=Lt(),[d,m]=b.useState([]),[p,f]=b.useState(!0),[x,h]=b.useState([]),[j,g]=b.useState("todos"),[v,S]=b.useState(""),[N,_]=b.useState(null),[z,C]=b.useState([]),[k,T]=b.useState(!1),[w,A]=b.useState(!1),L=b.useRef(null),[q,H]=b.useState(""),[F,U]=b.useState(""),[J,O]=b.useState(""),[X,B]=b.useState(""),[Z,te]=b.useState(!1),[P,$]=b.useState(!1),oe=l?l.cp_balance??l.friend_points??0:null,de=a4(J,X);b.useEffect(()=>{const ee=Gx(v);C(ee),T(ee.length>0&&v.length>=2)},[v]);const ze=async ee=>{try{A(!0);const he=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(ee)}&format=json&limit=1&accept-language=es`,me=await(await fetch(he,{signal:AbortSignal.timeout(4e3)})).json();if(me&&me[0])return{label:me[0].display_name.split(",").slice(0,2).join(","),lat:parseFloat(me[0].lat),lng:parseFloat(me[0].lon),tipo:"lugar"}}catch{}finally{A(!1)}return null},da=async ee=>{_(ee),C([]),T(!1),S(ee.label)},Ze=async()=>{if(!v.trim()){_(null);return}const ee=Gx(v);if(ee.length>0){await da(ee[0]);return}const he=await ze(v);if(he){await da(he);return}_({label:v,lat:null,lng:null,tipo:"texto"}),T(!1)};b.useEffect(()=>{if(!l){f(!1);return}const ee=new AbortController;return D.collection("homes").getList(1,200,{sort:"-created",signal:ee.signal}).then(he=>{m(he.items),h(he.items),f(!1),$(!1)}).catch(he=>{he!=null&&he.isAbort||(f(!1),$(!0))}),()=>ee.abort()},[l]);const[Ea,V]=b.useState([]),[pe,Ne]=b.useState([]);b.useEffect(()=>{let ee=d;if(N)if(N.lat!==null&&N.lng!==null)ee=ee.map(le=>{if(!le.lat||!le.lng)return null;const me=Vx(N.lat,N.lng,le.lat,le.lng);return{...le,_distKm:me}}).filter(Boolean).filter(le=>le._distKm<=80).sort((le,me)=>le._distKm-me._distKm);else{const le=N.label.toLowerCase();ee=ee.filter(me=>{var Be,xe,Ce,Te;return((Be=me.title)==null?void 0:Be.toLowerCase().includes(le))||((xe=me.location)==null?void 0:xe.toLowerCase().includes(le))||((Ce=me.country)==null?void 0:Ce.toLowerCase().includes(le))||((Te=me.climbing_areas)==null?void 0:Te.toLowerCase().includes(le))})}if(q.trim()){const le=q.toLowerCase();ee=ee.filter(me=>{var Be,xe;return((Be=me.climbing_areas)==null?void 0:Be.toLowerCase().includes(le))||((xe=me.location)==null?void 0:xe.toLowerCase().includes(le))})}F&&parseInt(F)>0&&(ee=ee.filter(le=>le.max_guests>=parseInt(F)));let he=ee;if(J&&X&&(he=ee.filter(le=>$x(le,J,X))),Z&&(he=he.filter(le=>le.pets===!0)),j!=="todos"&&(he=he.filter(le=>(le.accommodation_type||"vivienda_completa")===j)),h(he),J&&X&&he.length<3&&ee.length>0){const le=new Date(J).getTime(),me=new Date(X).getTime(),Be=[];for(const Te of[-14,-7,7,14,21,30]){const Qe=new Date(le+Te*864e5),Ge=new Date(me+Te*864e5),ua=Qe.toISOString().slice(0,10),Ka=Ge.toISOString().slice(0,10);if(new Date(ua)<new Date)continue;const ye=ee.filter(Va=>$x(Va,ua,Ka)).length;ye>0&&Be.push({dateFrom:ua,dateTo:Ka,count:ye,shift:Te})}const xe=new Set,Ce=Be.filter(Te=>{const Qe=Te.count;return xe.has(Qe)?!1:(xe.add(Qe),!0)}).slice(0,3);V(Ce)}else V([]);if(N!=null&&N.lat&&he.length<3){const le=d.map(me=>{if(!me.lat||!me.lng)return null;const Be=Vx(N.lat,N.lng,me.lat,me.lng);return{...me,_distKm:Be}}
167).filter(Boolean).filter(me=>me._distKm>80&&me._distKm<=200).sort((me,Be)=>me._distKm-Be._distKm).slice(0,4);Ne(le)}else Ne([])},[N,q,F,J,X,Z,d]);const ge=N||q||F||J||X||Z,ie=()=>{_(null),S(""),H(""),U(""),O(""),B(""),te(!1)};return e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-16",children:[e.jsxs("div",{className:"relative w-full overflow-hidden",style:{minHeight:"340px"},children:[e.jsx("img",{src:"/static/homes-hero-bg.jpg",alt:"Una pareja de escaladores llegando a una casa de piedra en el Pirineo",className:"absolute inset-0 w-full h-full object-cover",style:{objectPosition:"15% 75%"}}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-stone-950/60 via-stone-950/50 to-stone-950"}),e.jsxs("div",{className:"relative z-10 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16 flex flex-col items-start justify-end",style:{minHeight:"340px"},children:[e.jsx("h1",{className:"font-display text-4xl sm:text-6xl font-bold text-white mb-2 drop-shadow-lg",children:r("homes_page.title")}),e.jsx("p",{className:"text-stone-200 text-lg mb-6 drop-shadow max-w-xl",children:r("homes_page.subtitle")})]})]}),!l&&e.jsxs("div",{className:"min-h-[60vh] flex flex-col items-center justify-center px-6 text-center py-24",children:[e.jsx("div",{className:"w-20 h-20 rounded-2xl bg-stone-900 border border-stone-800 flex items-center justify-center mb-8 mx-auto",children:e.jsxs("svg",{viewBox:"0 0 48 48",width:"40",height:"40",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M8 24L24 10l16 14v18H8V24z",fill:"#e8ff4a",opacity:"0.12",stroke:"#e8ff4a",strokeWidth:"2",strokeLinejoin:"round"}),e.jsx("rect",{x:"19",y:"30",width:"10",height:"10",rx:"1.5",fill:"#e8ff4a",opacity:"0.8"})]})}),e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-white mb-4",children:r("homes_page.gate_title")}),e.jsx("p",{className:"text-stone-400 text-lg max-w-md mx-auto mb-8 leading-relaxed",children:r("homes_page.gate_desc")}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(ne,{to:"/signup",className:"px-8 py-4 rounded-full bg-[#e8ff4a] text-stone-950 font-bold text-lg hover:bg-[#f0ff70] transition-colors",children:r("homes_page.join_free")}),e.jsx(ne,{to:"/login",className:"px-8 py-4 rounded-full bg-stone-800 text-stone-200 font-semibold text-lg hover:bg-stone-700 transition-colors border border-stone-700",children:r("homes_page.already_member")})]}),e.jsx("p",{className:"text-stone-600 text-sm mt-6",children:r("homes_page.signup_easy")})]}),l&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"bg-stone-900 border-b border-stone-800 sticky top-16 z-20 shadow-lg",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[e.jsx("div",{className:"relative sm:col-span-2 lg:col-span-1",children:l?e.jsxs(e.Fragment,{children:[e.jsx("label",{htmlFor:"filter-lugar",className:"sr-only",children:"Buscar escuela, municipio o zona"}),e.jsxs("form",{onSubmit:ee=>{ee.preventDefault(),Ze()},className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(ya,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-stone-400 pointer-events-none"}),e.jsx("input",{id:"filter-lugar",ref:L,type:"text",placeholder:"Escuela, municipio, zona…",value:v,autoComplete:"off",onChange:ee=>{S(ee.target.value),N&&_(null)},onFocus:()=>z.length>0&&T(!0),onBlur:()=>setTimeout(()=>T(!1),150),className:"w-full pl-9 pr-3 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white text-sm placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] transition-colors"}),k&&e.jsx("ul",{className:"absolute z-50 top-full left-0 right-0 mt-1 bg-stone-800 border border-stone-600 rounded-xl shadow-2xl overflow-hidden",children:z.map((ee,he)=>e.jsx("li",{children:e.jsxs("button",{type:"button",onMouseDown:()=>da(ee),className:"w-full text-left px-4 py-2.5 text-sm text-stone-200 hover:bg-stone-700 hover:text-[#e8ff4a] flex items-center gap-2 transition-colors",children:[e.jsx(ya,{className:"w-3.5 h-3.5 text-[#e8ff4a] shrink-0"}),e.jsx("span",{children:ee.label}),e.jsx("span",{className:"ml-auto text-xs text-stone-500",children:"escuela"})]})},he))})]}),e.jsx("button",{type:"submit",disabled:w,className:"shrink-0 px-4 py-2.5 rounded-xl bg-[#e8ff4a] text-stone-950 text-sm font-bold hover:bg-[#f0ff70] active:scale-95 transition-all disabled:opacity-60",children:w?"…":"Buscar"})]})]}):e.jsxs("button",{onClick:()=>i("/signup"),className:"w-full flex items-center gap-2 bg-stone-800 border border-stone-700 rounded-xl pl-3 pr-4 py-2.5 text-stone-500 hover:border-[#e8ff4a]/60 hover:text-stone-300 transition-all group text-left","aria-label":"Crear cuenta para buscar casas",children:[e.jsx(ya,{className:"w-4 h-4 shrink-0 text-stone-500 group-hover:text-[#e8ff4a] transition-colors"}),e.jsx("span",{className:"flex-1 text-sm",children:"Escuela, municipio, zona…"}),e.jsx("span",{className:"text-xs font-semibold px-2.5 py-1 rounded-full bg-[#e8ff4a] text-stone-950 shrink-0",children:"Crear cuenta"})]})}),e.jsxs("div",{className:"relative",children:[e.jsx("label",{htmlFor:"filter-zona",className:"sr-only",children:r("homes_page.zone_filter")}),e.jsx(vs,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-stone-400"}),e.jsx("input",{id:"filter-zona",type:"text",placeholder:r("homes_page.zone_filter"),value:q,onChange:ee=>H(ee.target.value),className:"w-full pl-9 pr-3 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white text-sm placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] transition-colors"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("label",{htmlFor:"filter-huespedes",className:"sr-only",children:r("homes_page.climbers_filter")}),e.jsx(ut,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-stone-400"}),e.jsxs("select",{id:"filter-huespedes",value:F,onChange:ee=>U(ee.target.value),className:"w-full pl-9 pr-3 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors appearance-none cursor-pointer",style:{color:F?"white":"#78716c"},children:[e.jsx("option",{value:"",children:r("homes_page.climbers_filter")}),e.jsx("option",{value:"1",children:r("homes_page.climber_1")}),e.jsx("option",{value:"2",children:r("homes_page.climber_2")}),e.jsx("option",{value:"3",children:r("homes_page.climber_3")}),e.jsx("option",{value:"4",children:r("homes_page.climber_4")}),e.jsx("option",{value:"6",children:r("homes_page.climber_6")}),e.jsx("option",{value:"8",children:r("homes_page.climber_8")})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx("label",{htmlFor:"filter-from",className:"sr-only",children:r("homes_page.from_date")}),e.jsx(xn,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-4 h-4 text-stone-400 pointer-events-none"}),e.jsx("input",{id:"filter-from",type:"date",value:J,min:new Date().toISOString().slice(0,10),onChange:ee=>O(ee.target.value),className:"w-full pl-8 pr-1 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors",style:{colorScheme:"dark"},title:r("homes_page.from_date")})]}),e.jsxs("div",{className:"relative flex-1",children:[e.jsx("label",{htmlFor:"filter-to",className:"sr-only",children:r("homes_page.to_date")}),e.jsx("input",{id:"filter-to",type:"date",value:X,min:J||new Date().toISOString().slice(0,10),onChange:ee=>B(ee.target.value),className:"w-full px-2 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors",style:{colorScheme:"dark"},title:r("homes_page.to_date")})]})]})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[e.jsxs("button",{onClick:()=>te(!Z),"aria-pressed":Z,className:`inline-flex items-center gap-2 px-4 py-2 rounded-full border text-sm font-medium transition-all ${Z?"bg-[#e8ff4a] border-[#e8ff4a] text-stone-900":"bg-stone-800 border-stone-700 text-stone-300 hover:border-[#e8ff4a]/60"}`,children:[e.jsx(s4,{active:Z}),r("homes_page.pets_allowed")]}),de>0&&e.jsxs("div",{className:"flex items-center gap-2 bg-[#e8ff4a]/10 border border-[#e8ff4a]/30 rounded-full px-4 py-1.5 text-sm",children:[e.jsxs("span",{className:"text-[#e8ff4a] font-bold",children:[de," ",r("homes_page.nights")]}),F&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-stone-500",children:"·"}),e.jsxs("span",{className:"text-stone-300",children:[F," ",r("homes_page.guests")]})]}),oe!==null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-stone-500",children:"·"}),e.jsxs("span",{className:"text-stone-400",children:[r("homes_page.balance")," ",e.jsxs("span",{className:"text-white font-semibold",children:[oe," CP"]})]})]})]}),ge&&e.jsx("button",{onClick:ie,className:"text-xs text-stone-500 hover:text-[#e8ff4a] transition-colors ml-auto",children:"Limpiar filtros"})]}),ge&&e.jsxs("p",{className:"text-stone-500 text-xs mt-2",children:[x.length," ",r("homes_page.available_homes"),x.length!==1?"s":""," ",r("homes_page.available"),x.length!==1?"s":"",de>0?` · ${r("homes_page.calculating_for")} ${de} ${r("homes_page.nights")}`:""]})]})}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-4 pb-2",children:e.jsx("div",{className:"flex gap-2 flex-wrap",children:[{val:"todos",label:"Todos"},{val:"vivienda_completa",label:"Vivienda completa"},{val:"habitacion_privada",label:"Habitación privada"}].map(ee=>e.jsx("button",{onClick:()=>g(ee.val),className:`px-4 py-1.5 rounded-full text-sm font-medium border transition-all ${j===ee.val?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"bg-stone-900 text-stone-300 border-stone-700 hover:border-stone-500"}`,children:ee.label},ee.val))})}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:p?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(6)].map((ee,he)=>e.jsx("div",{className:"h-80 bg-stone-900 rounded-2xl animate-pulse border border-stone-800"},he))}):P?e.jsxs("div",{className:"text-center py-24",children:[e.jsx("p",{className:"text-stone-400 text-lg mb-4",children:"No se han podido cargar las casas. Comprueba tu conexión."}),e.jsx("button",{onClick:()=>{$(!1),f(!0),D.collection("homes").getList(1,200,{sort:"-created"}).then(ee=>{m(ee.items),h(ee.items),f(!1)}).catch(()=>{f(!1),$(!0)})},className:"px-6 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:"Reintentar"})]}):x.length===0?e.jsx("div",{className:"py-20 px-4",children:e.jsxs("div",{className:"max-w-md mx-auto text-center",children:[e.jsx("div",{className:"flex justify-center mb-6",children:e.jsx("div",{className:"w-20 h-20 rounded-2xl bg-stone-900 border border-stone-800 flex items-center justify-center",children:e.jsxs("svg",{viewBox:"0 0 48 48",width:"40",height:"40",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M8 24L24 10l16 14v18H8V24z",fill:"#e8ff4a",opacity:"0.12",stroke:"#e8ff4a",strokeWidth:"2",strokeLinejoin:"round"}),e.jsx("rect",{x:"19",y:"30",width:"10",height:"10",rx:"1.5",fill:"#e8ff4a",opacity:"0.8"}),e.jsx("circle",{cx:"38",cy:"12",r:"6",fill:"#0c0a09",stroke:"#e8ff4a",strokeWidth:"1.5"}),e.jsx("path",{d:"M35 12h6M38 9v6",stroke:"#e8ff4a",strokeWidth:"1.5",strokeLinecap:"round"})]})})}),e.jsx("h3",{className:"font-display text-2xl sm:text-3xl font-bold text-white mb-3",children:N!=null&&N.lat?`Aún no hay casas cerca de ${N.zona||N.label.split(",")[0]}`:ge?"Sin resultados para estos filtros":"Sé el primero en tu zona"}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed mb-8",children:N!=null&&N.lat?r("homes_page.no_homes_zone"):r(ge?"homes_page.no_homes_expand":"homes_page.no_homes_growing")}),ge&&e.jsx("button",{onClick:ie,className:"text-[#e8ff4a] text-sm font-semibold hover:underline mb-6 block mx-auto transition-colors",children:r("homes_page.remove_filters")}),e.jsxs(ne,{to:"/dashboard",className:"inline-flex items-center gap-2 px-7 py-3.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors text-sm",children:[e.jsx("svg",{viewBox:"0 0 20 20",width:"16",height:"16",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M10 4v12M4 10h12",stroke:"#0c0a09",strokeWidth:"2",strokeLinecap:"round"})}),r("homes_page.publish_home")]}),l&&e.jsx("p",{className:"text-stone-600 text-xs mt-5",children:"Tu casa atrae escaladores de toda España y Europa que buscan exactamente tu zona."})]})}):e.jsxs(e.Fragment,{children:[N&&e.jsxs("p",{className:"text-stone-500 text-sm mb-6",children:[x.length," casa",x.length!==1?"s":""," cerca de ",e.jsx("span",{className:"text-stone-300",children:N.zona||N.label.split(",")[0]}
167),N.lat?" · en un radio de 80 km, ordenadas por distancia":""]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:x.map(ee=>e.jsx(Fx,{home:ee,nights:de,huespedes:F,memberBalance:oe,searchAnchor:N},ee.id))}),Ea.length>0&&e.jsxs("div",{className:"mt-12 border-t border-stone-800 pt-10",children:[e.jsx("p",{className:"text-stone-400 text-sm mb-4",children:"Pocas casas disponibles para esas fechas — prueba estas ventanas alternativas:"}),e.jsx("div",{className:"flex flex-wrap gap-3",children:Ea.map((ee,he)=>{const le=me=>new Date(me).toLocaleDateString("es-ES",{day:"numeric",month:"short"});return e.jsxs("button",{onClick:()=>{O(ee.dateFrom),B(ee.dateTo)},className:"flex items-center gap-2 px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 hover:border-[#e8ff4a] hover:text-[#e8ff4a] text-stone-300 text-sm transition-all",children:[e.jsxs("svg",{viewBox:"0 0 16 16",className:"w-4 h-4 shrink-0 text-[#e8ff4a]",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",children:[e.jsx("rect",{x:"2",y:"3",width:"12",height:"11",rx:"2"}),e.jsx("path",{d:"M5 1v2M11 1v2M2 7h12",strokeLinecap:"round"})]}),le(ee.dateFrom)," – ",le(ee.dateTo),e.jsxs("span",{className:"ml-1 text-xs text-stone-500",children:[ee.count," casa",ee.count!==1?"s":""]})]},he)})})]}),pe.length>0&&e.jsxs("div",{className:"mt-12 border-t border-stone-800 pt-10",children:[e.jsx("p",{className:"text-stone-400 text-sm mb-4",children:"También hay casas algo más lejos — hasta 200 km de la zona buscada:"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:pe.map(ee=>e.jsx(Fx,{home:ee,nights:de,huespedes:F,memberBalance:oe,searchAnchor:N},ee.id))})]})]})})]})]})}const P0={zaragoza:[41.649,-.887],huesca:[42.136,-.408],teruel:[40.343,-1.106],jaca:[42.567,-.55],barbastro:[42.034,.125],monzon:[41.911,.193],fraga:[41.522,.351],sabinanigo:[42.515,-.368],sabiñánigo:[42.515,-.368],ainsa:[42.42,.131],aínsa:[42.42,.131],benasque:[42.601,.522],biescas:[42.629,-.32],"sallent de gallego":[42.772,-.337],panticosa:[42.726,-.289],torla:[42.627,-.107],broto:[42.604,-.124],bielsa:[42.634,.214],hecho:[42.731,-.747],echo:[42.731,-.747],anso:[42.764,-.831],ansó:[42.764,-.831],aisa:[42.733,-.54],esposa:[42.661,-.624],canfranc:[42.745,-.517],"aragues del puerto":[42.718,-.661],"aragüés del puerto":[42.718,-.661],riglos:[42.369,-.681],agüero:[42.381,-.681],"murillo de gallego":[42.35,-.72],rodellar:[42.239,-.138],alquezar:[42.179,-.013],alquézar:[42.179,-.013],lecina:[42.205,-.05],adahuesca:[42.126,-.069],colungo:[42.163,-.049],abizanda:[42.318,.21],fiscal:[42.512,-.13],laspuna:[42.557,.178],campo:[42.424,.394],graus:[42.188,.34],"castejón de sos":[42.53,.488],villanua:[42.7,-.519],villanúa:[42.7,-.519],"castiello de jaca":[42.616,-.518],siresa:[42.745,-.72],urdues:[42.748,-.756],embun:[42.71,-.762],embún:[42.71,-.762],botaya:[42.533,-.603],"santa cruz de la seros":[42.536,-.64],anzanigo:[42.403,-.619],anzánigo:[42.403,-.619],caldearenas:[42.383,-.567],"gurrea de gallego":[42.025,-.611],"alcala de gurrea":[42.021,-.573],"alcalá de gurrea":[42.021,-.573],liesa:[42.168,-.314],loporzano:[42.193,-.32],igries:[42.213,-.377],nueno:[42.239,-.393],apiés:[42.208,-.367],apiés:[42.208,-.367],nocito:[42.318,-.282],"bentue de rasal":[42.307,-.435],rasal:[42.348,-.469],ayerbe:[42.272,-.678],loarre:[42.316,-.667],bolea:[42.225,-.627],huerrios:[42.245,-.51],"castejon de valdejasa":[41.983,-.978],luna:[42.121,-.969],erla:[42.049,-1],"sierra de luna":[42.091,-.994],tauste:[41.921,-1.25],"ejea de los caballeros":[42.125,-1.137],"sos del rey católico":[42.495,-1.212],uncastillo:[42.355,-1.139],longares:[41.456,-1.204],cariñena:[41.34,-1.228],belchite:[41.305,-.755],albarracin:[40.411,-1.44],albarracín:[40.411,-1.44],bronchales:[40.489,-1.589],"orihuela del tremedal":[40.516,-1.641],"gea de albarracin":[40.425,-1.411],"mora de rubielos":[40.254,-.751],"rubielos de mora":[40.191,-.699],valdelinares:[40.395,-.631],"linares de mora":[40.297,-.633],barcelona:[41.39,2.154],tarragona:[41.117,1.245],girona:[41.983,2.824],lleida:[41.617,.62],manresa:[41.728,1.831],vic:[41.93,2.254],berga:[42.1,1.847],puigcerda:[42.432,1.929],puigcerdà:[42.432,1.929],"la seu d'urgell":[42.358,1.457],sort:[42.407,1.128],tremp:[42.166,.893],"pobla de segur":[42.246,.971],balaguer:[41.791,.807],cervera:[41.667,1.272],montserrat:[41.593,1.833],collbato:[41.585,1.8],esparreguera:[41.538,1.869],oliana:[42.073,1.32],organya:[42.215,1.32],organyà:[42.215,1.32],terradets:[42.039,.868],collegats:[42.133,.962],"gerri de la sal":[42.288,1.01],siurana:[41.262,.929],"cornudella de montsant":[41.279,.939],margalef:[41.328,.762],ulldemolins:[41.313,.875],"vilanova de prades":[41.305,.944],prades:[41.324,1.001],"la mussara":[41.293,1.068],"vilanova i la geltrú":[41.225,1.724],sitges:[41.237,1.813],penedes:[41.35,1.7],"vilafranca del penedes":[41.342,1.701],ripoll:[42.201,2.191],"ribes de freser":[42.304,2.163],queralbs:[42.346,2.134],nuria:[42.394,2.149],olot:[42.182,2.489],"santa pau":[42.145,2.563],besalu:[42.197,2.7],besalú:[42.197,2.7],roses:[42.267,3.177],cadaques:[42.288,3.279],cadaqués:[42.288,3.279],"l'escala":[42.118,3.134],empuries:[42.14,3.116],castelldefels:[41.281,1.977],"el prat de llobregat":[41.326,2.099],valencia:[39.47,-.376],alicante:[38.345,-.483],castellon:[39.986,-.051],castellón:[39.986,-.051],gandia:[38.966,-.184],denia:[38.841,.106],calpe:[38.644,.044],calp:[38.644,.044],benidorm:[38.536,-.133],finestrat:[38.543,-.212],sella:[38.583,-.289],guadalest:[38.674,-.197],alcoy:[38.7,-.471],alcoi:[38.7,-.471],cocentaina:[38.744,
167-.44],benifato:[38.665,-.208],confrides:[38.641,-.25],villena:[38.634,-.862],elda:[38.48,-.795],petrer:[38.493,-.778],novelda:[38.383,-.766],elx:[38.263,-.702],elche:[38.263,-.702],xativa:[38.988,-.519],xàtiva:[38.988,-.519],ontinyent:[38.82,-.601],bocairent:[38.779,-.609],agres:[38.771,-.541],morella:[40.617,-.095],"la tinença de benifassà":[40.674,-.053],peñiscola:[40.36,.401],peñíscola:[40.36,.401],benicarlo:[40.418,.424],vinaros:[40.471,.474],vinaròs:[40.471,.474],sevilla:[37.389,-5.984],malaga:[36.72,-4.42],málaga:[36.72,-4.42],granada:[37.177,-3.598],cordoba:[37.888,-4.78],córdoba:[37.888,-4.78],almeria:[36.84,-2.463],almería:[36.84,-2.463],jaen:[37.779,-3.789],jaén:[37.779,-3.789],cadiz:[36.527,-6.292],cádiz:[36.527,-6.292],huelva:[37.261,-6.949],"el chorro":[36.93,-4.74],ardales:[36.897,-4.849],carratraca:[36.86,-4.859],alora:[36.823,-4.7],pizarra:[36.767,-4.7],guadix:[37.302,-3.138],baza:[37.494,-2.765],huéscar:[37.811,-2.543],loja:[37.165,-4.151],"alhama de granada":[37,-3.986],nerja:[36.74,-3.871],frigiliana:[36.787,-3.895],torrox:[36.76,-3.955],"velez malaga":[36.778,-4.098],"vélez málaga":[36.778,-4.098],marbella:[36.51,-4.886],fuengirola:[36.541,-4.625],torremolinos:[36.622,-4.5],ronda:[36.746,-5.165],grazalema:[36.766,-5.37],"zahara de la sierra":[36.839,-5.401],"arcos de la frontera":[36.747,-5.812],cazorla:[37.913,-3],"segura de la sierra":[38.351,-2.648],quesada:[37.841,-3.062],hinojares:[37.718,-2.899],sorbas:[37.105,-2.124],nijar:[36.967,-2.202],"cabo de gata":[36.732,-2.194],carboneras:[37.002,-1.892],mojacar:[37.142,-1.851],mojácar:[37.142,-1.851],"sierra nevada":[37.095,-3.398],monachil:[37.115,-3.453],ogíjares:[37.135,-3.591],"la zubia":[37.122,-3.537],bilbao:[43.263,-2.935],vitoria:[42.846,-2.672],gasteiz:[42.846,-2.672],donostia:[43.318,-1.981],"san sebastian":[43.318,-1.981],"san sebastián":[43.318,-1.981],irun:[43.338,-1.789],irún:[43.338,-1.789],hondarribia:[43.363,-1.793],zarautz:[43.284,-2.17],zumaia:[43.299,-2.253],getaria:[43.299,-2.205],eibar:[43.184,-2.472],ermua:[43.191,-2.499],bergara:[43.119,-2.413],arrasate:[43.065,-2.489],mondragon:[43.065,-2.489],mondragón:[43.065,-2.489],tolosa:[43.133,-2.079],ordizia:[43.05,-2.172],beasain:[43.047,-2.197],azpeitia:[43.18,-2.269],azkoitia:[43.178,-2.305],balmaseda:[43.192,-3.21],durango:[43.17,-2.633],elorrio:[43.119,-2.539],lekeitio:[43.362,-2.498],ondarroa:[43.327,-2.419],mutriku:[43.304,-2.38],gernika:[43.316,-2.682],bermeo:[43.42,-2.722],mundaka:[43.406,-2.696],pamplona:[42.817,-1.644],iruña:[42.817,-1.644],tudela:[42.062,-1.605],estella:[42.672,-2.031],tafalla:[42.527,-1.674],olite:[42.481,-1.649],sangüesa:[42.571,-1.282],aoiz:[42.777,-1.378],lumbier:[42.649,-1.294],ochagavia:[42.913,-1.063],isaba:[42.861,-.94],roncal:[42.788,-.96],garde:[42.811,-.936],urzainqui:[42.836,-.953],burguete:[42.993,-1.347],roncesvalles:[43.009,-1.319],etxauri:[42.773,-1.82],"peñas de echauri":[42.808,-1.795],olazagutia:[42.893,-2.165],zudaire:[42.771,-2.17],lakuntza:[42.897,-2.022],alsasua:[42.9,-2.164],logrono:[42.467,-2.445],logroño:[42.467,-2.445],haro:[42.575,-2.851],calahorra:[42.302,-1.965],arnedo:[42.218,-2.103],ezcaray:[42.309,-3.01],nájera:[42.417,-2.73],"viniegra de abajo":[42.159,-2.886],mansilla:[42.223,-2.846],"peña isasa":[42.395,-2.05],arnedillo:[42.213,-2.226],santander:[43.462,-3.81],torrelavega:[43.352,-4.044],"castro urdiales":[43.383,-3.215],laredo:[43.413,-3.416],"san vicente de la barquera":[43.386,-4.399],comillas:[43.387,-4.296],potes:[43.154,-4.618],lebaniega:[43.154,-4.618],"arenas de cabrales":[43.303,-4.972],cabrales:[43.303,-4.972],pido:[43.126,-4.683],espinama:[43.119,-4.727],"fuente de":[43.118,-4.738],oviedo:[43.36,-5.845],gijon:[43.54,-5.66],gijón:[43.54,-5.66],aviles:[43.558,-5.924],avilés:[43.558,-5.924],"cangas de onis":[43.351,-5.131],"cangas de onís":[43.351,-5.131],arriondas:[43.39,-5.186],ribadesella:[43.462,-5.062],llanes:[43.42,-4.754],colombres:[43.387,-4.519],infiesto:[43.354,-5.355],nava:[43.358,-5.494],covadonga:[43.296,-5.074],"soto de sajambre":[43.131,-5.112],"santiago de compostela":[42.878,-8.544],"a coruña":[43.372,-8.419],vigo:[42.231,-8.712],pontevedra:[42.43
1671,-8.645],ourense:[42.336,-7.864],lugo:[43.012,-7.556],ferrol:[43.484,-8.233],betanzos:[43.284,-8.213],viveiro:[43.661,-7.592],ribadeo:[43.537,-7.038],burela:[43.659,-7.355],foz:[43.569,-7.255],burgos:[42.34,-3.7],leon:[42.6,-5.57],león:[42.6,-5.57],salamanca:[40.97,-5.663],valladolid:[41.652,-4.724],segovia:[40.948,-4.119],avila:[40.657,-4.7],ávila:[40.657,-4.7],zamora:[41.503,-5.745],palencia:[42.01,-4.529],soria:[41.764,-2.464],ponferrada:[42.547,-6.598],astorga:[42.457,-6.056],"la baneza":[42.297,-5.903],"la bañeza":[42.297,-5.903],"miranda de ebro":[42.688,-2.943],"aranda de duero":[41.671,-3.692],peñafiel:[41.604,-4.115],"medina del campo":[41.311,-4.915],tordesillas:[41.499,-5.001],"la pedriza":[40.73,-3.91],"manzanares el real":[40.724,-3.858],cercedilla:[40.741,-4.055],navacerrada:[40.789,-4.008],rascafria:[40.893,-3.867],lozoya:[40.935,-3.773],patones:[40.896,-3.438],"pontón de la oliva":[40.875,-3.458],toledo:[39.856,-4.024],"ciudad real":[38.986,-3.928],cuenca:[40.065,-2.134],guadalajara:[40.633,-3.167],albacete:[38.994,-1.856],alarcon:[39.536,-2.086],alarcón:[39.536,-2.086],caceres:[39.476,-6.372],cáceres:[39.476,-6.372],badajoz:[38.879,-6.97],merida:[38.916,-6.331],mérida:[38.916,-6.331],plasencia:[40.03,-6.091],trujillo:[39.46,-5.88],madrid:[40.416,-3.703],"alcala de henares":[40.481,-3.365],"alcalá de henares":[40.481,-3.365],getafe:[40.305,-3.73],mostoles:[40.323,-3.864],móstoles:[40.323,-3.864],leganes:[40.329,-3.763],leganés:[40.329,-3.763],fuenlabrada:[40.284,-3.795],parla:[40.239,-3.768],"el escorial":[40.58,-4.133],"san lorenzo de el escorial":[40.59,-4.148],"collado villalba":[40.636,-4.005],galapagar:[40.58,-4],torrelodones:[40.579,-3.943],"las rozas":[40.493,-3.876],majadahonda:[40.472,-3.872],"pozuelo de alarcon":[40.432,-3.813],"pozuelo de alarcón":[40.432,-3.813],"boadilla del monte":[40.402,-3.876],murcia:[37.987,-1.13],cartagena:[37.605,-.986],lorca:[37.671,-1.699],"molina de segura":[38.049,-1.213],moratalla:[38.185,-2.152],"caravaca de la cruz":[38.105,-1.862],yecla:[38.614,-1.114],jumilla:[38.472,-1.317],mazarron:[37.598,-1.319],mazarrón:[37.598,-1.319],aguilas:[37.405,-1.583],águilas:[37.405,-1.583],palma:[39.57,2.65],"palma de mallorca":[39.57,2.65],inca:[39.719,2.912],manacor:[39.57,3.209],felanitx:[39.469,3.148],santanyi:[39.359,3.126],santanyí:[39.359,3.126],pollenca:[39.878,3.014],pollença:[39.878,3.014],alcudia:[39.855,3.121],soller:[39.768,2.716],sóller:[39.768,2.716],ibiza:[38.909,1.432],eivissa:[38.909,1.432],formentera:[38.7,1.452],mahon:[39.888,4.261],maó:[39.888,4.261],"santa cruz de tenerife":[28.463,-16.251],"la laguna":[28.485,-16.314],"las palmas":[28.099,-15.413],"las palmas de gran canaria":[28.099,-15.413],telde:[27.992,-15.419],arucas:[28.12,-15.523],arrecife:[28.963,-13.548],"puerto del rosario":[28.5,-13.863],teide:[28.272,-16.641],vilaflor:[28.156,-16.637],"la orotava":[28.389,-16.523],"icod de los vinos":[28.371,-16.718],garachico:[28.369,-16.764],masca:[28.327,-16.829],"los gigantes":[28.246,-16.84],"santiago del teide":[28.282,-16.826],"roque nublo":[27.972,-15.611],tejeda:[27.999,-15.606],arco:[45.919,10.884],"riva del garda":[45.886,10.841],"finale ligure":[44.17,8.34],finale:[44.17,8.34],"orco ferayaz":[45.4,7.489],orco:[45.4,7.489],chamonix:[45.924,6.869],courmayeur:[45.796,6.971],zermatt:[46.017,7.749],grindelwald:[46.624,8.036],innsbruck:[47.268,11.393],schwaz:[47.353,11.709],hallstatt:[47.562,13.649],gosau:[47.584,13.53],kalymnos:[36.942,26.983],kos:[36.889,27.287],leonidio:[37.167,22.867],meteora:[39.721,21.631],siurana:[41.262,.929],margalef:[41.328,.762],buoux:[43.857,5.446],verdon:[43.72,6.4],ceuse:[44.525,5.966],orpierre:[44.31,5.693],fontainebleau:[48.402,2.702],bleau:[48.402,2.702],"rodellar france":[43.7,5],freyr:[50.196,4.987],dinant:[50.261,4.912],geyikbayiri:[36.922,30.451],gebze:[40.802,29.431],railay:[8.012,98.835],krabi:[8.085,98.906],yangshuo:[24.778,110.494],guilin:[25.274,110.29],hampi:[15.335,76.461],badami:[15.916,75.678],"red rocks":[36.135,-115.425],yosemite:[37.748,-119.588],bishop:[37.363,-118.395],"joshua tree":[34.014,-116.169],rifle:[39.531,-107.783],"shelf road":[38.701,-105.214],"el potrero chico":[25.879,-100.487],"hueco tanks":[31.911,-106.043],roraima:[5.
167143,-60.762],frey:[41.146,-71.537],paris:[48.853,2.35],lyon:[45.758,4.835],marseille:[43.297,5.381],marseilla:[43.297,5.381],niza:[43.71,7.262],nîmes:[43.838,4.361],montpellier:[43.611,3.877],grenoble:[45.188,5.724],annecy:[45.899,6.129],chamonix:[45.924,6.869],megeve:[45.857,6.617],mégève:[45.857,6.617],briançon:[44.895,6.638],briancon:[44.895,6.638],gap:[44.558,6.08],sisteron:[44.202,5.941],digne:[44.092,6.236],"digne les bains":[44.092,6.236],moustiers:[43.847,6.221],castellane:[43.847,6.51],verdon:[43.72,6.4],buoux:[43.857,5.446],apt:[43.876,5.396],lourmarin:[43.763,5.363],ceuse:[44.525,5.966],orpierre:[44.31,5.693],eyguians:[44.321,5.693],remuzat:[44.402,5.357],"buis les baronnies":[44.275,5.272],fontainebleau:[48.402,2.702],bleau:[48.402,2.702],nemours:[48.268,2.693],calanques:[43.215,5.44],cassis:[43.214,5.537],"la ciotat":[43.174,5.607],"saint guilhem":[43.736,3.549],"saint-guilhem-le-désert":[43.736,3.549],millau:[44.1,3.079],roquefort:[43.972,2.987],"gorges du tarn":[44.21,3.23],"saint martin de lenten":[44.136,3.316],"les gorges":[44.21,3.23],biarritz:[43.48,-1.558],bayonne:[43.493,-1.474],pau:[43.3,-.37],lourdes:[43.097,-.046],gavarnie:[42.736,-.006],cauterets:[42.891,-.112],"luz saint sauveur":[42.87,-.003],"saint lary":[42.82,.317],toulouse:[43.605,1.444],carcassonne:[43.213,2.353],perpignan:[42.698,2.895],prades:[42.617,2.423],banyuls:[42.482,3.128],collioure:[42.527,3.085],roma:[41.902,12.496],milan:[45.465,9.186],milán:[45.465,9.186],napoles:[40.851,14.268],nápoles:[40.851,14.268],florencia:[43.769,11.256],venice:[45.438,12.336],venecia:[45.438,12.336],torino:[45.07,7.687],turín:[45.07,7.687],genova:[44.407,8.934],génova:[44.407,8.934],bologna:[44.494,11.343],bolonia:[44.494,11.343],arco:[45.919,10.884],"riva del garda":[45.886,10.841],torbole:[45.869,10.873],"finale ligure":[44.17,8.34],finale:[44.17,8.34],calizzano:[44.232,8.116],"orco ferayaz":[45.4,7.489],"ceresole reale":[45.441,7.193],courmayeur:[45.796,6.971],aosta:[45.737,7.315],cervinia:[45.938,7.631],dolomitas:[46.5,11.9],cortina:[46.54,12.136],"cortina d'ampezzo":[46.54,12.136],bolzano:[46.498,11.352],trento:[46.072,11.121],rovereto:[45.892,11.04],verona:[45.438,10.993],brescia:[45.539,10.222],bergamo:[45.695,9.669],lecco:[45.856,9.393],como:[45.81,9.085],bellagio:[45.988,9.257],toscana:[43.4,11],siena:[43.318,11.331],arezzo:[43.464,11.878],"pietra di bismantova":[44.381,10.424],bismantova:[44.381,10.424],"san marino":[43.937,12.447],sardinia:[40.12,9.013],cerdena:[40.12,9.013],orosei:[40.378,9.701],"golfo orosei":[40.22,9.73],urzulei:[40.093,9.529],baunei:[40.033,9.671],sicilia:[37.599,14.015],palermo:[38.115,13.361],catania:[37.502,15.087],etna:[37.748,14.999],taormina:[37.851,15.286],munich:[48.136,11.577],múnich:[48.136,11.577],münchen:[48.136,11.577],berlin:[52.52,13.405],berlín:[52.52,13.405],hamburgo:[53.551,9.993],frankfurt:[50.11,8.682],colonia:[50.938,6.96],cologne:[50.938,6.96],dusseldorf:[51.226,6.773],düsseldorf:[51.226,6.773],stuttgart:[48.776,9.183],nuremberg:[49.453,11.077],núremberg:[49.453,11.077],friburgo:[47.997,7.842],freiburg:[47.997,7.842],garmisch:[47.492,11.094],"garmisch partenkirchen":[47.492,11.094],obersdorf:[47.41,10.278],oberstdorf:[47.41,10.278],mittenwald:[47.443,11.26],berchtesgaden:[47.63,13.004],zugspitze:[47.421,10.985],wetterstein:[47.42,11],frankenjura:[49.65,11.4],pottenstein:[49.771,11.413],trier:[49.75,6.637],mosel:[50.07,7.06],moselle:[50.07,7.06],saxony:[51.05,13.737],dresden:[51.05,13.737],"elbe sandstone":[50.92,14.12],lisboa:[38.717,-9.142],oporto:[41.157,-8.629],porto:[41.157,-8.629],sintra:[38.801,-9.388],cascais:[38.697,-9.421],setubal:[38.524,-8.889],sagres:[37.015,-8.936],lagos:[37.102,-8.673],tavira:[37.128,-7.651],evora:[38.571,-7.909],faro:[37.02,-7.935],albufeira:[37.089,-8.25],"peneda geres":[41.774,-8.163],geres:[41.75,-8.13],soajo:[41.867,-8.257],monsanto:[40.04,-7.114],marvao:[39.394,-7.37],marão:[39.394,-7.37],arouca:[40.933,-8.247],"pico ruivo":[32.748,-16.931],atenas:[37.984,23.728],athens:[37.984,23.728],thessaloniki:[40.64,22.944],tesalonica:[40.64,22.944],patras:[38.246,21.735],heraklion:[35.339,25.144],kalymnos:[36.942,26.983],kos:[36.889,27.287],rhodes:[36.434,28.217],rodas:[36.434,28.217],leonidio:[37.167,22.867],kyparissi:[36.977,23.005],meteora:[39.721,21.631],kalambaka:[39.707,21.627],delphi:[38.481,22.5],arachova:[38.477,22.585],crete:[35.24,24.81],creta:[35.24,24.81],chania:[35.513,24.018],kastellorizo:[36.143,29.573],snowdonia:[53.068,-4.076],llanberis:[53.118,-4.128],"peak district":[53.35,-1.8],bakewell:[53.215,-1.674],"lake district":[54.44,-3.09],keswick:[54.601,-3.135],portland:[50.55,-2.448],swanage:[50.609,-1.961],gower:[51.58,-4.12],ogmore:[51.475,-3.625],"glen coe":[56.684,-4.974],edinburgh:[55.953,-3.189],glasgow:[55.865,-4.258],ginebra:[46.204,6.143],lausana:[46.519,6.632],berna:[46.948,7.448],zurich:[47.377,8.541],basilea:[47.558,7.588],lucerna:[47.05,8.309],zermatt:[46.017,7.749],grindelwald:[46.624,8.036],interlaken:[46.685,7.857],"saas fee":[46.105,7.929],verbier:[46.097,7.228],andermatt:[46.637,8.594],praga:[50.075,14.438],prague:[50.075,14.438],brno:[49.195,16.608],bratislava:[48.148,17.107],viena:[48.208,16.373],vienna:[48.208,16.373],budapest:[47.498,19.04],cracovia:[50.063,19.937],krakow:[50.063,19.937],warsaw:[52.237,21.012],varsovia:[52.237,21.012],riga:[56.946,24.106],oslo:[59.913,10.739],bergen:[60.393,5.323],stavanger:[58.97,5.73],copenhague:[55.676,12.568],copenhagen:[55.676,12.568],amsterdam:[52.374,4.898],rotterdam:[51.923,4.479],bruselas:[50.851,4.352],brussels:[50.851,4.352],liege:[50.633,5.568],lieja:[50.633,5.568],freyr:[50.196,4.987],dinant:[50.261,4.912],kotor:[42.424,18.771],budva:[42.288,18.839],cetinje:[42.39,18.92],dubrovnik:[42.65,18.094],split:[43.508,16.44],hvar:[43.172,16.441],paklenica:[44.36,15.658],omis:[43.444,16.694],podgorica:[42.441,19.262],tirana:[41.33,19.831],bohinj:[46.283,13.899],bled:[46.367,14.094],triglav:[46.38,13.84],reikiavik:[64.135,-21.895],reykjavik:[64.135,-21.895]};/**
168 * @license lucide-react v1.47.0 - ISC
169 *
170 * This source code is licensed under the ISC license.
171 * See the LICENSE file in the root directory of this source tree.
172 */const U0={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};U0.node;const Go=Ie(U0);/**
173 * @license lucide-react v1.47.0 - ISC
174 *
175 * This source code is licensed under the ISC license.
176 * See the LICENSE file in the root directory of this source tree.
177 */const H0={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};H0.node;const V0=Ie(H0);/**
178 * @license lucide-react v1.47.0 - ISC
179 *
180 * This source code is licensed under the ISC license.
181 * See the LICENSE file in the root directory of this source tree.
182 */const G0={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};G0.node;const Fo=Ie(G0);/**
183 * @license lucide-react v1.47.0 - ISC
184 *
185 * This source code is licensed under the ISC license.
186 * See the LICENSE file in the root directory of this source tree.
187 */const F0={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};F0.node;const $n=Ie(F0);/**
188 * @license lucide-react v1.47.0 - ISC
189 *
190 * This source code is licensed under the ISC license.
191 * See the LICENSE file in the root directory of this source tree.
192 */const $0={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};$0.node;Ie($0);async function o4(l){if(!l)return null;const i=l.toLowerCase().trim();for(const[r,d]of Object.entries(P0))if(i.includes(r))return d;try{const r=encodeURIComponent(l+", España"),m=await(await fetch(`https://nominatim.openstreetmap.org/search?q=${r}&format=json&limit=1`,{headers:{"Accept-Language":"es","User-Agent":"climbandhome/1.0"}})).json();if(m&&m[0])return[parseFloat(m[0].lat),parseFloat(m[0].lon)];const f=await(await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(l)}&format=json&limit=1`,{headers:{"Accept-Language":"es","User-Agent":"climbandhome/1.0"}})).json();if(f&&f[0])return[parseFloat(f[0].lat),parseFloat(f[0].lon)]}catch{}return null}function l4(l,i,r,d){const p=(r-l)*Math.PI/180,f=(d-i)*Math.PI/180,x=Math.sin(p/2)**2+Math.cos(l*Math.PI/180)*Math.cos(r*Math.PI/180)*Math.sin(f/2)**2;return 6371*2*Math.atan2(Math.sqrt(x),Math.sqrt(1-x))}function i4({home:l}){const[i,r]=mu.useState([]),[d,m]=mu.useState(!0);return mu.useEffect(()=>{let p=!1;async function f(){m(!0);const x=at.filter(S=>
192S.lat&&S.lng),h=[l.location,l.climbing_areas].filter(Boolean).join(" "),j=await o4(h);if(!p&&j){const[S,N]=j,_=x.map(T=>({...T,_km:Math.round(l4(S,N,T.lat,T.lng))})).sort((T,w)=>T._km-w._km),z=_.filter(T=>T._km<=50),C=_.filter(T=>T._km>50&&T._km<=100);let k=[];z.length>0&&(k=z.slice(0,5)),k.length<3&&(k=[...k,...C].slice(0,5)),k.length===0&&(k=_.slice(0,3)),k=k.map(T=>({...T,_distLabel:T._km<50?`${T._km} km`:`~${T._km} km`})),r(k),m(!1);return}if(p)return;if(l.climbing_areas){const S=l.climbing_areas.toLowerCase().split(/[\s,;\/\-\.\(\)]+/).filter(_=>_.length>3),N=at.filter(_=>{const z=(_.zona+" "+_.resumen+" "+_.pais).toLowerCase();return S.some(C=>z.includes(C))});if(N.length>0){r(N.slice(0,5)),m(!1);return}}const g=(l.country||"").toLowerCase(),v=at.filter(S=>S.pais.toLowerCase()===g);r(v.length>=3?v.slice(0,5):at.slice(0,3)),m(!1)}return f(),()=>{p=!0}},[l.id,l.location,l.climbing_areas]),i.length===0?null:e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"font-display text-xl font-bold text-white mb-4",children:"Escuelas cercanas"}),e.jsx("div",{className:"flex gap-3 overflow-x-auto pb-2 -mx-1 px-1",style:{scrollbarWidth:"none"},children:i.map(p=>e.jsxs("div",{className:"shrink-0 w-56 bg-stone-900 border border-stone-800 rounded-xl p-4 hover:border-[#e8ff4a]/40 transition-colors",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1",children:[e.jsx("h3",{className:"text-white font-semibold text-sm leading-snug line-clamp-2",children:p.zona}),e.jsx("span",{className:"shrink-0 text-xs px-1.5 py-0.5 rounded-full bg-[#e8ff4a]/10 text-[#e8ff4a] border border-[#e8ff4a]/20 font-medium",children:p.nivel})]}),e.jsxs("p",{className:"flex items-center gap-1 text-stone-500 text-xs mb-2",children:[e.jsx(ya,{className:"w-3 h-3 shrink-0"})," ",p.pais,p._distLabel&&e.jsx("span",{className:"ml-auto text-[#e8ff4a]/70 font-medium",children:p._distLabel})]}),e.jsx("p",{className:"text-stone-400 text-xs leading-relaxed line-clamp-3 mb-3",children:p.resumen})]},p.id))})]})}function r4({home:l,onClose:i}){const r=new Date,[d,m]=b.useState(r.getMonth()),[p,f]=b.useState(r.getFullYear());let x=new Set,h=new Set;try{const C=l.blocked_dates;if(C){const k=typeof C=="string"?JSON.parse(C):C;Array.isArray(k)?x=new Set(k):k&&typeof k=="object"&&(h=new Set(k.available||[]),x=new Set(k.blocked||[]))}}catch{}const j=()=>{d===0?(f(C=>C-1),m(11)):m(C=>C-1)},g=()=>{d===11?(f(C=>C+1),m(0)):m(C=>C+1)},v=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],S=["L","M","X","J","V","S","D"];function N(C,k){const T=new Date(C,k,1).getDay(),w=T===0?6:T-1,A=new Date(C,k+1,0).getDate(),L=[];for(let F=0;F<w;F++)L.push(null);for(let F=1;F<=A;F++)L.push(F);const q=F=>`${C}-${String(k+1).padStart(2,"0")}-${String(F).padStart(2,"0")}`,H=F=>new Date(C,k,F)<new Date(r.getFullYear(),r.getMonth(),r.getDate());return e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5",children:[e.jsxs("p",{className:"text-white font-bold text-center mb-4",children:[v[k]," ",C]}),e.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:S.map(F=>e.jsx("span",{className:"text-stone-600 text-xs text-center font-medium",children:F},F))}),e.jsx("div",{className:"grid grid-cols-7 gap-1",children:L.map((F,U)=>{if(!F)return e.jsx("span",{},`e-${U}`);const J=q(F),O=H(F),X=x.has(J),B=h.has(J);let Z="h-8 flex items-center justify-center rounded text-xs font-medium ";return O?Z+="text-stone-700":X?Z+="bg-red-500/20 text-red-400 ring-1 ring-red-500/40":B?Z+="bg-[#e8ff4a]/20 text-[#e8ff4a] ring-1 ring-[#e8ff4a]/40":Z+="bg-stone-800 text-stone-400",e.jsx("span",{className:Z,title:X?"No disponible":B?"Disponible":"Sin definir",children:F},J)})})]})}const _=d===11?0:d+1,z=d===11?p+1:p;return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-stone-950/80 backdrop-blur-sm",onClick:i,children:e.jsxs("div",{className:"bg-stone-950 border border-stone-800 rounded-3xl p-6 w-full max-w-2xl shadow-2xl",onClick:C=>C.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-2xl font-bold text-white",children:"Disponibilidad"}),e.jsx("p",{className:"text-stone-400 text-sm mt-0.5",children:l.title})]}),e.jsx("button",{onClick:i,className:"w-9 h-9 flex items-center justify-center rounded-full bg-stone-800 text-stone-400 hover:text-white transition-colors","aria-label":"Cerrar",children:e.jsx(_t,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex items-center gap-4 mb-5 flex-wrap",children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-stone-400",children:[e.jsx("span",{className:"w-3 h-3 rounded-sm bg-[#e8ff4a]/20 ring-1 ring-[#e8ff4a]/40 inline-block"})," Disponible"]}),e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-stone-400",children:[e.jsx("span",{className:"w-3 h-3 rounded-sm bg-red-500/20 ring-1 ring-red-500/40 inline-block"})," No disponible"]}),e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-stone-400",children:[e.jsx("span",{className:"w-3 h-3 rounded-sm bg-stone-800 inline-block"})," Sin definir"]})]}),e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("button",{onClick:j,className:"px-3 py-1.5 rounded-lg border border-stone-700 text-stone-300 hover:border-[#e8ff4a] hover:text-[#e8ff4a] transition-colors text-sm",children:"← Anterior"}),e.jsx("button",{onClick:g,className:"px-3 py-1.5 rounded-lg border border-stone-700 text-stone-300 hover:border-[#e8ff4a] hover:text-[#e8ff4a] transition-colors text-sm",children:"Siguiente →"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[N(p,d),N(z,_)]}),e.jsx("p",{className:"text-stone-600 text-xs text-center mt-4",children:"El anfitrión actualiza su disponibilidad desde su panel. Contacta con él/ella si tienes dudas sobre fechas concretas."})]})})}function c4({owner:l,onClose:i}){const r={principiante:"Principiante",intermedio:"Intermedio",avanzado:"Avanzado",experto:"Experto"},[d,m]=b.useState([]),[p,f]=b.useState(0),[x,h]=b.useState(!0);b.useEffect(()=>{if(!(l!=null&&l.id))return;let v=!1;
192return Promise.allSettled([D.collection("exchange_reviews").getList(1,50,{filter:`reviewee = "${l.id}"`,sort:"-created",expand:"reviewer"}),D.collection("exchange_requests").getList(1,1,{filter:`to_home.owner = "${l.id}" && status = "accepted"`})]).then(([S,N])=>{v||(S.status==="fulfilled"&&m(S.value.items),N.status==="fulfilled"&&f(N.value.totalItems),h(!1))}),()=>{v=!0}},[l==null?void 0:l.id]);const j=d.length>0?d.reduce((v,S)=>v+(S.rating||0),0)/d.length:0,g=l!=null&&l.created?Math.max(0,Math.floor((Date.now()-new Date(l.created).getTime())/(1e3*60*60*24*365))):0;return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-stone-950/80 backdrop-blur-sm",onClick:i,children:e.jsxs("div",{className:"bg-stone-950 border border-stone-800 rounded-3xl p-6 w-full max-w-md shadow-2xl",onClick:v=>v.stopPropagation(),children:[e.jsxs("div",{className:"flex items-start justify-between mb-6",children:[e.jsx("h2",{className:"font-display text-2xl font-bold text-white",children:"Perfil del anfitrión"}),e.jsx("button",{onClick:i,className:"w-9 h-9 flex items-center justify-center rounded-full bg-stone-800 text-stone-400 hover:text-white transition-colors","aria-label":"Cerrar",children:e.jsx(_t,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-stone-800 overflow-hidden border-2 border-stone-700 shrink-0",children:l.avatar?e.jsx("img",{src:D.files.getURL(l,l.avatar),alt:l.name,className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx(Fo,{className:"w-7 h-7 text-stone-600"})})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"text-white font-bold text-lg",children:l.name||"Escalador"}),l.is_founder&&e.jsxs("span",{className:"inline-flex items-center gap-1 bg-[#e8ff4a]/10 border border-[#e8ff4a]/40 rounded-full px-2 py-0.5",children:[e.jsxs("svg",{viewBox:"0 0 16 16",className:"w-3 h-3",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"#1c1917",stroke:"#e8ff4a",strokeWidth:"1"}),e.jsx("path",{d:"M8 3l1.2 2.8L12 6.2l-2 2 .5 2.8L8 9.8 5.5 11l.5-2.8-2-2 2.8-.4z",fill:"#e8ff4a"})]}),e.jsx("span",{className:"text-[#e8ff4a] text-[10px] font-bold uppercase tracking-wider",children:"Socio Fundador"})]})]}),(l.municipality||l.province)&&e.jsxs("p",{className:"text-stone-400 text-sm flex items-center gap-1 mt-0.5",children:[e.jsx(ya,{className:"w-3 h-3"}),[l.municipality,l.province].filter(Boolean).join(", ")]})]})]}),l.bio&&e.jsxs("div",{className:"mb-5",children:[e.jsx("p",{className:"text-stone-400 text-xs uppercase tracking-widest font-semibold mb-2",children:"Bio escalador/a"}),e.jsx("p",{className:"text-stone-300 text-sm leading-relaxed",children:l.bio})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-5",children:[e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl p-3 flex flex-col items-center text-center",children:[e.jsx("p",{className:"text-stone-500 text-xs mb-1.5",children:"Valoración"}),x?e.jsx("div",{className:"h-5 w-12 bg-stone-800 rounded animate-pulse"}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-[#e8ff4a] font-bold text-xl font-display",children:d.length>0?j.toFixed(1):"—"}),e.jsx("div",{className:"flex gap-0.5 mt-1",children:[1,2,3,4,5].map(v=>e.jsx("svg",{viewBox:"0 0 20 20",fill:v<=Math.round(j)?"#e8ff4a":"none",stroke:"#e8ff4a",strokeWidth:"1.5",className:"w-3 h-3",children:e.jsx("path",{d:"M10 2l2.4 4.8 5.3.8-3.85 3.75.91 5.31L10 14.25l-4.76 2.49.91-5.31L2.3 7.6l5.3-.8L10 2z"})},v))}),d.length>0&&e.jsxs("p",{className:"text-stone-600 text-xs mt-1",children:[d.length," ",d.length===1?"reseña":"reseñas"]})]})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl p-3 flex flex-col items-center text-center",children:[e.jsx("p",{className:"text-stone-500 text-xs mb-1.5",children:"Intercambios"}),x?e.jsx("div",{className:"h-5 w-8 bg-stone-800 rounded animate-pulse"}):e.jsx("p",{className:"text-white font-bold text-xl font-display",children:p}),e.jsx("p",{className:"text-stone-600 text-xs mt-1",children:"realizados"})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl p-3 flex flex-col items-center text-center",children:[e.jsx("p",{className:"text-stone-500 text-xs mb-1.5",children:"En la comunidad"}),e.jsx("p",{className:"text-white font-bold text-xl font-display",children:g===0?"<1":g}),e.jsx("p",{className:"text-stone-600 text-xs mt-1",children:g===1?"año":"años"})]})]}),l.climbing_level&&e.jsx("div",{className:"mb-5",children:e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl p-3",children:[e.jsx("p",{className:"text-stone-500 text-xs mb-1",children:"Nivel"}),e.jsx("p",{className:"text-white font-semibold text-sm",children:r[l.climbing_level]||l.climbing_level})]})}),!x&&d.length>0&&e.jsxs("div",{className:"mb-5",children:[e.jsx("p",{className:"text-stone-400 text-xs uppercase tracking-widest font-semibold mb-3",children:"Últimas valoraciones"}),e.jsx("div",{className:"space-y-3 max-h-48 overflow-y-auto pr-1",children:d.slice(0,3).map(v
192=>{var S,N;return e.jsxs("div",{className:"bg-stone-900/60 border border-stone-800 rounded-xl p-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[[1,2,3,4,5].map(_=>e.jsx("svg",{viewBox:"0 0 20 20",fill:_<=(v.rating||0)?"#e8ff4a":"none",stroke:"#e8ff4a",strokeWidth:"1.5",className:"w-3 h-3",children:e.jsx("path",{d:"M10 2l2.4 4.8 5.3.8-3.85 3.75.91 5.31L10 14.25l-4.76 2.49.91-5.31L2.3 7.6l5.3-.8L10 2z"})},_)),e.jsx("span",{className:"text-stone-500 text-xs ml-1",children:((N=(S=v.expand)==null?void 0:S.reviewer)==null?void 0:N.name)||"Miembro"})]}),v.comment&&e.jsxs("p",{className:"text-stone-300 text-xs leading-relaxed line-clamp-2",children:['"',v.comment,'"']})]},v.id)})})]}),l.climbing_styles&&l.climbing_styles.length>0&&e.jsxs("div",{className:"mb-5",children:[e.jsx("p",{className:"text-stone-400 text-xs uppercase tracking-widest font-semibold mb-2",children:"Estilos"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:l.climbing_styles.map(v=>e.jsx("span",{className:"px-2.5 py-1 rounded-full bg-[#e8ff4a]/10 text-[#e8ff4a] text-xs font-medium border border-[#e8ff4a]/20",children:v},v))})]})]})})}function d4({home:l,user:i,ownerName:r}){return null}function u4(){var ee,he,le,me,Be;const{id:l}=Rr(),{user:i}=oa(),[r,d]=b.useState(null),[m,p]=b.useState([]),[f,x]=b.useState([]),[h,j]=b.useState(!0),[g,v]=b.useState(""),[S,N]=b.useState(!1),[_,z]=b.useState(""),[C,k]=b.useState(!1),[T,w]=b.useState(""),[A,L]=b.useState(""),[q,H]=b.useState(1),[F,U]=b.useState(!1),[J,O]=b.useState(!1),[X,B]=b.useState(!1),[Z,te]=b.useState(null),[P,$]=b.useState(0),[oe,de]=b.useState("escuelas"),[ze,da]=b.useState({title:"",entry_type:"via",description:"",grade:"",sector:"",images:[]}),[Ze,Ea]=b.useState(!1),[V,pe]=b.useState("");b.useEffect(()=>{const xe=new AbortController;return Promise.all([D.collection("homes").getOne(l,{expand:"owner",signal:xe.signal}),D.collection("climbing_tips").getList(1,20,{filter:`home = "${l}"`,expand:"author",sort:"-created",signal:xe.signal}),D.collection("home_library").getList(1,50,{filter:`home = "${l}"`,expand:"author",sort:"-created",signal:xe.signal})]).then(([Ce,Te,Qe])=>{d(Ce),p(Te.items),x(Qe.items),j(!1)}).catch(Ce=>{Ce!=null&&Ce.isAbort||j(!1)}),()=>xe.abort()},[l]);const Ne=async xe=>{var ua,Ka,ye,Va;if(xe.preventDefault(),z(""),!T){z("Indica la fecha de llegada.");return}if(!A){z("Indica la fecha de salida.");return}if(A<=T){z("La fecha de salida debe ser posterior a la de llegada.");return}if(!g.trim()){z("Escribe un mensaje para el anfitrión.");return}const Ce=Math.max(1,Math.round((new Date(A)-new Date(T))/864e5)),Te=r.max_guests||1,Ge=(r.cp_value&&r.cp_value>0?r.cp_value:Te<=2?100:Te<=4?120:Te<=6?150:Te<=8?180:200)*Ce;k(!0);try{const Ya=await D.collection("exchange_requests").create({from_member:i.id,to_home:l,message:g,status:"pending",date_from:T,date_to:A,nights:Ce,cp_cost:Ge,num_guests:q});N(!0),v("");const Aa=(Ka=(ua=r.expand)==null?void 0:ua.owner)==null?void 0:Ka.email,ja=((Va=(ye=r.expand)==null?void 0:ye.owner)==null?void 0:Va.name)||"Escalador";if(Aa&&Aa!==i.email)try{await D.collection("pending_emails").create({to_email:Aa,to_name:ja,subject:`Nueva solicitud de intercambio para ${r.title}`,template:"exchange_received",status:"pending",template_data:{from_name:i.name||"Un escalador",home_title:r.title,message:g,request_id:Ya.id}})}catch{}}catch{z("No se pudo enviar la solicitud. Inténtalo de nuevo.")}k(!1)};if(h)return e.jsx("main",{className:"min-h-screen bg-stone-950 pt-20 flex items-center justify-center",children:e.jsx("div",{className:"text-stone-500",children:"Cargando…"})});if(!r)return e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-20 flex flex-col items-center justify-center gap-4",children:[e.jsx("p",{className:"text-stone-400 text-lg",children:"Casa no encontrada."}),e.jsx(ne,{to:"/homes",className:"text-[#e8ff4a] hover:underline",children:"Volver a casas"})]});if(!i){const xe=r.photos||[],Ce=xe.length>0?D.files.getURL(r,xe[0],{thumb:"800x600"}):null;return e.jsx("main",{className:"min-h-screen bg-stone-950 pt-20",children:e.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 py-12",children:[e.jsxs(ne,{to:"/homes",className:"inline-flex items-center gap-2 text-stone-400 hover:text-white mb-8 transition-colors",children:[e.jsx(Go,{className:"w-4 h-4"})," Volver a casas"]}),e.jsxs("div",{className:"rounded-2xl overflow-hidden border border-stone-800 bg-stone-900",children:[Ce&&e.jsxs("div",{className:"relative h-56 sm:h-72 overflow-hidden",children:[e.jsx("img",{src:Ce,alt:r.title,className:"w-full h-full object-cover blur-sm scale-105 opacity-60"}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("div",{className:"bg-stone-950/80 rounded-xl px-6 py-4 text-center",children:[e.jsx("p",{className:"text-[#e8ff4a] font-display text-lg tracking-wide",children:"Vista previa"}),e.jsx("p",{className:"text-stone-300 text-sm mt-1",children:"Únete para ver las fotos completas"})]})})]}),e.jsxs("div",{className:"p-6 sm:p-8",children:[e.jsx("h1",{className:"font-display text-3xl sm:text-4xl text-white mb-2",children:r.title}),e.jsxs("p",{className:"text-stone-400 flex items-center gap-1.5 mb-6",children:[e.jsx(ya,{className:"w-4 h-4"})," ",r.location,r.country?`, ${r.country}`:""]}),e.jsxs("div",{className:"relative rounded-xl overflow-hidden mb-8",children:[e.jsxs("div",{className:"blur-sm select-none pointer-events-none space-y-3 p-4 bg-stone-800/50 rounded-xl",children:[e.jsx("p",{className:"text-stone-300 text-sm",children:"Descripción completa, zonas de escalada cercanas, consejos del anfitrión y toda la información del alojamiento disponible para miembros."}),e.jsx("p",{className:"text-stone-400 text-xs",children:"Escalada deportiva · Clásica · Senderismo"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("span",{className:"px-3 py-1 rounded-full bg-stone-700 text-stone-400 text-xs",children:"Croquis y reseñas locales"}),e.jsx("span",{className:"px-3 py-1 rounded-full bg-stone-700 text-stone-400 text-xs",children:"Calendario de disponibilidad"})]})]}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-stone-950/40 rounded-xl",children:e.jsx("p",{className:"text-white font-semibold text-sm",children:"Contenido exclusivo para miembros"})})]}),e.jsxs("div",{className:"bg-[#e8ff4a]/10 border border-[#e8ff4a]/30 rounded-2xl p-6 sm:p-8 text-center",children:[e.jsx("div",{className:"w-14 h-14 roun
192ded-full bg-[#e8ff4a]/20 flex items-center justify-center mx-auto mb-4",children:e.jsx(Fo,{className:"w-7 h-7 text-[#e8ff4a]"})}),e.jsx("h2",{className:"text-white font-bold text-xl mb-2",children:"Únete a la comunidad"}),e.jsx("p",{className:"text-stone-400 text-sm mb-6 max-w-sm mx-auto",children:"Para ver los croquis, la biblioteca de rutas, el calendario del anfitrión y solicitar un intercambio necesitas ser miembro de CLIMB & HOME."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(ne,{to:"/signup",className:"px-6 py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:"Crear cuenta"}),e.jsx(ne,{to:"/login",className:"px-6 py-3 rounded-xl border border-stone-600 text-stone-300 hover:border-stone-400 hover:text-white transition-colors",children:"Ya tengo cuenta"})]}),e.jsx("p",{className:"text-stone-500 text-xs mt-4",children:"Únete a la comunidad de escaladores que intercambian casa."})]})]})]})]})})}const ge=((he=(ee=r.expand)==null?void 0:ee.owner)==null?void 0:he.name)||"Escalador",ie=(le=r.expand)==null?void 0:le.owner;return e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-20",children:[F&&e.jsx(r4,{home:r,onClose:()=>U(!1)}),J&&ie&&e.jsx(c4,{owner:ie,onClose:()=>O(!1)}),Z&&e.jsxs("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:()=>te(null),children:[e.jsx("button",{onClick:()=>te(null),className:"absolute top-4 right-4 text-white/70 hover:text-white",children:e.jsx(_t,{className:"w-8 h-8"})}),e.jsx("img",{src:Z,alt:"Vista ampliada",className:"max-w-full max-h-full object-contain rounded-xl shadow-2xl",onClick:xe=>xe.stopPropagation()})]}),e.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-10",children:[e.jsxs(ne,{to:"/homes",className:"inline-flex items-center gap-2 text-stone-400 hover:text-white text-sm mb-8 transition-colors",children:[e.jsx(Go,{className:"w-4 h-4"})," Volver a casas"]}),r.photos&&r.photos.length>0&&e.jsxs("div",{className:"mb-8 relative rounded-2xl overflow-hidden",style:{height:"420px"},children:[e.jsx("img",{src:D.files.getURL(r,r.photos[P],{thumb:"1200x800"}),alt:`${r.title} — foto ${P+1}`,className:"w-full h-full object-cover object-center cursor-pointer",onClick:()=>$(xe=>(xe+1)%r.photos.length)}),r.photos.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>$(xe=>(xe-1+r.photos.length)%r.photos.length),className:"absolute left-3 top-1/2 -translate-y-1/2 w-9 h-9 rounded-full bg-stone-950/60 text-white flex items-center justify-center hover:bg-stone-950/90 transition-colors","aria-label":"Foto anterior",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}),e.jsx("button",{type:"button",onClick:()=>$(xe=>(xe+1)%r.photos.length),className:"absolute right-3 top-1/2 -translate-y-1/2 w-9 h-9 rounded-full bg-stone-950/60 text-white flex items-center justify-center hover:bg-stone-950/90 transition-colors","aria-label":"Foto siguiente",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}),e.jsx("div",{className:"absolute bottom-3 left-1/2 -translate-x-1/2 flex gap-1.5",children:r.photos.map((xe,Ce)=>e.jsx("button",{type:"button",onClick:()=>$(Ce),className:`w-2 h-2 rounded-full transition-all ${Ce===P?"bg-[#e8ff4a] w-4":"bg-white/50 hover:bg-white/80"}`,"aria-label":`Ver foto ${Ce+1}`},Ce))}),e.jsxs("div",{className:"absolute top-3 right-3 bg-stone-950/60 text-white text-xs px-2 py-1 rounded-full",children:[P+1," / ",r.photos.length]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-10",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4 mb-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-3xl sm:text-4xl font-bold text-white",children:r.title}),e.jsxs("p",{className:"flex items-center gap-1.5 text-stone-400 mt-2",children:[e.jsx(ya,{className:"w-4 h-4"}),r.location,r.country?`, ${r.country}`:""]})]}),r.available&&e.jsx("span",{className:"bg-[#e8ff4a] text-stone-950 text-sm font-bold px-3 py-1 rounded-full",children:"Disponible"})]}),r.accommodation_type==="habitacion_privada"&&e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-amber-500/15 border border-amber-500/30 text-amber-400 text-sm font-medium mb-4",children:[e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Habitación privada",(()=>
192{try{const xe=typeof r.room_info=="string"?JSON.parse(r.room_info):r.room_info;return xe!=null&&xe.host_present?" · anfitrión presente":""}catch{return""}})()]}),r.max_guests>0&&e.jsxs("p",{className:"flex items-center gap-2 text-stone-300 mb-4",children:[e.jsx(ut,{className:"w-4 h-4 text-stone-500"}),"Hasta ",r.max_guests," escaladores"]}),r.accommodation_type==="habitacion_privada"&&(()=>{let xe={};try{xe=typeof r.room_info=="string"?JSON.parse(r.room_info):r.room_info||{}}catch{}const Ce=[];return xe.bed_type&&Ce.push({label:"Cama",val:{doble:"Cama doble",twin:"Dos individuales",individual:"Individual",literas:"Literas"}[xe.bed_type]||xe.bed_type}),xe.bath_private?Ce.push({label:"Baño",val:"Privado"}):Ce.push({label:"Baño",val:"Compartido"}),xe.kitchen_shared&&Ce.push({label:"Cocina",val:"Compartida"}),xe.common_areas&&Ce.push({label:"Zonas comunes",val:xe.common_areas}),Ce.length===0?null:e.jsxs("div",{className:"mb-6 p-4 rounded-xl bg-stone-800/60 border border-stone-700",children:[e.jsx("p",{className:"text-xs text-stone-400 uppercase tracking-wider mb-3",children:"Sobre la habitación"}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:Ce.map(({label:Te,val:Qe})=>e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-stone-500",children:Te}),e.jsx("p",{className:"text-sm text-stone-200 font-medium",children:Qe})]},Te))}),xe.house_rules&&e.jsxs("div",{className:"mt-3 pt-3 border-t border-stone-700",children:[e.jsx("p",{className:"text-xs text-stone-400 uppercase tracking-wider mb-1",children:"Normas"}),e.jsx("p",{className:"text-sm text-stone-300",children:xe.house_rules})]})]})})(),r.description&&e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"font-display text-xl font-bold text-white mb-3",children:"Descripción"}),e.jsx("p",{className:"text-stone-300 leading-relaxed whitespace-pre-line",children:r.description})]}),r.climbing_areas&&e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"font-display text-xl font-bold text-white mb-3",children:"Zonas de escalada cerca"}),e.jsx("p",{className:"text-stone-300 leading-relaxed whitespace-pre-line",children:r.climbing_areas})]}),e.jsx(i4,{home:r}),r.difficulty_levels&&r.difficulty_levels.length>0&&e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"font-display text-xl font-bold text-white mb-3",children:"Actividades cercanas"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:r.difficulty_levels.map(xe=>e.jsx("span",{className:"px-3 py-1 rounded-full bg-green-500/15 text-green-400 border border-green-500/40 text-sm font-medium",children:xe},xe))})]}),e.jsx("div",{className:"mb-8",children:(()=>{const xe=m,Ce=f.filter(ye=>ye.entry_type==="croquis"||ye.entry_type==="foto"),Te=f.filter(ye=>ye.entry_type!=="croquis"&&ye.entry_type!=="foto"),Qe=[{key:"escuelas",label:"Escuelas",count:xe.length},{key:"croquis",label:"Croquis",count:Ce.length},{key:"resenas",label:"Reseñas",count:Te.length}],Ge={via:"Vía en pared",deportiva:"Deportiva",clasica:"Clásica",btt:"BTT",senderismo:"Senderismo",croquis:"Croquis / Topo",foto:"Galería"},ua={via:"text-blue-400 border-blue-500/30 bg-blue-500/10",deportiva:"text-green-400 border-green-500/30 bg-green-500/10",clasica:"text-purple-400 border-purple-500/30 bg-purple-500/10",btt:"text-orange-400 border-orange-500/30 bg-
192orange-500/10",senderismo:"text-emerald-400 border-emerald-500/30 bg-emerald-500/10",croquis:"text-yellow-400 border-yellow-500/30 bg-yellow-500/10",foto:"text-pink-400 border-pink-500/30 bg-pink-500/10"},Ka=ye=>{var Ya,Aa;const Va=ye.images&&ye.images.length>0;return e.jsxs("div",{className:"rounded-xl bg-stone-900 border border-stone-800 overflow-hidden",children:[e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-white text-lg leading-tight",children:ye.title}),(ye.sector||ye.grade)&&e.jsxs("p",{className:"text-stone-400 text-sm mt-0.5",children:[ye.sector&&e.jsx("span",{children:ye.sector}),ye.sector&&ye.grade&&e.jsx("span",{className:"mx-1.5 text-stone-600",children:"·"}),ye.grade&&e.jsx("span",{className:"text-[#e8ff4a] font-semibold",children:ye.grade})]})]}),e.jsx("span",{className:`shrink-0 text-xs px-2.5 py-1 rounded-full border font-medium ${ua[ye.entry_type]||"text-stone-400 border-stone-700 bg-stone-800"}`,children:Ge[ye.entry_type]||ye.entry_type})]}),ye.description&&e.jsx("p",{className:"text-stone-300 text-sm leading-relaxed whitespace-pre-line",children:ye.description}),((Aa=(Ya=ye.expand)==null?void 0:Ya.author)==null?void 0:Aa.name)&&e.jsxs("p",{className:"text-stone-600 text-xs mt-3",children:["— ",ye.expand.author.name]})]}),Va&&e.jsx("div",{className:`grid gap-1 px-1 pb-1 ${ye.images.length===1?"grid-cols-1":ye.images.length===2?"grid-cols-2":"grid-cols-3"}`,children:ye.images.map((ja,Ua)=>{const ss=`${D.baseURL}/api/files/${ye.collectionId}/${ye.id}/${ja}`,Zt=`${D.baseURL}/api/files/${ye.collectionId}/${ye.id}/${ja}?thumb=600x400`;return e.jsx("button",{onClick:()=>te(ss),className:"relative overflow-hidden rounded-xl bg-stone-800 group",style:{paddingBottom:ye.images.length===1?"56%":"75%"},children:e.jsx("img",{src:Zt,alt:`${ye.title} — ${Ua+1}`,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"})},Ua)})})]},ye.id)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex gap-1 mb-5 bg-stone-900 border border-stone-800 rounded-xl p-1",children:Qe.map(ye=>e.jsxs("button",{onClick:()=>de(ye.key),className:`flex-1 py-2 px-3 rounded-lg text-sm font-medium transition-all ${oe===ye.key?"bg-[#e8ff4a] text-stone-950":"text-stone-400 hover:text-white"}`,children:[ye.label,ye.count>0&&e.jsx("span",{className:`ml-1.5 text-xs px-1.5 py-0.5 rounded-full ${oe===ye.key?"bg-stone-950/20":"bg-stone-800 text-stone-500"}`,children:ye.count})]},ye.key))}),oe==="escuelas"&&e.jsx("div",{className:"flex flex-col gap-4",children:xe.length===0?e.jsx("div",{className:"p-5 rounded-xl bg-stone-900 border border-stone-800 text-center",children:e.jsx("p",{className:"text-stone-400 text-sm",children:"El anfitrión aún no ha compartido escuelas de escalada para esta zona."})}):xe.map(ye=>{var Va,Ya;return e.jsxs("div",{className:"p-5 rounded-xl bg-stone-900 border border-stone-800",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2 mb-2",children:[e.jsx("h3",{className:"font-bold text-white text-lg",children:ye.route_name}),ye.difficulty&&e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-[#e8ff4a]/10 text-[#e8ff4a] border border-[#e8ff4a]/30",children:ye.difficulty})]}),ye.sector&&e.jsxs("p",{className:"text-stone-500 text-sm mb-1",children:["Sector: ",ye.sector]}),ye.best_season&&e.jsxs("p",{className:"text-stone-500 text-sm mb-2",children:["Mejor época: ",ye.best_season]}),ye.description&&e.jsx("p",{className:"text-stone-300 text-sm mb-2",children:ye.description}),ye.local_tips&&e.jsxs("p",{className:"text-stone-400 text-sm italic border-l-2 border-[#e8ff4a]/40 pl-3",children:['"',ye.local_tips,'"']}),((Ya=(Va=ye.expand)==null?void 0:Va.author)==null?void 0:Ya.name)&&e.jsxs("p",{className:"text-stone-600 text-xs mt-3",children:["— ",ye.expand.author.name]})]},ye.id)})}),oe==="croquis"&&e.jsx("div",{className:"flex flex-col gap-4",children:Ce.length===0?e.jsx("div",{className:"p-5 rounded-xl bg-stone-900 border border-stone-800 text-center",children:e.jsx("p",{className:"text-stone-400 text-sm",children:"El anfitrión aún no ha subido croquis o galerías de fotos."})}):Ce.map(Ka)}),oe==="resenas"&&e.jsx("div",{className:"flex flex-col gap-4",children:Te.length===0?e.jsx("div",{className:"p-5 rounded-xl bg-stone-900 border border-stone-800 text-center",children:e.jsx("p",{className:"text-stone-400 text-sm",children:"El anfitrión aún no ha publicado reseñas de vías."})}):Te.map(Ka)})]})})()})]}),e.jsx("aside",{children:e.jsxs("div",{className:"sticky top-24 flex flex-col gap-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("button",{onClick:()=>U(!0),className:"flex flex-col items-center gap-2 p-4 rounded-2xl bg-stone-900 border border-stone-800 hover:border-[#e8ff4a]/50 hover:bg-stone-800/60 transition-all group",children:[e.jsx(xn,{className:"w-6 h-6 text-[#e8ff4a] group-hover:scale-110 transition-transform"}),e.jsx("span",{className:"text-stone-300 text-xs font-medium text-center",children:"Ver calendario"})]}),e.jsxs("button",{onClick:()=>ie&&O(!0),disabled:!ie,className:"flex flex-col items-center gap-2 p-4 rounded-2xl bg-stone-900 border border-stone-800 hover:border-[#e8ff4a]/50 hover:bg-stone-800/60 transition-all group disabled:opacity-40",children:[e.jsx(Fo,{className:"w-6 h-6 text-[#e8ff4a] group-hover:scale-110 transition-transform"}),e.jsx("span",{className:"text-stone-300 text-xs font-medium text-center",children:"Perfil anfitrión"})]})]}),(()=>{const xe=r.max_guests||1,Ce=r.cp_value&&r.cp_value>0?r.cp_value:xe<=2?100:xe<=4?120:xe<=6?150:xe<=8?180:200,Te=(i==null?void 0:i.climbpoints)??null;return e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5 mb-3",children:[e.jsx("h3",{className:"font-display text-base font-bold text-white mb-3",children:"Coste de la estancia"}),e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-stone-400 text-sm",children:"Valor por noche"}),e.jsxs("span",{className:"text-[#e8ff4a] font-bold",children:[Ce," CP"]})]}),e.jsx("p",{className:"text-stone-600 text-xs mb-3",children:"Elige las fechas en el buscador de casas para ver el total exacto."}),Te!==null&&e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-stone-800",children:[e.jsx("span",{className:"text-stone-400 text-sm",children:"Tu saldo actual"}),e.jsxs("span",{className:"text-white font-semibold",children:[Te," CP"]})]}),e.jsx("p",{className:"text-stone-600 text-xs mt-2 italic",children:"Solo se descuentan Climbpoints al confirmar el intercambio, no al enviar la solicitud."})]})})(),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h2",{className:"font-display text-lg font-bold text-white mb-1",children:"Solicitar intercambio"}),e.jsxs("p",{className:"text-stone-400 text-sm mb-5",children:["Anfitrión: ",e.jsx("span",{className:"text-stone-200",children:ge})]}),i?S?e.jsxs("div",{className:"text-center py-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-[#e8ff4a]/10 flex items-center justify-center mx-auto mb-3",children:e.jsx(V0,{className:"w-6 h-6 text-[#e8ff4a]"})}),e.jsx("p",{className:"text-white font-semibold",children:"¡Solicitud enviada!"}),e.jsx("p",{className:"text-stone-400 text-sm mt-1",children:"El anfitrión revisará tu mensaje y te responderá."})]}):((Be=(me=r.expand)==null?void 0:me.owner)==null?void 0:Be.id)===(i==null?void 0:i.id)||r.owner===(i==null?void 0:i.id)?e.jsx("p",{className:"text-stone-400 text-sm text-center",children:"Esta es tu propia casa."}):e.jsxs("form",{onSubmit:Ne,noValidate:!0,className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"req-date-from",className:"block text-xs text-stone-400 mb-1.5",children:"Llegada"}),e.jsx("input",{id:"req-date-from",type:"date",value:T,min:new Date().toISOString().slice(0,10),onChange:xe=>w(xe.target.value),className:"w-full px-3 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white focus:outline-none focus:border-[#e8ff4a] text-sm transition-colors"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"req-date-to",className:"block text-xs text-stone-400 mb-1.5",children:"Salida"}),e.jsx("input",{id:"req-date-to",type:"date",value:A,min:T||new Date().toISOString().slice(0,10),onChange:xe=>L(xe.target.value),className:"w-full px-3 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white focus:outline-none focus:border-[#e8ff4a] text-sm transition-colors"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"req-guests",className:"block text-xs text-stone-400 mb-1.5",children:["Escaladores (",r.max_guests?`máx. ${r.max_guests}`:"",")"]}),e.jsx("input",{id:"req-guests",type:"number",min:1,max:r.max_guests||10,value:q,onChange:xe=>H(Number(xe.target.value)),className:"w-full px-3 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white focus:outline-none focus:border-[#e8ff4a] text-sm transition-colors"})]}),T&&A&&A>T&&(()=>{const xe=Math.max(1,Math.round((new Date(A)-new Date(T))/864e5)),Ce=r.max_guests||1,Te=r.cp_value&&r.cp_value>0?r.cp_value:Ce<=2?100:Ce<=4?120:Ce<=6?150:Ce<=8?180:200,Qe=Te*xe;return e.jsxs("div",{className:"rounded-xl bg-[#e8ff4a]/5 border border-[#e8ff4a]/20 p-3",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{className:"text-stone-400",children:[Te," CP × ",xe," noche",xe>1?"s":""]}),e.jsxs("span",{className:"text-[#e8ff4a] font-bold",children:[Qe," CP"]})]}),e.jsx("p",{className:"text-stone-600 text-xs",children:"Los CP se reservan al aceptar el intercambio, no ahora."})]})})(),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"exchange-msg",className:"block text-xs text-stone-400 mb-1.5",children:"Tu mensaje"}
192),e.jsx("textarea",{id:"exchange-msg",value:g,onChange:xe=>v(xe.target.value),rows:3,placeholder:"Cuéntale quién eres, qué nivel tienes y qué escuelas quieres visitar…",className:"w-full px-4 py-3 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] resize-none transition-colors text-sm"})]}),_&&e.jsx("p",{className:"text-red-400 text-sm",role:"alert",children:_}),e.jsx("button",{type:"submit",disabled:C,className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors disabled:opacity-50",children:C?"Enviando…":"Solicitar intercambio"})]}):e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-stone-400 text-sm mb-4",children:"Inicia sesión para enviar una solicitud de intercambio"}),e.jsx(ne,{to:"/login",className:"block w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-center hover:bg-[#f0ff70] transition-colors",children:"Iniciar sesión"})]}),i&&e.jsx(d4,{home:r,user:i,ownerName:ge})]})]})})]})]})]})}const Fl={España:"Europa",Francia:"Europa",Italia:"Europa",Grecia:"Europa",Alemania:"Europa",Austria:"Europa",Suiza:"Europa",Eslovenia:"Europa",Croacia:"Europa",Portugal:"Europa",Noruega:"Europa",Suecia:"Europa",UK:"Europa",Islandia:"Europa","Rep. Checa":"Europa",Eslovaquia:"Europa",Rumanía:"Europa",Marruecos:"África",Sudáfrica:"África",Madagascar:"África",Tailandia:"Asia",China:"Asia",Japón:"Asia",India:"Asia",Israel:"Asia",Jordania:"Asia",Turquía:"Asia",Vietnam:"Asia",Nepal:"Asia",Omán:"Asia",Australia:"Oceanía","Nueva Zelanda":"Oceanía",EEUU:"América del Norte",Canadá:"América del Norte",México:"América del Norte",Perú:"América del Sur",Brasil:"América del Sur",Argentina:"América del Sur",Chile:"América del Sur"},m4=["Europa","África","Asia","Oceanía","América del Norte","América del Sur"];function p4(){const{user:l}=oa(),{t:i}=Lt(),r=Za(),[d,m]=b.useState([]),[p,f]=b.useState([]),[x,h]=b.useState(!0),[j,g]=b.useState(!1),[v,S]=Yl(),[N,_]=b.useState(()=>v.get("q")||""),[z,C]=b.useState(null),[k,T]=b.useState(null);b.useEffect(()=>{const B=v.get("q")||"";_(B)},[v]),b.useEffect(()=>{const B=new AbortController;return D.collection("climbing_tips").getList(1,100,{sort:"-created",expand:"author,home",signal:B.signal}).then(Z=>{m(Z.items),h(!1),g(!1)}).catch(Z=>{Z!=null&&Z.isAbort||(h(!1),g(!0))}),()=>B.abort()},[]),b.useEffect(()=>{let B=!1;return(async()=>{const te=await D.collection("community_schools").getList(1,200,{sort:"zona"});let P=[...te.items];if(te.totalItems>200){const oe=await D.collection("community_schools").getList(2,200,{sort:"zona"});P=P.concat(oe.items)}return P})().then(te=>{if(B)return;const P=te.filter($=>$.is_sector!==!0);f(P)}).catch(te=>console.error("[community_schools fetch error]",te)),()=>{B=!0}},[]);const w=N.toLowerCase().trim(),A=[...at,...p.map(B=>({pais:B.pais||"Otros"}))],L=m4.filter(B=>A.some(Z=>(Fl[Z.pais]||Z.continente)===B)),q=z?[...new Set(A.filter(B=>(Fl[B.pais]||B.continente)===z).map(B=>B.pais))].sort():[],H=w||k||z?d.filter(B=>{var oe,de,ze,da,Ze,Ea,V,pe;const Z=!w||((oe=B.route_name)==null?void 0:oe.toLowerCase().includes(w))||((de=B.sector)==null?void 0:de.toLowerCase().includes(w))||((ze=B.difficulty)==null?void 0:ze.toLowerCase().includes(w))||((Ea=(Ze=(da=B.expand)==null?void 0:da.home)==null?void 0:Ze.location)==null?void 0:Ea.toLowerCase().includes(w)),te=((pe=(V=B.expand)==null?void 0:V.home)==null?void 0:pe.country)||"",P=!k||te===k,$=!z||Fl[te]===z;return Z&&P&&$}):d,F=new Set(at.map(B=>(B.zona||"").toLowerCase().trim())),U=[...at,...p.filter(B=>!F.has((B.zona||"").toLowerCase().trim())).map(B=>({id:B.id,zona:B.zona,pais:B.pais,continente:B.continente||Fl[B.pais]||"Europa",region:B.region,lat:B.lat,lng:B.lng,nivel:B.nivel||"",tipo:B.tipo||"",temporada:B.temporada||"",resumen:B.resumen||"",_community:!0}))],J=U.filter(B=>{const Z=oe=>(oe||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/['''`]/g,"").toLowerCase(),te=!w||Z(B.zona).includes(Z(w))||Z(B.pais).includes(Z(w))||Z(B.region).includes(Z(w))||Z(B.nivel).includes(Z(w))||Z(B.resumen).includes(Z(w))||Z(B.municipio).includes(Z(w)),P=!z||(Fl[B.pais]||B.continente)===z,$=!k||B.pais===k;return te&&P&&$}),O=H.length>0||J.length>0;function X(){_(""),C(null),T(null),S({},{replace:!0})}return e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-16",children:[e.jsxs("div",{className:"relative w-full overflow-hidden",style:{minHeight:"320px"},children:[e.jsx("img",{src:"/static/escuelas-hero-bg.jpg",alt:"Escalador en pared roja con cuerda y mosquetones",className:"absolute inset-0 w-full h-full object-cover",style:{objectPosition:"40% 30%"}}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-stone-950/50 via-stone-950/40 to-stone-950"}),e.jsxs("div",{className:"relative z-10 max-w-5xl mx-auto px-4 sm:px-6 py-20 flex flex-col justify-end",style:{minHeight:"320px"},children:[e.jsx("h1",{className:"font-display text-4xl sm:text-6xl font-bold text-white mb-3 drop-shadow-lg",children:i("routes_page.title")}),e.jsx("p",{className:"text-stone-200 text-lg mb-4 drop-shadow max-w-xl",children:i("routes_page.subtitle")}),l&&e.jsxs("p",{className:"text-[#e8ff4a] font-display text-2xl mb-8 drop-shadow",children:[U.length," ",i("routes_page.schools_listed")]}),l?e.jsxs("div",{className:"w-full max-w-xl space-y-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx("label",{htmlFor:"search-routes",className:"sr-only",children:i("routes_page.search_schools")}),e.jsx(vs,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-stone-400 pointer-events-none"}),e.jsx("input",{id:"search-routes",type:"search",placeholder:i("routes_page.search_placeholder"),className:"w-full bg-stone-950/80 border border-stone-600 rounded-xl pl-11 pr-10 py-3 text-white placeholder-stone-400 focus:outline-hidden focu
192s:border-[#e8ff4a] transition-colors backdrop-blur-sm",value:N,onChange:B=>{_(B.target.value),C(null),T(null);const Z=B.target.value.trim();Z?S({q:Z},{replace:!0}):S({},{replace:!0})}}),N&&e.jsx("button",{onClick:X,className:"absolute right-3 top-1/2 -translate-y-1/2 text-stone-400 hover:text-white text-lg leading-none","aria-label":"Borrar búsqueda",children:"×"})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:L.map(B=>e.jsx("button",{onClick:()=>{C(z===B?null:B),T(null),_(""),S({},{replace:!0})},className:`px-3 py-1 rounded-full text-xs font-semibold border transition-all ${z===B?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"border-stone-600 text-stone-300 hover:border-stone-400"}`,children:B},B))}),z&&q.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:q.map(B=>e.jsx("button",{onClick:()=>T(k===B?null:B),className:`px-2.5 py-1 rounded-full text-xs border transition-all ${k===B?"bg-stone-100 text-stone-950 border-stone-100":"border-stone-700 text-stone-400 hover:border-stone-500 hover:text-stone-200"}`,children:B},B))})]}):e.jsx("div",{className:"w-full max-w-xl",children:e.jsxs("button",{onClick:()=>r("/signup"),className:"w-full flex items-center gap-3 bg-stone-950/60 border border-stone-600/60 rounded-xl pl-4 pr-5 py-3 text-stone-400 backdrop-blur-sm hover:border-[#e8ff4a]/60 hover:text-stone-200 transition-all group text-left","aria-label":"Crear cuenta para buscar escuelas",children:[e.jsx(vs,{className:"w-5 h-5 shrink-0 text-stone-500 group-hover:text-[#e8ff4a] transition-colors"}),e.jsx("span",{className:"flex-1 text-sm",children:"Buscar por nombre, país o zona…"}),e.jsx("span",{className:"text-xs font-semibold px-3 py-1 rounded-full bg-[#e8ff4a] text-stone-950 shrink-0",children:"Crear cuenta gratis"})]})})]})]}),e.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-12",children:[l?x?e.jsx("p",{className:"text-stone-500 text-center py-20",children:"Cargando…"}):j?e.jsxs("div",{className:"text-center py-20",children:[e.jsx("p",{className:"text-stone-400 text-lg mb-4",children:"No se ha podido cargar el contenido. Comprueba tu conexión."}),e.jsx("button",{onClick:()=>{g(!1),h(!0),D.collection("climbing_tips").getList(1,100,{sort:"-created",expand:"author,home"}).then(B=>{m(B.items),h(!1)}).catch(()=>{h(!1),g(!0)})},className:"px-6 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:"Reintentar"})]}):O?e.jsxs("div",{className:"space-y-12",children:[J.length>0&&e.jsxs("section",{children:[e.jsxs("h2",{className:"font-display text-2xl text-white mb-5 flex items-center gap-2",children:[e.jsx("span",{className:"inline-block",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"#e8ff4a",className:"w-6 h-6","aria-hidden":"true",children:[e.jsx("path",{d:"M3 19 L8 10 L13 19 Z"}),e.jsx("path",{d:"M11 19 L17 6 L23 19 Z"}),e.jsx("rect",{x:"14",y:"15",width:"4",height:"4",rx:"2",fill:"#0c0a09"}),e.jsx("rect",{x:"3",y:"19",width:"20",height:"2",rx:"1",fill:"#e8ff4a"})]})}),"Escuelas en el mapa",e.jsxs("span",{className:"text-stone-500 text-base font-sans font-normal ml-1",children:["(",J.length,")"]})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:J.map(B=>e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl p-5 hover:border-stone-600 transition-colors",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[e.jsx("h3",{className:"text-white font-semibold text-base leading-snug",children:B.zona}),e.jsx("span",{className:"shrink-0 text-xs px-2 py-0.5 rounded-full bg-[#e8ff4a]/10 text-[#e8ff4a] border border-[#e8ff4a]/20",children:B.nivel})]}),e.jsxs("p",{className:"text-stone-400 text-xs flex items-center gap-1 mb-3",children:[e.jsx(ya,{className:"w-3.5 h-3.5 shrink-0"})," ",B.pais]}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed line-clamp-3",children:B.resumen}),e.jsxs("div",{className:"flex items-center gap-4 mt-3",children:[B.lat&&B.lng&&!(B.lat===0&&B.lng===0)&&e.jsx(ne,{to:`/mapa?lat=${B.lat}&lng=${B.lng}&zoom=11`,className:"text-xs text-stone-400 hover:text-white transition-colors",children:"Ver en el mapa →"}),e.jsx(ne,{to:`/escuelas/${B.id}`,className:"text-xs text-[#e8ff4a] hover:underline",children:"Ver escuela →"}),e.jsx(ne,{to:`/resenas?zona=${encodeURIComponent(B.zona)}`,className:"text-xs text-stone-400 hover:text-[#e8ff4a] transition-colors",children:"Reseñas →"})]})]},B.id))})]}),H.length>0&&e.jsxs("section",{children:[e.jsxs("h2",{className:"font-display text-2xl text-white mb-5",children:["Recomendaciones de la comunidad",e.jsxs("span",{className:"text-stone-500 text-base font-sans font-normal ml-2",children:["(",H.length,")"]})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:H.map(B=>{var Z,te;return e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl p-5 hover:border-stone-600 transition-colors",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[e.jsx("h3",{className:"text-white font-semibold text-base leading-snug",children:B.route_name}),B.difficulty&&e.jsx("span",{className:"shrink-0 text-xs px-2 py-0.5 rounded-full bg-[#e8ff4a]/10 text-[#e8ff4a] border border-[#e8ff4a]/20",children:B.difficulty})]}),B.sector&&e.jsxs("p",{className:"text-stone-400 text-xs flex items-center gap-1 mb-2",children:[e.jsx(ya,{className:"w-3.5 h-3.5 shrink-0"})," ",B.sector]}),B.description&&e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed line-clamp-3",children:B.description}),((te=(Z=B.expand)==null?void 0:Z.author)==null?void 0:te.name)&&e.jsxs("p",{className:"text-stone-500 text-xs mt-3",children:["Por ",B.expand.author.name]})]},B.id)})})]})]}):e.jsxs("div",{className:"text-center py-20",children:[e.jsx("p",{className:"text-stone-400 text-lg mb-4",children:"No hay escuelas que coincidan con tu búsqueda."}),e.jsx("button",{onClick:X,className:"text-[#e8ff4a] hover:underline text-sm",children:"Borrar filtros"})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-24 text-center max-w-md mx-auto",children:[e.jsx("div",{className:"w-20 h-20 rounded-full bg-stone-900 border border-stone-700 flex items-center justify-center mb-6",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"#e8ff4a",className:"w-10 h-10","aria-hidden":"true",children:[e.jsx("path",{d:"M3 19 L8 10 L13 19 Z"}),e.jsx("path",{d:"M11 19 L17 6 L23 19 Z"}),e.jsx("rect",{x:"3",y:"19",width:"20",height:"2",rx:"1",fill:"#e8ff4a"})]})}),e.jsx("h2",{className:"text-white font-display text-3xl mb-3",children:"El directorio es para miembros"}),e.jsx("p",{className:"text-stone-400 text-base mb-8 leading-relaxed",children:"Más de 700 escuelas de escalada en todo el mund
192o, con sectores, reseñas y consejos de la comunidad. Regístrate gratis para acceder."}),e.jsx(ne,{to:"/signup",className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-bold text-base hover:bg-yellow-300 transition-colors mb-3",children:"Crear cuenta gratis"}),e.jsx(ne,{to:"/login",className:"text-stone-400 hover:text-white text-sm transition-colors",children:"Ya tengo cuenta — entrar"})]}),!w&&e.jsxs("div",{className:"mt-16 text-center bg-stone-900 border border-stone-800 rounded-2xl p-8",children:[e.jsxs("svg",{viewBox:"0 0 40 40",className:"w-10 h-10 mx-auto mb-3",fill:"#e8ff4a","aria-hidden":"true",children:[e.jsx("path",{d:"M3 32 L12 16 L21 32 Z"}),e.jsx("path",{d:"M17 32 L27 8 L37 32 Z"}),e.jsx("rect",{x:"22",y:"25",width:"7",height:"7",rx:"3.5",fill:"#0c0a09"}),e.jsx("rect",{x:"3",y:"32",width:"34",height:"3",rx:"1.5",fill:"#e8ff4a"})]}),e.jsx("h3",{className:"text-white font-bold text-lg mb-2",children:"¿Conoces una escuela que falta?"}),e.jsx("p",{className:"text-stone-400 text-sm mb-5",children:"Añade tu conocimiento local desde tu panel y ayuda a la comunidad."}),e.jsx(ne,{to:"/dashboard",className:"px-6 py-2.5 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-[#f0ff70] transition-colors",children:"Compartir mi escuela"})]})]})]})}/**
193 * @license lucide-react v1.47.0 - ISC
194 *
195 * This source code is licensed under the ISC license.
196 * See the LICENSE file in the root directory of this source tree.
197 */const I0={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};I0.node;const Ql=Ie(I0),h4="https://tiles.openfreemap.org/styles/liberty",f4="https://unpkg.com/[email protected]/dist/maplibre-gl.css",x4="https://unpkg.com/[email protected]/dist/maplibre-gl.js",Vn={background:"#e8e4d8",water:"#5b9ec9",landuse:"#c8d8a8",road_minor:"#d0c9b8",road_major:"#b8ae98",building:"#cec6b0",label:"#2a2418"};function b4(){return new Promise(l=>{if(window.maplibregl){l();return}const i=document.createElement("link");i.rel="stylesheet",i.href=f4,document.head.appendChild(i);const r=document.createElement("script");r.src=x4,r.onload=l,document.head.appendChild(r)})}function g4([l,i],[r,d]){const p=(d-i)*Math.PI/180,f=(r-l)*Math.PI/180,x=Math.sin(p/2)**2+Math.cos(i*Math.PI/180)*Math.cos(d*Math.PI/180)*Math.sin(f/2)**2;return 6371*2*Math.atan2(Math.sqrt(x),Math.sqrt(1-x))}function Nu(l,i){const r=new Set,d=[];for(let m=0;m<l.length;m++){if(r.has(m))continue;const p=[m];for(let h=m+1;h<l.length;h++)!r.has(h)&&g4(l[m].coords,l[h].coords)<i&&(p.push(h),r.add(h));r.add(m);const f=p.reduce((h,j)=>h+l[j].coords[0],0)/p.length,x=p.reduce((h,j)=>h+l[j].coords[1],0)/p.length;d.push({coords:[f,x],count:p.length,items:p.map(h=>l[h])})}return d}function v4(l){return l<4?800:l<5?400:l<6?200:l<7?100:l<8?50:l<9?25:l<10?12:l<11?6:0}const y4=`<svg viewBox="0 0 20 20" width="18" height="18" fill="#e8ff4a">
198  <path d="M2 16 L7 8 L12 16 Z"/>
199  <path d="M9 16 L14 4 L19 16 Z"/>
200  <rect x="11" y="12" width="3.5" height="4" rx="1.7" fill="#0c0a09"/>
201  <rect x="2" y="16" width="17" height="2" rx="1" fill="#e8ff4a"/>
202</svg>`,Ix=`<svg viewBox="0 0 20 20" width="18" height="18" fill="#60a5fa">
203  <path d="M10 3 L2 9.5 L4.5 9.5 L4.5 17 L15.5 17 L15.5 9.5 L18 9.5 Z"/>
204  <rect x="8" y="12" width="4" height="5" rx="0.8" fill="#1e3a5f"/>
205</svg>`;function j4({school:l,sectors:i,onClose:r,onFlyTo:d}){return e.jsxs("div",{className:"absolute bottom-4 left-4 right-4 sm:left-4 sm:right-auto sm:w-80 bg-white/97 backdrop-blur-sm border border-stone-200 rounded-2xl shadow-xl z-[1000] overflow-hidden",children:[e.jsxs("div",{className:"bg-stone-950 px-4 py-3 flex items-start gap-3",children:[e.jsx("span",{className:"text-lg shrink-0 mt-0.5",children:"🧗"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-[#e8ff4a] font-semibold uppercase tracking-widest mb-0.5",children:"Escuela de escalada"}),e.jsx("h3",{className:"text-white font-display text-lg font-bold leading-tight",children:l.zona}),(l.pais||l.nivel)&&e.jsx("p",{className:"text-stone-400 text-xs mt-0.5",children:[l.pais,l.nivel].filter(
205Boolean).join(" · ")})]}),e.jsx("button",{onClick:r,className:"text-stone-400 hover:text-white transition-colors shrink-0 mt-0.5","aria-label":"Cerrar",children:e.jsx(_t,{className:"w-4 h-4"})})]}),l.resumen&&e.jsxs("div",{className:"px-4 py-3 border-b border-stone-100",children:[e.jsx("p",{className:"text-stone-700 text-sm leading-relaxed",children:l.resumen}),l.temporada&&e.jsxs("p",{className:"text-stone-400 text-xs mt-1.5",children:["Mejor época: ",e.jsx("span",{className:"text-stone-600",children:l.temporada})]})]}),i.length>0&&e.jsxs("div",{className:"px-4 py-3 border-b border-stone-100",children:[e.jsxs("p",{className:"text-xs font-semibold text-stone-500 uppercase tracking-widest mb-2",children:[i.length," sector",i.length!==1?"es":""]}),e.jsx("div",{className:"flex flex-col gap-1 max-h-44 overflow-y-auto",children:i.map(m=>e.jsxs("button",{onClick:()=>d&&d([m.lng,m.lat],m.zona),className:"flex items-center gap-2 w-full text-left px-2 py-1.5 rounded-lg hover:bg-stone-100 transition-colors group",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#e8ff4a] shrink-0"}),e.jsx("span",{className:"text-stone-800 text-sm truncate flex-1 group-hover:text-stone-950",children:m.zona}),e.jsx(Ql,{className:"w-3.5 h-3.5 text-stone-400 shrink-0"})]},m.id))})]}),e.jsx("div",{className:"px-4 py-3 flex gap-2",children:e.jsx(ne,{to:`/escuelas/${l.id}`,onClick:r,className:"flex-1 text-center text-xs font-bold text-stone-950 bg-[#e8ff4a] px-3 py-2 rounded-full hover:bg-[#f0ff70] transition-colors",children:"Ver ficha completa →"})})]})}function _4({home:l,onClose:i,photoUrl:r}){const d=r(l);return e.jsxs("div",{className:"absolute bottom-4 left-4 right-4 sm:left-4 sm:right-auto sm:w-80 bg-white/97 backdrop-blur-sm border border-stone-200 rounded-2xl p-4 shadow-xl z-[1000]",children:[e.jsx("button",{onClick:i,className:"absolute top-3 right-3 text-stone-400 hover:text-stone-700 transition-colors","aria-label":"Cerrar",children:e.jsx(_t,{className:"w-4 h-4"})}),d&&e.jsx("div",{className:"w-full h-32 rounded-xl overflow-hidden mb-3 -mt-1",children:e.jsx("img",{src:d,alt:l.title,className:"w-full h-full object-cover"})}),e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx("span",{className:"text-xs text-blue-500 font-semibold uppercase tracking-widest",children:"🏠 Casa CLIMB & HOME"})}),e.jsx("h3",{className:"font-display text-lg font-bold text-stone-900 mb-0.5 leading-tight",children:l.title}),e.jsxs("div",{className:"flex items-center gap-3 text-stone-500 text-xs mb-2",children:[l.location&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ya,{className:"w-3 h-3"}),l.location]}),l.max_guests&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ut,{className:"w-3 h-3"}),l.max_guests," huésp."]})]}),l.description&&e.jsx("p",{className:"text-stone-600 text-sm leading-relaxed mb-3 line-clamp-2",children:l.description}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{to:`/homes/${l.id}`,onClick:i,className:"inline-flex items-center gap-2 text-xs font-bold text-stone-950 bg-[#e8ff4a] px-4 py-2 rounded-full hover:bg-[#f0ff70] transition-colors",children:"Ver la casa"}),l.cp_value&&e.jsxs("span",{className:"text-xs text-stone-400",children:[l.cp_value," CP/noche"]})]})]})}function N4({zone:l,onClose:i}){const r=Za();return e.jsxs("div",{className:"absolute bottom-4 left-4 right-4 sm:left-4 sm:right-auto sm:w-80 bg-white/97 backdrop-blur-sm border-2 border-blue-200 rounded-2xl shadow-xl z-[1000] overflow-hidden",children:[e.jsxs("div",{className:"bg-blue-50 px-4 py-3 flex items-start gap-3 border-b border-blue-100",children:[e.jsx("span",{className:"text-lg shrink-0 mt-0.5",children:"📍"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-blue-500 font-bold uppercase tracking-widest mb-0.5",children:"Sé el primero aquí"}),e.jsx("h3",{className:"text-stone-900 font-display text-lg font-bold leading-tight",children:l.zona}),l.region&&e.jsxs("p",{className:"text-stone-500 text-xs mt-0.5",children:[l.region,l.pais?` · ${l.pais}`:""]})]}),e.jsx("button",{onClick:i,className:"text-stone-400 hover:text-stone-700 transition-colors shrink-0 mt-0.5","aria-label":"Cerrar",children:e.jsx(_t,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"px-4 py-4",children:[e.jsx("p",{className:"text-stone-700 text-sm leading-relaxed mb-1 font-semibold",children:"Climb & Home está empezando a crecer en esta zona."}),e.jsx("p",{className:"text-stone-500 text-sm leading-relaxed mb-4",children:"¿Vives aquí o cerca y tienes una casa para intercambiar? Haz real este punto. Publica tu casa y sé de los primeros anfitriones de la zona."}),e.jsx("p",{className:"text-xs font-semibold bg-[#e8ff4a]/30 text-stone-700 rounded-lg px-3 py-2 mb-4",children:"🏆 Bonus Pionero de zona — +100 ClimbPoints extra por ser el primero"}),e.jsx("button",{onClick:()=>{i(),r("/dashboard")},className:"w-full text-center text-sm font-bold text-stone-950 bg-[#e8ff4a] px-4 py-3 rounded-full hover:bg-[#f0ff70] transition-colors",children:"Publica tu casa →"})]})]})}function w4({items:l,onSelect:i,onClose:r}){const[d,m]=b.useState(""),p=l.filter(f=>{if(!d)return!0;const x=d.toLowerCase();return(f.zona||f.title||"").toLowerCase().includes(x)||(f.pais||f.location||"").toLowerCase().includes(x)});return e.jsxs("div",{className:"absolute top-4 right-4 bottom-4 w-72 bg-stone-950/95 backdrop-blur-sm border border-stone-700 rounded-2xl shadow-2xl z-[999] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-stone-800 flex items-center gap-2",children:[e.jsxs("span",{className:"text-white text-sm font-semibold flex-1",children:[l.length," puntos en vista"]}),e.jsx("button",{onClick:r,className:"text-stone-500 hover:text-white transition-colors","aria-label":"Cerrar lista",children:e.jsx(_t,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"px-3 py-2 border-b border-stone-800",children:e.jsxs("div",{className:"relative",children:[e.jsx(vs,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-stone-500"}),e.jsx("input",{type:"text",placeholder:"Filtrar…",value:d,onChange:f=>m(f.target.value),className:"w-full bg-stone-900 border border-stone-700 rounded-full pl-7 pr-3 py-1.5 text-xs text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a]/50"})]})}),e.jsxs("div",{className:"flex-1 overflow-y-auto py-1",children:[p.length===0&&e.jsx("p",{className:"text-stone-600 text-xs text-center py-6",children:"Sin resultados"}),p.map((f,x)=>{const h=f._type==="school";return e.jsxs("button",{onClick:()=>i(f),className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-stone-800/60 transition-colors text-left group",children:[e.jsx("span",{className:"shrink-0 w-6 h-6 rounded-full flex items-center justify-center text-xs",style:{background:h?"#0c0a09":"#1e3a5f",border:`1.5px solid ${h?"#e8ff4a":"#60a5fa"}`},children:h?"🧗":"🏠"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-white text-xs font-semibold truncate group-hover:text-[#e8ff4a] transition-colors",children:f.zona||f.title}),e.jsxs("p",{className:"text-stone-500 text-[10px] truncate",children:[f.pais||f.location||"",f.nivel?` · ${f.nivel}`:""]})]}),e.jsx(Ql,{className:"w-3 h-3 text-stone-600 shrink-0"})]},f.id||x)})]})]})}function S4(){const{user:l}=oa(),i=b.useRef(null),r=b.useRef(null),d=b.useRef([]),[m,p]=b.useState(!1),[f,x]=b.useState(!1),[h,j]=b.useState(null),[g,v]=b.useState(null),[S,N]=b.useState(null),[_,z]=b.useState(null),[C,k]=b.useState([]),[T,w]=b.useState([]),[A,L]=b.useState([]),[q,H]=b.useState([]),[F,U]=b.useState("all"),[J,O]=b.useState(""),[X,B]=b.useState(!1),[Z,te]=b.useState([]),[P,$]=b.useState(""),[oe,de]=b.useState([]),[ze,da]=b.useState(!1),[Ze]=Yl(),Ea=b.useRef(!0),V=b.useRef(!0),pe=b.useRef(!0),Ne=b.useRef("all");b.useEffect(()=>{Ea.current=F==="all"||F==="schools",V.current=F==="all"||F==="homes",pe.current=F==="all"||F==="demo",Ne.current=F},[F]),b.useEffect(()=>{if(!l)return;const ue=new AbortController;return D.collection("homes").getList(1,200,{filter:"available=true",signal:ue.signal,expand:"owner"}).then(Se=>k(Se.items.filter(_e=>_e.lat&&_e.lng))).catch(Se=>{Se!=null&&Se.isAbort||console.error(Se)}),()=>ue.abort()},[l]);const[ge,ie]=b.useState([]);b.useEffect(()=>{let ue=!1;return(async()=>
205{let _e=[],Fe=1;for(;;){const _a=await D.collection("community_schools").getList(Fe,200,{sort:"zona"});if(_e=_e.concat(_a.items),_e.length>=_a.totalItems||_a.items.length<200)break;Fe++}return _e})().then(_e=>{ue||(H(_e.filter(Fe=>Fe.lat&&Fe.lng&&Fe.is_sector===!0)),L(_e.filter(Fe=>Fe.lat&&Fe.lng&&Fe.is_sector!==!0)))}).catch(_e=>{ue||console.error("[community_schools]",_e)}),()=>{ue=!0}},[]),b.useEffect(()=>{let ue=!1;return D.collection("members").getFullList({filter:"disponible_escalar=true",expand:"avatar"}).then(Se=>{ue||ie(Se.filter(_e=>_e.lat&&_e.lng))}).catch(Se=>{ue||console.error("[members]",Se)}),()=>{ue=!0}},[]);const ee=b.useRef([]);b.useEffect(()=>{const ue=at.map(_e=>({..._e,_source_static:!0,_type:"school"})),Se=A.map(_e=>({..._e,zona:_e.zona||_e.name||_e.municipio||"Sin nombre",pais:_e.pais||_e.country||"Otros",_source_community:!0,_type:"school"}));ee.current=[...ue,...Se]},[A]);const he=b.useRef([]);b.useEffect(()=>{he.current=C.map(ue=>({...ue,_type:"home"}))},[C]);const le=b.useRef(l);b.useEffect(()=>{le.current=l},[l]);const me=b.useRef([]);b.useEffect(()=>{me.current=T},[T]);const Be=b.useCallback(async ue=>{if(ue._source_community)try{return(await D.collection("community_schools").getList(1,100,{filter:`is_sector=true && parent_school="${ue.zona}"`,sort:"zona"})).items}catch{return[]}else try{const Se=ue.zona.replace(/"/g,'\\"');return(await D.collection("climbing_sectors").getFullList({filter:`school_name ~ "${Se}"`,sort:"name"})).map(Fe=>({...Fe,zona:Fe.name}))}catch{return[]}},[]),xe=b.useCallback(async ue=>{v(null),B(!1);const Se=await Be(ue);j({school:ue,sectors:Se})},[Be]),Ce=b.useRef(xe);b.useEffect(()=>{Ce.current=xe},[xe]);const Te=b.useRef(null),Qe=b.useCallback(ue=>{if(ue)try{const Se=ue.getBounds(),_e=ee.current,Fe=he.current,_a=Ne.current,La=[];_a!=="homes"&&_e.forEach(Ke=>{Se.contains([Ke.lng,Ke.lat])&&La.push(Ke)}),_a!=="schools"&&Fe.forEach(Ke=>{Se.contains([Ke.lng,Ke.lat])&&La.push(Ke)}),te(La)}catch{}},[]),Ge=b.useCallback(ue=>{const Se=window.maplibregl;d.current.forEach(qa=>qa.remove()),d.current=[];const _e=ue.getZoom(),Fe=v4(_e),_a=ee.current,La=he.current,Ke=ge,Oa=Ne.current,ma=Oa==="all"||Oa==="schools",Ra=Oa==="all"||Oa==="homes",js=Oa==="all"||Oa==="demo";if(ma&&_a.length>0){const qa=_a.map(ke=>({coords:[ke.lng,ke.lat],data:ke}));(Fe>0?Nu(qa,Fe):qa.map(ke=>({coords:ke.coords,count:1,items:[ke]}))).forEach(ke=>{const Je=document.createElement("div");if(ke.count>1){const Sa=ke.count>50?56:ke.count>10?46:38;Je.style.cssText=`
206            width:${Sa}px;height:${Sa}px;border-radius:50%;
207            background:#0c0a09;border:3px solid #e8ff4a;
208            display:flex;align-items:center;justify-content:center;
209            cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,0.6);
210            font-family:system-ui,sans-serif;font-weight:700;
211            font-size:${ke.count>99?"11":"13"}px;color:#e8ff4a;
212            flex-direction:column;line-height:1;user-select:none;
213          `,Je.innerHTML=`<span style="font-size:10px;margin-bottom:2px;">🧗</span><span>${ke.count}</span>`,Je.addEventListener("click",()=>{ue.flyTo({center:ke.coords,zoom:_e+2,speed:1.2})})}else{const Sa=ke.items[0].data;Je.style.cssText="width:36px;height:36px;display:flex;align-items:center;justify-content:center;cursor:pointer;";const sa=document.createElement("div");sa.style.cssText=`
214            width:36px;height:36px;border-radius:50%;
215            background:#0c0a09;border:2px solid #e8ff4a;
216            display:flex;align-items:center;justify-content:center;
217            box-shadow:0 2px 6px rgba(0,0,0,0.4);
218            transition:transform 0.15s ease;
219            transform-origin:center center;
220            will-change:transform;
221            pointer-events:none;
222          `,sa.innerHTML=y4,Je.appendChild(sa),Je.addEventListener("mouseenter",()=>{sa.style.transform="scale(1.2)"}),Je.addEventListener("mouseleave",()=>{sa.style.transform="scale(1)"}),Je.addEventListener("click",()=>Ce.current(Sa))}
222const Kt=new Se.Marker({element:Je,anchor:"center"}).setLngLat(ke.coords).addTo(ue);d.current.push(Kt)})}if(Ra&&La.length>0){const qa=La.map(ke=>({coords:[ke.lng,ke.lat],data:ke}));(Fe>0?Nu(qa,Fe):qa.map(ke=>({coords:ke.coords,count:1,items:[ke]}))).forEach(ke=>{const Je=document.createElement("div");if(ke.count>1){const Sa=ke.count>20?50:ke.count>5?42:36;Je.style.cssText=`
223            width:${Sa}px;height:${Sa}px;border-radius:50%;
224            background:#1e3a5f;border:3px solid #60a5fa;
225            display:flex;align-items:center;justify-content:center;
226            cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,0.6);
227            font-family:system-ui,sans-serif;font-weight:700;
228            font-size:13px;color:#93c5fd;
229            flex-direction:column;line-height:1;user-select:none;
230          `,Je.innerHTML=`<span style="font-size:10px;margin-bottom:2px;">🏠</span><span>${ke.count}</span>`,Je.addEventListener("click",()=>{ue.flyTo({center:ke.coords,zoom:_e+2,speed:1.2})})}else{const Sa=ke.items[0].data;Je.style.cssText="width:34px;height:34px;display:flex;align-items:center;justify-content:center;cursor:pointer;";const sa=document.createElement("div");sa.style.cssText=`
231            width:34px;height:34px;border-radius:50%;
232            background:#1e3a5f;border:2px solid #60a5fa;
233            display:flex;align-items:center;justify-content:center;
234            box-shadow:0 2px 6px rgba(0,0,0,0.4);
235            transition:transform 0.15s ease;
236            transform-origin:center center;
237            will-change:transform;
238            pointer-events:none;
239          `,sa.innerHTML=Ix,Je.appendChild(sa),Je.addEventListener("mouseenter",()=>{sa.style.transform="scale(1.2)"}),Je.addEventListener("mouseleave",()=>{sa.style.transform="scale(1)"}),Je.addEventListener("click",()=>{j(null),v(Sa)})}
239const Kt=new Se.Marker({element:Je,anchor:"center"}).setLngLat(ke.coords).addTo(ue);d.current.push(Kt)})}const Us=me.current,Rt=!!le.current;if((js||!Rt)&&Us.length>0&&Us.forEach(qa=>{const rt=document.createElement("div");rt.style.cssText=`width:34px;height:34px;display:flex;align-items:center;justify-content:center;cursor:${Rt?"pointer":"default"};`;const ke=document.createElement("div");ke.style.cssText=`
240          width:34px;height:34px;border-radius:50%;
241          background:#1e3a5f;border:2px dashed #60a5fa;
242          display:flex;align-items:center;justify-content:center;
243          box-shadow:0 2px 6px rgba(0,0,0,0.4);
244          transition:transform 0.15s ease;
245          transform-origin:center center;
246          will-change:transform;
247          pointer-events:none;
248        `,ke.innerHTML=Ix,rt.appendChild(ke),Rt&&(rt.addEventListener("mouseenter",()=>{ke.style.transform="scale(1.15)"}),rt.addEventListener("mouseleave",()=>{ke.style.transform="scale(1)"}),rt.addEventListener("click",()=>{j(null),v(null),N(qa)}));const Je=new Se.Marker({element:rt,anchor:"center"}).setLngLat([qa.lng,qa.lat]).addTo(ue);d.current.push(Je)}),(Oa==="all"||Oa==="members")&&Ke.length>0){const qa=Ke.map(ke=>({coords:[ke.lng,ke.lat],data:ke}));(Fe>0?Nu(qa,Fe):qa.map(ke=>({coords:ke.coords,count:1,items:[ke]}))).forEach(ke=>{const Je=document.createElement("div");if(ke.count>1){const Sa=ke.count>10?42:36;Je.style.cssText=`
249            width:${Sa}px;height:${Sa}px;border-radius:50%;
250            background:#374151;border:3px solid #10b981;
251            display:flex;align-items:center;justify-content:center;
252            cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,0.6);
253            font-family:system-ui,sans-serif;font-weight:700;
254            font-size:12px;color:#10b981;
255            flex-direction:column;line-height:1;user-select:none;
256          `,Je.innerHTML=`<span style="font-size:11px;margin-bottom:1px;">👥</span><span>${ke.count}</span>`,Je.addEventListener("click",()=>{ue.flyTo({center:ke.coords,zoom:_e+2,speed:1.2})})}else{const Sa=ke.items[0].data;Je.style.cssText="width:34px;height:34px;display:flex;align-items:center;justify-content:center;cursor:pointer;";const sa=document.createElement("div");sa.style.cssText=`
257            width:34px;height:34px;border-radius:50%;
258            background:#374151;border:2px solid #10b981;
259            display:flex;align-items:center;justify-content:center;
260            box-shadow:0 2px 6px rgba(0,0,0,0.4);
261            transition:transform 0.15s ease;
262            transform-origin:center center;
263            will-change:transform;
264            pointer-events:none;
265            font-size:18px;
266          `,sa.innerHTML="🧑",Je.appendChild(sa),Je.addEventListener("mouseenter",()=>{sa.style.transform="scale(1.2)"}),Je.addEventListener("mouseleave",()=>{sa.style.transform="scale(1)"}),Je.addEventListener("click",()=>{j(null),v(null),N(null),z(Sa)})}
266const Kt=new Se.Marker({element:Je,anchor:"center"}).setLngLat(ke.coords).addTo(ue);d.current.push(Kt)})}Qe(ue)},[Qe]),ua=b.useRef(Ge);b.useEffect(()=>{ua.current=Ge},[Ge]),b.useEffect(()=>{const ue=new AbortController;return D.collection("demo_zones").getFullList({filter:"active=true",signal:ue.signal}).then(Se=>{const _e=he.current,Fe=Se.filter(_a=>{if(!_a.lat||!_a.lng)return!1;if(!_a.hidden){const La=(_a.radius_km||30)*1e3;return!_e.some(Oa=>{const ma=(Oa.lng-_a.lng)*111320*Math.cos(_a.lat*Math.PI/180),Ra=(Oa.lat-_a.lat)*110540;return Math.sqrt(ma*ma+Ra*Ra)<La})}return!1});w(Fe),setTimeout(()=>{r.current&&ua.current&&(me.current=Fe,ua.current(r.current))},100)}).catch(Se=>{Se!=null&&Se.isAbort||console.error("[demo_zones]",Se)}),()=>ue.abort()},[]),b.useEffect(()=>{!m||!r.current||Ge(r.current)},[A,C,T,l,m,Ge]),b.useEffect(()=>{!m||!r.current||ua.current(r.current)},[F,m]);const Ka=b.useRef(null);b.useEffect(()=>{if(!m||!r.current)return;const ue=parseFloat(Ze.get("lat")),Se=parseFloat(Ze.get("lng")),_e=parseFloat(Ze.get("zoom")||"11");if(!isNaN(ue)&&!isNaN(Se)){const Fe=`${ue},${Se},${_e}`;if(Ka.current===Fe)return;Ka.current=Fe,r.current.flyTo({center:[Se,ue],zoom:_e,speed:1.4})}},[Ze,m]),b.useEffect(()=>{let ue=!1;return b4().then(()=>{if(ue||!i.current||r.current)return;const Se=window.maplibregl,_e=new Se.Map({container:i.current,style:h4,center:[parseFloat(Ze.get("lng")||"2.5"),parseFloat(Ze.get("lat")||"40.0")],zoom:parseFloat(Ze.get("zoom")||"4.5"),attributionControl:!1});_e.addControl(new Se.AttributionControl({customAttribution:'© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> · <a href="https://openfreemap.org" target="_blank">OpenFreeMap</a>'}),"bottom-right"),_e.addControl(new Se.NavigationControl({showCompass:!1}),"top-right"),_e.on("load",()=>{if(ue)return;try{(_e.getStyle().layers||[]).forEach(Oa=>{const ma=Oa.id;try{if(Oa.type==="background")_e.setPaintProperty(ma,"background-color",Vn.background);else if(Oa.type==="fill")ma.includes("water")?_e.setPaintProperty(ma,"fill-color",Vn.water):ma.includes("building")?_e.setPaintProperty(ma,"fill-color",Vn.building):(ma.includes("landuse")||ma.includes("park")||ma.includes("grass")||ma.includes("forest"))&&_e.setPaintProperty(ma,"fill-color",Vn.landuse);else if(Oa.type==="line"&&(ma.includes("road")||ma.includes("street")||ma.includes("highway"))){const Ra=ma.includes("motorway")||ma.includes("trunk")||ma.includes("primary")?Vn.road_major:Vn.road_minor;_e.setPaintProperty(ma,"line-color",Ra)}else Oa.type==="symbol"&&(_e.setPaintProperty(ma,"text-color",Vn.label),_e.setPaintProperty(ma,"text-halo-color","#e8e4d8"))}catch{}})}catch{}r.current=_e,ua.current(_e);const Fe=parseFloat(Ze.get("lat")),_a=parseFloat(Ze.get("lng")),La=parseFloat(Ze.get("zoom")||"11");!isNaN(Fe)&&!isNaN(_a)&&_e.flyTo({center:[_a,Fe],zoom:La,speed:1.8}),p(!0),_e.on("zoomend",()=>ua.current(_e)),_e.on("moveend",()=>{Te.current&&Te.current(_e)})})}).catch(()=>{ue||x(!0)}),()=>{ue=!0,d.current.forEach(Se=>Se.remove()),d.current=[],r.current&&(r.current.remove(),r.current=null)}},[]);const ye=ue=>{if(!ue.photos)return null;const Se=typeof ue.photos=="string"?JSON.parse(ue.photos):ue.photos;return Se!=null&&Se.length?`${D.baseURL}
266/api/files/${ue.collectionId||"homes"}/${ue.id}/${Se[0]}?thumb=400x300`:null},Va=ue=>{r.current&&r.current.flyTo({center:ue,zoom:14,speed:1.4})},Ya=b.useMemo(()=>{const ue=at.map(_e=>({..._e,_source_static:!0,_type:"school"})),Se=A.map(_e=>({..._e,zona:_e.zona||_e.name||_e.municipio||"Sin nombre",pais:_e.pais||_e.country||"Otros",nivel:_e.nivel||"",_source_community:!0,_type:"school"}));return[...ue,...Se]},[A]),[Aa,ja]=b.useState(""),Ua=Ya.filter(ue=>{if(!Aa)return!0;const Se=Aa.toLowerCase();return(ue.zona||"").toLowerCase().includes(Se)||(ue.pais||"").toLowerCase().includes(Se)||(ue.resumen||"").toLowerCase().includes(Se)}),ss=ue=>{B(!1),r.current&&r.current.flyTo({center:[ue.lng,ue.lat],zoom:12,speed:1.4}),ue._type==="school"?xe(ue):(j(null),v(ue))},Zt=Ya.length;b.useEffect(()=>{if(!P.trim()){de([]);return}const ue=P.toLowerCase(),Se=Ke=>Ke.lat&&Ke.lng&&Math.abs(Ke.lat)>.001&&Math.abs(Ke.lng)>.001,_e=Ke=>(Ke.zona||"").toLowerCase().includes(ue)||(Ke.pais||"").toLowerCase().includes(ue)||(Ke.region||"").toLowerCase().includes(ue),Fe=Ya.filter(Se).filter(_e),_a=q.filter(Se).filter(_e).map(Ke=>({...Ke,_isSector:!0})),La=[...Fe,..._a].slice(0,10);de(La)},[P,Ya,q]);const Nt=ue=>{$(""),de([]),da(!1),r.current&&r.current.flyTo({center:[ue.lng,ue.lat],zoom:12,speed:1.6}),xe(ue)};return e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-16 flex flex-col",children:[e.jsxs("div",{className:"relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"url('/static/mapa-hero.jpg')",backgroundSize:"cover",backgroundPosition:"center 40%"},"aria-hidden":"true"}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, rgba(12,10,9,0.55) 0%, rgba(12,10,9,0.70) 60%, rgba(12,10,9,1) 100%)"},"aria-hidden":"true"}),e.jsxs("div",{className:"relative px-4 sm:px-6 pt-10 pb-5 max-w-7xl mx-auto w-full",children:[e.jsxs("div",{className:"mb-5",children:[e.jsxs("h1",{className:"font-display text-4xl sm:text-5xl font-bold text-white leading-tight",style:{textShadow:"0 2px 16px rgba(0,0,0,0.7)"},children:["Mapa de",e.jsx("br",{}),e.jsx("span",{className:"text-[#e8ff4a]",children:"escalada global"})]}),e.jsxs("p",{className:"text-stone-200 mt-2 text-sm sm:text-base",style:{textShadow:"0 1px 8px rgba(0,0,0,0.8)"},children:[Zt," escuelas · pulsa una para explorar sus sectores"]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 flex-wrap",children:[e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:[{key:"all",label:"Todos",icon:"🗺️"},{key:"schools",label:"Escuelas",icon:"🧗"},{key:"homes",label:"Casas",icon:"🏠"},{key:"demo",label:"Zonas sin casa",icon:"📍"}].map(ue=>e.jsxs("button",{onClick:()=>U(ue.key),className:`flex items-center gap-1.5 px-4 py-2 rounded-full text-sm font-semibold border transition-all ${F===ue.key?ue.key==="homes"?"bg-blue-500 text-white border-blue-500":"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"border-stone-600 text-stone-400 hover:border-stone-400 bg-stone-950/40"}`,"aria-pressed":F===ue.key,children:[e.jsx("span",{children:ue.icon}),e.jsx("span",{children:ue.label})]},ue.key))}),e.jsx("div",{className:"relative sm:ml-auto w-full sm:w-72 shrink-0",children:l?e.jsxs(e.Fragment,{children:[e.jsx(vs,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-stone-400 pointer-events-none"}),e.jsx("input",{type:"text",placeholder:"Buscar escuela o sector…",value:P,onChange:ue=>$(ue.target.value),className:"w-full bg-stone-950/80 backdrop-blur border border-stone-600 rounded-full pl-9 pr-8 py-2 text-sm text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a]/70 transition-colors","aria-label":"Buscar escuela en el mapa"}),P&&e.jsx("button",{onClick:()=>{$(""),de([])},className:"absolute right-3 top-1/2 -translate-y-1/2 text-stone-400 hover:text-white transition-colors","aria-label":"Borrar búsqueda",children:e.jsx(_t,{className:"w-3.5 h-3.5"})}),P.trim()&&oe.length>0&&e.jsx("ul",{className:"absolute top-full left-0 right-0 mt-1 bg-stone-950 border border-stone-700 rounded-xl shadow-2xl overflow-hidden z-50",children:oe.map((ue,Se)=>e.jsx("li",{children:e.jsxs("button",{onMouseDown:()=>Nt(ue),className:"w-full text-left px-4 py-2.5 hover:bg-stone-800 transition-colors flex items-center gap-3",children:[e.jsx("span",{className:"text-[#e8ff4a] text-xs shrink-0",children:ue._isSector?"📍":"🧗"}),e.jsxs("span",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"text-white text-sm font-medium truncate block",children:ue.zona}),e.jsxs("span",{className:"text-stone-500 text-xs",children:[ue._isSector&&ue.parent_school?`${ue.parent_school}
266 · `:"",ue.pais,ue.region?` · ${ue.region}`:""]})]}),ue._isSector&&e.jsx("span",{className:"text-stone-600 text-[10px] shrink-0 border border-stone-700 rounded px-1",children:"sector"})]})},ue.id||Se))}),P.trim()&&oe.length===0&&e.jsxs("div",{className:"absolute top-full left-0 right-0 mt-1 bg-stone-950 border border-stone-700 rounded-xl shadow-xl px-4 py-3 text-stone-500 text-sm z-50",children:['Sin resultados para "',P,'"']})]}):e.jsxs("button",{onClick:()=>navigate("/signup"),className:"w-full flex items-center gap-2 bg-stone-950/80 backdrop-blur border border-stone-600 rounded-full pl-3 pr-4 py-2 text-stone-500 hover:border-[#e8ff4a]/60 hover:text-stone-300 transition-all group text-left","aria-label":"Crear cuenta para buscar en el mapa",children:[e.jsx(vs,{className:"w-4 h-4 shrink-0 text-stone-500 group-hover:text-[#e8ff4a] transition-colors"}),e.jsx("span",{className:"flex-1 text-sm",children:"Buscar escuela o sector…"}),e.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full bg-[#e8ff4a] text-stone-950 shrink-0 whitespace-nowrap",children:"Crear cuenta"})]})})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-1.5 text-xs text-stone-500 mt-3",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"w-7 h-7 rounded-full bg-stone-950 border-2 border-[#e8ff4a] flex items-center justify-center flex-col",style:{lineHeight:1},children:[e.jsx("span",{style:{fontSize:"8px"},children:"🧗"}),e.jsx("span",{className:"font-bold text-[#e8ff4a] text-[9px]",children:"N"})]}),"Cluster — pulsa para acercar"]}),e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-7 h-7 rounded-full bg-stone-950 border-2 border-[#e8ff4a] flex items-center justify-center",children:e.jsxs("svg",{viewBox:"0 0 20 20",width:"14",height:"14",fill:"#e8ff4a",children:[e.jsx("path",{d:"M2 16 L7 8 L12 16 Z"}),e.jsx("path",{d:"M9 16 L14 4 L19 16 Z"}),e.jsx("rect",{x:"11",y:"12",width:"3.5",height:"4",rx:"1.7",fill:"#0c0a09"}),e.jsx("rect",{x:"2",y:"16",width:"17",height:"2",rx:"1",fill:"#e8ff4a"})]})}),"Escuela — ver sectores"]}),e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-7 h-7 rounded-full bg-[#1e3a5f] border-2 border-blue-400 flex items-center justify-center",children:e.jsxs("svg",{viewBox:"0 0 20 20",width:"14",height:"14",fill:"#60a5fa",children:[e.jsx("path",{d:"M10 3 L2 9.5 L4.5 9.5 L4.5 17 L15.5 17 L15.5 9.5 L18 9.5 Z"}),e.jsx("rect",{x:"8",y:"12",width:"4",height:"5",rx:"0.8",fill:"#1e3a5f"})]})}),"Casa disponible"]}),e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-7 h-7 rounded-full bg-[#1e3a5f] border-2 border-dashed border-blue-400 flex items-center justify-center",children:e.jsxs("svg",{viewBox:"0 0 20 20",width:"14",height:"14",fill:"#60a5fa",children:[e.jsx("path",{d:"M10 3 L2 9.5 L4.5 9.5 L4.5 17 L15.5 17 L15.5 9.5 L18 9.5 Z"}),e.jsx("rect",{x:"8",y:"12",width:"4",height:"5",rx:"0.8",fill:"#1e3a5f"})]})}),"Sé el primero aquí"]})]})]})]}),e.jsxs("div",{className:"flex-1 px-4 sm:px-6 pb-6 max-w-7xl mx-auto w-full",children:[e.jsxs("div",{className:"relative rounded-2xl overflow-hidden border border-stone-800 shadow-2xl",style:{height:"calc(100vh - 360px)",minHeight:"420px"},children:[e.jsx("div",{ref:i,className:"w-full h-full"}),!m&&!f&&e.jsx("div",{className:"absolute inset-0 bg-stone-950 flex items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-[#e8ff4a] border-t-transparent animate-spin"}),e.jsx("p",{className:"text-stone-400 text-sm",children:"Cargando mapa…"})]})}),f&&e.jsx("div",{className:"absolute inset-0 bg-stone-950 flex items-center justify-center",children:e.jsx("p",{className:"text-stone-400 text-sm",children:"No se pudo cargar el mapa. Comprueba tu conexión."})}),m&&e.jsxs("button",{onClick:()=>B(ue=>!ue),className:"absolute top-3 left-3 flex items-center gap-2 px-3 py-2 rounded-xl bg-stone-950/90 border border-stone-700 text-white text-xs font-semibold hover:border-[#e8ff4a]/50 transition-colors z-[998]",children:[e.jsx(Ko,{className:`w-3.5 h-3.5 transition-transform ${X?"rotate-180":""}`}),"Lista de la vista",Z.length>0&&e.jsx("span",{className:"ml-1 bg-[#e8ff4a] text-stone-950 text-[10px] font-bold px-1.5 py-0.5 rounded-full",children:Z.length})]}),h&&e.jsx(j4,{school:h.school,sectors:h.sectors,onClose:()=>j(null),onFlyTo:Va,resumen:"Pequeña escuela de caliza, con 9 vias  en el valle de Aisa, Huesca. Ambiente tranquilo, sectores para todos los niveles y entorno pirenaico privilegiado.",zona:"Las tiesas bajas"}),g&&e.jsx(_4,{home:g,onClose:()=>v(null),photoUrl:ye}),S&&!g&&!h&&e.jsx(N4,{zone:S,onClose:()=>N(null)}),X&&e.jsx(w4,{items:Z,onSelect:ss,onClose:()=>B(!1)})]}),e.jsxs("div",{className:"mt-8",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 mb-6",children:[e.jsxs("h2",{className:"font-display text-2xl font-bold text-white",children:[Aa?`${Ua.length} de ${Zt}`:Zt," Escuelas de escalada"]}),e.jsxs("div",{className:"relative",children:[e.jsx("label",{htmlFor:"crag-search",className:"sr-only",children:"Buscar escuela, país o de
266scripción"}),e.jsx(vs,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-stone-500"}),e.jsx("input",{id:"crag-search",type:"text",placeholder:"Buscar escuela, país…",value:Aa,onChange:ue=>ja(ue.target.value),className:"w-full sm:w-72 bg-stone-900 border border-stone-700 rounded-full pl-9 pr-9 py-2 text-sm text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a]/60 transition-colors"}),Aa&&e.jsx("button",{onClick:()=>ja(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-stone-400 hover:text-white transition-colors","aria-label":"Borrar búsqueda",children:e.jsx(_t,{className:"w-3.5 h-3.5"})})]})]}),Ua.length===0?e.jsxs("p",{className:"text-stone-500 text-sm text-center py-8",children:['No hay escuelas que coincidan con "',Aa,'"']}):e.jsx(z4,{zones:Ua,onFly:ue=>{r.current&&r.current.flyTo({center:[ue.lng,ue.lat],zoom:12,speed:1.4}),xe(ue)}})]})]})]})}const C4=["Europa","África","Asia","Oceanía","América del Norte","América del Sur"],E4={España:"Europa",Francia:"Europa",Italia:"Europa",Grecia:"Europa",Alemania:"Europa",Austria:"Europa",Suiza:"Europa",Eslovenia:"Europa",Croacia:"Europa",Portugal:"Europa",Noruega:"Europa",Suecia:"Europa",UK:"Europa",Islandia:"Europa","Rep. Checa":"Europa",Eslovaquia:"Europa",Rumanía:"Europa",Marruecos:"África",Sudáfrica:"África",Madagascar:"África",Tailandia:"Asia",China:"Asia",Japón:"Asia",India:"Asia",Israel:"Asia",Jordania:"Asia",Turquía:"Asia",Vietnam:"Asia",Nepal:"Asia",Omán:"Asia",Australia:"Oceanía","Nueva Zelanda":"Oceanía",EEUU:"América del Norte",Canadá:"América del Norte",México:"América del Norte",Perú:"América del Sur",Brasil:"América del Sur",Argentina:"América del Sur",Chile:"América del Sur"};function z4({zones:l,onFly:i}){const r={};l.forEach(m=>{const p=E4[m.pais]||"Otros";r[p]||(r[p]={}),r[p][m.pais]||(r[p][m.pais]=[]),r[p][m.pais].push(m)});const d=C4.filter(m=>r[m]);return r.Otros&&d.push("Otros"),e.jsx("div",{className:"space-y-10",children:d.map(m=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[e.jsx("h3",{className:"font-display text-xl font-bold text-[#e8ff4a] uppercase tracking-widest",children:m}),e.jsx("div",{className:"flex-1 h-px bg-[#e8ff4a]/20"}),e.jsxs("span",{className:"text-stone-600 text-xs",children:[Object.values(r[m]).flat().length," escuelas"]})]}),e.jsx("div",{className:"space-y-6",children:Object.keys(r[m]).sort().map(p=>{const f=r[m][p];return e.jsxs("div",{children:[e.jsxs("h4",{className:"text-stone-400 text-xs uppercase tracking-widest font-semibold mb-3 flex items-center gap-2",children:[e.jsx("span",{children:p}),e.jsx("span",{className:"text-stone-700",children:"·"}),e.jsx("span",{className:"text-stone-600",children:f.length})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-2",children:f.map((x,h)=>e.jsxs("button",{onClick:()=>i(x),className:"group flex items-start gap-3 p-3 rounded-xl bg-stone-900 border border-stone-800 hover:border-[#e8ff4a]/40 transition-all hover:bg-stone-800/80 text-left w-full",children:[e.jsx("span",{className:"mt-0.5 shrink-0",children:e.jsxs("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",fill:"#e8ff4a",opacity:"0.85",children:[e.jsx("path",{d:"M3 19 L8 10 L13 19 Z"}),e.jsx("path",{d:"M11 19 L17 6 L23 19 Z"}),e.jsx("rect",{x:"14",y:"15",width:"4",height:"4",rx:"2",fill:"#0c0a09"}),e.jsx("rect",{x:"3",y:"19",width:"20",height:"2",rx:"1",fill:"#e8ff4a"})]})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-white text-sm font-semibold leading-tight group-hover:text-[#e8ff4a] transition-colors truncate",children:x.zona}),e.jsx("p",{className:"text-stone-500 text-xs truncate",children:x.nivel})]})]},x.id||`${x.zona}-${h}`))})]},p)})})]},m))})}const Zx={rating_respect:"Respeto por la vivienda",rating_cleanliness_guest:"Limpieza y cuidado",rating_agreement_guest:"Cumplimiento de lo acordado",rating_communication_guest:"Comunicación"},Kx={rating_accuracy_host:"La casa correspondía con lo descrito",rating_communication_host:"Comunicación y atención",rating_agreement_host:"Cumplimiento de lo acordado",rating_condition:"Condiciones de la vivienda",rating_support:"Atención ante incidencias"};function Yx({value:l}){return e.jsx("div",{className:"flex gap-0.5",children:[1,2,3,4,5].map(i=>e.jsx("svg",{viewBox:"0 0 16 16",className:`w-3.5 h-3.5 ${l>=i?"fill-[#e8ff4a]":"fill-stone-700"}`,"aria-hidden":"true",children:e.jsx("path",{d:"M8 1l1.8 3.6L14 5.3l-3 2.9.7 4.1L8 10.4l-3.7 1.9.7-4.1-3-2.9 4.2-.7z"})},i))})}const k4=[{value:"principiante",label:"Principiante",range:"5a–6a"},{value:"intermedio",label:"Intermedio",range:"6a–7a"},{value:"avanzado",label:"Avanzado",range:"7a–8a"},{value:"experto",label:"Experto",range:"8a+"}],A4=[{value:"deportiva",label:"Deportiva"},{value:"tradicional",label:"Clásica / Tradicional"},{value:"bloque",label:"Bloque"},{value:"hielo",label:"Hielo y mixta"},{value:"via_ferrata",label:"Vía ferrata"},{value:"alpinismo",label:"Alpinismo"}
266];function M4(){const{user:l}=oa(),{t:i}=Lt(),r=Za(),d=b.useRef(null),[m,p]=b.useState(null),[f,x]=b.useState(!1),[h,j]=b.useState(!1),[g,v]=b.useState(""),[S,N]=b.useState(null),[_,z]=b.useState(null),[C,k]=b.useState([]),[T,w]=b.useState([]),A=new Date,[L,q]=b.useState(A.getFullYear()),[H,F]=b.useState(A.getMonth()),[U,J]=b.useState({name:"",bio:"",municipality:"",province:"",country_code:"ES",climbing_level:"",climbing_styles:[],blocked_dates:"",marketing_consent:!1,zonas_habituales:"",disponible_escalar:!1,lat:null,lng:null}),[O,X]=b.useState(!1);b.useEffect(()=>{if(!l){r("/login");return}const P=new AbortController;return D.collection("members").getOne(l.id,{signal:P.signal}).then($=>{p($),J({name:$.name||"",bio:$.bio||"",municipality:$.municipality||"",province:$.province||"",country_code:$.country_code||"ES",climbing_level:$.climbing_level||"",climbing_styles:$.climbing_styles||[],blocked_dates:$.blocked_dates||"",marketing_consent:$.marketing_consent||!1,zonas_habituales:$.zonas_habituales||"",disponible_escalar:$.disponible_escalar||!1,lat:$.lat||null,lng:$.lng||null}),$.avatar&&N(D.files.getURL($,$.avatar))}).catch($=>{$!=null&&$.isAbort||console.error($)}),D.collection("exchange_reviews").getFullList({filter:`reviewee = "${l.id}" && published = true`,signal:P.signal}).then($=>{k($.filter(oe=>oe.role==="host")),w($.filter(oe=>oe.role==="guest"))}).catch(()=>{}),()=>P.abort()},[l,r]),U.blocked_dates&&U.blocked_dates.split(",").map(P=>P.trim()).filter(Boolean);const B=P=>{var oe;const $=(oe=P.target.files)==null?void 0:oe[0];$&&(z($),N(URL.createObjectURL($)))},Z=P=>{J($=>({...$,climbing_styles:$.climbing_styles.includes(P)?$.climbing_styles.filter(oe=>oe!==P):[...$.climbing_styles,P]}))},te=async P=>{var $,oe;if(P.preventDefault(),!!l){x(!0),v("");try{try{await D.collection("members").authRefresh()}catch{}const de=new FormData;de.append("name",U.name),de.append("bio",U.bio),de.append("municipality",U.municipality),de.append("province",U.province),de.append("country_code",U.country_code),de.append("climbing_level",U.climbing_level),U.climbing_styles.length===0?de.append("climbing_styles",""):U.climbing_styles.forEach(ze=>de.append("climbing_styles",ze)),de.append("blocked_dates",U.blocked_dates),de.append("marketing_consent",U.marketing_consent?"true":"false"),de.append("zonas_habituales",U.zonas_habituales),de.append("disponible_escalar",U.disponible_escalar?"true":"false"),U.lat!==null&&de.append("lat",U.lat),U.lng!==null&&de.append("lng",U.lng),_&&de.append("avatar",_),await D.collection("members").update(l.id,de),j(!0),setTimeout(()=>j(!1),2500)}catch(de){const ze=(($=de==null?void 0:de.data)==null?void 0:$.data)||{},Ze=Object.entries(ze).map(([Ea,V])=>Ea+": "+((V==null?void 0:V.message)||V)).join(", ")||((oe=de==null?void 0:de.data)==null?void 0:oe.message)||(de==null?void 0:de.message)||"No se pudo guardar. Intenta de nuevo.";v(Ze),console.error("Profile save error:",de)}finally{x(!1)}}};return m?e.jsx("main",{className:"min-h-screen bg-stone-950 pt-16",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-10",children:[e.jsx("div",{className:"flex items-center gap-4 mb-10",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"font-display text-4xl sm:text-5xl font-bold text-white leading-tight",children:[i("profile.my")," ",e.jsx("span",{className:"text-[#e8ff4a]",children:i("profile.profile")})]}),e.jsx("p",{className:"text-stone-400 mt-1 text-sm",children:i("profile.identity_desc")})]})}),e.jsx("form",{onSubmit:te,noValidate:!0,children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5 flex flex-col items-center gap-4",children:[e.jsxs("div",{className:"relative w-32 h-32",children:[e.jsxs("button",{type:"button",onClick:()=>{var P;return(P=d.current)==null?void 0:P.click()},className:`relative group w-32 h-32 rounded-full overflow-hidden border-2 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-[#e8ff4a] focus:ring-offset-2 focus:ring-offset-stone-900 ${m.is_founder?"border-[#e8ff4a] shadow-[0_0_16px_2px_rgba(232,255,74,0.25)]":"border-stone-700 hover:border-[#e8ff4a]"}`,"aria-label":"Cambiar foto de perfil",children:[S?e.jsx("img",{src:S,alt:"Tu foto de perfil",className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full bg-stone-800 flex items-center justify-center",children:e.jsxs("svg",{viewBox:"0 0 48 48",className:"w-16 h-16 text-stone-600",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[e.jsx("circle",{cx:"24",cy:"18",r:"8"}),e.jsx("path",{d:"M8 42 C8 32 40 32 40 42"})]})}),e.jsxs("div",{className:"absolute inset-0 bg-stone-950/70 opacity-0 group-hover:opacity-100 transition-opacity flex flex-col items-center justify-center gap-1",children:[e.jsx("svg",{viewBox:"0 0 24 24",className:"w-7 h-7 text-[#e8ff4a]",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-
2665 5M12 3v12"})}),e.jsx("span",{className:"text-[#e8ff4a] text-xs font-semibold",children:"Subir foto"})]})]}),m.is_founder&&e.jsx("div",{className:"absolute -bottom-1 -right-1 w-9 h-9 rounded-full bg-stone-950 border-2 border-[#e8ff4a] flex items-center justify-center shadow-lg",title:"Socio Fundador","aria-label":"Insignia Socio Fundador",children:e.jsx("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",fill:"none",children:e.jsx("path",{d:"M12 2L9 8H3l5 4-2 7 6-4 6 4-2-7 5-4h-6z",fill:"#e8ff4a",stroke:"#c8df00",strokeWidth:"0.5"})})})]}),e.jsx("input",{ref:d,type:"file",accept:"image/jpeg,image/png,image/webp,image/gif",className:"sr-only",onChange:B,"aria-label":"Subir foto de perfil"}),_?e.jsx("p",{className:"text-xs text-[#e8ff4a] text-center",children:'Foto lista — pulsa "Guardar cambios" para publicarla'}):e.jsx("button",{type:"button",onClick:()=>{var P;return(P=d.current)==null?void 0:P.click()},className:"text-xs text-stone-400 hover:text-[#e8ff4a] transition-colors underline underline-offset-2",children:S?"Cambiar foto":"Añadir foto de perfil"}),m.is_founder&&e.jsx("div",{className:"w-full border-t border-stone-800 pt-4",children:e.jsxs("div",{className:"flex flex-col items-center gap-1.5 bg-gradient-to-b from-[#e8ff4a]/10 to-[#e8ff4a]/5 border border-[#e8ff4a]/40 rounded-2xl px-4 py-3",children:[e.jsxs("svg",{viewBox:"0 0 32 32",className:"w-8 h-8",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"16",cy:"16",r:"14",fill:"#1c1917",stroke:"#e8ff4a",strokeWidth:"1.5"}),e.jsx("path",{d:"M16 6l2.5 5.5L24 12.5l-4 4 1 5.5L16 19.5 11 22l1-5.5-4-4 5.5-1z",fill:"#e8ff4a",stroke:"#c8df00",strokeWidth:"0.3"})]}),e.jsx("span",{className:"text-[#e8ff4a] text-xs font-bold uppercase tracking-[0.15em] leading-none",children:"Socio Fundador"}),e.jsx("span",{className:"text-stone-500 text-[10px] leading-none",children:"Entre los 100 primeros"})]})}),e.jsx("div",{className:"w-full border-t border-stone-800 pt-4",children:e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[e.jsxs("div",{className:"relative shrink-0",children:[e.jsx("input",{type:"checkbox",className:"sr-only",checked:U.marketing_consent,onChange:P=>J($=>({...$,marketing_consent:P.target.checked}))}),e.jsx("div",{className:`w-10 h-6 rounded-full transition-colors ${U.marketing_consent?"bg-[#e8ff4a]":"bg-stone-700"}`}),e.jsx("div",{className:`absolute top-1 w-4 h-4 rounded-full bg-stone-950 transition-all ${U.marketing_consent?"left-5":"left-1"}`})]}),e.jsx("span",{className:"text-stone-400 text-xs leading-snug",children:"Quiero recibir novedades y ofertas de la comunidad"})]})})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5",children:[e.jsx("p",{className:"text-stone-400 text-xs uppercase tracking-widest font-semibold mb-3",children:"Nivel de escalada"}),e.jsx("div",{className:"flex flex-col gap-2",children:k4.map(P=>e.jsxs("label",{className:["flex items-center justify-between px-3 py-2 rounded-xl border cursor-pointer transition-all",U.climbing_level===P.value?"border-[#e8ff4a] bg-[#e8ff4a]/10":"border-stone-800 hover:border-stone-600"].join(" "),children:[e.jsx("span",{className:`text-sm font-medium ${U.climbing_level===P.value?"text-white":"text-stone-400"}`,children:P.label}),e.jsx("span",{className:"text-xs text-stone-500",children:P.range}),e.jsx("input",{type:"radio",name:"climbing_level",value:P.value,checked:U.climbing_level===P.value,onChange:()=>J($=>({...$,climbing_level:P.value})),className:"sr-only"})]},P.value))})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5",children:[e.jsx("p",{className:"text-stone-400 text-xs uppercase tracking-widest font-semibold mb-3",children:"Estilos que practicas"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:A4.map(P=>e.jsxs("label",{className:["px-3 py-1.5 rounded-full border text-xs font-semibold cursor-pointer transition-all",U.climbing_styles.includes(P.value)?"border-[#e8ff4a] bg-[#e8ff4a] text-stone-950":"border-stone-700 text-stone-400 hover:border-stone-500"].join(" "),children:[P.label,e.jsx("input",{type:"checkbox",value:P.value,checked:U.climbing_styles.includes(P.value),onChange:()=>Z(P.value),className:"sr-only"})]},P.value))})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5",children:[e.jsx("p",{className:"text-stone-400 text-xs uppercase tracking-widest font-semibold mb-3",children:"Compañero de escalada"}),e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer mb-4",children:[e.jsx("div",{className:`relative w-10 h-5 rounded-full transition-colors ${U.disponible_escalar?"bg-[#e8ff4a]":"bg-stone-700"}`,children:e.jsx("div",{className:`absolute top-0.5 w-4 h-4 bg-white rounded-full shadow transition-transform ${U.disponible_escalar?"translate-x-5":"translate-x-0.5"}`})}),e.jsx("input",{type:"checkbox",className:"sr-only",checked:U.disponible_escalar,onChange:P=>J($=>({...$,disponible_escalar:P.target.checked}))}),e.jsx("span",{className:"text-sm text-stone-300",children:"Disponible para compartir escaladas"})]}),U.disponible_escalar&&e.jsxs("div",{children:[e.jsx("label",{htmlFor:"zonas-habituales",className:"block text-sm text-stone-400 mb-1.5",children:"Escuelas y zonas donde sueles escalar"}),e.jsx("textarea",{id:"zonas-habituales",value:U.zonas_habituales,onChange:P=>J($=>({...$,zonas_habituales:P.target.value})),placeholder:"Ej: Atxarte, Baltzola, Galdames, costa vasca…",rows:2,className:"w-full bg-stone-800 border border-stone-700 rounded-xl px-3 py-2 text-sm text-stone-100 placeholder-stone-600 focus:outline-hidden focu
266s:border-[#e8ff4a] resize-none"}),e.jsx("p",{className:"text-xs text-stone-500 mt-1.5",children:"Esta información se mostrará en tu perfil para que otros escaladores sepan si puedes acompañarles."})]})]})]}),e.jsxs("div",{className:"lg:col-span-2 flex flex-col gap-5",children:[e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5",children:[e.jsx("p",{className:"text-stone-400 text-xs uppercase tracking-widest font-semibold mb-4",children:"Información básica"}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-name",className:"block text-sm text-stone-300 font-medium mb-1.5",children:"Nombre"}),e.jsx("input",{id:"profile-name",type:"text",value:U.name,onChange:P=>J($=>({...$,name:P.target.value})),placeholder:"Tu nombre",className:"w-full bg-stone-800 border border-stone-700 rounded-xl px-4 py-2.5 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a]/60 text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-bio",className:"block text-sm text-stone-300 font-medium mb-1.5",children:"Bio escalador/a"}),e.jsx("textarea",{id:"profile-bio",value:U.bio,onChange:P=>J($=>({...$,bio:P.target.value})),placeholder:"Cuéntanos dónde escalas, qué buscas en un intercambio, las escuelas que más te gustan…",rows:4,className:"w-full bg-stone-800 border border-stone-700 rounded-xl px-4 py-2.5 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a]/60 text-sm resize-none"})]})]})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5",children:[e.jsx("p",{className:"text-stone-400 text-xs uppercase tracking-widest font-semibold mb-4",children:"Ubicación"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-municipality",className:"block text-xs text-stone-400 font-medium mb-1.5",children:"Municipio"}),e.jsx("input",{id:"profile-municipality",type:"text",value:U.municipality,onChange:P=>J($=>({...$,municipality:P.target.value})),placeholder:"Ej: Málaga",className:"w-full bg-stone-800 border border-stone-700 rounded-xl px-3 py-2.5 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a]/60 text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-province",className:"block text-xs text-stone-400 font-medium mb-1.5",children:"Provincia / Región"}),e.jsx("input",{id:"profile-province",type:"text",value:U.province,onChange:P=>J($=>({...$,province:P.target.value})),placeholder:"Ej: Andalucía",className:"w-full bg-stone-800 border border-stone-700 rounded-xl px-3 py-2.5 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a]/60 text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-country",className:"block text-xs text-stone-400 font-medium mb-1.5",children:"País"}),e.jsx("select",{id:"profile-country",value:U.country_code,onChange:P=>J($=>({...$,country_code:P.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-xl px-3 py-2.5 text-white focus:outline-none focus:border-[#e8ff4a]/60 text-sm",children:[["ES","🇪🇸 España"],["FR","🇫🇷 Francia"],["IT","🇮🇹 Italia"],["DE","🇩🇪 Alemania"],["PT","🇵🇹 Portugal"],["GR","🇬🇷 Grecia"],["US","🇺🇸 EEUU"],["CA","🇨🇦 Canadá"],["AU","🇦🇺 Australia"],["UK","🇬🇧 Reino Unido"],["CH","🇨🇭 Suiza"],["AT","🇦🇹 Austria"],["NO","🇳🇴 Noruega"],["TH","🇹🇭 Tailandia"],["MA","🇲🇦 Marruecos"],["ZA","🇿🇦 Sudáfrica"],["AR","🇦🇷 Argentina"],["CL","🇨🇱 Chile"],["JP","🇯🇵 Japón"],["CN","🇨🇳 China"],["IN","🇮🇳 India"],["OTHER","🌍 Otro"]].map(([P,$])=>e.jsx("option",{value:P,children:$},P))})]})]}),e.jsx("button",{type:"button",disabled:O,onClick:async()=>{X(!0),"geolocation"in navigator?navigator.geolocation.getCurrentPosition(P=>{J($=>({...$,lat:P.coords.latitude,lng:P.coords.longitude})),X(!1)},()=>{X(!1)}):X(!1)},className:"w-full bg-stone-800 hover:bg-stone-700 text-stone-300 hover:text-stone-100 border border-stone-700 rounded-xl px-3 py-2 text-xs font-medium transition-colors disabled:opacity-50",children:O?"Localizando…":U.lat?`📍 ${U.lat.toFixed(2)}, ${U.lng.toFixed(2)}`:"📍 Usar mi ubicación actual"})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{type:"submit",disabled:f,className:"px-8 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-[#f0ff70] transition-colors disabled:opacity-50",children:f?"Guardando…":"Guardar perfil"}),h&&e.jsxs("span",{className:"text-green-400 text-sm font-medium flex items-center gap-1.5",children:[e.jsx("svg",{viewBox:"0 0 20 20",className:"w-4 h-4",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M4 10 L8 14 L16 6",strokeLinecap:"round",strokeLinejoin:"round"})}),"Guardado"]}),g&&e.jsx("span",{className:"text-red-400 text-sm",children:g})]})]})]})}),e.jsxs("div",{className:"mt-16 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-2xl sm:text-3xl font-bold text-white mb-1",children:"Valoraciones"}),e.jsx("p",{className:"text-stone-500 text-sm",children:"Lo que otros miembros han dicho de ti — como huésped y como anfitrión. Solo se publican cuando las dos partes han valorado, para que nadie se condicione."})]}),e.jsxs("div",{className:"grid sm:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[e.jsx("div",{className:"w-9 h-9 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 flex items-center justify-center",children:e.jsx("span",{className:"text-base",children:"🏠"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-white font-bold text-sm",children:"Como huésped"}),e.jsx("div",{className:"text-stone-500 text-xs",children:C.length>0?`${C.length} valoración${C.length>1?"es":""}`:"Lo que han dicho los anfitriones que te acogieron"})]})]}),C.length===0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-3 mb-5",children:Object.values(Zx).map(P=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-stone-500 text-xs",children:P}),e.jsx("div",{className:"flex gap-0.5",children:[1,2,3,4,5].map($=>e.jsx("div",{className:"w-3.5 h-3.5 rounded-sm bg-stone-800 border border-stone-700"},$))})]},P))}),e.jsx("p",{className:"text-stone-600 text-xs italic",children:"Sin valoraciones todavía — aparecerán aquí tras tu primer intercambio como huésped."})]}):e.jsx("div",{className:"space-y-5",children:C.map(P=>e.jsxs("div",{className:"border-t border-stone-800 pt-4 first:border-0 first:pt-0",children:[e.jsx("div",{className:"space-y-2 mb-3",children:Object.entries(Zx).map(([$,oe])=>P[$]>0&&e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-stone-400 text-xs",children:oe}),e.jsx(Yx,{value:P[$]})]},$))}),P.comment&&e.jsxs("p",{className:"text-stone-400 text-xs italic",children:['"',P.comment,'"']}),e.jsx("p",{className:"text-stone-600 text-xs mt-1",children:new Date(P.created).toLocaleDateString("es-ES",{month:"long",year:"numeric"})})]},P.id))})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[e.jsx("div",{className:"w-9 h-9 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 flex items-center justify-center",children:e.jsx("span",{className:"text-base",children:"🧗"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-white font-bold text-sm",children:"Como anfitrión"}),e.jsx("div",{className:"text-stone-500 text-xs",children:T.length>0?`${T.length} valoración${T.length>1?"es":""}`:"Lo que han dicho los huéspedes que acogiste"})]})]}),T.length===0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-3 mb-5",children:Object.values(Kx).map(P=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-stone-500 text-xs",children:P}),e.jsx("div",{className:"flex gap-0.5",children:[1,2,3,4,5].map($=>e.jsx("div",{className:"w-3.5 h-3.5 rounded-sm bg-stone-800 border border-stone-700"},$))})]},P))}),e.jsx("p",{className:"text-stone-600 text-xs italic",children:"Sin valoraciones todavía — aparecerán aquí tras tu primer intercambio como anfitrión."})]}):e.jsx("div",{className:"space-y-5",children:T.map(P=>e.jsxs("div",{className:"border-t border-stone-800 pt-4 first:border-0 first:pt-0",children:[e.jsx("div",{className:"space-y-2 mb-3",children:Object.entries(Kx).map(([$,oe])=>P[$]>0&&e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-stone-400 text-xs",children:oe}),e.jsx(Yx,{value:P[$]})]},$))}),P.comment&&e.jsxs("p",{className:"text-stone-400 text-xs italic",children:['"',P.comment,'"']}),e.jsx("p",{className:"text-stone-600 text-xs mt-1",children:new Date(P.created).toLocaleDateString("es-ES",{month:"long",year:"numeric"})})]},P.id))})]})]})]})]})}):e.jsx("main",{className:"min-h-screen bg-stone-950 pt-16 flex items-center justify-center",children:e.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-[#e8ff4a] border-t-transparent animate-spin"})})}async function Il(l){const i=await D.collection("members").getOne(l,{fields:"id,cp_balance,cp_blocked"});return{available:i.cp_balance||0,blocked:i.cp_blocked||0,total:(i.cp_balance||0)+(i.cp_blocked||0)}}async function Mr({memberId:l,amount:i,type:r,status:d,requestId:m,note:p}){await D.collection("cp_transactions").create({member:l,amount:i,type:r,status:d,request:m||null,note:p||""})}async function T4({requestId:l,huespedId:i,amount:r}){const d=await Il(i);return d.available<r?{ok:!1,error:`Saldo insuficiente. Disponibles: ${d.available} CP, necesarios: ${r} CP.`}:(await D.collection("members").update(i,{cp_balance:d.available-r,cp_blocked:d.blocked+r}),await Mr({memberId:i,amount:-r,type:"block",status:"blocked",requestId:l,note:`CP bloqueados para solicitud ${l}`}),{ok:!0})}async function L4({requestId:l,huespedId:i,anfitrionId:r,amount:d}){const m=await Il(i),p=await Il(r);return await D.collection("members").update(i,{cp_blocked:Math.max(0,m.blocked-d)}),await D.collection("members").update(r,{cp_balance:p.available+d}),await Mr({memberId:i,amount:-d,type:"spend",status:"completed",requestId:l,note:`Estancia completada — ${d} CP transferidos`}),await Mr({memberId:r,amount:+d,type:"earn",status:"completed",requestId:l,note:`Estancia completada — ${d} CP recibidos`}
266),await D.collection("exchange_requests").update(l,{cp_settled:!0}),{ok:!0}}async function R4({requestId:l,huespedId:i,amount:r}){const d=await Il(i);return await D.collection("members").update(i,{cp_balance:d.available+r,cp_blocked:Math.max(0,d.blocked-r)}),await Mr({memberId:i,amount:+r,type:"unblock",status:"cancelled",requestId:l,note:`CP devueltos — solicitud ${l} rechazada/cancelada`}),{ok:!0}}/**
267 * @license lucide-react v1.47.0 - ISC
268 *
269 * This source code is licensed under the ISC license.
270 * See the LICENSE file in the root directory of this source tree.
271 */const Z0={name:"house",size:24,node:[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],aliases:["home"]};Z0.node;const gs=Ie(Z0);/**
272 * @license lucide-react v1.47.0 - ISC
273 *
274 * This source code is licensed under the ISC license.
275 * See the LICENSE file in the root directory of this source tree.
276 */const K0={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};K0.node;const Os=Ie(K0);/**
277 * @license lucide-react v1.47.0 - ISC
278 *
279 * This source code is licensed under the ISC license.
280 * See the LICENSE file in the root directory of this source tree.
281 */const Y0={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};Y0.node;const Qx=Ie(Y0);/**
282 * @license lucide-react v1.47.0 - ISC
283 *
284 * This source code is licensed under the ISC license.
285 * See the LICENSE file in the root directory of this source tree.
286 */const Q0={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};Q0.node;const q4=Ie(Q0);/**
287 * @license lucide-react v1.47.0 - ISC
288 *
289 * This source code is licensed under the ISC license.
290 * See the LICENSE file in the root directory of this source tree.
291 */const J0={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};J0.node;const bn=Ie(J0);/**
292 * @license lucide-react v1.47.0 - ISC
293 *
294 * This source code is licensed under the ISC license.
295 * See the LICENSE file in the root directory of this source tree.
296 */const X0={name:"bookmark",size:24,node:[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]]};X0.node;Ie(X0);/**
297 * @license lucide-react v1.47.0 - ISC
298 *
299 * This source code is licensed under the ISC license.
300 * See the LICENSE file in the root directory of this source tree.
301 */const W0={name:"mountain",size:24,node:[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]};W0.node;const eb=Ie(W0),D4=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],O4=["L","M","X","J","V","S","D"];function wu(l,i,r){return`${l}-${String(i+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`}function B4({year:l,month:i,available:r,blocked:d,onToggle:m,onToggleMonthAvail:p,onToggleMonthBlock:f}){const h=(new Date(l,i,1).getDay()+6)%7,j=new Date(l,i+1,0).getDate(),g=new Date,v=wu(g.getFullYear(),g.getMonth(),g.getDate()),S=[];for(let C=1;C<=j;C++){const k=wu(l,i,C);k>=v&&S.push(k)}const N=S.length>0&&S.every(C=>r.has(C)),_=S.length>0&&S.every(C=>d.has(C)),z=[];for(let C=0;C<h;C++)z.push(null);for(let C=1;C<=j;C++)z.push(C);return e.jsxs("div",{className:"bg-stone-900 rounded-2xl border border-stone-800 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 gap-2 flex-wrap",children:[e.jsxs("h3",{className:"text-white font-bold tracking-wide text-sm",children:[D4[i]," ",l]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>p(S,N),className:`text-xs px-2 py-1 rounded-full border transition-all font-semibold ${N?"border-green-500 bg-green-600/20 text-green-400":"border-stone-600 text-stone-400 hover:border-green-500/50 hover:text-green-400"}`,children:"✓ Disp."}),e.jsx("button",{onClick:()=>f(S,_),className:`text-xs px-2 py-1 rounded-full border transition-all font-semibold ${_?"border-red-500 bg-red-600/20 text-red-400":"border-stone-600 text-stone-400 hover:border-red-500/50 hover:text-red-400"}`,children:"✗ No disp."})]})]}),e.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:O4.map(C=>e.jsx("div",{className:"text-center text-stone-500 text-xs font-semibold py-1",children:C},C))}),e.jsx("div",{className:"grid grid-cols-7 gap-1",children:z.map((C,k)=>{if(!C)return e.jsx("div",{},`empty-${k}`);const T=wu(l,i,C),w=T<v,A=r.has(T),L=d.has(T);return e.jsx("button",{onClick:()=>!w&&m(T),disabled:w,title:A?"Disponible — clic para quitar":L?"No disponible — clic para quitar":"Sin definir — clic para marcar disponible",className:`
302                aspect-square rounded-lg text-xs font-medium transition-all
303                ${w?"text-stone-700 cursor-not-allowed":A?"bg-green-600/80 text-white hover:bg-green-500 border border-green-500":L?"bg-red-600/80 text-white hover:bg-red-500 border border-red-500":"bg-stone-800 text-stone-400 hover:bg-stone-700 hover:text-stone-200 border border-stone-700"}
304              `,children:C},T)})})]})}function P4({home:l}){const i=new Date,[r,d]=b.useState({year:i.getFullYear(),month:i.getMonth()}),[m,p]=b.useState(new Set),[f,x]=b.useState(new Set),[h,j]=b.useState(!1),[g,v]=b.useState(!1);b.useEffect(()=>{try{const L=l==null?void 0:l.blocked_dates,q=L?typeof L=="string"?JSON.parse(L):L:{};Array.isArray(q)?(x(new Set(q)),p(new Set)):(x(new Set(Array.isArray(q.blocked)?q.blocked:[])),p(new Set(Array.isArray(q.available)?q.available:[])))}catch{x(new Set),p(new Set)}},[l==null?void 0:l.id]);const S=L=>{p(q=>{const H=new Set(q);return H.has(L)?(H.delete(L),x(F=>{const U=new Set(F);return U.add(L),U})):x(F=>{const U=new Set(F);return U.has(L)?U.delete(L):H.add(L),U}),H}),v(!1)},N=(L,q)=>{p(H=>{const F=new Set(H);
304return q?L.forEach(U=>F.delete(U)):(L.forEach(U=>F.add(U)),x(U=>{const J=new Set(U);return L.forEach(O=>J.delete(O)),J})),F}),v(!1)},_=(L,q)=>{x(H=>{const F=new Set(H);return q?L.forEach(U=>F.delete(U)):(L.forEach(U=>F.add(U)),p(U=>{const J=new Set(U);return L.forEach(O=>J.delete(O)),J})),F}),v(!1)},z=async()=>{j(!0);try{await D.collection("homes").update(l.id,{blocked_dates:JSON.stringify({available:[...m],blocked:[...f]})}),v(!0),setTimeout(()=>v(!1),3e3)}catch(L){console.error(L)}finally{j(!1)}},C=()=>{d(({year:L,month:q})=>q===0?{year:L-1,month:11}:{year:L,month:q-1})},k=()=>{d(({year:L,month:q})=>q===11?{year:L+1,month:0}:{year:L,month:q+1})},T=[];for(let L=0;L<3;L++){let q=r.month+L,H=r.year;q>11&&(q-=12,H+=1),T.push({year:H,month:q})}const w=m.size,A=f.size;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4 text-sm flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded bg-stone-800 border border-stone-700"}),e.jsx("span",{className:"text-stone-400",children:"Sin definir"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded bg-green-600/80 border border-green-500"}),e.jsx("span",{className:"text-stone-400",children:"Disponible"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded bg-red-600/80 border border-red-500"}),e.jsx("span",{className:"text-stone-400",children:"No disponible"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:C,className:"px-3 py-1.5 rounded-lg border border-stone-700 text-stone-400 hover:border-[#e8ff4a] hover:text-[#e8ff4a] transition-colors text-sm",children:"← Anterior"}),e.jsx("button",{onClick:k,className:"px-3 py-1.5 rounded-lg border border-stone-700 text-stone-400 hover:border-[#e8ff4a] hover:text-[#e8ff4a] transition-colors text-sm",children:"Siguiente →"})]})]}),e.jsx("p",{className:"text-stone-500 text-xs",children:"Toca un día para pasar de sin definir → disponible (verde) → no disponible (rojo) → sin definir. Usa los botones del mes para marcar todo de un clic."}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:T.map(({year:L,month:q})=>e.jsx(B4,{year:L,month:q,available:m,blocked:f,onToggle:S,onToggleMonthAvail:N,onToggleMonthBlock:_},`${L}-${q}`))}),e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4 pt-2 border-t border-stone-800",children:[e.jsx("p",{className:"text-stone-400 text-sm",children:w===0&&A===0?"El calendario está en blanco — marca los días disponibles en verde o los bloqueados en rojo.":`${w} disponible${w!==1?"s":""} · ${A} no disponible${A!==1?"s":""}`}),e.jsx("button",{onClick:z,disabled:h,className:"px-6 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-[#f0ff70] transition-colors disabled:opacity-50",children:h?"Guardando…":g?"✓ Guardado":"Guardar disponibilidad"})]})]})}async function ab(l){if(!l)return null;const i=l.toLowerCase().trim();for(const[r,d]of Object.entries(P0))if(i.includes(r))return d;try{const r=encodeURIComponent(l+", España"),m=await(await fetch(`https://nominatim.openstreetmap.org/search?q=${r}&format=json&limit=1`,{headers:{"Accept-Language":"es","User-Agent":"climbandhome/1.0"}})).json();if(m&&m[0])return[parseFloat(m[0].lat),parseFloat(m[0].lon)];const f=await(await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(l)}&format=json&limit=1`,{headers:{"Accept-Language":"es","User-Agent":"climbandhome/1.0"}})).json();if(f&&f[0])return[parseFloat(f[0].lat),parseFloat(f[0].lon)]}catch{}return null}function Gn(l){if(!l)return"";const i=Date.now()-new Date(l).getTime(),r=Math.floor(i/6e4);if(r<2)return"hace un momento";if(r<60)return`hace ${r} minutos`;const d=Math.floor(r/60);if(d<24)return`hace ${d} hora${d>1?"s":""}`;const m=Math.floor(d/24);if(m<30)return`hace ${m} día${m>1?"s":""}`;const p=Math.floor(m/30);if(p<12)return`hace ${p} mes${p>1?"es":""}`;const f=Math.floor(p/12);return`hace ${f} año${f>1?"s":""}`}
304function U4({value:l,onChange:i}){const[r,d]=b.useState(0);return e.jsx("div",{className:"flex gap-0.5",role:"group",children:[1,2,3,4,5].map(m=>e.jsx("button",{type:"button",onClick:()=>i(m),onMouseEnter:()=>d(m),onMouseLeave:()=>d(0),"aria-label":`${m} estrellas`,className:"focus:outline-none",children:e.jsx("svg",{viewBox:"0 0 16 16",className:`w-5 h-5 transition-colors ${(r||l)>=m?"fill-[#e8ff4a]":"fill-stone-700 hover:fill-[#e8ff4a]/50"}`,"aria-hidden":"true",children:e.jsx("path",{d:"M8 1l1.8 3.6L14 5.3l-3 2.9.7 4.1L8 10.4l-3.7 1.9.7-4.1-3-2.9 4.2-.7z"})})},m))})}function H4({request:l,currentUserId:i,revieweeId:r,role:d,onDone:m}){const p=d==="guest"?HOST_CATEGORIES:GUEST_CATEGORIES,f=Object.fromEntries(p.map(L=>[L.key,0])),[x,h]=b.useState(f),[j,g]=b.useState(""),[v,S]=b.useState(!1),[N,_]=b.useState(""),[z,C]=b.useState(!1),k=Math.round(Object.values(x).reduce((L,q)=>L+q,0)/p.length)||0,T=async L=>{var H;L.preventDefault();const q=p[0].key;if(!x[q]){_(t("dashboard.reviews.validate_rating"));return}S(!0),_("");try{await D.collection("exchange_reviews").create({exchange_request:l.id,reviewer:i,reviewee:r,role:d,rating:k,...x,comment:j,published:!1});const F=await D.collection("exchange_reviews").getFullList({filter:`exchange_request = "${l.id}"`});F.length>=2&&await Promise.all(F.map(U=>D.collection("exchange_reviews").update(U.id,{published:!0}))),C(!0),m()}catch(F){_(((H=F==null?void 0:F.data)==null?void 0:H.message)||(F==null?void 0:F.message)||t("dashboard.reviews.save_error"))}S(!1)};if(z)return e.jsxs("div",{className:"mt-3 p-4 rounded-xl bg-stone-800 border border-green-500/30 text-sm",children:[e.jsx("p",{className:"text-green-400 font-semibold mb-1",children:t("dashboard.reviews.sent_success")}),e.jsx("p",{className:"text-stone-400 text-xs",children:t("dashboard.reviews.sent_notice")})]});const w=d==="guest"?t("dashboard.reviews.guest_title"):t("dashboard.reviews.host_title"),A=d==="guest"?t("dashboard.reviews.guest_subtitle"):t("dashboard.reviews.host_subtitle");return e.jsxs("form",{onSubmit:T,className:"mt-3 p-4 rounded-xl bg-stone-800 border border-stone-700 flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-200 text-sm font-bold",children:w}),e.jsxs("p",{className:"text-stone-500 text-xs mt-0.5",children:[A,". Tu valoración se publicará cuando la otra parte también haya valorado."]})]}),e.jsx("div",{className:"flex flex-col gap-3",children:p.map(L=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"text-stone-400 text-xs w-48 shrink-0",children:L.label}),e.jsx(U4,{value:x[L.key],onChange:q=>h(H=>({...H,[L.key]:q}))})]},L.key))}),e.jsx("textarea",{rows:2,value:j,onChange:L=>g(L.target.value),placeholder:t("dashboard.reviews.comment_placeholder"),className:"w-full px-3 py-2 rounded-lg bg-stone-900 border border-stone-700 text-white placeholder-stone-500 text-sm focus:outline-none focus:border-[#e8ff4a]/50 resize-none"}),N&&e.jsx("p",{className:"text-red-400 text-xs",role:"alert",children:N}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",disabled:v,className:"px-4 py-1.5 rounded-full bg-[#e8ff4a] text-stone-950 text-sm font-bold hover:bg-[#f0ff70] transition-colors disabled:opacity-50",children:v?t("dashboard.reviews.sending"):t("dashboard.reviews.send_rating")}),e.jsx("button",{type:"button",onClick:m,className:"px-4 py-1.5 rounded-full border border-stone-600 text-stone-400 text-sm hover:border-stone-400 transition-colors",children:"Cancelar"})]})]})}function V4({onSaved:l}){var q,H,F;const{user:i}=oa(),{t:r}=Lt(),[d,m]=b.useState({title:"",description:"",location:"",country:"",max_guests:"",climbing_areas:"",difficulty_levels:[],available:!0,cp_extras:[],accommodation_type:"vivienda_completa",room_info:{bath_private:!1,kitchen_shared:!0,host_present:!1,common_areas:"",house_rules:"",bed_type:"doble"}}),[p,f]=b.useState([]),[x,h]=b.useState({}),[j,g]=b.useState(!1),v=["Alpinismo","Escalada Clasica","Escalada Deportiva","Rocodromo","Senderismo","Esqui de Montana","BTT"],S={"Escalada Clasica":"Escalada Clásica",Rocodromo:"Rocódromo","Esqui de Montana":"Esquí de Montaña"},N=U=>S[U]||U,_=[{key:"escuela_cercana",label:r("dashboard.extras.escuela_cercana"),cp:15},{key:"parking_bicis",label:r("dashboard.extras.parking_bicis"),cp:5},{key:"rocodromo_cercano",label:r("dashboard.extras.rocodromo_cercano"),cp:10},{key:"wifi",label:r("dashboard.extras.wifi"),cp:5},{key:"mascotas",label:r("dashboard.extras.mascotas"),cp:5}],z=U=>{const J=parseInt(U)||1;return J<=2?100:J<=4?120:J<=6?150:200},C=()=>{const U=z(d.max_guests),J=(d.cp_extras||[]).reduce((O,X)=>{const B=_.find(Z=>Z.key===X);return O+(B?B.cp:0)},0);return U+Math.min(J,40)},k=U=>{m(J=>({...J,cp_extras:(J.cp_extras||[]).includes(U)?(J.cp_extras||[]).filter(O=>O!==U):[...J.cp_extras||[],U]}))},T=U=>{m(J=>({...J,difficulty_levels:J.difficulty_levels.includes(U)?J.difficulty_levels.filter(O=>O!==U):[...J.difficulty_levels,U]}))},w=()=>{const U={};return d.title.trim()||(U.title=r("dashboard.homes.title_required")),d.location.trim()||(U.location=r("dashboard.homes.location_required")),U},A=async U=>{var O,X,B,Z;
304if(U.preventDefault(),!(i!=null&&i.id)){h({general:r("dashboard.homes.must_login")});return}const J=w();if(Object.keys(J).length>0){h(J);return}g(!0),h({});try{try{await D.collection("members").authRefresh()}catch{}const te=new FormData;te.append("owner",i.id),te.append("title",d.title),te.append("description",d.description),te.append("location",d.location),te.append("country",d.country),d.max_guests&&te.append("max_guests",d.max_guests),te.append("climbing_areas",d.climbing_areas),d.difficulty_levels.length===0?te.append("difficulty_levels",""):d.difficulty_levels.forEach(de=>te.append("difficulty_levels",de)),te.append("available",d.available?"true":"false"),te.append("cp_extras",JSON.stringify(d.cp_extras||[])),te.append("pets",(d.cp_extras||[]).includes("mascotas")?"true":"false"),te.append("accommodation_type",d.accommodation_type||"vivienda_completa"),te.append("room_info",JSON.stringify(d.room_info||{}));const P=d.accommodation_type==="habitacion_privada"?Math.round(C()*.6):C();te.append("cp_value",P),p.forEach(de=>te.append("photos",de));const $=[d.location,d.country].filter(Boolean).join(", "),oe=await ab($);oe&&(te.append("lat",oe[0]),te.append("lng",oe[1])),await D.collection("homes").create(te),await Aj(i.id),l()}catch(te){const P=((O=te==null?void 0:te.data)==null?void 0:O.data)||{},oe=Object.entries(P).map(([de,ze])=>de+": "+((ze==null?void 0:ze.message)||ze)).join(", ")||((X=te==null?void 0:te.data)==null?void 0:X.message)||(te==null?void 0:te.message)||"No se pudo guardar. Inténtalo de nuevo.";h({general:oe}),console.error("AddHome error:",(B=te==null?void 0:te.data)==null?void 0:B.data,(Z=te==null?void 0:te.data)==null?void 0:Z.message,te==null?void 0:te.message,JSON.stringify(te))}g(!1)},L=(U,J,O="text",X={})=>e.jsxs("div",{children:[e.jsx("label",{htmlFor:U,className:"block text-sm text-stone-300 mb-1.5",children:J}),e.jsx("input",{id:U,type:O,value:d[U],onChange:B=>m(Z=>({...Z,[U]:B.target.value})),className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] transition-colors",...X}),x[U]&&e.jsx("p",{className:"text-red-400 text-sm mt-1",role:"alert",children:x[U]})]});return e.jsx(e.Fragment,{children:e.jsxs("form",{onSubmit:A,noValidate:!0,className:"flex flex-col gap-5",children:[L("title",r("dashboard.homes.title_label"),"text",{placeholder:r("dashboard.homes.title_example")}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-stone-300 mb-2",children:"Tipo de alojamiento *"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[{value:"vivienda_completa",label:r("dashboard.homes.accommodation_full"),desc:r("dashboard.homes.accommodation_full_desc")},{value:"habitacion_privada",label:r("dashboard.homes.accommodation_private"),desc:r("dashboard.homes.accommodation_private_desc")}].map(U=>e.jsxs("button",{type:"button",onClick:()=>m(J=>({...J,accommodation_type:U.value})),className:`text-left px-4 py-3 rounded-xl border-2 transition-all ${d.accommodation_type===U.value?"border-[#e8ff4a] bg-[#e8ff4a]/10":"border-stone-700 bg-stone-800 hover:border-stone-500"}`,children:[e.jsx("p",{className:`font-semibold text-sm ${d.accommodation_type===U.value?"text-[#e8ff4a]":"text-white"}`,children:U.label}),e.jsx("p",{className:"text-stone-400 text-xs mt-0.5",children:U.desc})]},U.value))})]}),d.accommodation_type==="habitacion_privada"&&e.jsxs("div",{className:"bg-stone-800/60 border border-stone-700 rounded-xl p-4 flex flex-col gap-4",children:[e.jsx("p",{className:"text-sm font-semibold text-[#e8ff4a]",children:r("dashboard.homes.room_details_title")}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:r("dashboard.homes.bed_type_label")}),e.jsxs("select",{value:((q=d.room_info)==null?void 0:q.bed_type)||"doble",onChange:U=>m(J=>({...J,room_info:{...J.room_info,bed_type:U.target.value}})),className:"w-full px-3 py-2 rounded-lg bg-stone-900 border border-stone-700 text-white text-sm focus:outline-none focus:border-[#e8ff4a]",children:[e.jsx("option",{value:"doble",children:r("dashboard.homes.bed_double")}),e.jsx("option",{value:"twin",children:r("dashboard.homes.bed_twin")}),e.jsx("option",{value:"individual",children:r("dashboard.homes.bed_single")}),e.jsx("option",{value:"literas",children:r("dashboard.homes.bed_bunk")})]})]}),e.jsx("div",{className:"flex flex-col gap-2 justify-center",children:[{key:"bath_private",label:r("dashboard.homes.bath_private")},{key:"kitchen_shared",label:r("dashboard.homes.kitchen_shared")},{key:"host_present",label:r("dashboard.homes.host_present")}].map(({key:U,label:J})=>{var O;return e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:!!((O=d.room_info)!=null&&O[U]),onChange:X=>m(B=>({...B,room_info:{...B.room_info,[U]:X.target.checked}})),className:"w-4 h-4 rounded accent-[#e8ff4a]"}),e.jsx("span",{className:"text-sm text-stone-300",children:J})]},U)})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Zonas comunes disponibles"}),e.jsx("input",{type:"text",value:((H=d.room_info)==null?void 0:H.common_areas)||"",onChange:U=>m(J=>({...J,room_info:{...J.room_info,common_areas:U.target.value}})),placeholder:"p.ej. salón, terraza, jardín…",className:"w-full px-3 py-2 rounded-lg bg-stone-900 border border-stone-700 text-white text-sm placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Normas de convivencia"}),e.jsx("textarea",{rows:2,value:((F=d.room_info)==null?void 0:F.house_rules)||"",onChange:U=>m(J=>({...J,room_info:{...J.room_info,house_rules:U.target.value}})),placeholder:"p.ej. no fumar en el interior, llegada antes de las 22h…",className:"w-full px-3 py-2 rounded-lg bg-stone-900 border border-stone-700 text-white text-sm placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] resize-none"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[L("location",r("dashboard.homes.location_label"),"text",{placeholder:r("dashboard.homes.location_example")}
304),L("country",r("dashboard.homes.country_label"),"text",{placeholder:r("dashboard.homes.country_example")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"description",className:"block text-sm text-stone-300 mb-1.5",children:"Descripción"}),e.jsx("textarea",{id:"description",rows:4,value:d.description,onChange:U=>m(J=>({...J,description:U.target.value})),placeholder:"Cuéntanos sobre tu casa y el entorno…",className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] resize-none transition-colors"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"climbing_areas",className:"block text-sm text-stone-300 mb-1.5",children:"Zonas de escalada cercanas"}),e.jsx("textarea",{id:"climbing_areas",rows:3,value:d.climbing_areas,onChange:U=>m(J=>({...J,climbing_areas:U.target.value})),placeholder:"Describe los sectores, accesos, tipo de roca…",className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] resize-none transition-colors"})]}),L("max_guests",r("dashboard.homes.max_guests_label"),"number",{min:1,placeholder:r("dashboard.homes.max_guests_example")}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-stone-300 mb-2",children:"Actividades cercanas"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:v.map(U=>e.jsx("button",{type:"button",onClick:()=>T(U),className:`px-3 py-1 rounded-full text-sm border transition-all font-medium ${d.difficulty_levels.includes(U)?"bg-green-500 text-white border-green-500 shadow-[0_0_10px_rgba(34,197,94,0.4)]":"bg-stone-800 text-stone-300 border-stone-700 hover:border-green-500/50 hover:text-green-400"}`,children:N(U)},U))})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm text-stone-300 mb-2",children:["Fotos de tu casa ",e.jsx("span",{className:"text-stone-500",children:"(hasta 6 · arrastra para ordenar)"})]}),e.jsxs("label",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-[#e8ff4a] text-stone-950 font-semibold text-sm cursor-pointer hover:bg-[#f0ff70] transition-colors mb-3",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"})}),"Añadir fotos",e.jsx("input",{type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:U=>{const J=Array.from(U.target.files),O=J.filter(X=>X.size>5*1024*1024);O.length>0?h(X=>({...X,photos:`Fotos demasiado grandes (máx 5MB): ${O.map(B=>B.name).join(", ")}`})):(h(X=>{const B={...X};return delete B.photos,B}),f(X=>[...X,...J].slice(0,6)))}})]}),x.photos&&e.jsx("p",{className:"text-red-400 text-sm mb-2",role:"alert",children:x.photos}),p.length>0&&e.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2",children:p.map((U,J)=>{const O=URL.createObjectURL(U);return e.jsxs("div",{draggable:!0,onDragStart:X=>X.dataTransfer.setData("idx",J),onDragOver:X=>X.preventDefault(),onDrop:X=>{X.preventDefault();const B=parseInt(X.dataTransfer.getData("idx"));B!==J&&f(Z=>{const te=[...Z],[P]=te.splice(B,1);return te.splice(J,0,P),te})},className:"relative group cursor-grab active:cursor-grabbing rounded-lg overflow-hidden border-2 border-stone-700 hover:border-[#e8ff4a] transition-colors aspect-square",children:[e.jsx("img",{src:O,alt:"",className:"w-full h-full object-cover pointer-events-none"}),J===0&&e.jsx("span",{className:"absolute top-1 left-1 bg-[#e8ff4a] text-stone-950 text-[9px] font-bold px-1.5 py-0.5 rounded",children:"PORTADA"}),e.jsx("button",{type:"button",onClick:()=>f(X=>X.filter((B,Z)=>Z!==J)),className:"absolute top-1 right-1 w-5 h-5 rounded-full bg-red-600 text-white text-xs font-bold opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:"✕"})]},J)})})]}),e.jsxs("div",{className:"rounded-2xl border border-stone-700 bg-stone-800/50 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("p",{className:"text-sm font-semibold text-stone-200",children:"Valor en ClimbPoints"}),e.jsxs("span",{className:"text-2xl font-bold text-[#e8ff4a]",children:[C()," ",e.jsx("span",{className:"text-sm font-normal text-stone-400",children:"CP / noche"})]})]}),e.jsxs("p",{className:"text-xs text-stone-500 mb-3",children:["Base según capacidad (",z(d.max_guests)," CP) + extras marcados (máx. +40 CP). La plataforma calcula el valor — tú no lo puedes modificar."]}),e.jsx("div",{className:"space-y-2",children:_.map(({key:U,label:J,cp:O})=>e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group",children:[e.jsx("input",{type:"checkbox",checked:(d.cp_extras||[]).includes(U),onChange:()=>k(U),className:"w-4 h-4 accent-[#e8ff4a] shrink-0"}),e.jsx("span",{className:"text-sm text-stone-300 group-hover:text-white transition-colors flex-1",children:J}),e.jsxs("span",{className:"text-xs text-[#e8ff4a] font-semibold shrink-0",children:["+",O," CP"]})]},U))})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{id:"available",type:"checkbox",checked:d.available,onChange:U=>m(J=>({...J,available:U.target.checked})),className:"w-4 h-4 accent-[#e8ff4a]"}),e.jsx("label",{htmlFor:"available",className:"text-sm text-stone-300",children:"Disponible para intercambio ahora"})]}),x.general&&e.jsx("p",{className:"text-red-400 text-sm",role:"alert",children:x.general}),e.jsx("button",{type:"submit",disabled:j,className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors disabled:opacity-50",children:r(j?"dashboard.homes.saving":"dashboard.homes.publish_button")})]})})}function G4({home:l,onSaved:i,onCancel:r}){const d=["Alpinismo","Escalada Clasica","Escalada Deportiva","Rocodromo","Senderismo","Esqui de Montana","BTT"],m={"Escalada Clasica":"Escalada Clásica",Rocodromo:"Rocódromo","Esqui de Montana":"Esquí de Montaña"},p=ie=>m[ie]||ie,f=[{key:"escuela_cercana",label:t("dashboard.extras.escuela_cercana"),cp:15},{key:"parking_bicis",label:t("dashboard.extras.parking_bicis"),cp:5},{key:"rocodromo_cercano",label:t("dashboard.extras.rocodromo_cercano"),cp:10},{key:"wifi",label:t("dashboard.extras.wifi"),cp:5},{key:"mascotas",label:t("dashboard.extras.mascotas"),cp:5}],x=ie=>{const ee=parseInt(ie)||1;return ee<=2?100:ee<=4?120:ee<=6?150:200},h=()=>{const ie=x(g.max_guests),ee=(g.cp_extras||[]).reduce((he,le)=>{const me=f.find(Be=>Be.key===le);return he+(me?me.cp:0)},0);return ie+Math.min(ee,40)},j=ie=>{v(ee=>({...ee,cp_extras:(ee.cp_extras||[]).includes(ie)?(ee.cp_extras||[]).filter(he=>he!==ie):[...ee.cp_extras||[],ie]}))},[g,v]=b.useState({title:l.title||"",description:l.description||"",location:l.location||"",country:l.country||"",max_guests:l.max_guests||"",climbing_areas:l.climbing_areas||"",difficulty_levels:Array.isArray(l.difficulty_levels)?l.difficulty_levels:[],available:l.available??!0,cp_extras:(()=>{try{return JSON.parse(l.cp_extras||"[]")}catch{return[]}})()}),[S,N]=b.useState([]),[_,z]=b.useState(l.photos||[]),[C,k]=b.useState({}),[T,w]=b.useState(!1),[A,L]=b.useState(!1),[q,H]=b.useState(!1),[F,U]=b.useState([]),[J,O]=b.useState(!0),[X,B]=b.useState(!1),[Z,te]=b.useState({title:"",entry_type:"via",description:"",grade:"",sector:"",images:[]}),[P,$]=b.useState(!1),[oe,de]=b.useState(""),{user:ze}=oa(),da=ie=>{v(ee=>({...ee,difficulty_levels:ee.difficulty_levels.includes(ie)?ee.difficulty_levels.filter(he=>he!==ie):[...ee.difficulty_levels,ie]}))};b.useEffect(()=>{O(!0),D.collection("home_library").getList(1,50,{filter:`home = "${l.id}"`,sort:"-created",expand:"author"}).then(ie=>{U(ie.items),O(!1)}).catch(()=>O(!1))},[l.id]);const Ze=async ie=>{var ee;if(ie.preventDefault(),!Z.title.trim()){de("El título es obligatorio.");return}$(!0),de("");try{const he=new FormData;he.append("home",l.id),he.append("author",ze.id),he.append("title",Z.title),he.append("entry_type",Z.entry_type),he.append("description",Z.description),he.append("grade",Z.grade),he.append("sector",Z.sector),Z.images.forEac
304h(me=>he.append("images",me));const le=await D.collection("home_library").create(he);le.expand={author:ze},U(me=>[le,...me]),te({title:"",entry_type:"via",description:"",grade:"",sector:"",images:[]}),B(!1)}catch(he){de(((ee=he==null?void 0:he.data)==null?void 0:ee.message)||(he==null?void 0:he.message)||"No se pudo guardar.")}$(!1)},Ea=async ie=>{try{await D.collection("home_library").delete(ie),U(ee=>ee.filter(he=>he.id!==ie))}catch{}},V=async ie=>{var ee,he;if(ie.preventDefault(),!g.title.trim()){k({title:"El título es obligatorio."});return}if(!g.location.trim()){k({location:"La ubicación es obligatoria."});return}w(!0),k({});try{const le=new FormData;le.append("title",g.title.trim()),le.append("description",g.description),le.append("location",g.location.trim()),le.append("country",g.country),le.append("max_guests",g.max_guests?Number(g.max_guests):""),le.append("climbing_areas",g.climbing_areas),le.append("difficulty_levels",""),(g.difficulty_levels||[]).forEach(Ce=>le.append("difficulty_levels",Ce)),le.append("available",g.available?"true":"false"),le.append("cp_value",h()),le.append("cp_extras",JSON.stringify(g.cp_extras||[])),le.append("pets",(g.cp_extras||[]).includes("mascotas")?"true":"false"),(l.photos||[]).filter(Ce=>!_.includes(Ce)).forEach(Ce=>le.append("photos-"+Ce,"")),S.forEach(Ce=>le.append("photos",Ce));const Be=[g.location.trim(),g.country].filter(Boolean).join(", "),xe=await ab(Be);xe&&(le.append("lat",xe[0]),le.append("lng",xe[1])),await D.collection("homes").update(l.id,le),w(!1),i()}catch(le){const me=((ee=le==null?void 0:le.response)==null?void 0:ee.message)||((he=le==null?void 0:le.data)==null?void 0:he.message)||(le==null?void 0:le.message)||"No se pudo guardar. Inténtalo de nuevo.";k({general:me}),w(!1)}},pe=async()=>{try{await D.collection("homes").update(l.id,{available:!1}),i()}catch{}},Ne=async()=>{if(!q){H(!0);return}L(!0);try{await D.collection("homes").delete(l.id),i()}catch{k({general:"No se pudo eliminar la casa. Inténtalo de nuevo."}),L(!1)}},ge=(ie,ee,he="text",le={})=>e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-"+ie,className:"block text-sm text-stone-300 mb-1.5",children:ee}),e.jsx("input",{id:"edit-"+ie,type:he,value:g[ie],onChange:me=>v(Be=>({...Be,[ie]:me.target.value})),className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] transition-colors",...le}),C[ie]&&e.jsx("p",{className:"text-red-400 text-sm mt-1",role:"alert",children:C[ie]})]});return e.jsxs(e.Fragment,{children:[e.jsxs("form",{onSubmit:V,noValidate:!0,className:"flex flex-col gap-5",children:[ge("title",t("dashboard.homes.title_label"),"text",{placeholder:t("dashboard.homes.title_example")}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[ge("location",t("dashboard.homes.location_label"),"text",{placeholder:t("dashboard.homes.location_example")}),ge("country",t("dashboard.homes.country_label"),"text",{placeholder:t("dashboard.homes.country_example")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-description",className:"block text-sm text-stone-300 mb-1.5",children:"Descripción"}),e.jsx("textarea",{id:"edit-description",rows:4,value:g.description,onChange:ie=>v(ee=>({...ee,description:ie.target.value})),className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] resize-none transition-colors"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[ge("climbing_areas","Zonas de escalada cercanas","text",{placeholder:"Siurana, Montsant…"}),ge("max_guests","Máx. huéspedes","number",{min:1,placeholder:"4"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-stone-300 mb-2",children:"Actividades / niveles"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:d.map(ie=>e.jsx("button",{type:"button",onClick:()=>da(ie),className:`px-3 py-1.5 rounded-full text-sm border transition-colors ${g.difficulty_levels.includes(ie)?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a] font-semibold":"border-stone-600 text-stone-400 hover:border-[#e8ff4a]/60"}`,children:p(ie)},ie))})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm text-stone-300 mb-2",children:["Fotos de tu casa ",e.jsx("span",{className:"text-stone-500",children:"(hasta 6 · arrastra para ordenar)"})]}),e.jsxs("label",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-[#e8ff4a] text-stone-950 font-semibold text-sm cursor-pointer hover:bg-[#f0ff70] transition-colors mb-3",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"})}),"Añadir fotos",e.jsx("input",{type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ie=>{const ee=Array.from(ie.target.files);N(he=>{var le;return[...he,...ee].slice(0,6-(((le=l.photos)==null?void 0:le.length)||0))})}})]}),(()=>{const ie=[..._.map(ee=>({type:"saved",key:ee})),...S.map((ee,he)=>({type:"new",key:"new_"+he,file:ee}))];return ie.length===0?null:e.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2",children:ie.map((ee,he)=>{const le=ee.type==="saved"?D.files.getURL(l,ee.key,{thumb:"120x120"}):URL.createObjectURL(ee.file);return e.jsxs("div",{draggable:!0,onDragStart:me=>me.dataTransfer.setData("pos",he),onDragOver:me=>me.preventDefault(),onDrop:me=>{me.preventDefault();const Be=parseInt(me.dataTransfer.getData("pos"));if(Be===he)return;const xe=[...ie],[Ce]=xe.splice(Be,1);xe.splice(he,0,Ce),z(xe.filter(Te=>Te.type==="saved").map(Te=>Te.key)),N(xe.filter(Te=>Te.type==="new").map(Te=>Te.file))},className:"relative group cursor-grab active:cursor-grabbing rounded-lg overflow-hidden border-2 border-stone-700 hover:border-[#e8ff4a] transition-colors aspect-square",children:[e.jsx("img",{src:le,alt:"",className:"w-full h-full object-cover pointer-events-none"}),he===0&&e.jsx("span",{className:"absolute top-1 left-1 bg-[#e8ff4a] text-stone-950 text-[9px] font-bold px-1.5 py-0.5 rounded pointer-events-none",children:"PORTADA"}),e.jsx("button",{type:"button",onClick:()=>{ee.type==="saved"?z(me=>me.filter(Be=>Be!==ee.key)):N(me=>me.filter((Be,xe)=>"new_"+xe!==ee.key))},className:"absolute top-1 right-1 w-5 h-5 rounded-full bg-red-600 text-white text-xs font-bold opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:"✕"})]},ee.key)})})})()]}),e.jsxs("div",{className:"rounded-2xl border border-stone-700 bg-stone-800/50 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("p",{className:"text-sm font-semibold text-stone-200",children:"Valor en ClimbPoints"}),e.jsxs("span",{className:"text-2xl font-bold text-[#e8ff4a]",children:[h()," ",e.jsx("span",{className:"text-sm font-normal text-stone-400",children:"CP / noche"})]})]}),e.jsxs("p",{className:"text-xs text-stone-500 mb-3",children:["Base según capacidad (",x(g.max_guests)," CP) + extras marcados (máx. +40 CP). La plataforma calcula el valor — tú no lo puedes modificar."]}),e.jsx("div",{className:"space-y-2",children:f.map(({key:ie,label:ee,cp:he})=>e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group",children:[e.jsx("input",{type:"checkbox",checked:(g.cp_extras||[]).includes(ie),onChange:()=>j(ie),className:"w-4 h-4 accent-[#e8ff4a] shrink-0"}),e.jsx("span",{className:"text-sm text-stone-300 group-hover:text-white transition-colors flex-1",children:ee}),e.jsxs("span",{className:"text-xs text-[#e8ff4a] font-semibold shrink-0",children:["+",he," CP"]})]},ie))})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{id:"edit-available",type:"checkbox",checked:g.available,onChange:ie=>v(ee=>({...ee,available:ie.target.checked})),className:"w-4 h-4 accent-[#e8ff4a]"}),e.jsx("label",{htmlFor:"edit-available",className:"text-sm text-stone-300",children:"Disponible para intercambio ahora"})]}),C.general&&e.jsx("p",{className:"text-red-400 text-sm",role:"alert",children:C.general}),e.jsxs("div",{className:"flex flex-col gap-3 pt-2 border-t border-stone-700",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{type:"submit",disabled:T,className:"flex-1 py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors disabled:opacity-50",children:T?"Guardando…":"Guardar cambios"}),e.jsx("button",{type:"button",onClick:r,className:"px-5 py-3 rounded-xl border border-stone-600 text-stone-300 hover:border-white hover:text-white transition-colors",children:"Cancelar"})]}),e.jsxs("div",{className:"flex gap-3",children:[g.available&&e.jsx("button",{type:"button",onClick:pe,className:"flex-1 py-2.5 rounded-xl border border-stone-600 text-stone-400 hover:border-stone-400 hover:text-stone-200 transition-colors text-sm font-medium",children:"Dar de baja temporalmente"}),e.jsx("button",{type:"button",onClick:Ne,disabled:A,className:`flex-1 py-2.5 rounded-xl text-sm font-semibold transition-colors ${q?"bg-red-600 text-white hover:bg-red-700":"border border-red-800/50 text-red-400 hover:border-red-600 hover:text-red-300"}`,children:A?"Eliminando…":q?"¿Seguro? Confirmar borrado":"Eliminar casa"})]})]})]}),e.jsxs("div",{className:"border-t border-stone-700 pt-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("h3",{className:"font-bold text-white flex items-center gap-2 text-sm",children:[e.jsx(Zn,{className:"w-4 h-4 text-[#e8ff4a]"})," Reseñas y croquis de esta casa"]}),e.jsxs("button",{type:"button",onClick:()=>B(ie=>!ie),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/40 text-[#e8ff4a] text-xs font-semibold hover:bg-[#e8ff4a]/20 transition-colors",children:[e.jsx($n,{className:"w-3 h-3"})," ",X?"Cancelar":"Añadir reseña"]})]}),X&&e.jsxs("form",{onSubmit:Ze,noValidate:!0,className:"mb-4 p-4 rounded-xl bg-stone-800/60 border border-[#e8ff4a]/20 flex flex-col gap-3",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Título *"}),e.jsx("input",{value:Z.title,onChange:ie=>te(ee=>({...ee,title:ie.target.value})),placeholder:"Nombre de la vía, ruta BTT, croquis…",className:"w-full px-3 py-2 rounded-lg bg-stone-900 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Tipo"}
304),e.jsxs("select",{value:Z.entry_type,onChange:ie=>te(ee=>({...ee,entry_type:ie.target.value})),className:"w-full px-3 py-2 rounded-lg bg-stone-900 border border-stone-700 text-white focus:outline-none focus:border-[#e8ff4a] text-sm",children:[e.jsx("option",{value:"via",children:"Vía en pared"}),e.jsx("option",{value:"deportiva",children:t("dashboard.sketch_sport")}),e.jsx("option",{value:"clasica",children:t("dashboard.sketch_classic")}),e.jsx("option",{value:"btt",children:t("dashboard.sketch_btt")}),e.jsx("option",{value:"senderismo",children:t("dashboard.sketch_hiking")}),e.jsx("option",{value:"croquis",children:t("dashboard.sketch_croquis")}),e.jsx("option",{value:"foto",children:t("dashboard.sketch_photo")})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Sector / zona"}),e.jsx("input",{value:Z.sector,onChange:ie=>te(ee=>({...ee,sector:ie.target.value})),placeholder:"Sector Nord…",className:"w-full px-3 py-2 rounded-lg bg-stone-900 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Grado"}),e.jsx("input",{value:Z.grade,onChange:ie=>te(ee=>({...ee,grade:ie.target.value})),placeholder:"7a, Difícil…",className:"w-full px-3 py-2 rounded-lg bg-stone-900 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] text-sm"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Descripción / beta"}),e.jsx("textarea",{value:Z.description,onChange:ie=>te(ee=>({...ee,description:ie.target.value})),rows:3,placeholder:"Consejos, acceso, qué esperar…",className:"w-full px-3 py-2 rounded-lg bg-stone-900 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] text-sm resize-none"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-xs text-stone-400 mb-1",children:["Fotos o croquis ",e.jsx("span",{className:"text-stone-600",children:"(hasta 5)"})]}),e.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:ie=>te(ee=>({...ee,images:Array.from(ie.target.files).slice(0,5)})),className:"w-full text-stone-300 text-xs file:mr-2 file:py-1.5 file:px-3 file:rounded-full file:border-0 file:bg-[#e8ff4a] file:text-stone-950 file:font-semibold file:cursor-pointer hover:file:bg-[#f0ff70]"}),Z.images.length>0&&e.jsxs("p",{className:"text-[#e8ff4a] text-xs mt-1",children:[Z.images.length," imagen",Z.images.length>1?"es":""," seleccionada",Z.images.length>1?"s":""]})]}),oe&&e.jsx("p",{className:"text-red-400 text-xs",role:"alert",children:oe}),e.jsx("button",{type:"submit",disabled:P,className:"self-start px-5 py-2 rounded-lg bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors disabled:opacity-50 text-sm",children:P?"Subiendo…":"Subir a la red"})]}),J?e.jsx("p",{className:"text-stone-500 text-sm",children:"Cargando…"}):F.length===0?e.jsx("p",{className:"text-stone-500 text-sm",children:"Aún no hay reseñas para esta casa."}):e.jsx("div",{className:"flex flex-col gap-2",children:F.map(ie=>{const ee={via:"Vía",deportiva:"Deportiva",clasica:"Clásica",btt:"BTT",senderismo:"Senderismo",croquis:"Croquis",foto:"Galería"};return e.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 rounded-lg bg-stone-800 border border-stone-700",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-white text-sm font-semibold truncate",children:ie.title}),e.jsxs("p",{className:"text-stone-400 text-xs",children:[ee[ie.entry_type]||ie.entry_type,ie.grade?` · ${ie.grade}`:""]})]}),ie.images&&ie.images.length>0&&e.jsx("img",{src:D.files.getURL(ie,ie.images[0],{thumb:"60x60"}),alt:"",className:"w-10 h-10 rounded-lg object-cover shrink-0 border border-stone-600"}),e.jsx("button",{type:"button",onClick:()=>Ea(ie.id),className:"shrink-0 p-1.5 rounded-lg text-stone-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",children:e.jsx(_t,{className:"w-4 h-4"})})]},ie.id)})})]})]})}
304function F4({homes:l,onSaved:i}){const{user:r}=oa(),[d,m]=b.useState({home:"",route_name:"",difficulty:"",sector:"",best_season:"",description:"",local_tips:""}),[p,f]=b.useState({}),[x,h]=b.useState(!1),j=async g=>{var S;g.preventDefault();const v={};if(d.route_name.trim()||(v.route_name="El nombre de la escuela es obligatorio."),d.home||(v.home="Selecciona una casa."),Object.keys(v).length>0){f(v);return}h(!0),f({});try{await D.collection("climbing_tips").create({author:r.id,home:d.home,route_name:d.route_name,difficulty:d.difficulty,sector:d.sector,best_season:d.best_season,description:d.description,local_tips:d.local_tips}),i()}catch(N){const _=((S=N==null?void 0:N.data)==null?void 0:S.message)||(N==null?void 0:N.message)||"No se pudo guardar. Inténtalo de nuevo.";f({general:_})}h(!1)};return e.jsxs("form",{onSubmit:j,noValidate:!0,className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"tip-home",className:"block text-sm text-stone-300 mb-1.5",children:"Casa a la que pertenece *"}),e.jsxs("select",{id:"tip-home",value:d.home,onChange:g=>m(v=>({...v,home:g.target.value})),className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white focus:outline-none focus:border-[#e8ff4a] transition-colors",children:[e.jsx("option",{value:"",children:t("dashboard.select_home")}),l.map(g=>e.jsx("option",{value:g.id,children:g.title},g.id))]}),p.home&&e.jsx("p",{className:"text-red-400 text-sm mt-1",role:"alert",children:p.home})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"route-name",className:"block text-sm text-stone-300 mb-1.5",children:"Nombre de la escuela *"}),e.jsx("input",{id:"route-name",type:"text",value:d.route_name,onChange:g=>m(v=>({...v,route_name:g.target.value})),placeholder:"p.ej. El Chorro, Siurana, Margalef…",className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] transition-colors"}),p.route_name&&e.jsx("p",{className:"text-red-400 text-sm mt-1",role:"alert",children:p.route_name})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"tip-season",className:"block text-sm text-stone-300 mb-1.5",children:"Mejor época del año"}),e.jsx("input",{id:"tip-season",type:"text",value:d.best_season,onChange:g=>m(v=>({...v,best_season:g.target.value})),placeholder:"p.ej. Octubre – Abril",className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] transition-colors"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"tip-desc",className:"block text-sm text-stone-300 mb-1.5",children:"Descripción de la escuela"}),e.jsx("textarea",{id:"tip-desc",rows:3,value:d.description,onChange:g=>m(v=>({...v,description:g.target.value})),placeholder:"Tipo de roca, sectores destacados, accesos, qué ofrece la zona…",className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] resize-none transition-colors"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"tip-local",className:"block text-sm text-stone-300 mb-1.5",children:"Consejo local secreto"}),e.jsx("textarea",{id:"tip-local",rows:3,value:d.local_tips,onChange:g=>m(v=>({...v,local_tips:g.target.value})),placeholder:"Lo que no encontrarás en ninguna guía…",className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] resize-none transition-colors"})]}),p.general&&e.jsx("p",{className:"text-red-400 text-sm",role:"alert",children:p.general}),e.jsx("button",{type:"submit",disabled:x,className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors disabled:opacity-50",children:x?"Guardando…":"Publicar escuela"})]})}function $4({topo:l,homes:i,onSaved:r,onCancel:d}){const m=["Deportiva","Clásica","Bloque","Psicobloc","Alpinismo","Senderismo","Esquí","BTT"],[p,f]=b.useState({route_name:l.route_name||"",zone:l.zone||"",sector:l.sector||"",grade:l.grade||"",style:l.style||"",description:l.description||"",home:l.home||""}),[x,h]=b.useState([]),[j,g]=b.useState({}),[v,S]=b.useState(!1),N=(C,k,T)=>e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm text-stone-300 mb-1.5",children:k}),e.jsx("input",{type:"text",value:p[C],onChange:w=>f(A=>({...A,[C]:w.target.value})),placeholder:T,className:"w-full px-4 py-2.5 bg-stone-800 border border-stone-700 rounded-xl text-white placeholder-stone-500 text-sm focus:outline-none focus:border-[#e8ff4a]/50"}),j[C]&&e.jsx("p",{className:"text-red-400 text-xs mt-1",children:j[C]})]}),_=async C=>{var T;C.preventDefault();const k={};if(p.route_name.trim()||(k.route_name="El nombre es obligatorio."),Object.keys(k).length>0){g(k);return}S(!0),g({});try{const w=new FormData;w.append("route_name",p.route_name),w.append("zone",p.zone),w.append("sector",p.sector),w.append("grade",p.grade),w.append("style",p.style),w.append("description",p.description),w.append("home",p.home||""),x.forEach(A=>w.append("image",A)),await D.collection("topos").update(l.id,w),r()}
304catch(w){const A=((T=w==null?void 0:w.data)==null?void 0:T.message)||(w==null?void 0:w.message)||"No se pudo guardar.";g({general:A})}S(!1)},z=l.image||[];return e.jsxs("form",{onSubmit:_,className:"flex flex-col gap-5 p-6 bg-stone-900 rounded-2xl border border-[#e8ff4a]/30",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"font-display text-xl font-bold text-white",children:"Editar croquis"}),e.jsx("button",{type:"button",onClick:d,className:"text-stone-500 hover:text-white text-sm",children:t("buttons.cancel")})]}),j.general&&e.jsx("p",{className:"text-red-400 text-sm",children:j.general}),z.length>0&&e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm text-stone-400 mb-2",children:["Fotos actuales (",z.length,")"]}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:z.map((C,k)=>e.jsx("img",{src:D.files.getURL(l,C,{thumb:"120x90"}),alt:"",className:"w-20 h-16 object-cover rounded-lg border border-stone-700"},k))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm text-stone-300 mb-1.5",children:"Añadir fotos nuevas (hasta 5)"}),e.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:C=>h(Array.from(C.target.files).slice(0,5)),className:"w-full text-sm text-stone-400 file:mr-3 file:py-1.5 file:px-3 file:rounded-lg file:border-0 file:bg-[#e8ff4a] file:text-stone-950 file:font-semibold file:text-xs hover:file:bg-[#f0ff70]"}),x.length>0&&e.jsxs("p",{className:"text-stone-400 text-xs mt-1",children:[x.length," foto(s) nueva(s)"]})]}),N("route_name","Nombre de la vía o escuela *","p.ej. La Rambla, Sector Bruixes, Siurana…"),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:N("sector","Sector","p.ej. Sector Bruixes…")}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[N("grade","Grado","p.ej. 7c+, 6a…"),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm text-stone-300 mb-1.5",children:"Estilo"}),e.jsxs("select",{value:p.style,onChange:C=>f(k=>({...k,style:C.target.value})),className:"w-full px-4 py-2.5 bg-stone-800 border border-stone-700 rounded-xl text-white text-sm focus:outline-none focus:border-[#e8ff4a]/50",children:[e.jsxs("option",{value:"",children:["— ",t("buttons.select")]}),m.map(C=>e.jsx("option",{value:C,children:C},C))]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm text-stone-300 mb-1.5",children:"Descripción y beta local"}),e.jsx("textarea",{rows:3,value:p.description,onChange:C=>f(k=>({...k,description:C.target.value})),placeholder:"Explica el paso clave, acceso, cualquier detalle útil…",className:"w-full px-4 py-2.5 bg-stone-800 border border-stone-700 rounded-xl text-white placeholder-stone-500 text-sm focus:outline-none focus:border-[#e8ff4a]/50 resize-none"})]}),i.length>0&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm text-stone-300 mb-1.5",children:"Vincular a una de tus casas (opcional)"}),e.jsxs("select",{value:p.home,onChange:C=>f(k=>({...k,home:C.target.value})),className:"w-full px-4 py-2.5 bg-stone-800 border border-stone-700 rounded-xl text-white text-sm focus:outline-none focus:border-[#e8ff4a]/50",children:[e.jsxs("option",{value:"",children:["— ",t("common.not_linked")]}),i.map(C=>e.jsx("option",{value:C.id,children:C.title},C.id))]})]}),e.jsx("button",{type:"submit",disabled:v,className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors disabled:opacity-50",children:v?"Guardando…":"Guardar cambios"})]})}function I4({homes:l,onSaved:i}){const{user:r}=oa(),[d,m]=b.useState({route_name:"",zone:"",sector:"",grade:"",style:"",description:"",home:""}),[p,f]=b.useState([]),[x,h]=b.useState({}),[j,g]=b.useState(!1),v=(N,_,z)=>e.jsxs("div",{children:[e.jsx("label",{htmlFor:`topo-${N}`,className:"block text-sm text-stone-300 mb-1.5",children:_}),e.jsx("input",{id:`topo-${N}`,type:"text",value:d[N],onChange:C=>m(k=>({...k,[N]:C.target.value})),placeholder:z,className:"w-full px-4 py-2.5 bg-stone-900 border border-stone-700 rounded-xl text-white placeholder-stone-500 text-sm focus:outline-none focus:border-[#e8ff4a]/50"}),x[N]&&e.jsx("p",{className:"text-red-400 text-xs mt-1",children:x[N]})]}),S=async N=>{var z;N.preventDefault();const _={};if(d.route_name.trim()||(_.route_name="El nombre de la vía es obligatorio."),Object.keys(_).length>0){h(_);return}g(!0),h({});try{const C=new FormData;C.append("author",r.id),C.append("route_name",d.route_name),C.append("zone",d.zone),C.append("sector",d.sector),C.append("grade",d.grade),C.append("style",d.style),C.append("description",d.description),d.home&&C.append("home",d.home),p.forEach(k=>C.append("image",k)),await D.collection("topos").create(C),m({route_name:"",zone:"",sector:"",grade:"",style:"",description:"",home:""}),f([]),i()}catch(C){const k=((z=C==null?void 0:C.data)==null?void 0:z.message)||(C==null?void 0:C.message)||"No se pudo guardar. Int
304éntalo de nuevo.";h({general:k})}g(!1)};return e.jsxs("form",{onSubmit:S,className:"flex flex-col gap-5 p-6 bg-stone-900 rounded-2xl border border-stone-800",children:[x.general&&e.jsx("p",{className:"text-red-400 text-sm",children:x.general}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"topo-img",className:"block text-sm text-stone-300 mb-1.5",children:"Fotos del croquis (hasta 5)"}),e.jsx("input",{id:"topo-img",type:"file",accept:"image/*",multiple:!0,onChange:N=>f(Array.from(N.target.files).slice(0,5)),className:"w-full text-sm text-stone-400 file:mr-3 file:py-1.5 file:px-3 file:rounded-lg file:border-0 file:bg-[#e8ff4a] file:text-stone-950 file:font-semibold file:text-xs hover:file:bg-[#f0ff70]"}),p.length>0&&e.jsxs("p",{className:"text-stone-400 text-xs mt-1",children:[p.length," foto(s) seleccionada(s)"]})]}),v("route_name","Nombre de la vía o escuela *","p.ej. La Rambla, Sector Bruixes, Siurana…"),v("zone","Escuela o sector","p.ej. Siurana, Montserrat, Prades…"),v("sector","Sector","p.ej. Sector Bruixes, Cinglera, La Tuca…"),v("grade","Grado","p.ej. 5a, 6b+, 7a…"),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"topo-style",className:"block text-sm text-stone-300 mb-1.5",children:"Estilo de escalada"}),e.jsxs("select",{id:"topo-style",value:d.style,onChange:N=>m(_=>({..._,style:N.target.value})),className:"w-full px-4 py-2.5 bg-stone-900 border border-stone-700 rounded-xl text-white text-sm focus:outline-none focus:border-[#e8ff4a]/50",children:[e.jsxs("option",{value:"",children:["— ",t("common.not_specified")]}),["Deportiva","Clásica","Bloque","Psicobloc","Alpinismo","Senderismo","Esquí","BTT"].map(N=>e.jsx("option",{value:N,children:N},N))]})]}),v("description","Descripción o notas","p.ej. Zona de iniciación, vías clásicas, ambiente familiar…"),l.length>0&&e.jsxs("div",{children:[e.jsx("label",{htmlFor:"topo-home",className:"block text-sm text-stone-300 mb-1.5",children:"Vincular a una de tus casas (opcional)"}),e.jsxs("select",{id:"topo-home",value:d.home,onChange:N=>m(_=>({..._,home:N.target.value})),className:"w-full px-4 py-2.5 bg-stone-900 border border-stone-700 rounded-xl text-white text-sm focus:outline-none focus:border-[#e8ff4a]/50",children:[e.jsxs("option",{value:"",children:["— ",t("common.not_linked")]}),l.map(N=>e.jsx("option",{value:N.id,children:N.title},N.id))]})]}),e.jsx("button",{type:"submit",disabled:j,className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors disabled:opacity-50",children:j?"Guardando…":"Publicar croquis"})]})}function Z4({r:l,user:i,messages:r,loadingMsgs:d,msg:m,setMsg:p,onSend:f,sending:x,onClose:h,onAccept:j,onReject:g,onConfirmStay:v,settling:S,updateStatus:N}){var O,X,B,Z,te,P,$;if(!l)return null;const _=((O=l.expand)==null?void 0:O.to_home)||{},z=l._direction==="received",C=z?((X=l.expand)==null?void 0:X.from_member)||{}:((B=_.expand)==null?void 0:B.owner)||((P=(te=(Z=l.expand)==null?void 0:Z.to_home)==null?void 0:te.expand)==null?void 0:P.owner)||{},k=C.name||"Escalador",T=C.avatar?`${D.baseURL}
304/api/files/members/${C.id}/${C.avatar}?thumb=80x80`:null,w=($=_.photos)!=null&&$[0]?`${D.baseURL}/api/files/homes/${_.id}/${_.photos[0]}?thumb=400x300`:null,A=l.date_from&&l.date_to?Math.max(1,Math.round((new Date(l.date_to)-new Date(l.date_from))/864e5)):null,L=A?A*(_.cp_per_night||0):null,q=React.useMemo(()=>{if(l.status!=="pending")return null;const oe=new Date(l.created),de=new Date(oe.getTime()+7200*60*1e3);return Math.ceil((de-Date.now())/(1e3*60*60*24))},[l.created,l.status]),H={pending:"Pendiente",preapproved:"Preaprobada – pendiente de confirmación",accepted:"Confirmada",declined:"Rechazada",confirmed:"Confirmada",completed:"Finalizada",cancelled:"Cancelada",dates_taken:"Fechas ya ocupadas",expired:"Expirada"},F={pending:"bg-yellow-500/20 text-yellow-300 border-yellow-500/30",preapproved:"bg-orange-500/20 text-orange-300 border-orange-500/30",accepted:"bg-green-500/20 text-green-400 border-green-500/30",declined:"bg-red-500/20 text-red-400 border-red-500/30",confirmed:"bg-blue-500/20 text-blue-400 border-blue-500/30",completed:"bg-stone-500/20 text-stone-400 border-stone-500/30",cancelled:"bg-stone-600/20 text-stone-500 border-stone-600/30",dates_taken:"bg-stone-700/20 text-stone-500 border-stone-700/30",expired:"bg-stone-700/20 text-stone-500 border-stone-700/30"},U=oe=>oe?new Date(oe).toLocaleDateString("es-ES",{day:"numeric",month:"short",year:"numeric"}):"—",J=React.useRef(null);return React.useEffect(()=>{var oe;(oe=J.current)==null||oe.scrollIntoView({behavior:"smooth"})},[r.length]),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40 bg-black/80 pointer-events-auto",onClick:h}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-end sm:items-center justify-center p-0 sm:p-4 pointer-events-none",children:e.jsxs("div",{className:"relative bg-stone-900 border border-stone-700 rounded-t-2xl sm:rounded-2xl w-full sm:max-w-2xl max-h-[95vh] flex flex-col overflow-hidden shadow-2xl pointer-events-auto",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-stone-800 shrink-0",children:[e.jsx("h2",{className:"text-white font-bold text-lg",children:"Detalle del intercambio"}),e.jsx("button",{onClick:h,className:"w-8 h-8 flex items-center justify-center rounded-full hover:bg-stone-800 text-stone-400 hover:text-white transition-colors text-xl",children:"×"})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto",children:[e.jsxs("div",{className:"relative h-40 sm:h-48 bg-stone-800 shrink-0",children:[w?e.jsx("img",{src:w,alt:_.title,className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-4xl",children:"🏠"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-stone-900/90 to-transparent"}),e.jsx("div",{className:"absolute bottom-4 left-5 right-5",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-white font-bold text-lg leading-tight",children:_.title||"Casa sin título"}),e.jsxs("p",{className:"text-stone-300 text-sm",children:[_.location,_.country?`, ${_.country}`:""]})]}),e.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-semibold border ${F[l.status]||F.pending}`,children:H[l.status]||l.status})]})})]}),e.jsxs("div",{className:"p-5 flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center gap-3 p-4 bg-stone-800/60 rounded-xl border border-stone-700/50",children:[T?e.jsx("img",{src:T,alt:k,className:"w-12 h-12 rounded-full object-cover border-2 border-stone-600"}):e.jsx("div",{className:"w-12 h-12 rounded-full bg-stone-700 flex items-center justify-center text-lg font-bold text-[#e8ff4a]",children:k[0]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-400 text-xs",children:z?"Solicitante":"Anfitrión"}),e.jsx("p",{className:"text-white font-semibold",children:k}),C.location&&e.jsx("p",{className:"text-stone-400 text-sm",children:C.location})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-stone-800/40 rounded-xl p-3 border border-stone-700/40",children:[e.jsx("p",{className:"text-stone-500 text-xs mb-1",children:"Entrada"}),e.jsx("p",{className:"text-white font-semibold text-sm",children:U(l.date_from)})]}),e.jsxs("div",{className:"bg-stone-800/40 rounded-xl p-3 border border-stone-700/40",children:[e.jsx("p",{className:"text-stone-500 text-xs mb-1",children:"Salida"}),e.jsx("p",{className:"text-white font-semibold text-sm",children:U(l.date_to)})]}),A&&e.jsxs("div",{className:"bg-stone-800/40 rounded-xl p-3 border border-stone-700/40",children:[e.jsx("p",{className:"text-stone-500 text-xs mb-1",children:"Noches"}),e.jsx("p",{className:"text-white font-semibold text-sm",children:A})]}),l.num_guests&&e.jsxs("div",{className:"bg-stone-800/40 rounded-xl p-3 border border-stone-700/40",children:[e.jsx("p",{className:"text-stone-500 text-xs mb-1",children:"Huéspedes"}),e.jsx("p",{className:"text-white font-semibold text-sm",children:l.num_guests})]}),L!=null&&e.jsxs("div",{className:"bg-[#e8ff4a]/10 rounded-xl p-3 border border-[#e8ff4a]/20",children:[e.jsx("p",{className:"text-[#e8ff4a]/70 text-xs mb-1",children:"Climbpoints"}),e.jsxs("p",{className:"text-[#e8ff4a] font-bold text-sm",children:[L," CP"]})]}),e.jsxs("div",{className:"bg-stone-800/40 rounded-xl p-3 border border-stone-700/40",children:[e.jsx("p",{className:"text-stone-500 text-xs mb-1",children:"Solicitud"}),e.jsx("p",{className:"text-white font-semibold text-sm",children:U(l.created)})]})]}),z&&l.status==="pending"&&q!==null&&e.jsxs("div",{className:`rounded-xl p-3 border flex items-center gap-3 ${q<=1?"bg-red-500/10 border-red-500/30":q<=2?"bg-orange-500/10 border-orange-500/30":"bg-stone-800/40 border-stone-700/40"}`,children:[e.jsxs("svg",{viewBox:"0 0 20 20",className:`w-5 h-5 shrink-0 ${q<=1?"text-red-400":q<=2?"text-orange-400":"text-stone-400"}`,fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[e.jsx("circle",{cx:"10",cy:"10",r:"8"}),e.jsx("path",{d:"M10 6v4l2.5 2.5",strokeLinecap:"round"})]}),e.jsx("p",{className:`text-sm ${q<=1?"text-red-300":q<=2?"text-orange-300":"text-stone-400"}`,children:q<=0?"Esta solicitud ha expirado — se cerrará automáticamente.":q===1?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-bold text-red-300",children:"Último día"})," para responder a esta solicitud."]}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"font-bold",children:[q," días"]})," para responder antes de que expire la solicitud."]})})]}),l.message&&e.jsxs("div",{className:"bg-stone-800/40 rounded-xl p-4 border border-stone-700/40",children:[e.jsx("p",{className:"text-stone-500 text-xs mb-2",children:"Mensaje inicial"}),e.jsxs("p",{className:"text-stone-200 text-sm italic",children:['"',l.message,'"']})]}),z&&(l.status==="pending"||l.status==="preapproved")&&e.jsxs("div",{className:"rounded-2xl border border-[#e8ff4a]/20 bg-[#e8ff4a]/5 p-4 flex flex-col gap-3",children:[e.jsx("p",{className:"text-stone-300 text-sm font-semibold",children:"¿Qué quieres hacer con esta solicitud?"}),l.status==="preapproved"&&e.jsx("p",{className:"text-orange-300 text-xs bg-orange-500/10 border border-orange-500/20 rounded-xl px-3 py-2",children:"Preaprobada — los ClimbPoints aún no están bloqueados y las fechas siguen libres. Cuando lo tengas claro, aprueba definitivamente."}),e.jsx("button",{onClick:()=>{j(l.id),h()},className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-base hover:bg-yellow-300 transition-colors",children:"✓ Aprobar intercambio"}),e.jsxs("div",{className:"flex gap-2",children:[l.status==="pending"&&e.jsx("button",{onClick:()=>{N(l.id,"preapproved"),h()},className:"flex-1 py-2 rounded-xl bg-orange-500/20 border border-orange-500/40 text-orange-300 text-sm font-medium hover:bg-orange-500/30 transition-colors",children:"Preaprobar — aún decido"}),e.jsx("button",{onClick:()=>{g(l.id),h()},className:"flex-1 py-2 rounded-xl border border-stone-700 text-stone-400 text-sm hover:border-red-600/50 hover:text-red-400 transition-colors",children:"Rechazar"})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[_.id&&e.jsx("a",{href:`#/homes/${_.id}`,onClick:h,className:"px-4 py-2 rounded-xl bg-stone-800 border border-stone-700 text-stone-300 text-sm font-medium hover:bg-stone-700 transition-colors",children:"Ver vivienda"}),l.status==="accepted"&&!l.cp_settled&&e.jsx("button",{onClick:()=>{v(l),h()},disabled:S===l.id,className:"px-4 py-2 rounded-xl bg-green-500/20 border border-green-500/30 text-green-400 text-sm font-medium hover:bg-green-500/30 transition-colors disabled:opacity-40",children:S===l.id?"Confirmando…":"Confirmar estancia"}),e.jsx("a",{href:"mailto:[email protected]",className:"px-4 py-2 rounded-xl bg-stone-800 border border-stone-700 text-stone-400 text-sm font-medium hover:bg-stone-700 transition-colors",children:"Soporte"})]}),e.jsxs("div",{className:"border border-stone-700/50 rounded-xl overflow-hidden",children:[e.jsx("div",{className:"px-4 py-3 bg-stone-800/60 border-b border-stone-700/40",children:e.jsx("p",{className:"text-stone-300 font-semibold text-sm",children:"Conversación"})}),e.jsxs("div",{className:"flex flex-col gap-2 p-4 max-h-64 overflow-y-auto bg-stone-900/40",children:[d&&e.jsx("p",{className:"text-stone-500 text-sm text-center py-4",children:"Cargando mensajes…"}),!d&&r.length===0&&e.jsxs("p",{className:"text-stone-600 text-sm text-center py-6",children:["Todavía no hay mensajes en este intercambio.",e.jsx("br",{}),"Escribe algo para empezar."]}),r.map(oe=>{var ze,da,Ze,Ea;const de=oe.author===i.id||((da=(ze=oe.expand)==null?void 0:ze.author)==null?void 0:da.id)===i.id;return e.jsx("div",{className:`flex ${de?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:`max-w-[80%] px-4 py-2.5 rounded-2xl text-sm ${de?"bg-[#e8ff4a] text-stone-950 rounded-br-sm":"bg-stone-800 text-stone-100 rounded-bl-sm border border-stone-700"}`,children:[!de&&e.jsx("p",{className:"text-xs font-semibold mb-1 opacity-70",children:((Ea=(Ze=oe.expand)==null?void 0:Ze.author)==null?void 0:Ea.name)||"Otro"}),e.jsx("p",{children:oe.body}),e.jsx("p",{className:"text-xs mt-1 opacity-50 text-right",children:new Date(oe.created).toLocaleTimeString("es-ES",{hour:"2-digit",minute:"2-digit"})})]})},oe.id)}),e.jsx("div",{ref:J})]}),e.jsxs("div",{className:"flex gap-2 p-3 border-t border-stone-700/40 bg-stone-800/40",children:[e.jsx("input",{value:m,onChange:oe=>p(oe.target.value),onKeyDown:oe=>oe.key==="Enter"&&!oe.shiftKey&&f(),placeholder:"Escribe un mensaje…",className:"flex-1 px-4 py-2.5 rounded-xl bg-stone-900 border border-stone-700 text-white text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors"}),e.jsx("button",{onClick:f,disabled:x||!m.trim(),className:"px-4 py-2.5 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-yellow-300 transition-colors disabled:opacity-40",children:"Enviar"})]})]})]})]})]})})]})}function K4({topo:l,imgs:i,startIdx:r,onClose:d}){const[m,p]=b.useState(r);b.useEffect(()=>{const h=j=>
304{j.key==="Escape"&&d(),j.key==="ArrowLeft"&&p(g=>(g-1+i.length)%i.length),j.key==="ArrowRight"&&p(g=>(g+1)%i.length)};return document.addEventListener("keydown",h),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",h),document.body.style.overflow=""}},[i.length,d]);const f=D.files.getURL(l,i[m]),x=h=>(h.preventDefault(),!1);return e.jsx("div",{className:"fixed inset-0 z-[200] flex flex-col items-center justify-center bg-stone-950/97 p-4",onClick:d,children:e.jsxs("div",{className:"relative w-full max-w-5xl flex flex-col items-center gap-3",onClick:h=>h.stopPropagation(),children:[e.jsx("button",{onClick:d,className:"absolute -top-2 -right-2 z-10 w-9 h-9 rounded-full bg-stone-800 border border-stone-700 flex items-center justify-center text-white hover:bg-stone-700","aria-label":"Cerrar",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4",children:e.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}),e.jsxs("div",{className:"relative w-full flex items-center justify-center rounded-xl overflow-hidden bg-stone-900",style:{maxHeight:"78vh"},children:[e.jsx("img",{src:f,alt:l.route_name,className:"max-w-full max-h-[78vh] object-contain pointer-events-none",onContextMenu:x,draggable:!1}),i.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>p(h=>(h-1+i.length)%i.length),className:"absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-stone-950/80 text-white flex items-center justify-center hover:bg-stone-950","aria-label":"Anterior",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-5 h-5",children:e.jsx("polyline",{points:"15 18 9 12 15 6"})})}),e.jsx("button",{onClick:()=>p(h=>(h+1)%i.length),className:"absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-stone-950/80 text-white flex items-center justify-center hover:bg-stone-950","aria-label":"Siguiente",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-5 h-5",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})}),e.jsxs("span",{className:"absolute bottom-3 left-1/2 -translate-x-1/2 px-3 py-1 rounded-full bg-stone-950/80 text-white text-xs",children:[m+1," / ",i.length]})]})]}),i.length>1&&e.jsx("div",{className:"flex gap-2 overflow-x-auto py-1 max-w-full",children:i.map((h,j)=>e.jsx("button",{onClick:()=>p(j),className:`shrink-0 w-20 h-20 rounded-lg overflow-hidden border-2 transition-all hover:scale-105 ${j===m?"border-[#e8ff4a]":"border-stone-700 hover:border-stone-500"}`,children:e.jsx("img",{src:D.files.getURL(l,h,{thumb:"160x160"}),alt:`Foto ${j+1}`,className:"w-full h-full object-cover pointer-events-none",onContextMenu:x,draggable:!1})},j))}),e.jsx("p",{className:"text-white font-bold text-sm",children:l.route_name})]})})}function Y4({topo:l,imgs:i,onEdit:r,onDelete:d}){const[m,p]=b.useState(null),f=i[0]?D.files.getURL(l,i[0],{thumb:"600x400"}):null;return e.jsxs(e.Fragment,{children:[m!==null&&e.jsx(K4,{topo:l,imgs:i,startIdx:m,onClose:()=>p(null)}),e.jsxs("div",{className:"rounded-2xl bg-stone-900 border border-stone-800 overflow-hidden hover:border-[#e8ff4a]/40 transition-colors",children:[f?e.jsxs("div",{className:"relative bg-stone-900 cursor-zoom-in",style:{height:"200px"},onClick:()=>p(0),children:[e.jsx("img",{src:f,alt:l.route_name,className:"w-full h-full object-cover"}),i.length>1&&e.jsxs("span",{className:"absolute bottom-2 right-2 px-2 py-0.5 rounded-full bg-stone-950/80 text-white text-xs font-medium",children:[i.length," fotos — clic para ver"]}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity bg-stone-950/30",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",className:"w-10 h-10 drop-shadow-lg",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("path",{d:"m21 21-4.35-4.35"}),e.jsx("line",{x1:"11",y1:"8",x2:"11",y2:"14"}),e.jsx("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]})})]}):e.jsx("div",{className:"bg-stone-800 flex items-center justify-center text-stone-600",
304style:{height:"200px"},children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",className:"w-10 h-10",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("line",{x1:"3",y1:"9",x2:"21",y2:"9"})]})}),i.length>1&&e.jsx("div",{className:"flex gap-1.5 px-3 pt-2 overflow-x-auto",children:i.map((x,h)=>e.jsx("button",{onClick:()=>p(h),className:"shrink-0 w-12 h-12 rounded-lg overflow-hidden border-2 transition-all hover:scale-105 hover:border-[#e8ff4a]/60 border-stone-700",children:e.jsx("img",{src:D.files.getURL(l,x,{thumb:"120x120"}),alt:`Foto ${h+1}`,className:"w-full h-full object-cover"})},h))}),e.jsxs("div",{className:"p-4",children:[e.jsx("h3",{className:"font-bold text-white truncate",children:l.route_name||"Sin título"}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 flex-wrap",children:[l.zone&&e.jsx("span",{className:"text-stone-400 text-xs",children:l.zone}),l.grade&&e.jsx("span",{className:"inline-block text-xs px-2 py-0.5 rounded-full bg-[#e8ff4a]/10 text-[#e8ff4a] border border-[#e8ff4a]/20",children:l.grade}),l.style&&e.jsx("span",{className:"text-stone-500 text-xs capitalize",children:l.style})]}),l.description&&e.jsx("p",{className:"text-stone-400 text-sm mt-2 line-clamp-2",children:l.description}),e.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t border-stone-800",children:[e.jsxs("button",{onClick:r,className:"ml-auto inline-flex items-center gap-1 px-3 py-1 rounded-full border border-[#e8ff4a]/40 text-[#e8ff4a] text-xs hover:bg-[#e8ff4a]/10 transition-colors",children:["✏️ ",t("buttons.edit")]}),e.jsxs("button",{onClick:d,className:"inline-flex items-center gap-1 px-3 py-1 rounded-full border border-red-800/50 text-red-500 text-xs hover:bg-red-900/20 transition-colors",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3 h-3",children:[e.jsx("polyline",{points:"3 6 5 6 21 6"}),e.jsx("path",{d:"M19 6l-1 14H6L5 6"}),e.jsx("path",{d:"M10 11v6M14 11v6"})]})," Eliminar"]})]})]})]})]})}function Q4(){const{t:l}=Lt();l("dashboard.reviews.rating_general"),l("dashboard.reviews.rating_home"),l("dashboard.reviews.rating_cleanliness"),l("dashboard.reviews.rating_accuracy"),l("dashboard.reviews.rating_communication"),l("dashboard.reviews.rating_respect"),l("dashboard.reviews.rating_cleanliness_guest"),l("dashboard.reviews.rating_agreement_guest"),l("dashboard.reviews.rating_communication_guest"),l("dashboard.reviews.rating_accuracy_host"),l("dashboard.reviews.rating_communication_host"),l("dashboard.reviews.rating_agreement_host"),l("dashboard.reviews.rating_condition"),l("dashboard.reviews.rating_support");const{user:i,authReady:r}=oa(),{setAlertCount:d}=z0(),m=Za(),[p,f]=b.useState("homes"),[x,h]=b.useState(null),[j,g]=b.useState([]),[v,S]=b.useState([]),[N,_]=b.useState([]),[z,C]=b.useState(null),[k,T]=b.useState([]),[w,A]=b.useState(""),[L,q]=b.useState(!1),[H,F]=b.useState(null),[U,J]=b.useState([]),[O,X]=b.useState(""),[B,Z]=b.useState(!1),[te,P]=b.useState(!1),[$,oe]=b.useState([]),[de,ze]=b.useState(null),[da,Ze]=b.useState(!1),[Ea,V]=b.useState(!1),[pe,Ne]=b.useState(!1),[ge,ie]=b.useState(null),[ee,he]=b.useState(!0),[le,me]=b.useState(null),[Be,xe]=b.useState(null),[Ce,Te]=b.useState(null),[Qe,Ge]=b.useState([]),[ua,Ka]=b.useState([]),[ye,Va]=b.useState([]),[Ya,Aa]=b.useState(null),[ja,Ua]=b.useState({}),[ss,Zt]=b.useState(!1),[Nt,ue]=b.useState(""),[Se,_e]=b.useState(!1);b.useEffect(()=>{if(!(i!=null&&i.is_founder))return;const M=`founder_welcome_shown_${i.id}`;sessionStorage.getItem(M)||_e(!0)},[i==null?void 0:i.id,i==null?void 0:i.is_founder]);const Fe=async M=>{F(M),J([]),P(!0);try{const I=await D.collection("exchange_messages").getList(1,200,{filter:`request = "${M.id}"`,sort:"created",expand:"author"});J(I.items)}catch{J([])}P(!1)},_a=async()=>{if(!(!O.trim()||!H)){Z(!0);try{const M=await D.collection("exchange_messages").create({request:H.id,author:i.id,body:O.trim()},{expand:"author"});J(I=>[...I,M]),X("")}catch{}Z(!1)}},La=async M=>{if(z===M){C(null),T([]);return}C(M),T([]);
304try{const I=await D.collection("exchange_messages").getList(1,100,{filter:`request = "${M}"`,sort:"created",expand:"author"});T(I.items)}catch{T([])}},Ke=async M=>{if(w.trim()){q(!0);try{const I=await D.collection("exchange_messages").create({request:M,author:i.id,body:w.trim()},{expand:"author"});T(be=>[...be,I]),A("")}catch{}q(!1)}},Oa=async M=>{var I,be,fe;Te(M.id);try{const je=M._direction==="received",Ve=je?M.from_member:i.id,Me=je?i.id:((be=(I=M.expand)==null?void 0:I.to_home)==null?void 0:be.owner)||null,Oe=M.date_from&&M.date_to?Math.max(1,Math.round((new Date(M.date_to)-new Date(M.date_from))/(1e3*60*60*24))):1,la=((((fe=M.expand)==null?void 0:fe.to_home)||{}).cp_value||100)*Oe;Me?await L4({requestId:M.id,huespedId:Ve,anfitrionId:Me,amount:la}):await D.collection("exchange_requests").update(M.id,{cp_settled:!0}),await js()}catch(je){console.error("Error al confirmar estancia:",je)}finally{Te(null),xe(null)}},[ma,Ra]=b.useState({available:0,blocked:0});b.useEffect(()=>{if(!r)return;if(!i){m("/login");return}const M=new AbortController;(async()=>{try{const je=await D.collection("homes").getList(1,50,{filter:`owner = "${i.id}"`,sort:"-created",signal:M.signal});g(je.items);const Ve=await D.collection("exchange_requests").getList(1,50,{filter:`from_member = "${i.id}"`,expand:"to_home,to_home.owner",sort:"-created",signal:M.signal});S(Ve.items);const Me=await D.collection("topos").getList(1,100,{filter:`author = "${i.id}"`,sort:"-created",signal:M.signal});oe(Me.items);try{const Oe=await D.collection("route_reviews").getFullList({filter:`author = "${i.id}"`,sort:"-created"});Va(Oe)}catch{}try{const Oe=await Il(i.id);Ra(Oe)}catch{}if(je.items.length>0){const Oe=je.items.map(xa=>`to_home = "${xa.id}"`).join(" || "),Pe=await D.collection("exchange_requests").getList(1,50,{filter:Oe,expand:"from_member,to_home",sort:"-created",signal:M.signal}),la=5,pa=Date.now(),qe=Pe.items.filter(xa=>xa.status==="pending"&&pa-new Date(xa.created).getTime()>la*24*60*60*1e3);for(const xa of qe)try{await D.collection("exchange_requests").update(xa.id,{status:"expired"})}catch{}const ea=Pe.items.map(xa=>qe.find(os=>os.id===xa.id)?{...xa,status:"expired"}:xa);_(ea)}else _([])}catch(je){je!=null&&je.isAbort||console.error("Dashboard load error:",je)}he(!1)})();let be=null;return(async()=>{try{be=await D.collection("exchange_requests").subscribe("*",je=>{if(!je.record)return;const Ve=je.record;Ve.from_member===i.id&&D.collection("exchange_requests").getOne(Ve.id,{expand:"to_home,to_home.owner"}).then(Me=>{S(Oe=>Oe.findIndex(la=>la.id===Me.id)===-1?[...Oe,Me]:Oe.map(la=>la.id===Me.id?Me:la))}).catch(()=>{}),Ve.to_home&&_(Me=>Me.findIndex(Pe=>Pe.id===Ve.id)===-1?Me:Me.map(Pe=>Pe.id===Ve.id?{...Pe,...Ve}:Pe))})}catch{}})(),()=>{M.abort(),be&&be()}},[i,r]);const js=async()=>{Ze(!1),V(!1),he(!0);try{const M=await D.collection("homes").getList(1,50,{filter:`owner = "${i.id}"`,sort:"-created"});g(M.items);const I=await D.collection("exchange_requests").getList(1,50,{filter:`from_member = "${i.id}"`,expand:"to_home,to_home.owner",sort:"-created"});S(I.items);const be=await D.collection("topos").getList(1,100,{filter:`author = "${i.id}"`,sort:"-created"});oe(be.items);const fe=await D.collection("saved_items").getFullList({filter:`member = "${i.id}"`,sort:"-created"});Ge(fe);const je=await D.collection("route_ascents").getFullList({filter:`member = "${i.id}"`,sort:"-created"});Ka(je);const Ve=await D.collection("route_reviews").getFullList({filter:`author = "${i.id}"`,sort:"-created"});if(Va(Ve),M.items.length>0){const Me=M.items.map(Pe=>`to_home = "${Pe.id}"`).join(" || "),Oe=await D.collection("exchange_requests").getList(1,50,{filter:Me,expand:"from_member,to_home",sort:"-created"});_(Oe.items)}else _([])}catch(M){console.error("refresh error:",M)}he(!1)},Us=async(M,I)=>{var be;_(fe=>fe.map(je=>je.id===M?{...je,status:I}:je));try{const fe=N.find(je=>je.id===M);if(I==="preapproved"){try{await D.collection("exchange_requests").update(M,{status:"preapproved"})}catch{_(Ve=>Ve.map(Me=>Me.id===M?{...Me,status:"pending"}:Me)),alert("No se pudo guardar la preaprobación. Comprueba tu conexión e inténtalo de nuevo.");return}return}if(I==="accepted"&&fe){const je=j.find(pa=>pa.id===fe.to_home)||await D.collection("homes").getOne(fe.to_home,{fields:"id,cp_value,max_guests"}),Ve=fe.nights||1,Me=(je.cp_value||100)*Ve,Oe=fe.from_member,Pe=await T4({requestId:M,huespedId:Oe,amount:Me});if(!Pe.ok){_(pa=>pa.map(qe=>qe.id===M?{...qe,status:"pending"}:qe)),alert(`No se puede aceptar: ${Pe.error}`);return}const la=fe.date_to?new Date(new Date(fe.date_to).getTime()+4320*60*1e3).toISOString():new Date(Date.now()+4320*60*1e3).toISOString();
304await D.collection("exchange_requests").update(M,{status:I,cp_cost:Me,cp_settled:!1,cp_settle_deadline:la});try{const pa=((be=fe.expand)==null?void 0:be.from_member)||await D.collection("members").getOne(fe.from_member,{fields:"id,name,email"}),qe=pa==null?void 0:pa.email,ea=(pa==null?void 0:pa.name)||"Escalador",xa=(je==null?void 0:je.title)||"la casa",os=(je==null?void 0:je.location)||"";qe&&qe!==i.email&&await D.collection("pending_emails").create({to_email:qe,to_name:ea,subject:"¡Tu solicitud de intercambio ha sido aceptada!",template:"exchange_accepted",status:"pending",template_data:{host_name:i.name||"El anfitrión",home_title:xa,home_location:os}})}catch{}try{const pa=N.filter(qe=>qe.id!==M&&qe.to_home===fe.to_home&&["pending","preapproved"].includes(qe.status)&&qe.date_from&&qe.date_to&&fe.date_from&&fe.date_to&&new Date(qe.date_from)<new Date(fe.date_to)&&new Date(qe.date_to)>new Date(fe.date_from));for(const qe of pa)await D.collection("exchange_requests").update(qe.id,{status:"dates_taken"});pa.length>0&&_(qe=>qe.map(ea=>pa.find(xa=>xa.id===ea.id)?{...ea,status:"dates_taken"}:ea))}catch{}}else I==="declined"&&fe?(fe.status==="accepted"&&fe.cp_cost&&await R4({requestId:M,huespedId:fe.from_member,amount:fe.cp_cost}),await D.collection("exchange_requests").update(M,{status:I})):await D.collection("exchange_requests").update(M,{status:I})}catch{js()}};if(b.useEffect(()=>{r&&!i&&m("/login")},[r,i,m]),!r||!i)return e.jsx("div",{className:"min-h-screen bg-stone-950 flex items-center justify-center",children:e.jsx("div",{className:"w-8 h-8 border-2 border-[#e8ff4a] border-t-transparent rounded-full animate-spin"})});const Rt=new Date,qa=[...v.filter(M=>M.status==="accepted").map(M=>({...M,_dir:"sent"})),...N.filter(M=>M.status==="accepted").map(M=>({...M,_dir:"received"}))],rt=qa.filter(M=>M.date_from&&M.date_to&&new Date(M.date_from)<=Rt&&new Date(M.date_to)>=Rt),ke=qa.filter(M=>M.date_from&&new Date(M.date_from)>Rt).sort((M,I)=>new Date(M.date_from)-new Date(I.date_from)),Je=qa.filter(M=>M.date_to&&new Date(M.date_to)<Rt).sort((M,I)=>new Date(I.date_to)-new Date(M.date_to)),Kt=[...v.filter(M=>M.status==="pending").map(M=>({...M,_dir:"sent"})),...N.filter(M=>M.status==="pending").map(M=>({...M,_dir:"received"}))],Sa=[...N.filter(M=>M.status==="preapproved").map(M=>({...M,_dir:"received"})),...v.filter(M=>M.status==="preapproved").map(M=>({...M,_dir:"sent"}))],sa=Kt.length+Sa.length,qt=rt.length,[ct,Or]=b.useState(0);b.useEffect(()=>{if(!i)return;let M=!1;return D.collection("private_messages").getList(1,200,{filter:`to_member = "${i.id}" && read = false`}).then(I=>{M||Or(I.totalItems)}).catch(()=>{}),()=>{M=!0}},[i]),b.useEffect(()=>(d(sa+qt+ct),()=>d(0)),[sa,qt,ct,d]);const[ns,Br]=b.useState("solicitudes"),[Yo,Qo]=b.useState(0),Kn=["4","4+","5","5+","6a","6a+","6b","6b+","6c","6c+","7a","7a+","7b","7b+","7c","7c+","8a","8a+","8b","8b+","8c","8c+","9a","9a+","9b","9b+","9c"],_s=["V0","V1","V2","V3","V4","V5","V6","V7","V8","V9","V10","V11","V12","V13","V14","V15","V16","Font 3","Font 4","Font 5","Font 6a","Font 6b","Font 6c","Font 7a","Font 7b","Font 7c","Font 8a","Font 8b","Font 8c"],Yn=["I","II","III","IV","V","VI","A0","A1","A2","A3"],gn=M=>{Aa(M.id),Ua({route_name:M.route_name||"",grade:M.grade||"",sector:M.sector||"",review_text:M.review_text||"",conditions:M.conditions||"",best_season:M.best_season||"",rating:M.rating||0}),ue("")},Xl=async M=>{var I,be;if(!((I=ja.route_name)!=null&&I.trim())||!((be=ja.review_text)!=null&&be.trim())){ue("El nombre de la vía y el texto son obligatorios.");return}Zt(!0),ue("");try{const fe=await D.collection("route_reviews").update(M,{route_name:ja.route_name.trim(),grade:ja.grade||"",sector:ja.sector||"",review_text:ja.review_text.trim(),conditions:ja.conditions||"",best_season:ja.best_season||"",rating:Number(ja.rating)||0});Va(je=>je.map(Ve=>Ve.id===M?{...Ve,...fe}:Ve)),Aa(null)}catch{ue("No se pudo guardar. Inténtalo de nuevo.")}Zt(!1)},Pr=[{id:"homes",label:l("dashboard.my_homes"),icon:e.jsx(gs,{className:"w-4 h-4"})},{id:"lugares",label:l("dashboard.my_places"),icon:e.jsx(eb,{className:"w-4 h-4"})},{id:"croquis",label:l("dashboard.sketches"),icon:e.jsx(Zn,{className:"w-4 h-4"})},{id:"resenas",label:l("dashboard.reviews"),icon:e.jsx(bn,{className:"w-4 h-4"}),badge:ye.length||null},{id:"intercambios",label:l("dashboard.exchanges"),icon:e.jsx(Os,{className:"w-4 h-4"}),badge:sa+qt||null},{id:"companeros",label:l("dashboard.companions"),icon:e.jsx(ut,{className:"w-4 h-4"})}];return e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-20",children:[H&&e.jsx(Z4,{r:H,user:i,messages:U,loadingMsgs:te,msg:O,setMsg:X,onSend:_a,sending:B,onClose:()=>F(null),onAccept:M=>Us(M,"accepted"),onReject:M=>Us(M,"declined"),onConfirmStay:Oa,settling:Ce}),e.jsxs("section",{className:"relative overflow-hidden",style:{minHeight:"200px"},children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"url('/static/dashboard-hero.jpg')",backgroundSize:"cover",backgroundPosition:"center 40%",filter:"brightness(0.7)"},"aria-hidden":"true"}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, rgba(12,10,9,0.3) 0%, rgba(12,10,9,0.5) 60%, rgba(12,10,9,1) 100%)"},"aria-hidden":"true"}),e.jsx("div",{className:"relative max-w-5xl mx-auto px-4 sm:px-6 pt-10 pb-10 flex items-end",style:{minHeight:"200px"},children:e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-3xl sm:text-4xl font-bold text-white",style:{textShadow:"0 2px 16px rgba(0,0,0,0.8)"},children:"Mi panel"}),e.jsxs("p",{className:"text-stone-300 mt-1",style:{textShadow:"0 1px 8px rgba(0,0,0,0.8)"},children:["Bienvenido, ",i.name||"escalador"," · ",e.jsx("span",{className:"text-stone-400 text-sm",children:i.email})]})]})})]}),e.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-8",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4 mb-10",children:[e.jsx("div",{}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl px-5 py-3 flex items-center gap-3",children:[e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-stone-500 text-xs uppercase tracking-widest font-semibold",children:"Climbpoints"}),e.jsx("p",{className:"font-display text-2xl font-bold text-[#e8ff4a] leading-none",children:ma.available}),ma.blocked>0&&e.jsxs("p",{className:"text-stone-500 text-xs mt-0.5",children:[ma.blocked," bloqueados"]})]}),i.is_founder&&e.jsxs("div",{className:"flex flex-col items-center gap-0.5 border-l border-stone-800 pl-3",children:[e.jsxs("svg",{viewBox:"0 0 20 20",className:"w-6 h-6",fill:"none","aria-label":"Socio Fundador",children:[e.jsx("circle",{cx:"10",cy:"10",r:"9",fill:"#1c1917",stroke:"#e8ff4a",strokeWidth:"1"}),e.jsx("path",{d:"M10 3l1.5 3.5L15 7.2l-2.5 2.5.6 3.5L10 11.5 7 13.2l.6-3.5L5 7.2l3.5-.7z",fill:"#e8ff4a"})]}),e.jsx("span",{className:"text-[#e8ff4a] text-[9px] font-bold uppercase tracking-wide leading-none",children:"Fundador"})]})]})}),e.jsxs("div",{className:"flex gap-3 flex-wrap",children:[e.jsxs("button",{onClick:()=>{V(!Ea),Ze(!1),Ne(!1)},className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-stone-800 border border-stone-700 text-stone-200 font-semibold hover:border-[#e8ff4a] hover:text-[#e8ff4a] transition-colors text-sm",children:[e.jsx($n,{className:"w-4 h-4"})," Añadir escuela"]}),e.jsxs("button",{onClick:()=>{Ze(!da),V(!1),Ne(!1)},className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-stone-800 border border-stone-700 text-stone-200 font-semibold hover:border-[#e8ff4a] hover:text-[#e8ff4a] transition-colors text-sm",children:[e.jsx($n,{className:"w-4 h-4"})," ",l("dashboard.add_home")]})]})]}),da&&e.jsxs("div",{className:"mb-10 p-6 rounded-2xl bg-stone-900 border border-[#e8ff4a]/30",children:[e.jsx("h2",{className:"font-display text-xl font-bold text-white mb-6",children:l("dashboard.add_home")}),e.jsx(V4,{onSaved:js})]}),Ea&&e.jsxs("div",{className:"mb-10 p-6 rounded-2xl bg-stone-900 border border-[#e8ff4a]/30",children:[e.jsx("h2",{className:"font-display text-xl font-bold text-white mb-6",children:"Nueva escuela"}),j.length===0?e.jsx("p",{className:"text-stone-400",children:"Añade primero una casa para poder publicar consejos de escalada."}):e.jsx(F4,{homes:j,onSaved:js})]}),Se&&e.jsxs("div",{className:"mb-6 relative bg-[#e8ff4a]/5 border border-[#e8ff4a]/30 rounded-xl px-4 py-3 flex items-center gap-3",children:[e.jsxs("svg",{viewBox:"0 0 20 20",className:"w-5 h-5 shrink-0",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"10",cy:"10",r:"9",fill:"#1c1917",stroke:"#e8ff4a",strokeWidth:"1.5"}),e.jsx("path",{d:"M10 3l1.5 3.5L15 7.2l-2.5 2.5.6 3.5L10 11.5 7 13.2l.6-3.5L5 7.2l3.5-.7z",fill:"#e8ff4a"})]}),e.jsxs("p",{className:"text-stone-300 text-sm flex-1",children:[e.jsx("span",{className:"text-[#e8ff4a] font-bold",children:"Socio Fundador"})," — tienes ",e.jsx("span",{className:"text-[#e8ff4a] font-bold",children:"500 CP"})," de bienvenida. Tu insignia es permanente aunque uses los puntos."]}),e.jsx("button",{onClick:()=>{sessionStorage.setItem(`founder_welcome_shown_${i.id}`,"1"),_e(!1)},className:"shrink-0 text-stone-500 hover:text-white transition-colors text-lg leading-none","aria-label":l("buttons.close"),children:"×"})]}),e.jsx("div",{className:"flex gap-2 flex-wrap mb-8 border-b border-stone-800 pb-4",children:Pr.map(M=>{const I=M.id==="intercambios",be=p===M.id;return e.jsxs("button",{onClick:()=>f(M.id),className:`inline-flex items-center gap-2 rounded-full text-sm transition-all ${I?be?"bg-[#e8ff4a] text-stone-950 font-black px-6 py-3 text-base shadow-lg shadow-[#e8ff4a]/30 scale-105":"bg-[#e8ff4a]/15 text-[#e8ff4a] font-black border-2 border-[#e8ff4a] hover:bg-[#e8ff4a]/25 px-6 py-3 text-base":be?"bg-[#e8ff4a] text-stone-950 font-bold px-4 py-2":"text-stone-400 hover:text-[#e8ff4a] hover:border-[#e8ff4a] border border-stone-700 px-4 py-2"}`,children:[M.icon," ",M.label,M.badge?e.jsx("span",{className:`text-xs w-5 h-5 rounded-full flex items-center justify-center font-bold ${I&&!be?"bg-[#e8ff4a] text-stone-950":"bg-red-500 text-white"}`,children:M.badge}):null]},M.id)})}),ee?e.jsx("div",{className:"flex flex-col gap-4",children:[...Array(3)].map((M,I)=>e.jsx("div",{className:"h-20 bg-stone-900 rounded-2xl animate-pulse border border-stone-800"},I))}):p==="homes"?j.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("p",{className:"text-stone-500 text-lg mb-4",children:"Aún no has añadido ninguna casa."}),e.jsxs("button",{onClick:()=>Ze(!0),className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:[e.jsx($n,{className:"w-4 h-4"})," Añadir tu primera casa"]})]}):e.jsx("div",{className:"flex flex-col gap-4",children:j.map(M=>e.jsxs("div",{className:"rounded-2xl bg-stone-900 border border-stone-800 overflow-hidden hover:border-[#e8ff4a]/40 transition-colors",children:[e.jsxs("div",{className:"flex flex-col gap-3 p-4 group",children:[e.jsxs(ne,{to:`/homes/${M.id}`,className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"shrink-0",children:M.photos&&M.photos.length>0?e.jsxs("div",{className:"flex gap-1",children:[M.photos.slice(0,3).map((I,be)=>e.jsx("div",{className:"w-16 h-16 rounded-xl bg-stone-800 overflow-hidden",children:e.jsx("img",{src:D.files.getURL(M,I,{thumb:"100x100"}),alt:"",className:"w-full h-full object-cover"})},be)),M.photos.length>3&&e.jsxs("div",{className:"w-16 h-16 rounded-xl bg-stone-800 flex items-center justify-center text-stone-400 text-xs font-bold",children:["+",M.photos.length-3]})]}):e.jsx("div",{className:"w-16 h-16 rounded-xl bg-stone-800 flex items-center justify-center text-stone-600",children:e.jsx(gs,{className:"w-6 h-6"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-bold text-white group-hover:text-[#e8ff4a] transition-colors truncate",children:M.title}),e.jsxs("p",{className:"flex items-center gap-1 text-stone-400 text-sm mt-0.5",children:[e.jsx(ya,{className:"w-3 h-3"})," ",M.location]}),M.available&&e.jsx("span",{className:"inline-block mt-1.5 text-xs px-2 py-0.5 rounded-full bg-[#e8ff4a]/10 text-[#e8ff4a] border border-[#e8ff4a]/30",children:"Disponible"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap pt-1 border-t border-stone-800",children:[e.jsxs("button",{onClick:()=>
304{h(M),f("calendar")},className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-full border border-stone-600 text-stone-300 hover:border-[#e8ff4a] hover:text-[#e8ff4a] transition-colors text-sm font-medium min-h-[40px]",children:[e.jsx(xn,{className:"w-4 h-4"})," Calendario"]}),e.jsxs("button",{onClick:()=>ie((ge==null?void 0:ge.id)===M.id?null:M),className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-full border border-stone-600 text-stone-300 hover:border-[#e8ff4a] hover:text-[#e8ff4a] transition-colors text-sm font-medium min-h-[40px]",children:[(ge==null?void 0:ge.id)===M.id?e.jsx(_t,{className:"w-4 h-4"}):e.jsx(Qx,{className:"w-4 h-4"}),(ge==null?void 0:ge.id)===M.id?"Cerrar":"Editar"]})]})]}),(ge==null?void 0:ge.id)===M.id&&e.jsx("div",{className:"px-5 pb-5 pt-4 border-t border-stone-800",children:e.jsx(G4,{home:M,onSaved:()=>{ie(null),js()},onCancel:()=>ie(null)})})]},M.id))}):p==="lugares"?e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-2xl font-bold text-white mb-1",children:"Mis lugares de escalada"}),e.jsx("p",{className:"text-stone-400 text-sm",children:"Escuelas, sectores y vías que has guardado o escalado."})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-stone-300 font-semibold text-sm uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx("span",{className:"text-[#e8ff4a]",children:"✓"})," Vías que he escalado ",ua.length]}),ua.length===0?e.jsx("p",{className:"text-stone-500 text-sm py-6 text-center",children:"Aún no has marcado ninguna vía como escalada. Pulsa «La he escalado» en cualquier reseña o ficha de escuela."}):e.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:ua.map(M=>{var I;return e.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl bg-stone-900 border border-stone-800",children:[e.jsx("span",{className:"text-[#e8ff4a] text-lg leading-none mt-0.5",children:"✓"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-white font-semibold text-sm truncate",children:M.route_name||M.route_key}),e.jsx("p",{className:"text-stone-500 text-xs mt-0.5 truncate",children:[M.school_name,M.sector_name].filter(Boolean).join(" · ")}),e.jsx("p",{className:"text-stone-600 text-xs mt-0.5",children:(I=M.created)==null?void 0:I.slice(0,10)})]})]},M.id)})})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-stone-300 font-semibold text-sm uppercase tracking-widest mb-4 flex items-center gap-2",children:[e.jsx("span",{className:"text-rose-400",children:"♥"})," Guardados ",Qe.length]}),Qe.length===0?e.jsx("p",{className:"text-stone-500 text-sm py-6 text-center",children:"Aún no has guardado ningún lugar. Pulsa «♡ Guardar» en cualquier escuela o vía."}):e.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:Qe.map(M=>{const I=M.item_type==="school"?"Escuela":M.item_type==="sector"?"Sector":"Vía",be=M.item_type==="school"?"text-[#e8ff4a]":M.item_type==="sector"?"text-sky-400":"text-emerald-400";return e.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl bg-stone-900 border border-stone-800",children:[e.jsx("span",{className:"text-rose-400 text-lg leading-none mt-0.5",children:"♥"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:`text-xs font-bold uppercase tracking-wide ${be}`,children:I}),e.jsx("p",{className:"text-white font-semibold text-sm truncate mt-0.5",children:M.item_name||M.item_key}),M.school_name&&e.jsx("p",{className:"text-stone-500 text-xs mt-0.5 truncate",children:[M.school_name,M.sector_name].filter(Boolean).join(" · ")})]})]},M.id)})})]})]}):p==="croquis"?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-2xl font-bold text-white",children:"Mis croquis"}),e.jsx("p",{className:"text-stone-400 text-sm mt-1",children:"Los croquis y topos que has subido a la comunidad."})]}),e.jsxs("button",{onClick:()=>Ne(!pe),className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors text-sm",children:[e.jsx($n,{className:"w-4 h-4"})," Subir croquis"]})]}),pe&&e.jsx("div",{className:"rounded-2xl bg-stone-900 border border-[#e8ff4a]/30 overflow-hidden",children:e.jsx(I4,{homes:j,onSaved:()=>{Ne(!1),D.collection("topos").getList(1,100,{filter:`author = "${i.id}"`,sort:"-created"}).then(M=>oe(M.items))}})}),de&&e.jsx("div",{className:"rounded-2xl overflow-hidden mb-2",children:e.jsx($4,{topo:de,homes:j,onSaved:()=>{ze(null),D.collection("topos").getList(1,100,{filter:`author = "${i.id}"`,sort:"-created"}).then(M=>oe(M.items))},onCancel:()=>ze(null)})}),$.length===0&&!pe?e.jsxs("div",{className:"text-center py-16",children:[e.jsx(Zn,{className:"w-12 h-12 text-stone-700 mx-auto mb-4"}),e.jsx("p",{className:"text-stone-500 text-lg mb-2",children:"Aún no has subido ningún croquis."}),e.jsx("p",{className:"text-stone-600 text-sm mb-6",children:"Comparte los topos de tus zonas favoritas con la comunidad."}),e.jsxs("button",{onClick:()=>Ne(!0),className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:[e.jsx($n,{className:"w-4 h-4"})," Subir mi primer croquis"]})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:$.map(M=>{const I=M.image||M.images||[],be=Array.isArray(I)?I:I?[I]:[];return e.jsx(Y4,{topo:M,imgs:be,onEdit:()=>{ze(M),Ne(!1),setTimeout(()=>window.scrollTo({top:0,behavior:"smooth"}),50)},onDelete:async()=>{confirm("¿Eliminar este croquis?")&&(await D.collection("topos").delete(M.id),oe(fe=>fe.filter(je=>je.id!==M.id)))}},M.id)})})]}):p==="resenas"?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-2xl font-bold text-white mb-1",children:"Mis reseñas"}),e.jsx("p",{className:"text-stone-400 text-sm",children:"Las reseñas de escalada que has publicado. Puedes editarlas cuando quieras."})]}),ye.length===0?e.jsxs("div",{className:"text-center py-16 bg-stone-900 rounded-2xl border border-stone-800",children:[e.jsx(bn,{className:"w-10 h-10 text-stone-700 mx-auto mb-4"}),e.jsx("p",{className:"text-stone-400 text-sm",children:"Aún no has publicado ninguna reseña."}),e.jsx(ne,{to:"/resenas",className:"inline-block mt-4 px-5 py-2 bg-[#e8ff4a] text-stone-950 rounded-xl text-sm font-bold hover:bg-[#f0ff70] transition-colors",children:"Ir a Reseñas"})]}):e.jsx("div",{className:"flex flex-col gap-4",children:ye.map(M=>{var I,be;return e.jsx("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5",children:Ya===M.id?e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{className:"text-xs text-[#e8ff4a] font-semibold uppercase tracking-wide mb-1",children:"Editar reseña"}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-stone-400 block mb-1",children:"Nombre de la vía *"}),e.jsx("input",{value:ja.route_name||"",onChange:fe=>Ua(je=>({...je,route_name:fe.target.value})),className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm focus:outline-hidden focu
304s:border-[#e8ff4a]/50"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-stone-400 block mb-1",children:"Grado"}),e.jsxs("select",{value:ja.grade||"",onChange:fe=>Ua(je=>({...je,grade:fe.target.value})),className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm focus:outline-hidden focus:border-[#e8ff4a]/50",children:[e.jsxs("option",{value:"",children:["— ",l("common.no_grade")]}),e.jsx("optgroup",{label:"Deportiva",children:Kn.map(fe=>e.jsx("option",{value:fe,children:fe},fe))}),e.jsx("optgroup",{label:"Bloque",children:_s.map(fe=>e.jsx("option",{value:fe,children:fe},fe))}),e.jsx("optgroup",{label:"Clásica",children:Yn.map(fe=>e.jsx("option",{value:fe,children:fe},fe))})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-stone-400 block mb-1",children:"Sector"}),e.jsx("input",{value:ja.sector||"",onChange:fe=>Ua(je=>({...je,sector:fe.target.value})),className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm focus:outline-hidden focus:border-[#e8ff4a]/50"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-stone-400 block mb-1",children:"Texto de la reseña *"}),e.jsx("textarea",{value:ja.review_text||"",onChange:fe=>Ua(je=>({...je,review_text:fe.target.value})),rows:4,className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm focus:outline-hidden focus:border-[#e8ff4a]/50 resize-y"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-stone-400 block mb-1",children:"Condiciones"}),e.jsx("input",{value:ja.conditions||"",onChange:fe=>Ua(je=>({...je,conditions:fe.target.value})),className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm focus:outline-hidden focus:border-[#e8ff4a]/50"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-stone-400 block mb-1",children:"Mejor época"}),e.jsx("input",{value:ja.best_season||"",onChange:fe=>Ua(je=>({...je,best_season:fe.target.value})),className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm focus:outline-hidden focus:border-[#e8ff4a]/50"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-stone-400 block mb-1",children:"Valoración"}),e.jsx("div",{className:"flex gap-2",children:[1,2,3,4,5].map(fe=>e.jsx("button",{type:"button",onClick:()=>Ua(je=>({...je,rating:je.rating===fe?0:fe})),className:`w-8 h-8 rounded-full text-sm font-bold transition-all ${(ja.rating||0)>=fe?"bg-[#e8ff4a] text-stone-900":"bg-stone-800 text-stone-500 hover:bg-stone-700"}`,children:fe},fe))})]}),Nt&&e.jsx("p",{className:"text-red-400 text-xs",role:"alert",children:Nt}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>Xl(M.id),disabled:ss,className:"flex-1 py-2 bg-[#e8ff4a] text-stone-950 rounded-xl text-sm font-bold disabled:opacity-50 hover:bg-[#f0ff70] transition-colors",children:ss?"Guardando…":"Guardar cambios"}),e.jsx("button",{onClick:()=>{Aa(null),ue("")},className:"px-4 py-2 bg-stone-800 text-stone-300 rounded-xl text-sm hover:bg-stone-700 transition-colors",children:l("buttons.cancel")})]})]}):e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-white font-bold truncate",children:M.route_name}),e.jsx("p",{className:"text-stone-500 text-xs mt-0.5",children:[M.zone,M.sector].filter(Boolean).join(" › ")})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[M.grade&&e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-[#e8ff4a]/15 text-[#e8ff4a] text-xs font-bold border border-[#e8ff4a]/30",children:M.grade}),e.jsxs("button",{onClick:()=>gn(M),className:"flex items-center gap-1 text-xs text-stone-500 hover:text-[#e8ff4a] transition-colors px-2 py-1 rounded-lg hover:bg-stone-800",children:[e.jsx(Qx,{
304className:"w-3.5 h-3.5","aria-hidden":"true"})," Editar"]})]})]}),e.jsx("p",{className:"text-stone-300 text-sm leading-relaxed line-clamp-3",children:M.review_text}),M.rating>0&&e.jsx("div",{className:"flex gap-0.5",children:Array.from({length:5}).map((fe,je)=>e.jsx("span",{className:je<M.rating?"text-[#e8ff4a]":"text-stone-700",children:"★"},je))}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-stone-600 border-t border-stone-800 pt-2 mt-1 flex-wrap",children:[M.conditions&&e.jsxs("span",{children:["Condiciones: ",e.jsx("span",{className:"text-stone-400",children:M.conditions})]}),M.best_season&&e.jsxs("span",{children:["Mejor época: ",e.jsx("span",{className:"text-stone-400",children:M.best_season})]}),e.jsx("time",{className:"ml-auto",dateTime:(I=M.created)==null?void 0:I.slice(0,10),children:(be=M.created)==null?void 0:be.slice(0,10)})]})]})},M.id)})})]}):p==="calendar"?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-2xl font-bold text-white mb-1",children:"Disponibilidad anual"}),e.jsx("p",{className:"text-stone-400 text-sm",children:"Haz clic en cualquier día para marcarlo en rojo como no disponible. Pulsa de nuevo para liberar el día. Guarda cuando termines."})]}),j.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("p",{className:"text-stone-500 text-lg mb-4",children:"Primero añade una casa para gestionar su calendario."}),e.jsxs("button",{onClick:()=>{Ze(!0),f("homes")},className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:[e.jsx($n,{className:"w-4 h-4"})," Añadir mi casa"]})]}):e.jsxs("div",{className:"space-y-8",children:[j.length>1&&e.jsx("div",{className:"flex flex-wrap gap-2",children:j.map(M=>e.jsx("button",{onClick:()=>h(M),className:`px-4 py-2 rounded-full text-sm font-semibold border transition-colors ${((x==null?void 0:x.id)||j[0].id)===M.id?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"border-stone-700 text-stone-300 hover:border-[#e8ff4a] hover:text-[#e8ff4a]"}`,children:M.title},M.id))}),e.jsx(P4,{home:x||j[0]})]})]}):p==="intercambios"?e.jsxs("div",{children:[e.jsx("div",{className:"flex gap-2 flex-wrap mb-6 overflow-x-auto pb-1",children:[{id:"solicitudes",label:"Solicitudes",count:Kt.length},{id:"preaprobadas",label:"Preaprobadas",count:Sa.length},{id:"encurso",label:"En curso",count:rt.length},{id:"proximos",label:"Próximos",count:ke.length},{id:"pasados",label:"Finalizados",count:Je.length}].map(M=>e.jsxs("button",{onClick:()=>Br(M.id),className:`inline-flex items-center gap-1.5 px-4 py-2 rounded-full text-sm font-medium transition-colors shrink-0 ${ns===M.id?"bg-[#e8ff4a] text-stone-950 font-bold":"border border-stone-700 text-stone-400 hover:text-[#e8ff4a] hover:border-[#e8ff4a]"}`,children:[M.label,e.jsx("span",{className:`text-xs min-w-[20px] h-5 px-1 rounded-full flex items-center justify-center font-bold ${ns===M.id?"bg-stone-950/25 text-stone-950":M.count>0?"bg-[#e8ff4a]/20 text-[#e8ff4a] border border-[#e8ff4a]/30":"bg-stone-800 text-stone-500"}`,children:M.count})]},M.id))}),ns==="solicitudes"&&(()=>{if(Kt.length===0&&v.filter(I=>I.status!=="pending"&&I.status!=="preapproved").length===0&&N.filter(I=>I.status!=="pending"&&I.status!=="preapproved").length===0)return e.jsxs("div",{className:"text-center py-16",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-stone-900 flex items-center justify-center mx-auto mb-4",children:e.jsx(Os,{className:"w-7 h-7 text-stone-600"})}),e.jsx("p",{className:"text-stone-400 text-lg font-semibold mb-1",children:"Aún no tienes solicitudes"}),e.jsx("p",{className:"text-stone-600 text-sm mb-6",children:"Explora casas y envía tu primera solicitud de intercambio."}),e.jsx(ne,{to:"/homes",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-yellow-300 transition-colors",children:"Ver casas disponibles"})]});const M=[...v.filter(I=>I.status!=="preapproved").map(I=>({...I,_dir:"sent"})),...N.filter(I=>I.status!=="preapproved").map(I=>({...I,_dir:"received"}))].sort((I,be)=>new Date(be.created)-new Date(I.created));return e.jsx("div",{className:"flex flex-col gap-4",children:M.map(I=>{var la,pa,qe;const be=(la=I.expand)==null?void 0:la.to_home,fe=(pa=I.expand)==null?void 0:pa.from_member,je=(qe=be==null?void 0:be.photos)!=null&&qe[0]?D.files.getURL(be,be.photos[0],{thumb:"400x300"}):null,Ve=fe!=null&&fe.avatar?D.files.getURL(fe,fe.avatar,{thumb:"100x100"}):null,Me=I._dir==="sent",Oe=I.status==="accepted"?"bg-green-500/10 text-green-400 border-green-500/30":I.status==="preapproved"?"bg-orange-500/10 text-orange-300 border-orange-500/30":I.status==="declined"?"bg-red-500/10 text-red-400 border-red-500/30":I.status==="dates_taken"?"bg-stone-700/20 text-stone-500 border-stone-700/30":Me?"bg-yellow-500/10 text-yellow-400 border-yellow-500/30":"bg-[#e8ff4a]/10 text-[#e8ff4a] border-[#e8ff4a]/30",Pe=I.status==="accepted"?"✓ Confirmada":I.status==="preapproved"?"◐ Preaprobada":I.status==="declined"?"✗ Rechazada":I.status==="dates_taken"?"⊘ Fechas ocupadas":"⏳ Pendiente";return e.jsxs("div",{className:`rounded-2xl bg-stone-900 border overflow-hidden ${I.status==="accepted"?"border-green-500/20":I.status==="declined"?"border-red-500/10":Me?"border-stone-800":"border-[#e8ff4a]/20"}`,children:[I.status==="pending"&&e.jsx("div",{className:`h-1 ${Me?"bg-yellow-500/50":"bg-[#e8ff4a]"}`}),I.status==="accepted"&&e.jsx("div",{className:"h-1 bg-green-500"}),e.jsxs("div",{className:"flex gap-0",children:[je?e.jsx("div",{className:"w-24 md:w-32 shrink-0 overflow-hidden",children:e.jsx("img",{src:je,alt:be==null?void 0:be.title,className:"w-full h-full object-cover"})}):e.jsx("div",{className:"w-24 md:w-32 shrink-0 bg-stone-800 flex items-center justify-center",children:e.jsx(gs,{className:"w-8 h-8 text-stone-600"})}),e.jsxs("div",{className:"flex-1 p-4 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-semibold border ${Me?"bg-stone-800 text-stone-400 border-stone-700":"bg-[#e8ff4a]/10 text-[#e8ff4a] border-[#e8ff4a]/20"}`,children:Me?"Enviada":"Recibida"}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-semibold border ${Oe}`,children:Pe})]}),e.jsx(ne,{to:`/homes/${I.to_home}`,className:"font-bold text-white hover:text-[#e8ff4a] transition-colors text-base leading-tight block truncate",children:(be==null?void 0:be.title)||"Casa"}),(be==null?void 0:be.location)&&e.jsxs("p",{className:"text-stone-500 text-xs flex items-center gap-1 mt-0.5",children:[e.jsx(ya,{className:"w-3 h-3 shrink-0"}),be.location]}),!Me&&fe&&e.jsxs("p",{className:"text-stone-400 text-xs flex items-center gap-1 mt-1",children:[Ve?e.jsx("img",{src:Ve,alt:fe.name,className:"w-4 h-4 rounded-full object-cover"}):null,fe.name]}),e.jsx("p",{className:"text-stone-400 text-sm line-clamp-2 mt-1",children:I.message}),I.date_from&&I.date_to&&e.jsxs("p",{className:"text-stone-500 text-xs flex items-center gap-1 mt-1",children:[e.jsx(xn,{className:"w-3 h-3 shrink-0"}),new Date(I.date_from).toLocaleDateString("es-ES",{day:"numeric",month:"short"})," → ",new Date(I.date_to).toLocaleDateString("es-ES",{day:"numeric",month:"short"}),I.nights?` · ${I.nights} noches`:"",I.cp_cost?` · ${I.cp_cost} CP`:""]}),e.jsx("p",{className:"text-stone-600 text-xs mt-1",children:Gn(I.created)})]})]}),!Me&&(I.status==="pending"||I.status==="preapproved")&&e.jsx("div",{className:"px-4 pb-4 pt-1 border-t border-stone-800",children:e.jsx("button",{onClick:()=>setSelectedRequest(I),className:"w-full py-2.5 rounded-xl bg-[#e8ff4a] text-stone-950 text-sm font-bold hover:bg-yellow-300 transition-colors",children:"Ver solicitud y responder →"})}),I.status==="dates_taken"&&e.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-stone-800",children:e.jsx("p",{className:"text-stone-500 text-xs",children:"Estas fechas ya fueron confirmadas para otro intercambio."})}),e.jsxs("div",{className:"border-t border-stone-800",children:[e.jsxs("button",{onClick:()=>La(I.id),className:"w-full flex items-center gap-2 px-4 py-2.5 text-stone-500 hover:text-stone-300 text-xs font-medium transition-colors",children:[e.jsx(Os,{className:"w-3.5 h-3.5"}),z===I.id?"Cerrar conversación":"Ver conversación"]}),z===I.id&&e.jsxs("div",{className:"px-4 pb-4",children:[e.jsxs("div",{className:"space-y-2 mb-3 max-h-48 overflow-y-auto",children:[k.length===0&&e.jsx("p",{className:"text-stone-600 text-xs text-center py-2",children:"Sin mensajes aún — el primero fue la solicitud inicial."}),k.map(ea=>e.jsx("div",{className:`flex gap-2 ${ea.author===i.id?"justify-end":""}`,children:e.jsxs("div",{className:`max-w-[80%] px-3 py-2 rounded-xl text-sm ${ea.author===i.id?"bg-[#e8ff4a]/10 text-[#e8ff4a] rounded-br-none":"bg-stone-800 text-stone-200 rounded-bl-none"}`,children:[e.jsx("p",{children:ea.body}),e.jsx("p",{className:"text-xs opacity-50 mt-0.5",children:Gn(ea.created)})]})},ea.id))]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:w,onChange:ea=>A(ea.target.value),onKeyDown:ea=>ea.key==="Enter"&&!ea.shiftKey&&Ke(I.id),placeholder:"Escribe un mensaje…",className:"flex-1 px-3 py-2 rounded-xl bg-stone-800 border border-stone-700 text-white text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors"}),e.jsx("button",{onClick:()=>Ke(I.id),disabled:L||!w.trim(),className:"px-3 py-2 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-yellow-300 transition-colors disabled:opacity-40",children:"→"})]})]})]})]},I.id+I._dir)})})})(),ns==="preaprobadas"&&(Sa.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-stone-900 flex items-center justify-center mx-auto mb-4",children:e.jsx("span",{className:"text-2xl",children:"◐"})}),e.jsx("p",{className:"text-stone-400 text-lg font-semibold mb-1",children:"Sin solicitudes preaprobadas"}),e.jsx("p",{className:"text-stone-600 text-sm",children:"Cuando preapruebas una solicitud aparece aquí mientras decides."})]}):e.jsxs("div",{className:"flex flex-col gap-4",children:[Sa.some(M=>M._dir==="received")&&e.jsxs("div",{className:"px-4 py-3 rounded-xl bg-orange-500/10 border border-orange-500/20 text-orange-300 text-sm mb-2",children:["Estas solicitudes están preaprobadas pero ",e.jsx("strong",{children:"no confirmadas"}
304),". Las fechas siguen libres y los Climbpoints no se han movido. Confirma cuando lo tengas claro."]}),Sa.some(M=>M._dir==="sent")&&e.jsx("div",{className:"px-4 py-3 rounded-xl bg-sky-500/10 border border-sky-500/20 text-sky-300 text-sm mb-2",children:"El anfitrión ha preaprobado tu solicitud — está revisando fechas y te confirmará pronto."}),Sa.map(M=>{var Ve,Me,Oe,Pe;const I=(Ve=M.expand)==null?void 0:Ve.to_home,be=M._dir==="received"?(Me=M.expand)==null?void 0:Me.from_member:((Oe=I==null?void 0:I.expand)==null?void 0:Oe.owner)||null,fe=(Pe=I==null?void 0:I.photos)!=null&&Pe[0]?D.files.getURL(I,I.photos[0],{thumb:"400x300"}):null,je=be!=null&&be.avatar?D.files.getURL(be,be.avatar,{thumb:"100x100"}):null;return e.jsxs("div",{className:"rounded-2xl bg-stone-900 border border-orange-500/30 overflow-hidden",children:[e.jsx("div",{className:"h-1 bg-orange-500/60"}),e.jsxs("div",{className:"flex gap-0",children:[fe?e.jsx("div",{className:"w-24 md:w-32 shrink-0 overflow-hidden",children:e.jsx("img",{src:fe,alt:I==null?void 0:I.title,className:"w-full h-full object-cover"})}):e.jsx("div",{className:"w-24 md:w-32 shrink-0 bg-stone-800 flex items-center justify-center",children:e.jsx(gs,{className:"w-8 h-8 text-stone-600"})}),e.jsxs("div",{className:"flex-1 p-4 min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-orange-500/20 text-orange-300 border border-orange-500/30 font-semibold",children:"◐ Preaprobada"})}),e.jsx("p",{className:"font-bold text-white text-base truncate",children:(I==null?void 0:I.title)||"Casa"}),(I==null?void 0:I.location)&&e.jsxs("p",{className:"text-stone-500 text-xs flex items-center gap-1 mt-0.5",children:[e.jsx(ya,{className:"w-3 h-3 shrink-0"}),I.location]}),be&&e.jsxs("p",{className:"text-stone-400 text-xs flex items-center gap-1 mt-1",children:[je?e.jsx("img",{src:je,alt:be.name,className:"w-4 h-4 rounded-full object-cover"}):null,be.name]}),M.date_from&&M.date_to&&e.jsxs("p",{className:"text-stone-500 text-xs flex items-center gap-1 mt-1",children:[e.jsx(xn,{className:"w-3 h-3 shrink-0"}),new Date(M.date_from).toLocaleDateString("es-ES",{day:"numeric",month:"short"})," → ",new Date(M.date_to).toLocaleDateString("es-ES",{day:"numeric",month:"short"}),M.nights?` · ${M.nights} noches`:""]})]})]}),M._dir==="received"&&e.jsx("div",{className:"px-4 pb-4 pt-1 border-t border-stone-800",children:e.jsx("button",{onClick:()=>setSelectedRequest(M),className:"w-full py-2.5 rounded-xl bg-[#e8ff4a] text-stone-950 text-sm font-bold hover:bg-yellow-300 transition-colors",children:"Ver solicitud y responder →"})}),M._dir==="sent"&&e.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-stone-800",children:e.jsx("p",{className:"text-sky-400 text-xs font-medium py-1",children:"⏳ Esperando confirmación del anfitrión"})}),e.jsxs("div",{className:"border-t border-stone-800",children:[e.jsxs("button",{onClick:()=>La(M.id),className:"w-full flex items-center gap-2 px-4 py-2.5 text-stone-500 hover:text-stone-300 text-xs font-medium transition-colors",children:[e.jsx(Os,{className:"w-3.5 h-3.5"}),z===M.id?"Cerrar conversación":"Ver conversación"]}),z===M.id&&e.jsxs("div",{className:"px-4 pb-4",children:[e.jsxs("div",{className:"space-y-2 mb-3 max-h-48 overflow-y-auto",children:[k.length===0&&e.jsx("p",{className:"text-stone-600 text-xs text-center py-2",children:"Sin mensajes aún."}),k.map(la=>e.jsx("div",{className:`flex gap-2 ${la.author===i.id?"justify-end":""}`,children:e.jsxs("div",{className:`max-w-[80%] px-3 py-2 rounded-xl text-sm ${la.author===i.id?"bg-[#e8ff4a]/10 text-[#e8ff4a] rounded-br-none":"bg-stone-800 text-stone-200 rounded-bl-none"}`,children:[e.jsx("p",{children:la.body}),e.jsx("p",{className:"text-xs opacity-50 mt-0.5",children:Gn(la.created)})]})},la.id))]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:w,onChange:la=>A(la.target.value),onKeyDown:la=>la.key==="Enter"&&!la.shiftKey&&Ke(M.id),placeholder:"Escribe un mensaje…",className:"flex-1 px-3 py-2 rounded-xl bg-stone-800 border border-stone-700 text-white text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors"}),e.jsx("button",{onClick:()=>Ke(M.id),disabled:L||!w.trim(),className:"px-3 py-2 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-yellow-300 transition-colors disabled:opacity-40",children:"→"})]})]})]})]},M.id)})]})),ns==="encurso"&&(rt.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("p",{className:"text-stone-500 text-lg mb-2",children:"No tienes intercambios activos en este momento."}),e.jsx("p",{className:"text-stone-600 text-sm",children:"Los intercambios aceptados cuyas fechas coinciden con hoy a
304parecerán aquí."})]}):e.jsx("div",{className:"flex flex-col gap-4",children:rt.map(M=>{var Ve,Me,Oe;const I=(Ve=M.expand)==null?void 0:Ve.to_home,be=(Me=M.expand)==null?void 0:Me.from_member,fe=(Oe=I==null?void 0:I.photos)!=null&&Oe[0]?D.files.getURL(I,I.photos[0],{thumb:"400x300"}):null,je=M._dir==="sent"?I==null?void 0:I.title:be==null?void 0:be.name;return e.jsxs("div",{className:"rounded-2xl bg-stone-900 border border-green-500/30 overflow-hidden",children:[e.jsx("div",{className:"h-1 bg-gradient-to-r from-green-500 to-emerald-400"}),e.jsxs("div",{className:"flex gap-0",children:[fe?e.jsx("div",{className:"w-24 md:w-32 shrink-0 overflow-hidden",children:e.jsx("img",{src:fe,alt:I==null?void 0:I.title,className:"w-full h-full object-cover"})}):e.jsx("div",{className:"w-24 md:w-32 shrink-0 bg-stone-800 flex items-center justify-center",children:e.jsx(gs,{className:"w-8 h-8 text-stone-600"})}),e.jsxs("div",{className:"flex-1 p-4 min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-green-500/20 text-green-400 border border-green-500/30 font-semibold animate-pulse",children:"● En curso"})}),e.jsx("p",{className:"font-bold text-white text-base truncate",children:(I==null?void 0:I.title)||"Casa"}),(I==null?void 0:I.location)&&e.jsxs("p",{className:"text-stone-500 text-xs flex items-center gap-1",children:[e.jsx(ya,{className:"w-3 h-3 shrink-0"}),I.location]}),e.jsxs("p",{className:"text-stone-400 text-sm mt-1",children:[M._dir==="sent"?"Estás alojad
304o en casa de":"Te alojan",": ",e.jsx("span",{className:"text-white font-medium",children:je})]}),e.jsxs("p",{className:"text-stone-500 text-xs flex items-center gap-1 mt-1",children:[e.jsx(xn,{className:"w-3 h-3 shrink-0"}),new Date(M.date_from).toLocaleDateString("es-ES",{day:"numeric",month:"short"})," → ",new Date(M.date_to).toLocaleDateString("es-ES",{day:"numeric",month:"short"}),M.nights?` · ${M.nights} noches`:"",M.cp_cost?` · ${M.cp_cost} CP`:""]})]})]}),e.jsxs("div",{className:"border-t border-stone-800",children:[e.jsx("button",{onClick:()=>Fe(M),className:"w-full flex items-center justify-center gap-2 px-4 py-3 text-[#e8ff4a] hover:bg-[#e8ff4a]/5 text-sm font-semibold transition-colors",children:"Ver detalle y conversación →"}),e.jsxs("button",{onClick:()=>La(M.id),className:"w-full flex items-center gap-2 px-4 py-2.5 text-stone-500 hover:text-stone-300 text-xs font-medium transition-colors border-t border-stone-800/50",children:[e.jsx(Os,{className:"w-3.5 h-3.5"}),z===M.id?"Cerrar conversación":"Mensajes rápidos"]}),z===M.id&&e.jsxs("div",{className:"px-4 pb-4",children:[e.jsxs("div",{className:"space-y-2 mb-3 max-h-48 overflow-y-auto",children:[k.length===0&&e.jsx("p",{className:"text-stone-600 text-xs text-center py-2",children:"Sin mensajes aún."}),k.map(Pe=>e.jsx("div",{className:`flex gap-2 ${Pe.author===i.id?"justify-end":""}`,children:e.jsxs("div",{className:`max-w-[80%] px-3 py-2 rounded-xl text-sm ${Pe.author===i.id?"bg-[#e8ff4a]/10 text-[#e8ff4a] rounded-br-none":"bg-stone-800 text-stone-200 rounded-bl-none"}`,children:[e.jsx("p",{children:Pe.body}),e.jsx("p",{className:"text-xs opacity-50 mt-0.5",children:Gn(Pe.created)})]})},Pe.id))]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:w,onChange:Pe=>A(Pe.target.value),onKeyDown:Pe=>Pe.key==="Enter"&&!Pe.shiftKey&&Ke(M.id),placeholder:"Escribe un mensaje…",className:"flex-1 px-3 py-2 rounded-xl bg-stone-800 border border-stone-700 text-white text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors"}),e.jsx("button",{onClick:()=>Ke(M.id),disabled:L||!w.trim(),className:"px-3 py-2 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-yellow-300 transition-colors disabled:opacity-40",children:"→"})]})]})]})]},M.id+M._dir)})})),ns==="proximos"&&(ke.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("p",{className:"text-stone-500 text-lg mb-2",children:"No tienes intercambios próximos confirmados."}),e.jsx("p",{className:"text-stone-600 text-sm",children:"Los intercambios aceptados con fecha futura aparecerán aquí."})]}):e.jsx("div",{className:"flex flex-col gap-4",children:ke.map(M=>{var je,Ve,Me;const I=(je=M.expand)==null?void 0:je.to_home;(Ve=M.expand)==null||Ve.from_member;const be=(Me=I==null?void 0:I.photos)!=null&&Me[0]?D.files.getURL(I,I.photos[0],{thumb:"400x300"}):null,fe=Math.ceil((new Date(M.date_from)-Rt)/(1e3*60*60*24));return e.jsxs("div",{className:"rounded-2xl bg-stone-900 border border-stone-700 overflow-hidden",children:[e.jsxs("div",{className:"flex gap-0",children:[be?e.jsx("div",{className:"w-24 md:w-32 shrink-0 overflow-hidden",children:e.jsx("img",{src:be,alt:I==null?void 0:I.title,className:"w-full h-full object-cover"})}):e.jsx("div",{className:"w-24 md:w-32 shrink-0 bg-stone-800 flex items-center justify-center",children:e.jsx(gs,{className:"w-8 h-8 text-stone-600"})}),e.jsxs("div",{className:"flex-1 p-4 min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsxs("span",{className:"text-xs px-2 py-0.5 rounded-full bg-[#e8ff4a]/10 text-[#e8ff4a] border border-[#e8ff4a]/20 font-semibold",children:["En ",fe," día",fe!==1?"s":""]})}),e.jsx("p",{className:"font-bold text-white text-base truncate",children:(I==null?void 0:I.title)||"Casa"}),(I==null?void 0:I.location)&&e.jsxs("p",{className:"text-stone-500 text-xs flex items-center gap-1",children:[e.jsx(ya,{className:"w-3 h-3 shrink-0"}),I.location]}),e.jsxs("p",{className:"text-stone-500 text-xs flex items-center gap-1 mt-1",children:[e.jsx(xn,{className:"w-3 h-3 shrink-0"}),new Date(M.date_from).toLocaleDateString("es-ES",{day:"numeric",month:"long"})," → ",new Date(M.date_to).toLocaleDateString("es-ES",{day:"numeric",month:"long"}),M.nights?` · ${M.nights} noches`:"",M.cp_cost?` · ${M.cp_cost} CP`:""]})]})]}),e.jsxs("div",{className:"border-t border-stone-800",children:[e.jsx("button",{onClick:()=>Fe(M),className:"w-full flex items-center justify-center gap-2 px-4 py-3 text-[#e8ff4a] hover:bg-[#e8ff4a]/5 text-sm font-semibold transition-colors",children:"Ver detalle y conversación →"}),e.jsxs("button",{onClick:()=>La(M.id),className:"w-full flex items-center gap-2 px-4 py-2.5 text-stone-500 hover:text-stone-300 text-xs font-medium transition-colors border-t border-stone-800/50",children:[e.jsx(Os,{className:"w-3.5 h-3.5"}),z===M.id?"Cerrar conversación":"Mensajes rápidos"]}),z===M.id&&e.jsxs("div",{className:"px-4 pb-4",children:[e.jsxs("div",{className:"space-y-2 mb-3 max-h-48 overflow-y-auto",children:[k.length===0&&e.jsx("p",{className:"text-stone-600 text-xs text-center py-2",children:"Sin mensajes aún."}),k.map(Oe=>e.jsx("div",{className:`flex gap-2 ${Oe.author===i.id?"justify-end":""}`,children:e.jsxs("div",{className:`max-w-[80%] px-3 py-2 rounded-xl text-sm ${Oe.author===i.id?"bg-[#e8ff4a]/10 text-[#e8ff4a] rounded-br-none":"bg-stone-800 text-stone-200 rounded-bl-none"}`,children:[e.jsx("p",{children:Oe.body}),e.jsx("p",{className:"text-xs opacity-50 mt-0.5",children:Gn(Oe.created)})]})}
304,Oe.id))]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:w,onChange:Oe=>A(Oe.target.value),onKeyDown:Oe=>Oe.key==="Enter"&&!Oe.shiftKey&&Ke(M.id),placeholder:"Escribe un mensaje…",className:"flex-1 px-3 py-2 rounded-xl bg-stone-800 border border-stone-700 text-white text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors"}),e.jsx("button",{onClick:()=>Ke(M.id),disabled:L||!w.trim(),className:"px-3 py-2 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-yellow-300 transition-colors disabled:opacity-40",children:"→"})]})]})]})]},M.id+M._dir)})})),ns==="pasados"&&(Je.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("p",{className:"text-stone-500 text-lg mb-2",children:"Aún no tienes intercambios finalizados."}),e.jsx("p",{className:"text-stone-600 text-sm",children:"Aquí verás el historial completo con fechas, Climbpoints y conversaciones."})]}):e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-5 top-0 bottom-0 w-px bg-stone-800"}),e.jsx("div",{className:"flex flex-col gap-6 pl-14",children:Je.map(M=>{var je,Ve;const I=(je=M.expand)==null?void 0:je.to_home,be=(Ve=M.expand)==null?void 0:Ve.from_member,fe=M._dir==="sent"?(I==null?void 0:I.title)||"Casa":(be==null?void 0:be.name)||"Escalador";return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -left-[2.35rem] top-3 w-3 h-3 rounded-full bg-stone-500 border-2 border-stone-950"}),e.jsxs("div",{className:"p-5 rounded-2xl bg-stone-900 border border-stone-800",children:[e.jsxs("div",{className:"flex items-start justify-between flex-wrap gap-2 mb-2",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"font-bold text-white text-sm",children:[M._dir==="sent"?"Estuviste en":"Te alojó"," ",e.jsx("span",{className:"text-stone-300",children:fe})]}),(I==null?void 0:I.location)&&e.jsxs("p",{className:"text-stone-500 text-xs mt-0.5 flex items-center gap-1",children:[e.jsx(ya,{className:"w-3 h-3"}),I.location]})]}),M.cp_settled&&e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-green-500/10 text-green-400 border border-green-500/30 font-semibold",children:"✓ Completado"})]}),M.date_from&&M.date_to&&e.jsxs("p",{className:"text-stone-500 text-xs flex items-center gap-1 mb-3",children:[e.jsx(xn,{className:"w-3 h-3 shrink-0"}),new Date(M.date_from).toLocaleDateString("es-ES",{day:"numeric",month:"short",year:"numeric"})," → ",new Date(M.date_to).toLocaleDateString("es-ES",{day:"numeric",month:"short",year:"numeric"}),M.nights?` · ${M.nights} noches`:"",M.cp_cost?` · ${M.cp_cost} CP`:""]}),!M.cp_settled&&(Be===M.id?e.jsxs("div",{className:"mt-2 p-3 rounded-xl bg-stone-800 border border-[#e8ff4a]/20",children:[e.jsx("p",{className:"text-stone-300 text-sm mb-3",children:"¿Confirmas que la estancia ha finalizado? Los Climbpoints se liquidarán."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>Oa(M),disabled:Ce===M.id,className:"px-4 py-1.5 rounded-full bg-[#e8ff4a] text-stone-950 text-xs font-bold hover:bg-yellow-300 transition-colors disabled:opacity-50",children:Ce===M.id?"Procesando…":"Sí, confirmar"}),e.jsx("button",{onClick:()=>xe(null),className:"px-4 py-1.5 rounded-full border border-stone-700 text-stone-400 text-xs",children:l("buttons.cancel")})]})]}):e.jsx("button",{onClick:()=>xe(M.id),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/40 text-[#e8ff4a] text-xs font-semibold hover:bg-[#e8ff4a]/20 transition-colors",children:"✓ Confirmar estancia completada"})),(()=>{var la,pa;const Me=M._dir==="sent"?"guest":"host",Oe=M._dir==="sent"?((pa=(la=M.expand)==null?void 0:la.to_home)==null?void 0:pa.owner)||M.to_home:M.from_member,Pe=`past-${M.id}`;return e.jsxs("div",{className:"mt-2",children:[e.jsxs("button",{onClick:()=>me(le===Pe?null:Pe),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full border border-[#e8ff4a]/40 text-[#e8ff4a] text-xs hover:bg-[#e8ff4a]/10 transition-colors",children:[e.jsx(bn,{className:"w-3 h-3"}),Me==="guest"?"Valorar mi estancia":"Valorar al huésped"]}),le===Pe&&e.jsx(H4,{request:M,currentUserId:i.id,revieweeId:Oe,role:Me,onDone:()=>me(null)})]})})(),e.jsxs("div",{className:"border-t border-stone-800 mt-3",children:[e.jsx("button",{onClick:()=>Fe(M),className:"w-full flex items-center justify-center gap-2 py-2.5 text-[#e8ff4a] hover:bg-[#e8ff4a]/5 text-xs font-semibold transition-colors rounded-xl",children:"Ver ficha completa →"}),e.jsxs("button",{onClick:()=>La(M.id),className:"w-full flex items-center gap-2 py-2 text-stone-600 hover:text-stone-400 text-xs font-medium transition-colors border-t border-stone-800/50",children:[e.jsx(Os,{className:"w-3 h-3"}),z===M.id?"Cerrar conversación":"Ver conversación"]}),z===M.id&&e.jsx("div",{children:e.jsxs("div",{className:"space-y-2 mb-3 max-h-40 overflow-y-auto",children:[k.length===0&&e.jsx("p",{className:"text-stone-600 text-xs text-center py-2",children:"Sin mensajes en este intercambio."}),k.map(Me=>e.jsx("div",{className:`flex gap-2 ${Me.author===i.id?"justify-end":""}`,children:e.jsxs("div",{className:`max-w-[80%] px-3 py-2 rounded-xl text-sm ${Me.author===i.id?"bg-[#e8ff4a]/10 text-[#e8ff4a] rounded-br-none":"bg-stone-800 text-stone-200 rounded-bl-none"}`,children:[e.jsx("p",{children:Me.body}),e.jsx("p",{className:"text-xs opacity-50 mt-0.5",children:Gn(Me.created)})]})},Me.id))]})})]})]})]},M.id+M._dir)})})]})),ns==="mensajes"&&(()=>{const M=[...v.map(I=>({...I,_dir:"sent"})),...N.map(I=>({...I,_dir:"received"}))].sort((I,be)=>new Date(be.created)-new Date(I.created));return M.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-stone-900 flex items-center justify-center mx-auto mb-4",children:e.jsx(Os,{className:"w-7 h-7 text-stone-600"})}),e.jsx("p",{className:"text-stone-400 text-lg font-semibold mb-1",children:"Sin conversaciones aún"}),e.jsx("p",{className:"text-stone-600 text-sm",children:"Cada conversación queda vinculada a su intercambio. Cuando envíes o recibas una solicitud, podrás escribirte desde aquí."})]}):e.jsx("div",{className:"flex flex-col gap-3",children:M.map(I=>{var Pe,la,pa;const be=(Pe=I.expand)==null?void 0:Pe.to_home,fe=(la=I.expand)==null?void 0:la.from_member,je=(pa=be==null?void 0:be.photos)!=null&&pa[0]?D.files.getURL(be,be.photos[0],{thumb:"200x200"}):null,Ve=fe!=null&&fe.avatar?D.files.getURL(fe,fe.avatar,{thumb:"100x100"}):null,Me=z===I.id,Oe=I.status==="accepted"?"Aceptada":I.status==="declined"?"Rechazada":"Pendiente";return e.jsxs("div",{className:`rounded-2xl bg-stone-900 border transition-colors ${Me?"border-[#e8ff4a]/30":"border-stone-800 hover:border-stone-700"}`,children:[e.jsxs("button",{onClick:()=>La(I.id),className:"w-full flex items-center gap-3 p-4 text-left",children:[e.jsx("div",{className:"shrink-0",children:I._dir==="received"&&Ve?e.jsx("img",{src:Ve,alt:fe==null?void 0:fe.name,className:"w-10 h-10 rounded-full object-cover border border-stone-700"}):je?e.jsx("img",{src:je,alt:be==null?void 0:be.title,className:"w-10 h-10 rounded-xl object-cover border border-stone-700"}):e.jsx("div",{className:"w-10 h-10 rounded-full bg-stone-800 flex items-center justify-center text-stone-500",children:e.jsx(Os,{className:"w-5 h-5"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-semibold text-white text-sm truncate",children:I._dir==="received"?(fe==null?void 0:fe.name)||"Escalador":(be==null?void 0:be.title)||"Casa"}),e.jsxs("p",{className:"text-stone-500 text-xs truncate",children:[be==null?void 0:be.title," · ",Oe]}),I.date_from&&e.jsxs("p",{className:"text-stone-600 text-xs",children:[new Date(I.date_from).toLocaleDateString("es-ES",{day:"numeric",month:"short"})," → ",new Date(I.date_to||I.date_from).toLocaleDateString("es-ES",{day:"numeric",month:"short"})]})]}),e.jsx("span",{className:"text-stone-600 text-lg",children:Me?"▲":"▼"})]}),Me&&e.jsxs("div",{className:"px-4 pb-4 border-t border-stone-800 pt-3",children:[e.jsxs("div",{className:"space-y-2 mb-3 max-h-64 overflow-y-auto",children:[k.length===0&&e.jsxs("div",{className:"text-center py-4",children:[e.jsxs("p",{className:"text-stone-600 text-xs",children:['Mensaje inicial: "',I.message,'"']}),e.jsx("p",{className:"text-stone-700 text-xs mt-1",children:"Responde para 
304iniciar la conversación."})]}),k.map(qe=>e.jsx("div",{className:`flex gap-2 ${qe.author===i.id?"justify-end":""}`,children:e.jsxs("div",{className:`max-w-[80%] px-3 py-2 rounded-xl text-sm ${qe.author===i.id?"bg-[#e8ff4a]/10 text-[#e8ff4a] rounded-br-none":"bg-stone-800 text-stone-200 rounded-bl-none"}`,children:[e.jsx("p",{children:qe.body}),e.jsx("p",{className:"text-xs opacity-50 mt-0.5",children:Gn(qe.created)})]})},qe.id))]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:w,onChange:qe=>A(qe.target.value),onKeyDown:qe=>qe.key==="Enter"&&!qe.shiftKey&&Ke(I.id),placeholder:"Escribe un mensaje…",className:"flex-1 px-3 py-2 rounded-xl bg-stone-800 border border-stone-700 text-white text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors"}),e.jsx("button",{onClick:()=>Ke(I.id),disabled:L||!w.trim(),className:"px-3 py-2 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-yellow-300 transition-colors disabled:opacity-40",children:"→"})]})]})]},I.id+I._dir)})})})()]}):p==="companeros"?e.jsx(J4,{user:i}):null]})]})}function J4({user:l}){const[i,r]=b.useState([]),[d,m]=b.useState(!0);b.useEffect(()=>{if(!l)return;const h=new AbortController;return D.collection("cordada_posts").getFullList({filter:`author = "${l.id}"`,sort:"-created",signal:h.signal}).then(j=>{r(j),m(!1)}).catch(()=>m(!1)),()=>h.abort()},[l]);const p=async h=>{await D.collection("cordada_posts").update(h,{cerrado:!0}),r(j=>j.map(g=>g.id===h?{...g,cerrado:!0}:g))},f=async h=>{confirm("¿Borrar este anuncio?")&&(await D.collection("cordada_posts").delete(h),r(j=>j.filter(g=>g.id!==h)))},x=async h=>{await D.collection("cordada_posts").update(h,{cerrado:!1}),r(j=>j.map(g=>g.id===h?{...g,cerrado:!1}:g))};return d?e.jsx("div",{className:"text-center py-16 text-stone-500",children:"Cargando…"}):e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-2xl font-bold text-white mb-1",children:"Mis anuncios de cordada"}),e.jsx("p",{className:"text-stone-400 text-sm",children:"Los anuncios cerrados no aparecen en la búsqueda."})]}),e.jsx(ne,{to:"/companero",className:"inline-flex items-center gap-2 bg-[#e8ff4a] text-stone-900 font-semibold px-4 py-2 rounded-lg text-sm hover:bg-[#d4eb2a] transition-colors",children:"+ Nuevo anuncio"})]}),i.length===0?e.jsxs("div",{className:"text-center py-16 bg-stone-800/40 rounded-2xl border border-stone-700",children:[e.jsx("p",{className:"text-4xl mb-3",children:"🧗"}),e.jsx("p",{className:"text-stone-400 mb-4",children:"Todavía no has publicado ninguna búsqueda de cordada."}),e.jsx(ne,{to:"/companero",className:"inline-block bg-[#e8ff4a] text-stone-900 font-semibold px-5 py-2.5 rounded-lg text-sm hover:bg-[#d4eb2a] transition-colors",children:"Buscar compañero →"})]}):e.jsx("div",{className:"space-y-4",children:i.map(h=>{const j=Array.isArray(h.modalidades)?h.modalidades:[];return e.jsxs("div",{className:`bg-stone-800 border rounded-xl p-5 ${h.cerrado?"border-stone-700 opacity-60":"border-stone-600"}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"font-semibold text-[#e8ff4a]",children:h.zona||"Zona sin especificar"}),h.cerrado&&e.jsx("span",{className:"text-xs bg-stone-700 text-stone-400 px-2 py-0.5 rounded-full",children:"Cerrado"})]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 text-xs text-stone-400",children:[h.fecha_desde&&e.jsxs("span",{children:["📅 ",h.fecha_desde,h.fecha_hasta?` → ${h.fecha_hasta}`:""]}),h.nivel&&e.jsxs("span",{children:["· ",h.nivel]}),j.length>0&&e.jsxs("span",{children:["· ",j.join(", ")]})]}),h.mensaje&&e.jsx("p",{className:"text-stone-400 text-sm mt-2",children:h.mensaje})]}),e.jsxs("div",{className:"flex gap-2 shrink-0",children:[h.cerrado?e.jsx("button",{onClick:()=>x(h.id),className:"text-xs text-[#e8ff4a] hover:underline",children:"Reabrir"}):e.jsx("button",{onClick:()=>p(h.id),className:"text-xs text-stone-400 hover:text-stone-200",children:"Cerrar"}),e.jsx("button",{onClick:()=>f(h.id),className:"text-xs text-red-500 hover:text-red-400",children:"Borrar"})]})]}),!h.cerrado&&e.jsx(ne,{to:"/bocaboca",className:"inline-flex items-center gap-1.5 text-xs text-stone-400 hover:text-stone-200 transition-colors mt-1",children:"Ver conversaciones →"})]}
304,h.id)})})]})}function X4(){const{login:l}=oa(),{t:i}=Lt(),r=Za(),[d,m]=b.useState({email:"",password:""}),[p,f]=b.useState(""),[x,h]=b.useState(!1),[j,g]=b.useState(!1),v=async S=>{if(S.preventDefault(),f(""),!d.email.trim()||!d.password){f("Por favor completa todos los campos.");return}h(!0);try{await l(d.email,d.password),r("/dashboard")}catch{f("Correo o contraseña incorrectos.")}h(!1)};return e.jsx("main",{className:"min-h-screen bg-stone-950 flex items-center justify-center px-4 pt-8 pb-10",children:e.jsxs("div",{className:"w-full max-w-md",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"flex items-center justify-center gap-2 mb-4",children:e.jsx("img",{src:"/static/logo-climb-home.jpg",alt:"CLIMB & HOME",className:"h-14 w-auto rounded-sm"})}),e.jsx("h1",{className:"font-display text-3xl font-bold text-white",children:i("login.title")}),e.jsx("p",{className:"text-stone-400 mt-2",children:i("login.subtitle")})]}),e.jsxs("div",{className:"bg-stone-900 rounded-2xl border border-stone-800 p-8 flex flex-col gap-5",children:[e.jsxs("form",{onSubmit:v,noValidate:!0,className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm text-stone-300 mb-1.5",children:i("login.email_label")}),e.jsx("input",{id:"email",type:"email",value:d.email,onChange:S=>m(N=>({...N,email:S.target.value})),placeholder:i("login.email_placeholder"),className:"w-full px-4 py-3 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a] transition-colors",autoComplete:"email"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("label",{htmlFor:"password",className:"block text-sm text-stone-300",children:i("login.password_label")}),e.jsx(ne,{to:"/recuperar-acceso",className:"text-xs text-stone-400 hover:text-[#e8ff4a] transition-colors underline underline-offset-2",children:i("login.forgot_password")})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:"password",type:j?"text":"password",value:d.password,onChange:S=>m(N=>({...N,password:S.target.value})),placeholder:i("login.password_placeholder"),className:"w-full px-4 py-3 pr-12 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a] transition-colors",autoComplete:"current-password"}),e.jsx("button",{type:"button",onClick:()=>g(S=>!S),"aria-label":i(j?"login.hide_password":"login.show_password"),className:"absolute right-3 top-1/2 -translate-y-1/2 text-stone-400 hover:text-[#e8ff4a] transition-colors p-1",children:j?e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-5 h-5",children:[e.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"}),e.jsx("path",{d:"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"}),e.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-5 h-5",children:[e.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]})]}),p&&e.jsx("p",{className:"text-red-400 text-sm text-center",role:"alert",children:p}),e.jsx("button",{type:"submit",disabled:x,className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-lg hover:bg-[#f0ff70] active:bg-[#d4e840] active:scale-[0.98] focus-visible:ring-2 focus-visible:ring-[#e8ff4a] focus-visible:ring-offset-2 focus-visible:ring-offset-stone-900 transition-all disabled:opacity-50",children:i(x?"login.submitting":"login.submit")})]}),e.jsx("div",{className:"h-px bg-stone-800"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-stone-400 text-sm mb-3",children:i("login.no_account")}),e.jsx(ne,{to:"/signup",className:"w-full inline-flex items-center justify-center py-3 rounded-xl border-2 border-[#e8ff4a] text-[#e8ff4a] font-bold text-base hover:bg-[#e8ff4a] hover:text-stone-950 transition-all",children:i("login.signup_link")})]})]})]})})}const W4=[{title:"1. Quién somos",body:"CLIMB & HOME es una plataforma de intercambio de viviendas entre escaladores, operada conforme a la normativa española y europea. La plataforma facilita el contacto entre miembros; no actúa como agencia de viajes ni presta servicios de alojamiento directamente."},{title:"2. Aceptación",body:"Al registrarte en CLIMB & HOME aceptas estos Términos y nuestra Política de Privacidad. Si no estás de acuerdo, no podrás utilizar la plataforma."},{title:"3. Elegibilidad",body:"Debes tener al menos 18 años para registrarte. Al crear una cuenta declaras que la información facilitada es veraz y que actuarás de buena fe en todos los intercambios."},{title:"4. Uso de la plataforma",body:"Está prohibido publicar información falsa o fraudulenta. Queda prohibido el uso comercial (subarrendamiento, alquiler vacacional remunerado, etc.). Los intercambios son entre particulares; CLIMB & HOME no garantiza el resultado de ningún acuerdo. Debes respetar los bienes de la vivienda que ocupes."},{title:"5. ClimbPoints",body:"El sistema de ClimbPoints es una unidad de valor interna sin equivalente monetario. No son transferibles fuera de la plataforma ni canjeables por dinero."},{title:"6. Responsabilidad",body:"CLIMB & HOME actúa como intermediario entre miembros. No nos hacemos responsables de daños, pérdidas o accidentes durante un intercambio. La práctica de la escalada conlleva riesgos inherentes; cada miembro asume la responsabilidad de su propia seguridad."},{title:"7. Propiedad intelectual",body:"El contenido que publiques (fotos, croquis, descripciones) es tuyo. Al publicarlo en CLIMB & HOME nos concedes una licencia no exclusiva para mostrarlo en la plataforma."},{title:"8. Legislación aplicable",body:"Estos Términos se rigen por la legislación española. En caso de conflicto, ambas partes se someten a los juzgados y tribunales competentes de España, sin perjuicio de los derechos que como consumidor te ampara el RGPD y la normativa europea."}],e2=[{title:"Responsable del tratamiento",body:"El responsable del tratamiento de tus datos personales es CLIMB & HOME."},{title:"Qué datos recogemos",body:"Nombre, correo electrónico y contraseña (cifrada) en el registro. Datos opcionales de perfil: ubicación, nivel de escalada, foto. Datos de actividad: solicitudes de intercambio, reseñas y mensajes. Datos técnicos anónimos para mejorar la plataforma."},{title:"Para qué usamos tus datos",body:"Para gestionar tu cuenta, facilitar los intercambios entre miembros, mostrar tu perfil a la comunidad y mejorar la plataforma. Nunca vendemos tus datos a terceros ni los usamos con fines publicitarios externos."},{title:"Base legal (RGPD)",body:"Ejecución del contrato (art. 6.1.b): para prestarte el servicio. Consentimiento (art. 6.1.a): para datos opcionales. Interés legítimo (art. 6.1.f): para mejorar la plataforma y prevenir el fraude."},{title:"Cuánto tiempo guardamos tus datos",body:"Mientras tu cuenta esté activa. Si eliminas tu cuenta, borraremos tus datos personales en un máximo de 30 días."},{title:"Tus derechos (RGPD)",body:"Tienes derecho de acceso, rectificación, supresión («derecho al olvido»), oposición, limitación y portabilidad. Puedes retirar el consentimiento en cualquier momento. También puedes reclamar ante la AEPD (www.aepd.es)."},{title:"Seguridad y cookies",body:"Aplicamos cifrado y acceso restringido. Solo usamos cookies técnicas estrictamente necesarias para la sesión; no usamos cookies de rastreo ni publicitarias."},{title:"Transferencias internacionales",body:"Tus datos se almacenan en servidores dentro del Espacio Económico Europeo. No realizamos transferencias fuera del EEE."}];function a2({type:l,onClose:i,onAccept:r}){const d=l==="terms",[m,p]=b.useState(!1),f=b.useRef(null);b.useEffect(()=>{p(!1),f.current&&(f.current.scrollTop=0)},[l]),b.useEffect(()=>{const j=g=>{g.key==="Escape"&&i()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[i]);const x=()=>{const j=f.current;j&&j.scrollTop+j.clientHeight>=j.scrollHeight-16&&p(!0)},h=d?W4:e2;return e.jsx("div",{className:"fixed inset-0 z-[200] bg-black/70 flex items-end sm:items-center justify-center p-0 sm:p-4",role:"dialog","aria-modal":"true","aria-label":d?"Términos y Condiciones":"Política de Privacidad",onClick:j=>{j.target===j.currentTarget&&i()},children:e.jsxs("div",{className:"w-full sm:max-w-lg bg-stone-900 sm:rounded-2xl border border-stone-700 flex flex-col max-h-[92vh] sm:max-h-[80vh]",children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-stone-800 shrink-0",children:[e.jsx("h2",{className:"text-white font-semibold text-base",children:d?"Términos y Condiciones de Uso":"Política de Privacidad"}),e.jsx("button",{onClick:i,className:"text-stone-400 hover:text-white transition-colors p-1 -mr-1","aria-label":"Cerrar",children:e.jsx(_t,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"px-6 pt-3 pb-1 shrink-0",children:e.jsx("span",{className:"text-xs text-[#e8ff4a] bg-[#e8ff4a]/10 border border-[#e8ff4a]/30 rounded-full px-3 py-0.5",children:"Conforme al RGPD (UE) 2016/679"})}),e.jsxs("div",{ref:f,onScroll:x,className:"flex-1 overflow-y-auto px-6 py-4 flex flex-col gap-5",children:[h.map(j=>e.jsxs("div",{children:[e.jsx("h3",{className:"text-[#e8ff4a] text-sm font-semibold mb-1",children:j.title}),e.jsx("p",{className:"text-stone-300 text-sm leading-relaxed",children:j.body})]},j.title)),e.jsx("div",{className:"h-4"})]}),!m&&e.jsx("p",{className:"text-center text-stone-500 text-xs pb-1 shrink-0",children:"↓ Desplázate para leer todo el documento"}),e.jsxs("div",{className:"px-6 py-4 border-t border-stone-800 flex flex-col gap-3 shrink-0",children:[e.jsxs("p",{className:"text-stone-400 text-xs leading-relaxed",children:["Al pulsar «Acepto» confirmas que has leído este documento y consientes su contenido. Puedes consultar la versión completa en"," ",e.jsx("a",{href:d?"/terminos":"/privacidad",target:"_blank",rel:"noopener noreferrer",className:"text-[#e8ff4a] hover:underline",children:d?"/terminos":"/privacidad"}),"."]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:i,className:"flex-1 py-2.5 rounded-xl border border-stone-700 text-stone-300 text-sm font-medium hover:border-stone-500 transition-colors",children:"Cancelar"}),e.jsx("button",{onClick:r??i,className:"flex-1 py-2.5 rounded-xl bg-[#e8ff4a] text-stone-950 text-sm font-bold hover:bg-[#f0ff70] transition-colors",children:"Acepto"})]})]})]})})}const Cr=[{id:"perfil",num:"01",icon:e.jsxs("svg",{viewBox:"0 0 40 40",width:"36",height:"36",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"20",cy:"14",r:"7",fill:"#e8ff4a",opacity:"0.9"}),e.jsx("path",{d:"M6 34c0-7.7 6.3-14 14-14s14 6.3 14 14",stroke:"#e8ff4a",strokeWidth:"2.5",strokeLinecap:"round",fill:"none"})]}),title:"Preséntate a la comunidad",desc:"Tu perfil es tu carta de presentación. Añade tu nivel de escalada, los estilos que practicas, dónde escalas habitualmente y una foto. Los anfitriones lo miran antes de aceptar una solicitud.",cta:"Completar mi perfil",href:"/perfil",secondary:"Lo haré después"},{id:"casa",num:"02",icon:e.jsxs("svg",{viewBox:"0 0 40 40",width:"36",height:"36",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M6 20L20 7l14 13v14H6V20z",fill:"#e8ff4a",opacity:"0.15",stroke:"#e8ff4a",strokeWidth:"2",strokeLinejoin:"round"}),e.jsx("rect",{x:"15",y:"26",width:"10",height:"8",rx:"1",fill:"#e8ff4a",opacity:"0.9"})]}),title:"Publica tu casa — activa tu condición de Socio Fundador",desc:"Tu casa es lo que hace funcionar el intercambio. Cuéntanos dónde estás y qué escuelas de escalada hay cerca — eso es exactamente lo que otros escaladores buscan. Al publicarla, recibirás los 300 Climbpoints que quedan del bono y quedarás registrado para siempre entre los primeros 100 fundadores.",cta:"Añadir mi casa ahora",href:"/dashboard",secondary:"Ahora no"},{id:"explorar",num:"03",icon:e.jsxs("svg",{viewBox:"0 0 40 40",width:"36",height:"36",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"18",cy:"18",r:"10",stroke:"#e8ff4a",strokeWidth:"2.5",fill:"none"}),e.jsx("path",{d:"M25 25l8 8",stroke:"#e8ff4a",strokeWidth:"2.5",strokeLinecap:"round"}),e.jsx("path",{d:"M18 12v6l4 3",stroke:"#e8ff4a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),title:"Busca tu próximo destino",desc:"Ya puedes explorar todas las casas disponibles. Filtra por zona, nivel de escalada o fechas y propón tu primer intercambio. Los ClimbPoints se calculan solos.",cta:"Ver casas disponibles",href:"/homes",secondary:"Ir a mi panel",secondaryHref:"/dashboard"}];function t2({name:l,onContinue:i}){const r=Za(),[d,m]=b.useState(0),p=Cr[d],f=d===Cr.length-1;function x(){r(p.href)}function h(){f?r(p.secondaryHref||"/dashboard"):m(j=>j+1)}return e.jsx("main",{className:"min-h-screen bg-stone-950 flex items-center justify-center px-4 pt-16 pb-10",children:e.jsxs("div",{className:"w-full max-w-lg",children:[d===0&&e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("div",{className:"flex justify-center mb-5",children:e.jsx("div",{className:"w-16 h-16 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/30 flex items-center justify-center",children:e.jsxs("svg",{viewBox:"0 0 40 40",width:"36",height:"36",fill:"none","aria-hidden":"true",children:[e.jsx("polygon",{points:"6,34 20,8 34,34",fill:"#e8ff4a",opacity:"0.9"}
304),e.jsx("rect",{x:"16",y:"26",width:"8",height:"8",rx:"1",fill:"#0c0a09"})]})})}),e.jsxs("div",{className:"inline-flex items-center gap-2 bg-[#e8ff4a]/10 border border-[#e8ff4a]/30 rounded-full px-3 py-1 mb-4",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-[#e8ff4a] animate-pulse"}),e.jsx("span",{className:"text-[#e8ff4a] text-xs font-bold uppercase tracking-widest",children:"Socio Fundador"})]}),e.jsxs("h1",{className:"font-display text-4xl sm:text-5xl font-bold text-white mb-3",children:["¡Bienvenido,",e.jsx("br",{}),e.jsxs("span",{className:"text-[#e8ff4a]",children:[l,"!"]})]}),e.jsxs("p",{className:"text-stone-300 text-sm leading-relaxed max-w-sm mx-auto",children:["Ya tienes ",e.jsx("span",{className:"text-[#e8ff4a] font-semibold",children:"200 Climbpoints"})," en tu cuenta y el distintivo de ",e.jsx("strong",{className:"text-white",children:"Socio Fundador"})," reservado. Publica tu casa y recibirás ",e.jsx("span",{className:"text-[#e8ff4a] font-semibold",children:"300 más"})," — y tu condición de fundador será permanente para siempre."]}),e.jsxs("div",{className:"mt-4 flex items-start gap-3 bg-stone-900 border border-stone-700 rounded-xl px-4 py-3 max-w-sm mx-auto text-left",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"#e8ff4a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-5 h-5 shrink-0 mt-0.5","aria-hidden":"true",children:[e.jsx("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),e.jsx("polyline",{points:"22,6 12,13 2,6"})]}),e.jsx("p",{className:"text-stone-400 text-xs leading-relaxed",children:"Te hemos enviado un correo de confirmación. Ábrelo y haz clic en el enlace para verificar tu cuenta — es rápido y solo hay que hacerlo una vez."})]})]}),e.jsx("div",{className:"flex items-center gap-2 mb-8 justify-center",children:Cr.map((j,g)=>e.jsx("div",{className:"h-1 rounded-full transition-all duration-500",style:{width:g===d?"2.5rem":"0.75rem",background:g<=d?"#e8ff4a":"#292524"}},j.id))}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-7 mb-5",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-5",children:[e.jsx("div",{className:"w-14 h-14 rounded-xl bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 flex items-center justify-center shrink-0",children:p.icon}),e.jsxs("div",{children:[e.jsxs("span",{className:"text-[#e8ff4a] text-xs font-bold tracking-widest uppercase",children:[p.num," / ",Cr.length]}),e.jsx("h2",{className:"text-white font-bold text-xl leading-snug mt-0.5",children:p.title})]})]}),e.jsx("p",{className:"text-stone-300 text-sm leading-relaxed",children:p.desc})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("button",{onClick:x,className:"w-full py-3.5 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-base hover:bg-[#f0ff70] transition-colors focus:outline-hidden focus-visible:ring-2 focus-visible:ring-[#e8ff4a]",children:p.cta}),e.jsx("button",{onClick:h,className:"w-full py-3 rounded-xl bg-transparent border border-stone-700 text-stone-400 font-semibold text-sm hover:border-stone-500 hover:text-stone-200 transition-colors focus:outline-hidden focus-visible:ring-2 focus-visible:ring-stone-500",children:p.secondary})]}),e.jsxs("p",{className:"text-stone-600 text-xs mt-6 text-center",children:["¿Dudas? ",e.jsx(ne,{to:"/ayuda",className:"text-stone-500 hover:text-[#e8ff4a] transition-colors underline",children:"Consulta la sección Ayuda"})]})]})})}function s2(){const{signup:l}=oa(),{t:i}=Lt(),r=Za(),[d,m]=b.useState({name:"",email:"",password:""}),[p,f]=b.useState({}),[x,h]=b.useState(!1),[j,g]=b.useState(!1),[v,S]=b.useState(!1),[N,_]=b.useState(!1),[z,C]=b.useState(!1),k=()=>{const w={};return d.name.trim()||(w.name="Ponle un nombre o apodo — lo verán los anfitriones."),d.email.trim()||(w.email="Necesitamos tu correo para crear la cuenta."),d.password.length<8&&(w.password="La contraseña debe tener al menos 8 caracteres."),z||(w.legal="Debes aceptar los Términos y la Política de Privacidad."),w},T=async w=>{var q,H;w.preventDefault();const A=k();if(Object.keys(A).length>0){f(A);return}f({}),h(!0);const L=d.name.trim();try{await l(d.email,d.password,L,d.password,!1),S(!0)}catch(F){const U=(((q=F==null?void 0:F.data)==null?void 0:q.message)||(F==null?void 0:F.message)||"").toLowerCase(),J=((H=F==null?void 0:F.data)==null?void 0:H.data)||{};J.email||U.includes("email")||U.includes("already exists")||U.includes("unique")||U.includes("ya existe")?f({email:"Este correo ya está registrado. Prueba a iniciar sesión."}):J.password?f({password:J.password.message||"La contraseña debe tener al menos 8 caracteres."}):f({general:"Algo ha fallado. Inténtalo de nuevo."})}h(!1)};return v?e.jsx(t2,{name:d.name||d.email.split("@")[0],onContinue:()=>r("/dashboard")}):e.jsxs(e.Fragment,{children:[N&&e.jsx(a2,{type:N,onClose:()=>_(!1),onAccept:()=>_(!1)}),!v&&e.jsx("main",{className:"min-h-screen bg-stone-950 flex items-center justify-center px-4 pt-8 pb-10",children:e.jsxs("div",{className:"w-full max-w-sm",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"flex items-center justify-center mb-4",children:e.jsx("img",{src:"/static/logo-climb-home.jpg",alt:"CLIMB & HOME",className:"h-14 w-auto rounded-sm"})}),e.jsx("h1",{className:"font-display text-3xl font-bold text-white",children:"Únete gratis"}),e.jsx("p",{className:"text-stone-400 mt-2 text-sm",children:"Casas, escuelas y comunidad escaladora"})]}),e.jsxs("form",{onSubmit:T,noValidate:!0,className:"bg-stone-900 rounded-2xl border border-stone-800 p-6 flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm text-stone-300 mb-1.5",children:"Tu nombre o apodo"}),e.jsx("input",{id:"name",type:"text",value:d.name,onChange:w=>m(A=>({...A,name:w.target.value})),placeholder:"Como te llaman en la pared",className:"w-full px-4 py-3 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] transition-colors",autoComplete:"name"}),p.name&&e.jsx("p",{className:"text-red-400 text-sm mt-1",role:"alert",children:p.name})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm text-stone-300 mb-1.5",children:"Correo electrónico"}),e.jsx("input",{id:"email",type:"email",value:d.email,onChange:w=>m(A=>({...A,email:w.target.value})),placeholder:"[email protected]",className:"w-full px-4 py-3 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] transition-colors",autoComplete:"email"}),p.email&&e.jsx("p",{className:"text-red-400 text-sm mt-1",role:"alert",children:p.email})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"password",className:"block text-sm text-stone-300 mb-1.5",children:"Contraseña"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:"password",type:j?"text":"password",value:d.password,onChange:w=>m(A=>({...A,password:w.target.value})),placeholder:"Mínimo 8 caracteres",className:"w-full px-4 py-3 pr-24 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a] transition-colors",autoComplete:"new-password"}),e.jsx("button",{type:"button",onClick:()=>g(w=>!w),className:"absolute right-3 top-1/2 -translate-y-1/2 text-stone-500 hover:text-[#e8ff4a] text-xs font-medium transition-colors px-1",children:j?"ocultar":"mostrar"})]}),p.password&&e.jsx("p",{className:"text-red-400 text-sm mt-1",role:"alert",children:p.password})]}),p.general&&e.jsx("p",{className:"text-red-400 text-sm text-center",role:"alert",children:p.general}),e.jsx("button",{type:"submit",disabled:x,className:"w-full py-3.5 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-lg hover:bg-[#f0ff70] active:scale-[0.98] transition-all disabled:opacity-50 mt-1",children:x?"Creando tu cuenta…":"Crear cuenta gratis"}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("input",{id:"legal",type:"checkbox",checked:z,onChange:w=>C(w.target.checked),className:"mt-0.5 w-4 h-4 shrink-0 accent-[#e8ff4a] cursor-pointer"}),e.jsxs("label",{htmlFor:"legal",className:"text-stone-400 text-sm leading-relaxed cursor-pointer select-none",children:["He leído y acepto los"," ",e.jsx("button",{type:"button",onClick:()=>_("terms"),className:"text-stone-300 hover:text-[#e8ff4a] underline underline-offset-2 transition-colors",children:"Términos de uso"})," ","y la"," ",e.jsx("button",{type:"button",onClick:()=>_("privacy"),className:"text-stone-300 hover:text-[#e8ff4a] underline underline-offset-2 transition-colors",children:"Política de privacidad"})]})]}),p.legal&&e.jsx("p",{className:"text-red-400 text-sm -mt-1",role:"alert",children:p.legal}),e.jsxs("p",{className:"text-center text-stone-400 text-sm",children:["¿Ya tienes cuenta?"," ",e.jsx(ne,{to:"/login",className:"text-[#e8ff4a] hover:underline font-semibold",children:"Entrar"})]})]})]})})]})}const Lu=[{cat:"Intercambios",q:"¿Cómo funciona el intercambio de casas?",a:"Crea tu cuenta, añade tu casa con fotos y las escuelas de escalada cercanas, y busca casas de otros miembros. Cuando encuentres una que te interese, envía una solicitud de intercambio. Si el anfitrión la acepta, ¡a escalar!"},{cat:"Intercambios",q:"¿Tengo que intercambiar al mismo tiempo que mi anfitrión?",a:"No es obligatorio. En un intercambio simultáneo, cada estancia genera su cargo y su abono — si las casas valen igual y las estancias duran lo mismo, el saldo neto es cero. Si no coincidís en fechas, usas Climbpoints (unos 100 por noche según el valor de la casa) para ir ahora, y el anfitrión los usa cuando le venga bien."},{cat:"Intercambios",q:"¿Cómo contacto con otro miembro?",a:"Desde la ficha de cualquier casa puedes enviar una solicitud de intercambio con un mensaje personal. El anfitrión la recibe en su panel y puede preaprobarlo, confirmarlo o rechazarlo."},{cat:"Intercambios",q:"¿Qué significa 'Preaprobado'?",a:"El anfitrión puede preaprobar una solicitud mientras habla contigo y concreta los detalles — sin confirmar definitivamente. Una preaprobación no bloquea fechas ni mueve Climbpoints. Cuando finalmente confirma, las fechas se reservan y se cierra el intercambio. El resto de solicitudes con esas mismas fechas quedan marcadas automáticamente como 'Fechas ya ocupadas'."},{cat:"Intercambios",q:"¿Cuánto tiempo tiene el anfitrión para responder?",a:"Cada solicitud tiene un plazo de 5 días para recibir respuesta. Si el anfitrión no responde en ese tiempo, la solicitud se cierra sola y recibirás un aviso. Así nadie se queda esperando en el limbo."},{cat:"Intercambios",q:"¿Cómo puedo ver la disponibilidad de una casa?",a:"Entra en la ficha de cualquier casa y verás su calendario de disponibilidad. Los días libres aparecen marcados claramente en verde."},{cat:"ClimbPoints",q:"¿Qué son los ClimbPoints y para qué sirven?",a:"Los Climbpoints son los puntos internos de intercambio de la comunidad. Los ganas alojando a otros escaladores — el valor base está entre 100 y 200 CP por noche según la capacidad de tu casa, más los extras. Los usas para quedarte en casas de otros miembros. En un intercambio simultáneo, los puntos circulan en ambas direcciones: si las casas valen igual y las estancias duran lo mismo, el saldo neto es cero, pero el movimiento queda registrado."},{cat:"ClimbPoints",q:"¿Cuántos ClimbPoints vale una noche?",a:"De media, una noche equivale a 100 Climbpoints. El valor exacto depende de la capacidad de la casa y la proximidad a escuelas importantes. Los miembros fundadores reciben 200 Climbpoints al registrarse y 300 más al publicar su primera casa — un total de 500 CP de bienvenida."},{cat:"ClimbPoints",q:"¿Puedo comprar ClimbPoints con dinero?",a:"No. Los Climbpoints se ganan alojando a otros escaladores — a razón de unos 100 puntos por noche, según el valor calculado de tu casa. Los miembros fundadores reciben 200 CP al registrarse y 300 CP más al publicar su primera casa. No se venden ni se compran."},{cat:"Mi casa",q:"¿Qué tipos de alojamiento puedo ofrecer?",a:"Puedes publicar una vivienda completa — el huésped disfruta de toda la casa — o una habitación privada dentro de tu propia vivienda, compartiendo cocina y zonas comunes. La habitación privada es perfecta si solo tienes una casa y quieres participar en la comunidad aunque no puedas dejarla entera. En ambos casos el funcionamiento es el mismo: solicitud, preaprobación, confirmación y valoración al final."},{cat:"Mi casa",q:"¿Cuántos ClimbPoints vale una habitación privada?",a:"Las habitaciones privadas valen aproximadamente el 60% de lo que valdría la misma casa como vivienda completa. El valor exacto depende de la capacidad y las características de la habitación — baño privado, cocina compartida, zonas comunes disponibles. Se calcula automáticamente al publicarla."},{cat:"Mi casa",q:"¿Cómo añado mi casa?",a:"Entra en 'Mi Panel' y pulsa 'Añadir casa'. Lo primero es elegir el tipo de alojamiento — vivienda completa o habitación privada. Después rellena el título, la ubicación, las fotos y las actividades cercanas. Cuanto más completa sea la ficha, más solicitudes recibirás."},{cat:"Mi casa",q:"¿Cómo marco mis fechas de disponibilidad?",a:"En 'Mi Panel', pestaña 'Calendario'. Puedes bloquear días sueltos haciendo clic, o pulsar 'Todo el mes' para bloquearlo entero. Los días en rojo son no dis
304ponibles; los verdes están abiertos para recibir escaladores."},{cat:"Mi casa",q:"¿Puedo subir fotos de mi casa?",a:"Sí, al añadir o editar tu casa puedes subir varias fotos. Recomendamos incluir al menos la fachada, el salón y la zona de dormir para generar más confianza."},{cat:"Cuenta y precios",q:"¿Tengo que pagar algo?",a:"En esta fase de lanzamiento, acceder a Climb & Home es abierto para todos los escaladores. La promoción de lanzamiento incluye un regalo de bienvenida — Climbpoints extra — para los primeros 100 miembros que completen su perfil y publiquen una casa. Cuando se agoten esas 100 plazas, el regalo desaparece."},{cat:"Cuenta y precios",q:"¿Qué incluye la cuenta?",a:"Acceso completo a todas las casas de la comunidad, envío y recepción de solicitudes de intercambio, uso del sistema de Climbpoints y publicación de tu propia casa. Además, si eres de los primeros 100 en completar tu perfil y publicar una casa, recibes Climbpoints de regalo — eso sí tiene límite de plazas."},{cat:"Mi casa",q:"¿Qué pasa si busco una zona y hay pocas casas disponibles?",a:"La búsqueda es flexible: si encuentras pocas casas para tus fechas, la plataforma te sugiere automáticamente ventanas alternativas (hasta 30 días antes o después) donde sí hay disponibilidad. Y si hay pocas casas en un radio de 80 km, también aparecen casas de zonas algo más alejadas para que siempre tengas opciones."},{cat:"Escalada y sostenibilidad",q:"¿Qué son las escuelas de escalada?",a:"Las escuelas son zonas de escalada con rutas equipadas, normalmente con distintos sectores y grados. En el Mapa puedes ver más de 200 escuelas en todo el mund
304o. Los anfitriones también pueden añadir sus propias escuelas locales desde el panel."},{cat:"Escalada y sostenibilidad",q:"¿Por qué no publicáis las coordenadas exactas de algunas vías?",a:"Algunos sectores son especialmente sensibles: paredes en zonas protegidas, colonias de rapaces, o acuerdos con propietarios que dependen de visitas ordenadas. En estos casos damos orientación general y dejamos que el conocimiento preciso lo comparta el anfitrión local directamente. El boca a boca de escalador a escalador es la mejor red de protección."},{cat:"Escalada y sostenibilidad",q:"¿Qué debo hacer al visitar una escuela nueva?",a:"Llega informado — consulta el estado del sector con el anfitrión. No difundas la ubicación exacta si el sector lo pide. Respeta la fauna y las vedas estacionales. Deja el entorno mejor de como lo encontraste."},{cat:"Encuentra compañero",q:"¿Cómo publico que busco cordada?",a:"Entra en 'Encuentra compañero' y pulsa el botón azul 'Publicar búsqueda de cordada'. Rellena la zona o escuela donde quieres ir, las fechas aproximadas, tu nivel y las modalidades que te interesan (deportiva, clásica, búlder...). Escribe un mensaje opcional para contar más sobre ti. Cuando publicas, tu anuncio aparece en la lista pública."},{cat:"Encuentra compañero",q:"¿Cómo contacto con alguien que busca cordada?",a:"Cuando ves un anuncio que te interesa, aparece un botón amarillo 'Quiero escalar contigo'. Al pulsarlo, se abre un chat privado entre vosotros dos. Podéis detallar fechas exactas, nivel, material que llevaréis y cualquier otra cosa. El chat es privado — solo lo ven los dos."},{cat:"Encuentra compañero",q:"¿Qué pasa después de que nos escribimos?",a:"Una vez acordadas fechas, zona y detalles en el chat, ya tenéis todo listo para escalar juntos. Es completamente voluntario — nadie os obliga a nada. Si todo sale bien y escaláis juntos, luego podéis dejaros una valoración mutuamente (como con los anfitriones de casas)."},{cat:"Encuentra compañero",q:"¿Cómo cierro o edito mi anuncio?",a:"En 'Mi Panel', pestaña 'Compañeros', ves todos tus anuncios publicados. Desde ahí puedes cerrar un anuncio (desaparece de la búsqueda pública pero se queda en tu historial), reabrirlo o borrarlo completamente. Los anuncios cerrados no aparecen en el buscador."},{cat:"Encuentra compañero",q:"¿Y si tengo que viajar a otra zona para escalar?",a:"Cuando dos escaladores contactan y uno viaja a otra zona, la comunidad local puede ofrecerle alojamiento con Climb Points — sin dinero de por medio. Si usas puntos para hospedarte, luego tú también puedes ganarlos ofreciendo tu habitación o casa a otros escaladores. Es un sistema recíproco: escalada + alojamiento + comunidad. Todo funciona con puntos."}],n2=["Todos",...Array.from(new Set(Lu.map(l=>l.cat)))],o2=[{icon:"🏠",title:"Casas",desc:"Busca casas de escaladores en cualquier destino. Filtra por ubicación o actividad y solicita el intercambio directamente.",links:[{label:"Ver todas las casas",to:"/homes"}]},{icon:"🗺️",title:"Mapa global",desc:"Más de 200 escuelas de escalada en el mapa mundial. Haz clic en cualquier punto para ver detalles de cada zona.",links:[{label:"Abrir el mapa",to:"/mapa"}]},{icon:"⭐",title:"ClimbPoints",desc:"El sistema de puntos de la comunidad. Gana puntos alojando escaladores y úsalos para solicitar estancias.",links:[{label:"Ver cómo funciona",to:"/climbpoints"}]},{icon:"📅",title:"Mi Panel",desc:"Gestiona tus casas, marca tu disponibilidad, consulta las solicitudes recibidas y enviadas.",links:[{label:"Ir a mi panel",to:"/dashboard"}]},{icon:"📝",title:"Reseñas de escalada",desc:"Lee y escribe reseñas de vías reales — grado, condiciones, beta local, fotos.",links:[{label:"Ver reseñas",to:"/resenas"}]},{icon:"👤",title:"Mi Perfil",desc:"Añade tu foto, bio escaladora, nivel y estilos. Un perfil completo genera más confianza y más solicitudes.",links:[{label:"Editar mi perfil",to:"/perfil"}]},{icon:"🧗",title:"Croquis",desc:"Galería de croquis de rutas subidos por la comunidad. Acceso completo para miembros.",links:[{label:"Ver croquis",to:"/croquis"}]},{icon:"🤝",title:"Encuentra compañero",desc:"Publica que buscas cordada en una zona y fecha. Contacta con otros escaladores, abre un chat privado y coordinaos para ir juntos.",links:[{label:"Buscar compañero",to:"/companero"}]},{icon:"🌿",title:"Escalada sostenible",desc:"Respetamos los acuerdos locales, no difundimos ubicaciones sensibles y ponemos el conocimiento del anfitrión por encima de las coordenadas.",links:[{label:"Preguntas frecuentes",to:"/ayuda"}]}];function l2(){const[l,i]=b.useState(null),[r,d]=b.useState("Todos"),{user:m}=oa(),[p,f]=b.useState(null);b.useEffect(()=>{m!=null&&m.id&&D.collection("members").getOne(m.id,{fields:"id,cp_balance,friend_points"}).then(h=>
304f(h.cp_balance??h.friend_points??0)).catch(()=>{})},[m==null?void 0:m.id]),b.useEffect(()=>{window.location.hash==="#climbpoints"&&(d("ClimbPoints"),setTimeout(()=>{const h=document.getElementById("climbpoints");h&&h.scrollIntoView({behavior:"smooth",block:"start"})},100))},[]);const x=r==="Todos"?Lu:Lu.filter(h=>h.cat===r);return e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-20 pb-24",children:[e.jsxs("section",{className:"relative overflow-hidden",style:{minHeight:"480px"},children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"url('/static/ayuda-hero.jpg')",backgroundSize:"38%",backgroundPosition:"72% 55%",backgroundRepeat:"no-repeat",backgroundColor:"#0c0a09"},"aria-hidden":"true"}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, rgba(12,10,9,0.10) 0%, rgba(12,10,9,0.20) 50%, rgba(12,10,9,1) 100%)"},"aria-hidden":"true"}),e.jsxs("div",{className:"relative max-w-4xl mx-auto px-4 sm:px-6 pt-16 pb-16 flex flex-col items-center justify-end text-center",style:{minHeight:"480px"},children:[e.jsx("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full border border-[#e8ff4a]/40 text-[#e8ff4a] text-xs font-bold tracking-widest uppercase mb-5",children:"Centro de ayuda"}),e.jsxs("h1",{className:"font-display text-5xl sm:text-7xl font-bold text-white mb-4 leading-none tracking-tight",style:{textShadow:"0 2px 20px rgba(0,0,0,0.7)"},children:["¿En qué podemos",e.jsx("br",{}),e.jsx("span",{className:"text-[#e8ff4a]",children:"ayudarte?"})]}),e.jsx("p",{className:"text-stone-200 text-lg max-w-xl mx-auto",style:{textShadow:"0 1px 8px rgba(0,0,0,0.8)"},children:"Todo lo que necesitas saber para encontrar tu próxima pared, compartir tu casa y conectar con la comunidad escaladora."})]})]}),e.jsxs("section",{className:"max-w-6xl mx-auto px-4 sm:px-6 mb-20",children:[e.jsx("div",{className:"flex items-end justify-between mb-8 gap-4 flex-wrap",children:e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-white leading-none",children:"Guía rápida"}),e.jsx("p",{className:"text-stone-500 text-sm mt-1",children:"Cada sección del sitio, explicada en dos líneas."})]})}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:o2.map(h=>e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-4 hover:border-[#e8ff4a]/30 transition-all duration-200 hover:bg-stone-900/80 flex flex-col gap-3 group",children:[e.jsx("span",{className:"text-2xl",children:h.icon}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-white font-bold text-sm mb-1",children:h.title}),e.jsx("p",{className:"text-stone-500 text-xs leading-relaxed",children:h.desc})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-auto",children:h.links.map(j=>e.jsxs(ne,{to:j.to,className:"text-xs text-[#e8ff4a]/80 group-hover:text-[#e8ff4a] border border-[#e8ff4a]/20 group-hover:border-[#e8ff4a]/40 px-2.5 py-1 rounded-full transition-colors",children:[j.label," →"]},j.to))})]},h.title))})]}),e.jsx("section",{className:"max-w-6xl mx-auto px-4 sm:px-6 mb-20",children:e.jsx("div",{className:"bg-stone-900 border border-stone-800 rounded-3xl overflow-hidden",children:e.jsxs("div",{className:"grid lg:grid-cols-2 gap-0",children:[e.jsxs("div",{className:"p-8 sm:p-10 flex flex-col justify-between border-b lg:border-b-0 lg:border-r border-stone-800",children:[e.jsxs("div",{children:[e.jsx("span",{className:"inline-block text-[#e8ff4a] text-xs font-bold tracking-widest uppercase mb-4",children:"La comunidad"}),e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-white leading-tight mb-4",children:"Un espacio para compartir la pasión por escalar y viajar"}),e.jsx("p",{className:"text-stone-400 leading-relaxed mb-6",children:"Aquí intercambiamos casas, pero también información: escuelas, sectores, grados, condiciones, advertencias de acceso, regulaciones y todo lo que no está en ninguna guía. Si sabes algo que le sirve a otro escalador, este es el sitio."}),e.jsx("p",{className:"text-stone-400 leading-relaxed",children:"Discutimos grados, avisamos de cierres temporales, compartimos betas y recomendamos dónde dormir después de un buen día en la roca. Sin algoritmos, sin anuncios — solo escaladores."})]}),e.jsx("div",{className:"mt-8",children:e.jsx(ne,{to:"/comunidad",className:"inline-flex items-center gap-2 bg-[#e8ff4a] text-stone-950 font-bold px-6 py-3 rounded-full hover:bg-[#d4eb3a] transition-colors text-sm",children:"Ver la comunidad →"})})]}),e.jsxs("div",{className:"p-8 sm:p-10",children:[e.jsx("span",{className:"inline-block text-stone-500 text-xs font-bold tracking-widest uppercase mb-6",children:"Cómo funcionan las reseñas"}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 flex items-center justify-center shrink-0 mt-0.5",children:e.jsx("span",{className:"text-[#e8ff4a] text-xs font-bold",children:"1"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-semibold text-sm mb-1",children:"Reseñas por vía y sector"}),e.jsx("p",{className:"text-stone-500 text-sm leading-relaxed",children:"Cada reseña indica escuela, sector, vía, grado, condiciones del día y beta. Puedes filtrar por zona, grado o tipo de escalada."})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 flex items-center justify-center shrink-0 mt-0.5",children:e.jsx("span",{className:"text-[#e8ff4a] text-xs font-bold",children:"2"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-semibold text-sm mb-1",children:"Grado de la comunidad"}),e.jsx("p",{className:"text-stone-500 text-sm leading-relaxed",children:"Para cada vía, la comunidad vota si el grado de la reseña se queda corto, es justo o va largo. El grado consensuado aparece junto al oficial."})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 flex items-center justify-center shrink-0 mt-0.5",children:e.jsx("span",{className:"text-[#e8ff4a] text-xs font-bold",children:"3"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-semibold text-sm mb-1",children:"Ascensiones y guardados"}),e.jsx("p",{className:"text-stone-500 text-sm leading-relaxed",children:'Marca las vías que has escalado con "La he escalado" — aparece un contador comunitario. Guarda escuelas y sectores en tu lista personal para tener todo localizado.'})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 flex items-center justify-center shrink-0 mt-0.5",children:e.jsx("span",{className:"text-[#e8ff4a] text-xs font-bold",children:"4"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-semibold text-sm mb-1",children:"Croquis subidos por miembros"}),e.jsx("p",{className:"text-stone-500 text-sm leading-relaxed",children:"Los miembros pueden subir topos propios de rutas. La galería completa está disponible para miembros registrados — otro motivo para unirse."})]})]})]}),e.jsxs("div",{className:"mt-8 pt-6 border-t border-stone-800",children:[e.jsx("p",{className:"text-stone-500 text-xs leading-relaxed",children:"Para escribir reseñas, votar grados o marcar ascensiones necesitas una cuenta. Es gratis y tarda menos de un minuto."}),e.jsx(ne,{to:"/signup",className:"inline-flex items-center gap-1.5 text-[#e8ff4a] text-xs font-semibold mt-2 hover:underline",children:"Crear cuenta gratuita →"})]})]})]})})}),e.jsxs("section",{className:"max-w-6xl mx-auto px-4 sm:px-6 mb-20",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("span",{className:"inline-block text-[#e8ff4a] text-xs font-bold tracking-widest uppercase mb-3",children:"Intercambios"}),e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-white leading-tight mb-3",children:"Confianza y valoraciones"}),e.jsxs("p",{className:"text-stone-400 max-w-2xl leading-relaxed",children:["Una de las primeras preguntas que aparece cuando descubres el intercambio de casas es: ",e.jsx("em",{className:"text-stone-300",children:'"¿Cómo voy a dejar mi casa a alguien que no conozco?"'})," Es una pregunta razonable. Aquí explicamos cómo funciona la confianza dentro de la comunidad."]})]}),e.jsxs("div",{className:"grid lg:grid-cols-2 gap-6 mb-8",children:[e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-7",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 flex items-center justify-center mb-5",children:e.jsx("span",{className:"text-lg",children:"👤"})}),e.jsx("h3",{className:"text-white font-bold text-lg mb-3",children:"Primero conoce. Después decide."}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed mb-4",children:"Antes de aceptar un intercambio puedes ver el perfil completo de la otra persona, consultar las valoraciones que le han dejado otros miembros y comunicarte con ella directamente a través de la solicitud."}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed",children:"Nadie tiene que aceptar un intercambio con el que no se sienta cómodo. La confianza se construye poco a poco — a través del perfil, la conversación y la reputación dentro de la comunidad."})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-7",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 flex items-center justify-center mb-5",children:e.jsx("span",{className:"text-lg",children:"🤝"})}),e.jsx("h3",{className:"text-white font-bold text-lg mb-3",children:"El principio básico: trata la casa de otro como te gustaría que trataran la tuya."}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed mb-4",children:"En un intercambio, la responsabilidad va en las dos direcciones. El huésped respeta la vivienda, sus cosas y las normas acordadas. El anfitrión ofrece lo que ha descrito y mantiene una comunicación clara."}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed",children:"Qu
304ien entra en casa de otro entiende exactamente lo que significa abrir también la suya propia. Esa reciprocidad favorece comportamientos responsables — aunque nunca debe presentarse como una garantía absoluta."})]})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-7 sm:p-10 mb-6",children:[e.jsx("h3",{className:"text-white font-bold text-xl mb-2",children:"Valoraciones después de cada intercambio"}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed mb-8",children:"Cuando termina un intercambio, las dos partes pueden valorar su experiencia. Las valoraciones son públicas y construyen la reputación real de cada miembro dentro de la comunidad. Existen dos perspectivas diferenciadas porque la experiencia de huésped y anfitrión no son la misma cosa."}),e.jsxs("div",{className:"grid sm:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"border border-stone-700 rounded-xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("span",{className:"text-xl",children:"🏠"}),e.jsx("span",{className:"text-white font-bold",children:"Como huésped"})]}),e.jsx("ul",{className:"space-y-2",children:["Respeto por la vivienda y sus pertenencias","Limpieza y cuidado al marcharse","Cumplimiento de lo acordado","Comunicación y comportamiento general"].map(h=>e.jsxs("li",{className:"flex items-start gap-2 text-stone-400 text-sm",children:[e.jsx("span",{className:"text-[#e8ff4a] mt-0.5 shrink-0",children:"·"}),h]},h))})]}),e.jsxs("div",{className:"border border-stone-700 rounded-xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("span",{className:"text-xl",children:"🧗"}),e.jsx("span",{className:"text-white font-bold",children:"Como anfitrión"})]}),e.jsx("ul",{className:"space-y-2",children:["Claridad de la información y descripción real de la casa","Comunicación y atención ante incidencias","Cumplimiento de lo acordado","Condiciones en las que se ofrece la vivienda","Experiencia general de la estancia"].map(h=>e.jsxs("li",{className:"flex items-start gap-2 text-stone-400 text-sm",children:[e.jsx("span",{className:"text-[#e8ff4a] mt-0.5 shrink-0",children:"·"}),h]},h))})]})]}),e.jsx("p",{className:"text-stone-500 text-sm leading-relaxed mt-6",children:"Antes de aceptar un futuro intercambio podrás consultar el historial completo de la otra persona: cómo se ha comportado cuando ha alojado a otros y cómo cuando se ha alojado en casas ajenas. Son dos cosas distintas y ambas importan."})]}),e.jsx("div",{className:"bg-stone-900/50 border border-stone-800 rounded-2xl p-7",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-9 h-9 rounded-full bg-red-500/10 border border-red-500/20 flex items-center justify-center shrink-0 mt-0.5",children:e.jsx("span",{className:"text-base",children:"🛡️"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-bold mb-2",children:"Protección de la comunidad"}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed mb-3",children:"Climb & Home dispone de normas de convivencia y mecanismos para comunicar problemas. Un incumplimiento grave, daños intencionados, engaños, comportamientos abusivos o un uso reiteradamente inadecuado del sistema podrán ser revisados y, cuando corresponda, suponer la suspensión o exclusión del miembro."}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed",children:"Las valoraciones no están para crear miedo ni para castigar, sino para que la comunidad pueda tomar decisiones con más información y para favorecer una cultura de respeto mutuo."})]})]})})]}),e.jsxs("section",{className:"max-w-3xl mx-auto px-4 sm:px-6 mb-20",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-white leading-none mb-1",children:"Preguntas frecuentes"}),e.jsx("p",{className:"text-stone-500 text-sm",children:"Las dudas más comunes de la comunidad escaladora."})]}),e.jsx("div",{className:"flex gap-2 flex-wrap mb-6",children:n2.map(h=>e.jsx("button",{onClick:()=>{d(h),i(null)},className:`px-3.5 py-1.5 rounded-full text-xs font-semibold border transition-all ${r===h?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"border-stone-700 text-stone-400 hover:border-stone-500 hover:text-stone-200"}`,children:h},h))}),e.jsx("div",{className:"flex flex-col gap-2",children:x.map((h,j)=>e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl overflow-hidden hover:border-[#e8ff4a]/20 transition-colors",children:[e.jsxs("button",{onClick:()=>i(l===j?null:j),className:"w-full text-left flex items-center justify-between gap-4 px-5 py-4","aria-expanded":l===j,children:[e.jsx("span",{className:"text-white font-medium text-sm",children:h.q}),e.jsx("span",{className:`text-[#e8ff4a] shrink-0 text-xl font-light transition-transform duration-200 ${l===j?"rotate-45":""}`,children:"+"})]}),l===j&&e.jsx("div",{className:"px-5 pb-5 text-stone-400 text-sm leading-relaxed border-t border-stone-800 pt-4",children:h.a})]},j))})]}),e.jsx("section",{id:"climbpoints",className:"max-w-4xl mx-auto px-4 sm:px-6 mb-20 scroll-mt-24",children:e.jsxs("div",{className:"bg-stone-900 border border-[#e8ff4a]/20 rounded-3xl p-8 sm:p-10",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-6 mb-8",children:[e.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full border-2 border-[#e8ff4a]/40 bg-[#e8ff4a]/10 shrink-0",children:e.jsxs("svg",{viewBox:"0 0 48 48",className:"w-8 h-8",fill:"none",children:[e.jsx("circle",{cx:"24",cy:"24",r:"20",stroke:"#e8ff4a",strokeWidth:"2.5"}),e.jsx("text",{x:"24",y:"31",textAnchor:"middle",fontSize:"13",fontWeight:"bold",fill:"#e8ff4a",fontFamily:"sans-serif",children:"CP"})]})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-white leading-none mb-2",children:["climb",e.jsx("span",{className:"text-[#e8ff4a]",children:"Points"})]}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed",children:"Los puntos internos de intercambio de la comunidad escaladora. No se compran — se ganan alojando a otros escaladores."})]}),m&&p!==null&&e.jsxs("div",{className:"flex items-center gap-3 bg-[#e8ff4a]/10 border border-[#e8ff4a]/30 rounded-2xl px-5 py-3 shrink-0",children:[e.jsx("span",{className:"text-[#e8ff4a] font-bold text-3xl font-display",children:p.toLocaleStr
304ing()}),e.jsxs("span",{className:"text-stone-400 text-xs leading-tight",children:["CP en",e.jsx("br",{}),"tu cuenta"]})]})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h3",{className:"font-display text-xl font-bold text-white mb-4",children:"Valor base por noche"}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[{guests:"1–2 personas",cp:100},{guests:"3–4 personas",cp:130},{guests:"5–6 personas",cp:160},{guests:"7+ personas",cp:200}].map(({guests:h,cp:j})=>e.jsxs("div",{className:"bg-stone-950 border border-stone-800 rounded-xl p-4 text-center",children:[e.jsx("p",{className:"text-[#e8ff4a] font-bold text-2xl font-display",children:j}),e.jsx("p",{className:"text-stone-500 text-xs mt-1",children:"CP/noche"}),e.jsx("p",{className:"text-stone-400 text-xs mt-1",children:h})]},j))})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h3",{className:"font-display text-xl font-bold text-white mb-4",children:"Extras que suman puntos"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[{label:"Garaje/almacén de material",cp:10},{label:"Mascotas bienvenidas",cp:10},{label:"Información local de escalada",cp:10},{label:"Transporte a la pared",cp:20}].map(({label:h,cp:j})=>e.jsxs("div",{className:"flex items-center justify-between bg-stone-950 border border-stone-800 rounded-xl px-4 py-3",children:[e.jsx("span",{className:"text-stone-300 text-sm",children:h}),e.jsxs("span",{className:"text-[#e8ff4a] font-bold text-sm",children:["+",j," CP"]})]},h))})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-display text-xl font-bold text-white mb-4",children:"Cómo circulan los puntos"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[{emoji:"🏠",title:"Añade tu casa",desc:"El valor en CP se calcula según capacidad y extras. Cuanto más compartes, más puntos generas."},{emoji:"📅",title:"Aloja a un escalador",desc:"Cuando alguien se queda en tu casa, los CP pasan de su cuenta a la tuya al confirmar la reserva."},{emoji:"🧗",title:"Usa tus puntos",desc:"Con tus CP puedes solicitar quedarte en casas de otros miembros en cualquier destino de la comunidad."}].map(({emoji:h,title:j,desc:g})=>e.jsxs("div",{className:"bg-stone-950 border border-stone-800 rounded-xl p-5",children:[e.jsx("p",{className:"text-2xl mb-3",children:h}),e.jsx("h4",{className:"text-white font-bold text-sm mb-2",children:j}),e.jsx("p",{className:"text-stone-500 text-xs leading-relaxed",children:g})]},j))})]}),!m&&e.jsxs("div",{className:"mt-8 flex flex-col sm:flex-row gap-3",children:[e.jsx(ne,{to:"/signup",className:"px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors text-center text-sm",children:"Únete y empieza a ganar puntos"}),e.jsx(ne,{to:"/login",className:"px-6 py-3 rounded-full border border-stone-600 text-stone-300 hover:border-white hover:text-white transition-colors text-center text-sm",children:"Ya tengo cuenta"})]})]})}),e.jsx("section",{className:"max-w-3xl mx-auto px-4 sm:px-6",children:e.jsxs("div",{className:"bg-stone-900 border border-[#e8ff4a]/20 rounded-3xl p-8 sm:p-10 text-center",children:[e.jsx("p",{className:"text-4xl mb-4",children:"✉️"}),e.jsx("h2",{className:"font-display text-2xl sm:text-3xl font-bold text-white mb-3",children:"¿No encuentras lo que buscas?"}),e.jsx("p",{className:"text-stone-400 mb-6 max-w-md mx-auto text-sm",children:"El equipo de CLIMB & HOME está aquí para ayudarte. Escríbenos y te respondemos en menos de 48 horas."}),e.jsx("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-2 px-8 py-3.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:"[email protected]"})]})})]})}function i2({topo:l,onClose:i}){const r=(l.image||[]).map(j=>D.files.getURL(l,j)),[d,m]=b.useState(0),p=r[d]||null,f=b.useCallback(j=>{j.stopPropagation(),m(g=>(g-1+r.length)%r.length)},[r.length]),x=b.useCallback(j=>{j.stopPropagation(),m(g=>(g+1)%r.length)},[r.length]),h=j=>(j.preventDefault(),!1);return b.useEffect(()=>{const j=g=>{g.key==="Escape"&&i(),g.key==="ArrowLeft"&&m(v=>(v-1+r.length)%r.length),g.key==="ArrowRight"&&m(v=>(v+1)%r.length)};return document.addEventListener("keydown",j),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",j),document.body.style.overflow=""}},[i,r.length]),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-stone-950/95 backdrop-blur-sm p-4",onClick:i,role:"dialog","aria-modal":"true","aria-label":`Croquis: ${l.route_name}`,children:e.jsxs("div",{className:"relative max-w-5xl w-full max-h-[95vh] flex flex-col items-center gap-3",onClick:j=>j.stopPropagation(),children:[e.jsx("button",{onClick:i,className:"absolute -top-2 -right-2 z-10 w-9 h-9 rounded-full bg-stone-800 border border-stone-700 flex items-center justify-center text-white hover:bg-stone-700 transition-colors","aria-label":"Cerrar",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4",children:e.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}),p&&e.jsxs("div",{className:"relative w-full flex items-center justify-center rounded-xl overflow-hidden bg-stone-900",style:{maxHeight:r.length>1?"72vh":"82vh"},children:[e.jsx("img",{src:p,alt:`${l.route_name} — foto ${d+1}`,className:"max-w-full object-contain pointer-events-none",style:{maxHeight:r.length>1?"72vh":"82vh"},onContextMenu:h,draggable:!1}),r.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:f,className:"absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-stone-950/80 hover:bg-stone-950 text-white flex items-center justify-center transition-colors","aria-label":"Anterior",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-5 h-5",children:e.jsx("polyline",{points:"15 18 9 12 15 6"})})}),e.jsx("button",{onClick:x,className:"absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-stone-950/80 hover:bg-stone-950 text-white flex items-center justify-center transition-colors","aria-label":"Siguiente",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-5 h-5",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})}),e.jsxs("span",{className:"absolute bottom-3 left-1/2 -translate-x-1/2 px-3 py-1 rounded-full bg-stone-950/80 text-white text-xs font-medium",children:[d+1," / ",r.length]})]})]}),r.length>1&&e.jsx("div",{className:"flex gap-2 w-full overflow-x-auto py-1",onClick:j=>j.stopPropagation(),children:r.map((j,g)=>e.jsx("button",{onClick:v=>{v.stopPropagation(),m(g)},title:`Foto ${g+1}`,className:`shrink-0 rounded-lg overflow-hidden border-2 transition-all hover:scale-105 ${g===d?"border-[#e8ff4a]":"border-stone-700 hover:border-stone-500"}`,style:{width:"96px",height:"96px"},children:e.jsx("img",{src:j,alt:`Foto ${g+1}`,className:"w-full h-full object-cover pointer-events-none",onContextMenu:h,draggable:!1})},g))}),e.jsxs("div",{className:"w-full flex items-center justify-between gap-4 px-1",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-white font-bold text-base truncate",children:l.route_name}),(l.zone||l.sector)&&e.jsx("p",{className:"text-stone-400 text-sm truncate",children:[l.zone,l.sector].filter(
304Boolean).join(" · ")})]}),e.jsxs("button",{onClick:handleDownload,className:"flex items-center gap-2 px-4 py-2 rounded-full bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-[#f0ff70] transition-colors shrink-0",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4",children:[e.jsx("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),e.jsx("polyline",{points:"7 10 12 15 17 10"}),e.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),"Descargar"]})]})]})})}const r2=["Todos","Deportiva","Clásica","Bloque","Psicobloc","Alpinismo","Senderismo","Esquí","BTT"];function c2({grade:l}){return l?e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-[#e8ff4a]/15 text-[#e8ff4a] text-xs font-bold border border-[#e8ff4a]/30",children:l}):null}function d2({topo:l,isLoggedIn:i,onOpen:r}){var p,f,x,h;const d=l.image||[],m=d[0]?D.files.getURL(l,d[0],{thumb:"600x450"}):null;return e.jsxs("article",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden hover:border-[#e8ff4a]/30 transition-all hover:-translate-y-0.5 hover:shadow-xl hover:shadow-black/40 flex flex-col",children:[e.jsxs("div",{className:`relative bg-stone-800 overflow-hidden ${i&&m?"cursor-zoom-in":""}`,style:{height:"220px"},onClick:()=>i&&m&&r(l),role:i&&m?"button":void 0,"aria-label":i&&m?`Ver croquis de ${l.route_name}`:void 0,tabIndex:i&&m?0:void 0,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&i&&m&&r(l)},children:[m?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:m,alt:i?l.route_name:"Croquis de escalada",className:`w-full h-full object-cover transition-transform duration-500 hover:scale-105 ${i?"":"blur-md scale-110"}`}),d.length>1&&i&&e.jsxs("span",{className:"absolute bottom-2 right-2 px-2 py-0.5 rounded-full bg-stone-950/80 text-white text-xs font-medium",children:[d.length," fotos"]}),!i&&e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 bg-stone-950/60",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-8 h-8 text-[#e8ff4a]",children:[e.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0110 0v4"})]}),e.jsx("span",{className:"text-white text-sm font-semibold text-center px-4",children:"Regístrate para ver el croquis completo"}),e.jsx(ne,{to:"/signup",className:"px-4 py-1.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold text-xs hover:bg-[#f0ff70] transition-colors",children:"Crear cuenta"})]})]}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-stone-600",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",className:"w-12 h-12",children:[e.jsx("title",{children:"Sin imagen"}),e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),e.jsx("line",{x1:"9",y1:"21",x2:"9",y2:"9"})]})}),l.style&&e.jsx("span",{className:"absolute top-3 left-3 px-2 py-0.5 rounded-full bg-stone-950/80 text-stone-300 text-xs font-medium",children:l.style})]}),e.jsxs("div",{className:"p-4 flex flex-col gap-2 flex-1",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h3",{className:"text-white font-bold text-sm leading-tight line-clamp-2 flex-1",children:i?l.route_name:"Vía — inicia sesión para verla"}),e.jsx(c2,{grade:l.grade})]}),(l.zone||l.sector)&&e.jsxs("div",{className:"flex items-center gap-1 text-stone-400 text-xs",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3 h-3 shrink-0",children:[e.jsx("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z"}),e.jsx("circle",{cx:"12",cy:"10",r:"3"})]}),e.jsx("span",{className:"line-clamp-1",children:[l.zone,l.sector].filter(Boolean).join(" · ")})]}),l.description&&i&&e.jsx("p",{className:"text-stone-400 text-xs leading-relaxed line-clamp-2 mt-1",children:l.description}),e.jsxs("div",{className:"mt-auto pt-3 border-t border-stone-800 flex items-center gap-2",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-[#e8ff4a]/20 flex items-center justify-center shrink-0",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"#e8ff4a",strokeWidth:"2",className:"w-3.5 h-3.5",children:[e.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),e.jsx("circle",{cx:"12",cy:"7",r:"4"})]})}),e.jsx("span",{className:"text-stone-300 text-xs font-medium",children:((f=(p=l.expand)==null?void 0:p.author)==null?void 0:f.name)||"Miembro"}),((h=(x=l.expand)==null?void 0:x.author)==null?void 0:h.location)&&e.jsx("span",{className:"text-stone-500 text-xs ml-auto",children:l.expand.author.location})]})]})]})}function u2(){const{user:l}=oa(),[i,r]=b.useState([]),[d,m]=b.useState(!0),[p,f]=b.useState(""),[x,h]=b.useState("Todos"),[j,g]=b.useState(0),[v,S]=b.useState(null),N=b.useRef(null);return b.useEffect(()=>
304{N.current&&N.current.abort(),N.current=new AbortController,m(!0);const _=[];p.trim()&&_.push(`(route_name ~ "${p.trim()}" || zone ~ "${p.trim()}" || sector ~ "${p.trim()}" || grade ~ "${p.trim()}")`),x!=="Todos"&&_.push(`style = "${x}"`);const z=_.join(" && ");return D.collection("topos").getList(1,48,{sort:"-created",expand:"author",...z?{filter:z}:{},signal:N.current.signal}).then(C=>{r(C.items),g(C.totalItems),m(!1)}).catch(C=>{C!=null&&C.isAbort||m(!1)}),()=>{var C;return(C=N.current)==null?void 0:C.abort()}},[p,x]),e.jsxs(e.Fragment,{children:[e.jsxs("main",{className:"min-h-screen bg-stone-950 pb-24 relative",children:[e.jsx("div",{"aria-hidden":"true",className:"fixed inset-0 pointer-events-none select-none z-0",style:{backgroundImage:"url('/static/croquis-bg.jpg')",backgroundSize:"cover",backgroundPosition:"center top",backgroundRepeat:"no-repeat",backgroundAttachment:"fixed",filter:"blur(0px) grayscale(60%) brightness(1.1) contrast(0.95)",opacity:.55,transform:"scale(1.10)"}}),e.jsx("div",{className:"relative z-10 pt-20 pb-2 max-w-7xl mx-auto px-4 sm:px-6",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end gap-4 py-10",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("h1",{className:"font-display text-4xl sm:text-6xl font-bold text-white drop-shadow-[0_2px_6px_rgba(0,0,0,0.9)] mb-2",children:"Croquis de la comunidad"}),e.jsxs("p",{className:"text-white font-medium drop-shadow-[0_1px_4px_rgba(0,0,0,0.8)] text-lg max-w-xl",children:["Vías documentadas por escaladores locales — el conocimiento que no está en ninguna guía comercial.",!l&&e.jsxs(e.Fragment,{children:[" ",e.jsx(ne,{to:"/signup",className:"text-[#e8ff4a] font-semibold hover:underline",children:"Crear cuenta"})," para ver todos los croquis."]})]})]}),l&&e.jsxs(ne,{to:"/dashboard",className:"shrink-0 inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors text-sm",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4",children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Subir mi croquis"]})]})}),e.jsxs("section",{className:"relative z-10 max-w-7xl mx-auto px-4 sm:px-6 py-10",children:[!d&&e.jsxs("div",{className:"flex items-center gap-3 mb-6 text-sm",children:[e.jsx("span",{className:"text-[#e8ff4a] font-bold text-lg",children:j}),e.jsx("span",{className:"text-white font-semibold drop-shadow-[0_1px_4px_rgba(0,0,0,0.9)]",children:"croquis publicados por la comunidad"}),!l&&e.jsx("span",{className:"ml-auto text-white font-bold drop-shadow-[0_1px_4px_rgba(0,0,0,0.9)]",children:"• vista previa — regístrate para ver todos"})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-8",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-4 h-4 text-stone-400 absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("path",{d:"m21 21-4.35-4.35"})]}),e.jsx("input",{type:"text",placeholder:"Buscar por vía, zona, sector o grado…",value:p,onChange:_=>f(_.target.value),className:"w-full pl-9 pr-4 py-2.5 bg-stone-900 border border-stone-700 rounded-xl text-white placeholder-stone-500 text-sm focus:outline-none focus:border-[#e8ff4a]/50"})]}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:r2.map(_=>e.jsx("button",{onClick:()=>h(_),className:`px-3 py-2 rounded-xl text-xs font-semibold border transition-colors ${x===_?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"bg-stone-900 text-stone-400 border-stone-700 hover:border-stone-500"}`,children:_},_))})]}),d?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-
3045",children:[...Array(8)].map((_,z)=>e.jsx("div",{className:"h-72 bg-stone-900 rounded-2xl animate-pulse border border-stone-800"},z))}):i.length===0?e.jsxs("div",{children:[e.jsxs("p",{className:"text-white font-semibold drop-shadow-[0_1px_4px_rgba(0,0,0,0.9)] text-sm mb-5 flex items-center gap-2",children:[e.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-[#e8ff4a]"}),"Ejemplo de croquis — la comunidad irá añadiendo los suyos"]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-5 mb-10",children:e.jsxs("div",{className:"bg-stone-900 rounded-2xl overflow-hidden border border-stone-800",children:[e.jsxs("div",{className:"relative overflow-hidden",style:{height:"220px"},children:[e.jsx("img",{src:"/static/croquis-napazal.png",alt:"Croquis Los Cencerros del Napazal",className:`w-full h-full object-cover object-top ${l?"":"blur-sm scale-105"}`}),!l&&e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-stone-950/40",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-8 h-8 text-white mb-2",children:[e.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),e.jsx("span",{className:"text-white text-sm font-semibold text-center px-4",children:"Regístrate para ver el croquis completo"})]}),e.jsx("div",{className:"absolute top-2 left-2",children:e.jsx("span",{className:"bg-stone-950/80 text-[#e8ff4a] text-xs font-bold px-2 py-0.5 rounded-full",children:"Ejemplo"})})]}),e.jsxs("div",{className:"p-4",children:[e.jsx("h3",{className:"text-white font-bold text-sm mb-1",children:l?"Los Cencerros del Napazal":"Vía — inicia sesión para verla"}),e.jsx("p",{className:"text-stone-400 text-xs",children:"Cerro Peñarruaba · 6a+ · 140 m"})]})]})}),e.jsxs("div",{className:"text-center py-12 border-t border-stone-800",children:[e.jsx("p",{className:"text-white font-semibold drop-shadow-[0_1px_4px_rgba(0,0,0,0.9)] text-lg mb-2",children:"Sé el primero en subir un croquis real."}),l?e.jsx(ne,{to:"/dashboard",className:"text-[#e8ff4a] font-semibold hover:underline",children:"Subir mi croquis →"}):e.jsx(ne,{to:"/signup",className:"text-[#e8ff4a] font-semibold hover:underline",children:"Regístrate y sube el primero →"})]})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-
3045",children:i.map(_=>e.jsx(d2,{topo:_,isLoggedIn:!!l,onOpen:S},_.id))}),!l&&i.length>0&&e.jsxs("div",{className:"mt-16 bg-stone-900 border border-[#e8ff4a]/20 rounded-3xl p-8 text-center",children:[e.jsx("h2",{className:"font-display text-2xl sm:text-3xl font-bold text-white mb-3",children:"¿Quieres ver los croquis completos?"}),e.jsx("p",{className:"text-stone-400 mb-6 max-w-md mx-auto",children:"Únete a la comunidad escaladora, sube tus propios croquis y accede a todos los que comparten los miembros."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(ne,{to:"/signup",className:"inline-flex items-center justify-center gap-2 px-8 py-3.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:"Crear cuenta"}),e.jsx(ne,{to:"/login",className:"inline-flex items-center justify-center gap-2 px-8 py-3.5 rounded-full border border-stone-600 text-white hover:border-stone-400 transition-colors",children:"Ya tengo cuenta"})]})]})]})]}),v&&e.jsx(i2,{topo:v,onClose:()=>S(null)})]})}const m2=["Todos","Deportiva","Clásica","Bloque","Psicobloc","Alpinismo","Senderismo","Esquí","BTT"];function Fn(l){return(l||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function p2({n:l}){return e.jsx("div",{className:"flex gap-0.5","aria-label":`${l} de 5 estrellas`,children:[1,2,3,4,5].map(i=>e.jsx("svg",{viewBox:"0 0 16 16",className:`w-4 h-4 ${i<=l?"fill-[#e8ff4a]":"fill-stone-700"}`,"aria-hidden":"true",children:e.jsx("path",{d:"M8 1l1.8 3.6L14 5.3l-3 2.9.7 4.1L8 10.4l-3.7 1.9.7-4.1-3-2.9 4.2-.7z"})},i))})}function h2({value:l,onChange:i}){const[r,d]=b.useState(0);return e.jsx("div",{className:"flex gap-1",role:"group","aria-label":"Puntuación",children:[1,2,3,4,5].map(m=>e.jsx("button",{type:"button",onClick:()=>i(m),onMouseEnter:()=>d(m),onMouseLeave:()=>d(0),"aria-label":`${m} estrella${m>1?"s":""}`,className:"focus:outline-none",children:e.jsx("svg",{viewBox:"0 0 16 16",className:`w-7 h-7 transition-colors ${(r||l)>=m?"fill-[#e8ff4a]":"fill-stone-700 hover:fill-[#e8ff4a]/50"}`,"aria-hidden":"true",children:e.jsx("path",{d:"M8 1l1.8 3.6L14 5.3l-3 2.9.7 4.1L8 10.4l-3.7 1.9.7-4.1-3-2.9 4.2-.7z"})})},m))})}function f2({type:l}){const i=INFO_TYPES.find(r=>r.value===l)||INFO_TYPES[0];return e.jsx("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-semibold border ${i.bg} ${i.border} ${i.color}`,children:i.label})}const x2=[{value:"spam",label:"Spam o contenido irrelevante"},{value:"incorrecto",label:"Información incorrecta"},{value:"ofensivo",label:"Contenido ofensivo"},{value:"seguridad",label:"Problema de seguridad real"},{value:"otro",label:"Otro motivo"}];function b2({reviewId:l,currentUserId:i}){const[r,d]=b.useState(!1),[m,p]=b.useState(!1),[f,x]=b.useState("incorrecto"),[h,j]=b.useState(""),[g,v]=b.useState(!1);if(!i)return null;const S=async()=>{v(!0);try{await D.collection("review_reports").create({review:l,reporter:i,reason:f,details:h,status:"pendiente"}),d(!0),p(!1)}catch{}v(!1)};return r?e.jsx("span",{className:"text-stone-600 text-xs",children:"Reportada ✓"}):e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>p(!0),title:"Reportar esta reseña",className:"text-stone-600 hover:text-stone-400 transition-colors text-xs flex items-center gap-1","aria-label":"Reportar esta reseña",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3.5 h-3.5","aria-hidden":"true",children:[e.jsx("path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"}),e.jsx("line",{x1:"4",y1:"22",x2:"4",y2:"15"})]}),"Reportar"]}),m&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/70",role:"dialog","aria-modal":"true","aria-label":"Reportar reseña",children:e.jsxs("div",{className:"bg-stone-900 border border-stone-700 rounded-2xl p-6 w-full max-w-md flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-white font-bold text-lg",children:"Reportar reseña"}),e.jsx("button",{onClick:()=>p(!1),className:"text-stone-400 hover:text-white text-2xl leading-none","aria-label":"Cerrar",children:"×"})]}),e.jsx("p",{className:"text-stone-400 text-sm",children:"Selecciona el motivo. No se eliminará automáticamente — un moderador lo revisará."}),e.jsxs("fieldset",{className:"flex flex-col gap-2",children:[e.jsx("legend",{className:"text-stone-300 text-sm mb-1",children:"Motivo"}),x2.map(N=>e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-stone-300 hover:text-white",children:[e.jsx("input",{type:"radio",name:"report-reason",value:N.value,checked:f===N.value,onChange:()=>
304x(N.value),className:"accent-[#e8ff4a]"}),N.label]},N.value))]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"report-details",className:"text-stone-300 text-sm block mb-1.5",children:"Detalles adicionales (opcional)"}),e.jsx("textarea",{id:"report-details",rows:2,value:h,onChange:N=>j(N.target.value),placeholder:"Explica brevemente el problema…",className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-xl text-white text-sm placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50 resize-none"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:S,disabled:g,className:"flex-1 py-2.5 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors disabled:opacity-50 text-sm",children:g?"Enviando…":"Enviar reporte"}),e.jsx("button",{onClick:()=>p(!1),className:"px-4 py-2.5 rounded-xl border border-stone-600 text-stone-400 hover:border-stone-400 transition-colors text-sm",children:"Cancelar"})]})]})})]})}function g2({reviewId:l,currentUserId:i}){const[r,d]=b.useState([]),[m,p]=b.useState(!0),[f,x]=b.useState(""),[h,j]=b.useState(null),[g,v]=b.useState(""),[S,N]=b.useState(!1),[_,z]=b.useState(!1),C=b.useCallback(L=>D.collection("review_comments").getFullList({filter:`review = "${l}"`,sort:"created",expand:"author",signal:L}).then(d).catch(q=>{q!=null&&q.isAbort||d([])}).finally(()=>p(!1)),[l]);b.useEffect(()=>{const L=new AbortController;return C(L.signal),()=>L.abort()},[C]);const k=async(L,q=null)=>{if(!(!L.trim()||!i)){N(!0);try{const H=await D.collection("review_comments").create({review:l,author:i,content:L.trim(),parent_comment:q||""});x(""),j(null),v(""),C()}catch{}N(!1)}},T=r.filter(L=>!L.parent_comment),w=L=>r.filter(q=>q.parent_comment===L),A=_?T:T.slice(0,3);return i?e.jsx("div",{className:"border-t border-stone-800 mt-4 pt-4",children:m?e.jsx("div",{className:"h-4 bg-stone-800 rounded animate-pulse w-24"}):e.jsxs(e.Fragment,{children:[r.length>0&&e.jsxs("p",{className:"text-stone-500 text-xs mb-3 font-semibold uppercase tracking-wide",children:[r.length," ",r.length===1?"comentario":"comentarios"]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[A.map(L=>{var q,H,F,U;return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-[#e8ff4a]/10 flex items-center justify-center shrink-0 mt-0.5","aria-hidden":"true",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"#e8ff4a",strokeWidth:"2",className:"w-3 h-3",children:[e.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),e.jsx("circle",{cx:"12",cy:"7",r:"4"})]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-baseline gap-2 flex-wrap",children:[e.jsx("span",{className:"text-white text-xs font-semibold",children:((H=(q=L.expand)==null?void 0:q.author)==null?void 0:H.name)||"Miembro"}),e.jsx("time",{className:"text-stone-600 text-xs",dateTime:(F=L.created)==null?void 0:F.slice(0,10),children:(U=L.created)==null?void 0:U.slice(0,10)})]}),e.jsx("p",{className:"text-stone-300 text-sm mt-0.5",children:L.content}),i&&e.jsx("button",{onClick:()=>j(h===L.id?null:L.id),className:"text-stone-600 hover:text-[#e8ff4a] text-xs mt-1 transition-colors",children:"Responder"})]})]}),w(L.id).map(J=>{var O,X,B,Z;return e.jsxs("div",{className:"ml-8 flex items-start gap-2",children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-stone-800 flex items-center justify-center shrink-0 mt-0.5","aria-hidden":"true",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-2.5 h-2.5 text-stone-500",children:[e.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),e.jsx("circle",{cx:"12",cy:"7",r:"4"})]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-stone-300 text-xs font-semibold",children:((X=(O=J.expand)==null?void 0:O.author)==null?void 0:X.name)||"Miembro"}),e.jsx("time",{className:"text-stone-600 text-xs",dateTime:(B=J.created)==null?void 0:B.slice(0,10),children:(Z=J.created)==null?void 0:Z.slice(0,10)})]}),e.jsx("p",{className:"text-stone-400 text-sm",children:J.content})]})]},J.id)}),h===L.id&&i&&e.jsxs("div",{className:"ml-8 flex gap-2 mt-1",children:[e.jsx("input",{type:"text",value:g,onChange:J=>v(J.target.value),placeholder:"Escribe tu respuesta…","aria-label":"Respuesta",className:"flex-1 px-3 py-1.5 bg-stone-800 border border-stone-700 rounded-lg text-white text-xs placeholder-stone-500 focus:outline-hidden focu
304s:border-[#e8ff4a]/50"}),e.jsx("button",{onClick:()=>k(g,L.id),disabled:S||!g.trim(),className:"px-3 py-1.5 bg-[#e8ff4a] text-stone-950 rounded-lg text-xs font-bold disabled:opacity-50 hover:bg-[#f0ff70] transition-colors",children:S?"…":"Enviar"})]})]},L.id)}),T.length>3&&!_&&e.jsxs("button",{onClick:()=>z(!0),className:"text-[#e8ff4a] text-xs hover:underline self-start",children:["Ver ",T.length-3," comentario",T.length-3!==1?"s":""," más →"]})]}),i?e.jsxs("div",{className:"flex gap-2 mt-3",children:[e.jsx("input",{type:"text",value:f,onChange:L=>x(L.target.value),placeholder:"Añade un comentario…","aria-label":"Nuevo comentario",onKeyDown:L=>{L.key==="Enter"&&!L.shiftKey&&(L.preventDefault(),k(f))},className:"flex-1 px-3 py-2 bg-stone-800 border border-stone-700 rounded-xl text-white text-sm placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50"}),e.jsx("button",{onClick:()=>k(f),disabled:S||!f.trim(),className:"px-4 py-2 bg-[#e8ff4a] text-stone-950 rounded-xl text-sm font-bold disabled:opacity-50 hover:bg-[#f0ff70] transition-colors",children:S?"…":"Comentar"})]}):e.jsxs("p",{className:"text-stone-600 text-xs mt-3",children:[e.jsx(ne,{to:"/login",className:"text-[#e8ff4a] hover:underline",children:"Inicia sesión"})," para comentar."]})]})}):e.jsx("div",{className:"border-t border-stone-800 mt-4 pt-4",children:m?e.jsx("div",{className:"h-4 bg-stone-800 rounded animate-pulse w-24"}):r.length>0?e.jsxs("p",{className:"text-stone-600 text-xs",children:[e.jsxs("span",{className:"text-stone-400 font-semibold",children:[r.length," ",r.length===1?"debate":"debates"]})," — ",e.jsx(ne,{to:"/signup",className:"text-[#e8ff4a] hover:underline",children:"regístrate para leerlos"})]}):null})}const Ru=["4","4+","5","5+","6a","6a+","6b","6b+","6c","6c+","7a","7a+","7b","7b+","7c","7c+","8a","8a+","8b","8b+","8c","8c+","9a","9a+","9b","9b+","9c"],qu=["V0","V1","V2","V3","V4","V5","V6","V7","V8","V9","V10","V11","V12","V13","V14","V15","V16","Font 3","Font 4","Font 5","Font 6a","Font 6b","Font 6c","Font 7a","Font 7b","Font 7c","Font 8a","Font 8b","Font 8c"],Du=["I","II","III","IV","V","VI","A0","A1","A2","A3"],v2=[...Ru,...qu,...Du];function y2(l){if(!l)return v2;const i=d=>d==null?void 0:d.trim().toLowerCase(),r=[Ru,qu,Du];for(const d of r){const m=d.findIndex(p=>i(p)===i(l));if(m!==-1){const p=Math.max(0,m-2),f=Math.min(d.length-1,m+2);return d.slice(p,f+1)}}return/^[VF]/i.test(l)?qu:/^[IVA]/i.test(l)?Du:Ru}function tb({routeKey:l,routeName:i,schoolName:r,sectorName:d,currentUserId:m}){const[p,f]=b.useState(0),[x,h]=b.useState(null),[j,g]=b.useState(!1);b.useEffect(()=>{if(!l)return;const S=new AbortController;return D.collection("route_ascents").getFullList({filter:`route_key="${l.replace(/"/g,"")}"`,signal:S.signal}).then(N=>{f(N.length),m&&h(N.find(_=>_.member===m)||null)}).catch(()=>{}),()=>S.abort()},[l,m]);const v=async()=>{if(!m){alert("Debes iniciar sesión para marcar ascensiones.");return}g(!0);try{if(x)await D.collection("route_ascents").delete(x.id),h(null),f(S=>Math.max(0,S-1));else{const S=await D.collection("route_ascents").create({member:m,route_key:l,route_name:i||"",school_name:r||"",sector_name:d||""});h(S),f(N=>N+1)}}catch(S){console.error(S)}finally{g(!1)}};return e.jsxs("button",{onClick:v,disabled:j,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold transition-all ${x?"bg-[#e8ff4a] text-stone-900":"bg-stone-800 text-stone-300 hover:bg-stone-700"}`,title:x?"Quitar de mis ascensiones":"Marcar como escalada",children:[e.jsx("span",{children:x?"✓":"○"}),e.jsx("span",{children:x?"La escalé":"La he escalado"}),p>0&&e.jsxs("span",{className:`ml-1 ${x?"text-stone-700":"text-stone-500"}`,children:["· ",p]})]})}function Wu({itemType:l,itemKey:i,itemName:r,schoolName:d,sectorName:m,currentUserId:p}){const[f,x]=b.useState(null),[h,j]=b.useState(!1);b.useEffect(()=>{if(!p||!i)return;const v=new AbortController;return D.collection("saved_items").getFullList({filter:`member="${p}"&&item_key="${i.replace(/"/g,"")}"`,signal:v.signal}).then(S=>x(S[0]||null)).catch(()=>{}),()=>v.abort()},[i,p]);const g=async()=>
304{if(!p){alert("Debes iniciar sesión para guardar.");return}j(!0);try{if(f)await D.collection("saved_items").delete(f.id),x(null);else{const v=await D.collection("saved_items").create({member:p,item_type:l,item_key:i,item_name:r||"",school_name:d||"",sector_name:m||""});x(v)}}catch(v){console.error(v)}finally{j(!1)}};return e.jsxs("button",{onClick:g,disabled:h,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold transition-all ${f?"bg-rose-500/20 text-rose-300 border border-rose-500/40":"bg-stone-800 text-stone-400 hover:bg-stone-700"}`,title:f?"Quitar de guardados":"Guardar",children:[e.jsx("span",{children:f?"♥":"♡"}),e.jsx("span",{children:f?"Guardada":"Guardar"})]})}function sb({routeKey:l,referenceGrade:i,currentUserId:r,compact:d=!1}){var q;const[m,p]=b.useState([]),[f,x]=b.useState(null),[h,j]=b.useState(""),[g,v]=b.useState(!1),[S,N]=b.useState(!1),[_,z]=b.useState(!1),C=y2(i);b.useEffect(()=>{if(!l)return;const H=new AbortController;return D.collection("grade_votes").getFullList({filter:`route_key = "${l.replace(/"/g,"")}"`,signal:H.signal}).then(F=>{if(p(F),r){const U=F.find(J=>J.voter===r);U&&(x(U),j(U.grade))}}).catch(F=>{F!=null&&F.isAbort||p([])}),()=>H.abort()},[l,r]);const k=m.reduce((H,F)=>(H[F.grade]=(H[F.grade]||0)+1,H),{}),T=Object.entries(k).sort((H,F)=>F[1]-H[1]),w=(q=T[0])==null?void 0:q[0],A=m.length,L=async()=>{if(!(!h.trim()||!r||!l)){v(!0);try{if(f){const H=await D.collection("grade_votes").update(f.id,{grade:h});x(H),p(F=>F.map(U=>U.id===f.id?{...U,grade:h}:U))}else{const H=await D.collection("grade_votes").create({route_key:l,voter:r,grade:h});x(H),p(F=>[...F,H])}N(!1)}catch{}v(!1)}};return d?e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[A>0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-stone-500",children:"Comunidad:"}),e.jsx("button",{onClick:()=>z(H=>!H),className:"px-2 py-0.5 rounded-full bg-[#e8ff4a]/15 border border-[#e8ff4a]/30 text-[#e8ff4a] text-xs font-bold font-mono hover:bg-[#e8ff4a]/25 transition-colors",title:"Ver reparto de propuestas",children:w}),e.jsxs("span",{className:"text-stone-600 text-xs",children:["· ",A," ",A===1?"voto":"votos"]}),_&&e.jsx("div",{className:"w-full flex gap-1 flex-wrap mt-1",children:T.map(([H,F])=>e.jsxs("span",{className:`text-xs px-2 py-0.5 rounded-full font-mono border ${H===w?"bg-[#e8ff4a]/15 border-[#e8ff4a]/30 text-[#e8ff4a]":"bg-stone-800 border-stone-700 text-stone-400"}`,children:[H," ",e.jsxs("span",{className:"text-stone-600",children:["×",F]})]},H))})]}):e.jsx("span",{className:"text-stone-700 text-xs italic",children:"Sin votos de grado aún"}),r&&e.jsx("button",{onClick:()=>N(H=>!H),className:"text-xs text-[#e8ff4a]/70 hover:text-[#e8ff4a] transition-colors",children:f?`(tu voto: ${f.grade})`:"+ votar grado"}),S&&r&&e.jsxs("div",{className:"w-full flex gap-2 items-center pt-2 border-t border-stone-800 mt-1",children:[e.jsx("label",{className:"text-xs text-stone-400 shrink-0",children:"Mi grado:"}),e.jsx("div",{className:"flex gap-1.5 flex-wrap flex-1",children:C.map(H=>e.jsx("button",{onClick:()=>j(H),className:`px-2.5 py-1 rounded-lg text-xs font-mono font-bold border transition-all ${h===H?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"bg-stone-800 border-stone-700 text-stone-300 hover:border-[#e8ff4a]/40"}`,children:H},H))}),e.jsx("button",{onClick:L,disabled:g||!h,className:"px-3 py-1.5 bg-[#e8ff4a] text-stone-950 rounded-lg text-xs font-bold disabled:opacity-50 hover:bg-[#f0ff70] transition-colors shrink-0",children:g?"…":f?"Actualizar":"Votar"}),e.jsx("button",{onClick:()=>N(!1),className:"text-stone-600 hover:text-stone-400 text-xs",children:"✕"})]})]}):e.jsxs("div",{className:"mt-3 p-3 bg-stone-900/60 border border-stone-800 rounded-xl flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[i&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-stone-600 text-xs",children:"Grado original:"}),e.jsx("span",{className:"px-2.5 py-0.5 rounded-full bg-stone-700 border border-stone-600 text-stone-200 text-sm font-bold font-mono",children:i})]}),A>0&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[i&&e.jsx("span",{className:"text-stone-700 text-xs",children:"→"}),e.jsx("span",{className:"text-stone-600 text-xs",children:"Comunidad:"}),e.jsx("button",{onClick:()=>z(H=>!H),className:"px-2.5 py-0.5 rounded-full bg-[#e8ff4a]/20 border border-[#e8ff4a]/40 text-[#e8ff4a] text-sm font-bold font-mono hover:bg-[#e8ff4a]/30 transition-colors",title:"Ver reparto de votos",children:w}),e.jsxs("span",{className:"text-stone-600 text-xs",children:["· ",A," ",A===1?"voto":"votos"]})]}),!i&&A===0&&e.jsx("span",{className:"text-stone-600 text-xs",children:"Sin grado todavía — sé el primero en proponer"})]}),r?e.jsx("button",{onClick:()=>N(H=>!H),className:"text-xs text-[#e8ff4a]/80 hover:text-[#e8ff4a] transition-colors shrink-0",children:f?`Tu voto: ${f.grade} · cambiar`:"Proponer grado"}):e.jsx(ne,{to:"/login",className:"text-xs text-[#e8ff4a]/60 hover:text-[#e8ff4a] transition-colors",children:"Entra para votar"})]}),_&&A>0&&e.jsx("div",{className:"flex gap-1 flex-wrap",children:T.map(([H,F])=>e.jsxs("span",{className:`text-xs px-2 py-0.5 rounded-full font-mono border ${H===w?"bg-[#e8ff4a]/15 border-[#e8ff4a]/30 text-[#e8ff4a]":"bg-stone-800 border-stone-700 text-stone-400"}`,children:[H," ",e.jsxs("span",{className:"text-stone-600",children:["×",F]})]},H))}),S&&r&&e.jsxs("div",{className:"flex flex-col gap-2 pt-2 border-t border-stone-800 mt-1",children:[e.jsx("p",{className:"text-xs text-stone-400",children:i?`Grado de referencia: ${i} — elige el que más se ajuste:`:"Elige el grado que propones:"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:C.map(H=>e.jsx("button",{onClick:()=>j(H),className:`px-3 py-1.5 rounded-lg text-sm font-mono font-bold border transition-all ${h===H?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"bg-stone-800 border-stone-700 text-stone-300 hover:border-[#e8ff4a]/40"}`,children:H},H))}),e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx("button",{onClick:L,disabled:g||!h,className:"px-4 py-1.5 bg-[#e8ff4a] text-stone-950 rounded-lg text-sm font-bold disabled:opacity-50 hover:bg-[#f0ff70] transition-colors",children:g?"…":f?"Actualizar":"Votar"}),e.jsx("button",{onClick:()=>N(!1),className:"text-stone-600 hover:text-stone-400 text-xs",children:"Cancelar"})]})]})]})}function j2({review:l,currentUserId:i,communityGrade:r,onUpdate:d}
304){var w,A,L,q,H,F,U;const[m,p]=b.useState(!1),[f,x]=b.useState(!1),[h,j]=b.useState({route_name:l.route_name||"",grade:l.grade||"",sector:l.sector||"",review_text:l.review_text||"",conditions:l.conditions||"",best_season:l.best_season||"",rating:l.rating||0}),[g,v]=b.useState(!1),[S,N]=b.useState(""),_=(w=l.photos)!=null&&w[0]?D.files.getURL(l,l.photos[0],{thumb:"500x350"}):null,z=l.info_type||"personal",C=INFO_TYPES.find(J=>J.value===z)||INFO_TYPES[0],k=i&&l.author===i,T=async()=>{if(!h.route_name.trim()){N("El nombre de la vía no puede estar vacío.");return}if(!h.review_text.trim()){N("El texto de la reseña no puede estar vacío.");return}v(!0),N("");try{const J=await D.collection("route_reviews").update(l.id,{route_name:h.route_name.trim(),grade:h.grade.trim(),sector:h.sector.trim(),review_text:h.review_text.trim(),conditions:h.conditions.trim(),best_season:h.best_season.trim()});x(!1),d&&d({...l,...J})}catch{N("No se pudo guardar. Inténtalo de nuevo.")}v(!1)};return e.jsxs("article",{className:`border rounded-2xl overflow-hidden hover:-translate-y-0.5 hover:shadow-xl hover:shadow-black/40 transition-all flex flex-col h-fit ${z!=="personal"?`${C.bg} ${C.border} border`:"bg-stone-900 border-stone-800 hover:border-[#e8ff4a]/20"}`,children:[_&&e.jsx("div",{className:"h-44 overflow-hidden",children:e.jsx("img",{src:_,alt:l.route_name,className:"w-full h-full object-cover",loading:"lazy"})}),e.jsxs("div",{className:"p-5 flex flex-col gap-3 flex-1",children:[z!=="personal"&&e.jsx(f2,{type:z}),e.jsxs("div",{className:"flex items-start gap-3 justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("h3",{className:"text-white font-bold leading-tight flex items-center gap-2 flex-wrap",children:[!l.route_name||l.route_name==="__pending__"?e.jsx("span",{className:"text-stone-500 italic text-sm",children:"Vía sin nombre"}):l.route_name,k&&(!l.route_name||l.route_name==="__pending__")&&!f&&e.jsx("button",{onClick:()=>x(!0),className:"text-[10px] text-[#e8ff4a] border border-[#e8ff4a]/40 rounded-full px-2 py-0.5 hover:bg-[#e8ff4a]/10 transition-colors shrink-0",children:"Corregir"})]}),(l.zone||l.sector)&&e.jsxs("p",{className:"text-stone-500 text-xs mt-0.5 flex items-center gap-1",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3 h-3 shrink-0","aria-hidden":"true",children:[e.jsx("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z"}),e.jsx("circle",{cx:"12",cy:"10",r:"3"})]}),l.zone&&e.jsx("span",{className:"text-stone-400",children:l.zone}),l.zone&&l.sector&&e.jsx("span",{className:"text-stone-700",children:"›"}),l.sector&&e.jsx("span",{children:l.sector})]})]}),e.jsxs("div",{className:"flex flex-col items-end gap-1 shrink-0",children:[l.grade&&e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-[#e8ff4a]/15 text-[#e8ff4a] text-xs font-bold border border-[#e8ff4a]/30",children:l.grade}),r&&r.consensus&&r.consensus!==l.grade&&e.jsxs("span",{className:"px-2 py-0.5 rounded-full bg-stone-700/60 text-stone-300 text-xs font-bold border border-stone-600 flex items-center gap-1",title:`Grado de la comunidad: ${r.consensus} · ${r.total} ${r.total===1?"voto":"votos"}`,children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3 h-3 text-stone-400","aria-hidden":"true",children:[e.jsx("path",{d:"M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"}),e.jsx("circle",{cx:"9",cy:"7",r:"4"}),e.jsx("path",{d:"M23 21v-2a4 4 0 00-3-3.87"}),e.jsx("path",{d:"M16 3.13a4 4 0 010 7.75"})]}),r.consensus,e.jsxs("span",{className:"text-stone-500 font-normal text-[10px]",children:["·",r.total]})]}),r&&r.consensus&&r.consensus===l.grade&&r.total>0&&e.jsxs("span",{className:"text-stone-500 text-[10px]",title:`${r.total} ${r.total===1?"escalador confirma":"escaladores confirman"} este grado`,children:["✓ ",r.total," ",r.total===1?"confirmación":"confirmaciones"]}),l.style&&e.jsx("span",{className:"text-stone-500 text-xs",children:l.style})]})]}),l.rating>0&&e.jsx(p2,{n:l.rating}),(()=>{const J=l.review_text||"",O=J.length>280;return e.jsxs("div",{children:[e.jsxs("p",{className:"text-stone-300 text-sm leading-relaxed",children:["“",m||!O?J:J.slice(0,280)+"…","”"]}),O&&e.jsx("button",{onClick:()=>p(X=>!X),className:"text-xs text-[#e8ff4a]/70 hover:text-[#e8ff4a] mt-1 transition-colors",children:m?"Ver menos":"Ver más"})]})})(),(l.conditions||l.best_season)&&e.jsxs("div",{className:"flex gap-3 text-xs text-stone-500 border-t border-stone-800/60 pt-3 flex-wrap",children:[l.conditions&&e.jsxs("span",{children:["Condiciones: ",e.jsx("span",{className:"text-stone-400",children:l.conditions})]}),l.best_season&&e.jsxs("span",{children:["Mejor época: ",e.jsx("span",{className:"text-stone-400",children:l.best_season})]})]}),l.info_type!=="seguridad"&&l.info_type!=="acceso"&&e.jsx(sb,{routeKey:l.zone&&l.route_name?`${l.zone}::${l.route_name}`:l.id,referenceGrade:l.grade,currentUserId:i}),l.info_type!=="seguridad"&&l.info_type!=="acceso"&&e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx(tb,{routeKey:l.zone&&l.route_name?`${l.zone}::${l.route_name}`:l.id,routeName:l.route_name,schoolName:l.zone,sectorName:l.sector,currentUserId:i}),e.jsx(Wu,{itemType:"route",itemKey:l.zone&&l.route_name?`${l.zone}::${l.route_name}`:l.id,itemName:l.route_name,schoolName:l.zone,sectorName:l.sector,currentUserId:i}),e.jsxs("a",{href:`/croquis?zone=${encodeURIComponent(l.zone||"")}&search=${encodeURIComponent(l.route_name||"")}`,className:"text-xs bg-stone-800 hover:bg-stone-700 text-stone-300 hover:text-[#e8ff4a] px-3 py-1.5 rounded-full transition-colors inline-flex items-center gap-1",title:"Ver o sub
304ir croquis de esta vía",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3.5 h-3.5","aria-hidden":"true",children:[e.jsx("path",{d:"M21 19V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2z"}),e.jsx("path",{d:"M9 14l3-3 3 3M8 11l4-4 4 4"})]}),"Ver o subir croquis"]})]}),e.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-stone-800/60",children:[e.jsx("div",{className:"w-7 h-7 rounded-full bg-[#e8ff4a]/15 flex items-center justify-center shrink-0","aria-hidden":"true",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"#e8ff4a",strokeWidth:"2",className:"w-3.5 h-3.5",children:[e.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),e.jsx("circle",{cx:"12",cy:"7",r:"4"})]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-white text-xs font-semibold truncate",children:((L=(A=l.expand)==null?void 0:A.author)==null?void 0:L.name)||"Miembro"}),((H=(q=l.expand)==null?void 0:q.author)==null?void 0:H.location)&&e.jsx("p",{className:"text-stone-500 text-xs truncate",children:l.expand.author.location})]}),e.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[e.jsxs("button",{onClick:()=>p(J=>!J),className:`text-xs flex items-center gap-1 transition-colors ${m?"text-[#e8ff4a]":"text-stone-500 hover:text-[#e8ff4a]"}`,"aria-label":m?"Cerrar debate":"Debatir / comentar",title:m?"Cerrar debate":"Debatir sobre esta reseña",children:[e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3.5 h-3.5","aria-hidden":"true",children:e.jsx("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})}),"Debatir"]}),e.jsx("time",{className:"text-stone-600 text-xs",dateTime:(F=l.created)==null?void 0:F.slice(0,10),children:(U=l.created)==null?void 0:U.slice(0,10)}),k&&!f&&e.jsxs("button",{onClick:()=>x(!0),className:"text-stone-500 hover:text-[#e8ff4a] text-xs flex items-center gap-1 transition-colors",title:"Editar mi reseña",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3.5 h-3.5","aria-hidden":"true",children:[e.jsx("path",{d:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"}),e.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"})]}),"Editar"]}),!k&&e.jsx(b2,{reviewId:l.id,currentUserId:i})]})]}),f&&e.jsxs("div",{className:"border-t border-[#e8ff4a]/20 mt-3 pt-4 flex flex-col gap-3",children:[e.jsx("p",{className:"text-xs text-[#e8ff4a] font-semibold uppercase tracking-wide",children:"Corregir mi reseña"}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-xs text-stone-400",htmlFor:`edit-name-${l.id}`,children:"Nombre de la vía *"}),e.jsx("input",{id:`edit-name-${l.id}`,type:"text",value:h.route_name,onChange:J=>j(O=>({...O,route_name:J.target.value})),className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-xs text-stone-400",htmlFor:`edit-grade-${l.id}`,children:"Grado"}),e.jsx("input",{id:`edit-grade-${l.id}`,type:"text",value:h.grade,onChange:J=>j(O=>({...O,grade:J.target.value})),className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-xs text-stone-400",htmlFor:`edit-sector-${l.id}`,children:"Sector"}),e.jsx("input",{id:`edit-sector-${l.id}`,type:"text",value:h.sector,onChange:J=>j(O=>({...O,sector:J.target.value})),className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-xs text-stone-400",htmlFor:`edit-text-${l.id}`,children:"Texto de la reseña *"}),e.jsx("textarea",{id:`edit-text-${l.id}`,value:h.review_text,onChange:J=>j(O=>({...O,review_text:J.target.value})),rows:5,className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm placeholder-stone-500 focus:outline-hidden focu
304s:border-[#e8ff4a]/50 resize-y"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-xs text-stone-400",htmlFor:`edit-cond-${l.id}`,children:"Condiciones"}),e.jsx("input",{id:`edit-cond-${l.id}`,type:"text",value:h.conditions,onChange:J=>j(O=>({...O,conditions:J.target.value})),className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm focus:outline-hidden focus:border-[#e8ff4a]/50"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-xs text-stone-400",htmlFor:`edit-season-${l.id}`,children:"Mejor época"}),e.jsx("input",{id:`edit-season-${l.id}`,type:"text",value:h.best_season,onChange:J=>j(O=>({...O,best_season:J.target.value})),className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm focus:outline-hidden focus:border-[#e8ff4a]/50"})]})]}),S&&e.jsx("p",{className:"text-red-400 text-xs",role:"alert",children:S}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:T,disabled:g,className:"flex-1 py-2 bg-[#e8ff4a] text-stone-950 rounded-xl text-sm font-bold disabled:opacity-50 hover:bg-[#f0ff70] transition-colors",children:g?"Guardando…":"Guardar cambios"}),e.jsx("button",{onClick:()=>{x(!1),N("")},className:"px-4 py-2 bg-stone-800 text-stone-300 rounded-xl text-sm hover:bg-stone-700 transition-colors",children:"Cancelar"})]})]}),m&&e.jsxs("div",{className:"border-t border-stone-800 mt-3 pt-1",children:[e.jsx("p",{className:"text-xs text-stone-600 font-semibold uppercase tracking-wide mb-3",children:"Debate · comentarios"}),e.jsx(g2,{reviewId:l.id,currentUserId:i})]})]})]})}function _2({value:l,onChange:i,onSchoolSelected:r}){const[d,m]=b.useState(l||""),[p,f]=b.useState([]),[x,h]=b.useState(!1),[j,g]=b.useState({zona:"",pais:"",region:"",municipio:"",lat:"",lng:"",tipo:"deportiva",temporada:"",resumen:""}),[v,S]=b.useState(!1),[N,_]=b.useState(""),[z,C]=b.useState(!1),[k,T]=b.useState([]),{user:w}=oa();b.useEffect(()=>{const O=new AbortController;return D.collection("community_schools").getFullList({sort:"-created",signal:O.signal}).then(X=>{O.signal.aborted||T(X)}).catch(X=>{(X==null?void 0:X.name)!=="AbortError"&&!O.signal.aborted&&console.warn("community_schools fetch:",X)}),()=>O.abort()},[]);const A=[...at.map(O=>({id:O.id,zona:O.zona,pais:O.pais,region:O.continente,municipio:"",source:"static"})),...k.map(O=>({id:O.id,zona:O.zona,pais:O.pais,region:O.region,municipio:O.municipio,source:"community"}))],L=(O,X,B,Z)=>{const P=(B-O)*Math.PI/180,$=(Z-X)*Math.PI/180,oe=Math.sin(P/2)**2+Math.cos(O*Math.PI/180)*Math.cos(B*Math.PI/180)*Math.sin($/2)**2;return 6371*2*Math.atan2(Math.sqrt(oe),Math.sqrt(1-oe))},q=O=>{if(m(O),i(O),O.length<2){f([]);return}const X=te=>(te||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/['''`]/g,"").toLowerCase(),B=X(O),Z=A.filter(te=>X(te.zona).includes(B)||X(te.pais).includes(B)||X(te.municipio).includes(B)||X(te.region).includes(B));f(Z.slice(0,8))},H=O=>{m(O.zona),i(O.zona),f([]),r&&r(O)},F=(O,X,B)=>{const Z=P=>(P==null?void 0:P.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase())||"",te=Z(O);return A.filter(P=>{const $=Z(P.zona).includes(te)||te.includes(Z(P.zona));if(!$)return!1;if(!X||!B)return $;const oe=at.find(ze=>ze.id===P.id);if(oe)return L(parseFloat(X),parseFloat(B),oe.lat,oe.lng)<30;const de=k.find(ze=>ze.id===P.id);return de!=null&&de.lat&&(de!=null&&de.lng)?L(parseFloat(X),parseFloat(B),de.lat,de.lng)<30:$})},U=async()=>{const O=[j.zona,j.municipio,j.region,j.pais].filter(Boolean).join(", ");if(!O.trim()){_("Escribe al menos el nombre de la escuela para buscar sus coordenadas.");return}C(!0),_("");try{const X=`https://nominatim.openstreetmap.org/search?format=json&limit=1&q=${encodeURIComponent(O)}`,Z=await(await fetch(X,{headers:{"Accept-Language":"es","User-Agent":"CragSwap/1.0"}})).json();Z&&Z.length>0?(g(te=>({...te,lat:parseFloat(Z[0].lat).toFixed(5),lng:parseFloat(Z[0].lon).toFixed(5)})),_("")):_("No encontramos esa ubicación. Prueba con más detalles o introduce las coordenadas manualmente.")}catch{_("No se pudo conectar con el servicio de mapas. Introduce las coordenadas manualmente.")}C(!1)},J=async()=>{var X,B;if(_(""),!j.zona.trim()||!j.pais.trim()){_("El nombre de la escuela y el país son obligatorios.");return}if(!w){_("Debes iniciar sesión para añadir una escuela.");return}S(!0);const O=F(j.zona,j.lat,j.lng);if(O.length>0){if(!confirm(`Encontramos "${O[0].zona}" (${O[0].pais}) que podría ser la misma escuela. ¿Quieres usar esa en lugar de crear una nueva?`)){S(!1);return}H(O[0]),h(!1),S(!1);return}
304try{const Z=await D.collection("community_schools").create({...j,lat:parseFloat(j.lat)||0,lng:parseFloat(j.lng)||0,contributed_by:w.id,verified:!1});T(te=>[...te,Z]),H({id:Z.id,zona:Z.zona,pais:Z.pais,region:Z.region,municipio:Z.municipio,source:"community"}),h(!1),_("")}catch(Z){const P=((X=Z==null?void 0:Z.response)!=null&&X.data?Object.values(Z.response.data).map($=>($==null?void 0:$.message)||$).join(". "):"")||((B=Z==null?void 0:Z.response)==null?void 0:B.message)||(Z==null?void 0:Z.message)||"Error desconocido";_("No se pudo guardar: "+P)}S(!1)};return e.jsxs("div",{className:"relative",children:[e.jsxs("label",{className:"block text-sm text-stone-300 mb-1.5",children:["Escuela / Zona ",e.jsx("span",{className:"text-[#e8ff4a]",children:"*"})]}),e.jsx("input",{type:"text",value:d,onChange:O=>q(O.target.value),placeholder:"p.ej. Siurana, Atxarte, El Chorro…",className:"w-full px-4 py-2.5 bg-stone-800 border border-stone-700 rounded-xl text-white placeholder-stone-500 text-sm focus:outline-hidden focus:border-[#e8ff4a]/50"}),p.length>0&&e.jsxs("ul",{className:"absolute z-50 w-full mt-1 bg-stone-800 border border-stone-700 rounded-xl shadow-xl overflow-hidden",children:[p.map(O=>e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>H(O),className:"w-full text-left px-4 py-2.5 text-sm hover:bg-stone-700 transition-colors",children:[e.jsx("span",{className:"text-white font-medium",children:O.zona}),e.jsxs("span",{className:"text-stone-400 ml-2 text-xs",children:[O.municipio?`${O.municipio} · `:"",O.pais]}),O.source==="community"&&e.jsx("span",{className:"ml-2 text-[#e8ff4a] text-xs",children:"comunidad"})]})},O.id)),e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>{h(!0),f([]),g(O=>({...O,zona:d})),_("")},className:"w-full text-left px-4 py-2.5 text-sm text-[#e8ff4a] hover:bg-stone-700 border-t border-stone-700",children:["+ Añadir «",d,"» como nueva escuela"]})})]}),d.length>=2&&p.length===0&&!x&&e.jsx("button",{type:"button",onClick:()=>{h(!0),g(O=>({...O,zona:d})),_("")},className:"mt-2 text-sm text-[#e8ff4a] hover:underline",children:"No encontrada — ¿Añadir nueva escuela?"}),x&&e.jsxs("div",{className:"mt-3 p-4 bg-stone-800 border border-[#e8ff4a]/30 rounded-xl flex flex-col gap-3",children:[e.jsx("p",{className:"text-sm font-semibold text-[#e8ff4a]",children:"Nueva escuela de escalada"}),e.jsx("p",{className:"text-xs text-stone-400",children:"Quedará registrada en el directorio y en el mapa de Climb & Home."}),[["zona","Nombre de la escuela *","p.ej. Atxarte"],["pais","País *","p.ej. España"],["region","Región / Provincia","p.ej. Bizkaia"],["municipio","Municipio o localidad","p.ej. Abadiño"],["tipo","Tipo","deportiva / clásica / bloque"],["temporada","Temporada","p.ej. abr–nov"],["resumen","Descripción breve","Unas líneas sobre la escuela…"]].map(([O,X,B])=>e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:X}),O==="resumen"?e.jsx("textarea",{rows:2,value:j[O],onChange:Z=>g(te=>({...te,[O]:Z.target.value})),placeholder:B,className:"w-full px-3 py-2 bg-stone-900 border border-stone-700 rounded-lg text-white text-sm placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50 resize-none"}):e.jsx("input",{type:"text",value:j[O],onChange:Z=>g(te=>({...te,[O]:Z.target.value})),placeholder:B,className:"w-full px-3 py-2 bg-stone-900 border border-stone-700 rounded-lg text-white text-sm placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50"})]},O)),e.jsxs("div",{className:"rounded-lg bg-stone-900 border border-stone-700 p-3 flex flex-col gap-2",children:[e.jsxs("p",{className:"text-xs text-stone-400",children:["Coordenadas",j.lat&&j.lng?e.jsxs("span",{className:"text-[#e8ff4a] ml-1",children:["✓ ",j.lat,", ",j.lng]}):e.jsx("span",{className:"text-stone-500 ml-1",children:"sin rellenar"})]}),e.jsx("button",{type:"button",onClick:U,disabled:z,className:"w-full py-1.5 bg-stone-700 text-stone-200 text-xs font-semibold rounded-lg hover:bg-stone-600 transition-colors disabled:opacity-50",children:z?"Buscando en el mapa…":"📍 Detectar coordenadas automáticamente"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"block text-xs text-stone-500 mb-1",children:"Latitud (manual)"}),e.jsx("input",{type:"text",value:j.lat,onChange:O=>g(X=>({...X,lat:O.target.value})),placeholder:"p.ej. 43.160",className:"w-full px-2 py-1.5 bg-stone-800 border border-stone-600 rounded text-white text-xs placeholder-stone-600 focus:outline-hidden focu
304s:border-[#e8ff4a]/50"})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"block text-xs text-stone-500 mb-1",children:"Longitud (manual)"}),e.jsx("input",{type:"text",value:j.lng,onChange:O=>g(X=>({...X,lng:O.target.value})),placeholder:"p.ej. -2.623",className:"w-full px-2 py-1.5 bg-stone-800 border border-stone-600 rounded text-white text-xs placeholder-stone-600 focus:outline-hidden focus:border-[#e8ff4a]/50"})]})]})]}),N&&e.jsx("p",{className:"text-red-400 text-xs rounded-lg bg-red-900/20 border border-red-800/40 px-3 py-2",role:"alert",children:N}),e.jsxs("div",{className:"flex gap-2 pt-1",children:[e.jsx("button",{type:"button",onClick:J,disabled:v,className:"flex-1 py-2 bg-[#e8ff4a] text-stone-900 font-bold rounded-lg text-sm hover:bg-[#d4eb00] transition-colors disabled:opacity-50",children:v?"Guardando…":"Guardar escuela"}),e.jsx("button",{type:"button",onClick:()=>{h(!1),_("")},className:"px-4 py-2 bg-stone-700 text-white rounded-lg text-sm hover:bg-stone-600 transition-colors",children:"Cancelar"})]})]})]})}function N2({schoolZona:l,value:i,onChange:r}){const[d,m]=b.useState([]),[p,f]=b.useState(!1),[x,h]=b.useState(""),{user:j}=oa();b.useEffect(()=>{if(!l){m([]);return}const v=new AbortController;return D.collection("climbing_sectors").getFullList({filter:`school_name="${l.replace(/"/g,"")}"`,signal:v.signal}).then(S=>m(S)).catch(()=>{}),()=>v.abort()},[l]);const g=async()=>{var v;if(x.trim())try{const S={name:x,school_name:l};j!=null&&j.id&&(S.contributed_by=j.id);const N=await D.collection("climbing_sectors").create(S);m(_=>[..._,N]),r(N.name),f(!1),h("")}catch(S){console.error("Error guardando sector:",S);const N=((v=S==null?void 0:S.response)==null?void 0:v.message)||(S==null?void 0:S.message)||"Error desconocido";alert("No se pudo guardar el sector: "+N)}};return l?e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm text-stone-300 mb-1.5",children:"Sector"}),e.jsxs("select",{value:i,onChange:v=>{v.target.value==="__new__"?f(!0):r(v.target.value)},className:"w-full px-4 py-2.5 bg-stone-800 border border-stone-700 rounded-xl text-white text-sm focus:outline-hidden focus:border-[#e8ff4a]/50",children:[e.jsx("option",{value:"",children:"Sin sector / no sé"}),d.map(v=>e.jsx("option",{value:v.name,children:v.name},v.id)),e.jsx("option",{value:"__new__",children:"+ Añadir nuevo sector…"})]}),p&&e.jsxs("div",{className:"mt-2 flex gap-2",children:[e.jsx("input",{type:"text",value:x,onChange:v=>h(v.target.value),placeholder:"Nombre del sector",className:"flex-1 px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50"}),e.jsx("button",{type:"button",onClick:g,className:"px-4 py-2 bg-[#e8ff4a] text-stone-900 font-bold rounded-lg text-sm",children:"Guardar"}),e.jsx("button",{type:"button",onClick:()=>f(!1),className:"px-3 py-2 bg-stone-700 text-white rounded-lg text-sm",children:"✕"})]})]}):null}function w2({schoolZona:l,sectorName:i,value:r,onChange:d,onPendingNew:m}){const[p,f]=b.useState([]),[x,h]=b.useState(!1),[j,g]=b.useState({name:"",grade:"",style:"",length:"",bolts:""}),{user:v}=oa();b.useEffect(()=>{if(!l){f([]);return}const N=new AbortController,_=i?`school_id="${l.replace(/"/g,"")}"&&sector_id="${i.replace(/"/g,"")}"`:`school_id="${l.replace(/"/g,"")}"`;return D.collection("climbing_routes").getFullList({filter:_,signal:N.signal}).then(z=>f(z)).catch(()=>{}),()=>N.abort()},[l,i]);const S=async()=>{var N;if(j.name.trim())try{const _={...j,school_id:l,sector_id:i||""};v!=null&&v.id&&(_.contributed_by=v.id);const z=await D.collection("climbing_routes").create(_);f(C=>[...C,z]),d(z.name),h(!1),g({name:"",grade:"",style:"",length:"",bolts:""})}catch(_){console.error("Error guardando vía:",_);const z=((N=_==null?void 0:_.response)==null?void 0:N.message)||(_==null?void 0:_.message)||"Error desconocido";alert("No se pudo guardar la vía: "+z)}};return l?e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm text-stone-300 mb-1.5",children:["Nombre de la vía ",e.jsx("span",{className:"text-[#e8ff4a]",children:"*"})]}),e.jsxs("select",{value:r==="__pending__"?"__new__":r,onChange:N=>{N.target.value==="__new__"?(h(!0),d("__pending__")):(h(!1),d(N.target.value))},className:"w-full px-4 py-2.5 bg-stone-800 border border-stone-700 rounded-xl text-white text-sm focus:outline-hidden focu
304s:border-[#e8ff4a]/50",children:[e.jsx("option",{value:"",children:"Seleccionar vía existente…"}),p.map(N=>e.jsxs("option",{value:N.name,children:[N.name,N.grade?` (${N.grade})`:""]},N.id)),e.jsx("option",{value:"__new__",children:"+ Añadir nueva vía…"})]}),!p.length&&r&&r!=="__new__"&&e.jsx("p",{className:"text-xs text-stone-500 mt-1",children:"La vía se registrará como nueva en esta escuela."}),x&&e.jsxs("div",{className:"mt-3 p-4 bg-stone-800 border border-[#e8ff4a]/30 rounded-xl flex flex-col gap-3",children:[e.jsx("p",{className:"text-sm font-semibold text-[#e8ff4a]",children:"Nueva vía"}),[["name","Nombre *","p.ej. La Rambla"],["grade","Grado","p.ej. 9a"],["style","Estilo","Deportiva / Clásica…"],["length","Largo","p.ej. 30m"],["bolts","Chapas","p.ej. 12"]].map(([N,_,z])=>e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:_}),e.jsx("input",{type:"text",value:j[N],onChange:C=>g(k=>({...k,[N]:C.target.value})),placeholder:z,className:"w-full px-3 py-2 bg-stone-900 border border-stone-700 rounded-lg text-white text-sm placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50"})]},N)),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"button",onClick:S,className:"flex-1 py-2 bg-[#e8ff4a] text-stone-900 font-bold rounded-lg text-sm",children:"Guardar vía"}),e.jsx("button",{type:"button",onClick:()=>h(!1),className:"px-4 py-2 bg-stone-700 text-white rounded-lg text-sm",children:"Cancelar"})]})]})]}):null}function S2({onSaved:l,onCancel:i}){const{user:r}=oa(),d=["Deportiva","Clásica","Bloque","Psicobloc","Alpinismo","Senderismo","Esquí","BTT"],[m,p]=b.useState({route_name:"",zone:"",sector:"",grade:"",style:"",rating:0,review_text:"",conditions:"",best_season:"",info_type:"personal"}),[f,x]=b.useState([]),[h,j]=b.useState({}),[g,v]=b.useState(!1),S=k=>p(T=>({...T,zone:k})),N=k=>p(T=>({...T,sector:k})),_=k=>p(T=>({...T,route_name:k})),z=(k,T,w)=>e.jsxs("div",{children:[e.jsx("label",{htmlFor:`rev-${k}`,className:"block text-sm text-stone-300 mb-1.5",children:T}),e.jsx("input",{id:`rev-${k}`,type:"text",value:m[k],onChange:A=>p(L=>({...L,[k]:A.target.value})),placeholder:w,className:"w-full px-4 py-2.5 bg-stone-800 border border-stone-700 rounded-xl text-white placeholder-stone-500 text-sm focus:outline-hidden focus:border-[#e8ff4a]/50"}),h[k]&&e.jsx("p",{className:"text-red-400 text-xs mt-1",role:"alert",children:h[k]})]}),C=async k=>{k.preventDefault();const T={};if(m.zone.trim()||(T.zone="La escuela es obligatoria."),m.route_name.trim()||(T.route_name="El nombre de la vía es obligatorio."),m.review_text.trim()||(T.review_text="La reseña no puede estar vacía."),m.rating===0&&m.info_type==="personal"&&(T.rating="Selecciona una puntuación."),Object.keys(T).length){j(T);return}v(!0);try{const w=new FormData;w.append("author",r.id),Object.entries(m).forEach(([A,L])=>{L&&w.append(A,L)}),f.forEach(A=>w.append("photos",A)),await D.collection("route_reviews").create(w),l()}catch{j({general:"No se pudo guardar. Inténtalo de nuevo."})}v(!1)};return e.jsxs("form",{onSubmit:C,className:"bg-stone-900 border border-[#e8ff4a]/30 rounded-2xl p-6 flex flex-col gap-5",noValidate:!0,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"font-display text-xl font-bold text-white",children:"Escribir una reseña"}),e.jsx("button",{type:"button",onClick:i,className:"text-stone-400 hover:text-white transition-colors text-2xl leading-none","aria-label":"Cerrar formulario",children:"×"})]}),h.general&&e.jsx("p",{className:"text-red-400 text-sm",role:"alert",children:h.general}),e.jsxs("div",{className:"bg-stone-800/50 border border-stone-700 rounded-xl p-4 flex flex-col gap-4",children:[e.jsx("p",{className:"text-xs text-[#e8ff4a] font-semibold uppercase tracking-wide",children:"1. ¿Dónde escalaste?"}),e.jsx(_2,{value:m.zone,onChange:S}),h.zone&&e.jsx("p",{className:"text-red-400 text-xs -mt-2",role:"alert",children:h.zone}),e.jsx(N2,{schoolZona:m.zone,value:m.sector,onChange:N}),m.zone?e.jsxs(e.Fragment,{children:[e.jsx(w2,{schoolZona:m.zone,sectorName:m.sector,value:m.route_name,onChange:_}),h.route_name&&e.jsx("p",{className:"text-red-400 text-xs -mt-2",role:"alert",children:h.route_name})]}):e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"rev-route",className:"block text-sm text-stone-300 mb-1.5",children:["Nombre de la vía ",e.jsx("span",{className:"text-[#e8ff4a] ml-1","aria-hidden":"true",children:"*"})]}),e.jsx("input",{id:"rev-route",type:"text",value:m.route_name,onChange:k=>p(T=>({...T,route_name:k.target.value})),placeholder:"p.ej. Rabadá-Navarro, La Rambla…","aria-required":"true",className:"w-full px-4 py-2.5 bg-stone-800 border border-stone-700 rounded-xl text-white placeholder-stone-500 text-sm focus:outline-hidden focu
304s:border-[#e8ff4a]/50"}),h.route_name&&e.jsx("p",{className:"text-red-400 text-xs mt-1",role:"alert",children:h.route_name})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[z("grade","Grado","p.ej. 7c+, 6a, V7, MD…"),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"rev-style",className:"block text-sm text-stone-300 mb-1.5",children:"Estilo"}),e.jsxs("select",{id:"rev-style",value:m.style,onChange:k=>p(T=>({...T,style:k.target.value})),className:"w-full px-4 py-2.5 bg-stone-800 border border-stone-700 rounded-xl text-white text-sm focus:outline-hidden focus:border-[#e8ff4a]/50",children:[e.jsx("option",{value:"",children:"Seleccionar…"}),d.map(k=>e.jsx("option",{value:k,children:k},k))]})]})]})]}),e.jsxs("div",{className:"bg-stone-800/50 border border-stone-700 rounded-xl p-4 flex flex-col gap-4",children:[e.jsx("p",{className:"text-xs text-[#e8ff4a] font-semibold uppercase tracking-wide",children:"2. Tu experiencia"}),m.info_type==="personal"&&e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm text-stone-300 mb-2",children:["Puntuación ",e.jsx("span",{className:"text-[#e8ff4a]","aria-hidden":"true",children:"*"})]}),e.jsx(h2,{value:m.rating,onChange:k=>p(T=>({...T,rating:k}))}),h.rating&&e.jsx("p",{className:"text-red-400 text-xs mt-1",role:"alert",children:h.rating})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"rev-text",className:"block text-sm text-stone-300 mb-1.5",children:[m.info_type==="personal"?"Tu reseña":"Descripción"," ",e.jsx("span",{className:"text-[#e8ff4a]","aria-hidden":"true",children:"*"})]}),e.jsx("textarea",{id:"rev-text",rows:5,value:m.review_text,onChange:k=>p(T=>({...T,review_text:k.target.value})),placeholder:m.info_type==="seguridad"?"Describe el problema de seguridad o estado del equipamiento…":m.info_type==="acceso"?"Describe el acceso, restricción o situación actual…":m.info_type==="condiciones"?"Describe las condiciones actuales de la roca y el tiempo…":"Comparte tu experiencia: los pasos clave, el ambiente, la roca, los accesos, el equipador…","aria-required":"true",className:"w-full px-4 py-2.5 bg-stone-800 border border-stone-700 rounded-xl text-white placeholder-stone-500 text-sm focus:outline-hidden focus:border-[#e8ff4a]/50 resize-y min-h-[120px]"}),h.review_text&&e.jsx("p",{className:"text-red-400 text-xs mt-1",role:"alert",children:h.review_text})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[z("conditions","Estado de la roca","p.ej. Seca, perfecta…"),z("best_season","Mejor época","p.ej. Oct–abr…")]})]}),e.jsxs("div",{className:"bg-stone-800/50 border border-stone-700 rounded-xl p-4 flex flex-col gap-3",children:[e.jsx("p",{className:"text-xs text-[#e8ff4a] font-semibold uppercase tracking-wide",children:"3. Tipo de aportación"}),e.jsxs("fieldset",{children:[e.jsx("legend",{className:"sr-only",children:"Tipo de información"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:INFO_TYPES.map(k=>e.jsxs("label",{className:`flex items-center gap-2 px-3 py-1.5 rounded-full border cursor-pointer text-xs font-semibold transition-all ${m.info_type===k.value?`${k.bg} ${k.border} ${k.color}`:"bg-stone-800 border-stone-700 text-stone-400 hover:border-stone-500"}`,children:[e.jsx("input",{type:"radio",name:"info_type",value:k.value,checked:m.info_type===k.value,onChange:T=>p(w=>({...w,info_type:T.target.value})),className:"sr-only"}),k.label]},k.value))})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"rev-photos",className:"block text-sm text-stone-300 mb-1.5",children:"Fotos (hasta 3, opcional)"}),e.jsx("input",{id:"rev-photos",type:"file",accept:"image/*",multiple:!0,onChange:k=>x(Array.from(k.target.files).slice(0,3)),className:"w-full text-sm text-stone-400 file:mr-3 file:py-1.5 file:px-3 file:rounded-lg file:border-0 file:bg-[#e8ff4a] file:text-stone-950 file:font-semibold file:text-xs hover:file:bg-[#f0ff70]"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{type:"submit",disabled:g,className:"flex-1 py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors disabled:opacity-50",children:g?"Publicando…":"Publicar reseña"}),e.jsx("button",{type:"button",onClick:i,className:"px-6 py-3 rounded-xl border border-stone-600 text-stone-300 hover:border-stone-400 transition-colors",children:"Cancelar"})]})]})}function C2(){const{user:l}=oa(),{t:i}=Lt(),[r,d]=b.useState([]),[m]=Yl(),[p,f]=b.useState([]),[x,h]=b.useState(!0),[j,g]=b.useState(!1),[v,S]=b.useState(0),[N,_]=b.useState(m.get("zona")||""),[z,C]=b.useState("Todos"),[k,T]=b.useState("todos"),[w,A]=b.useState(!1),[L,q]=b.useState({}),H=b.useRef(null),F=O=>{const X={};for(const Z of O)!Z.route_key||!Z.grade||(X[Z.route_key]||(X[Z.route_key]={}),X[Z.route_key][Z.grade]=(X[Z.route_key][Z.grade]||0)+1);const B={};for(const[Z,te]of Object.entries(X)){const P=Object.entries(te).sort(($,oe)=>oe[1]-$[1]);B[Z]={consensus:P[0][0],total:O.filter($=>$.route_key===Z).length}}return B},U=()=>
304{H.current&&H.current.abort(),H.current=new AbortController,h(!0),g(!1),Promise.all([D.collection("route_reviews").getFullList({sort:"-created",expand:"author",signal:H.current.signal}),D.collection("grade_votes").getFullList({signal:H.current.signal}).catch(()=>[])]).then(([O,X])=>{f(O.filter(B=>!B.hidden)),q(F(X)),h(!1)}).catch(O=>{O!=null&&O.isAbort||(g(!0),h(!1))})};b.useEffect(()=>(U(),()=>{var O;return(O=H.current)==null?void 0:O.abort()}),[]),b.useEffect(()=>{const O=Fn(N.trim());let X=p;O&&(X=X.filter(B=>{var oe,de;const Z=Fn(B.zone),te=Fn(B.sector),P=Fn(B.route_name),$=Z.includes(O)||Z.length>2&&O.includes(Z);return P.includes(O)||$||te.includes(O)||Fn(B.grade).includes(O)||Fn((de=(oe=B.expand)==null?void 0:oe.author)==null?void 0:de.location).includes(O)||Fn(B.municipio).includes(O)})),z!=="Todos"&&(X=X.filter(B=>B.style===z)),k!=="todos"&&(X=X.filter(B=>(B.info_type||"personal")===k)),X=[...X].sort((B,Z)=>{const te={seguridad:0,acceso:1,condiciones:2,personal:3},P=te[B.info_type||"personal"]??3,$=te[Z.info_type||"personal"]??3;return P!==$?P-$:new Date(Z.created)-new Date(B.created)}),d(X),S(X.length)},[N,z,k,p]);const J=p.filter(O=>O.info_type==="seguridad"||O.info_type==="acceso").length;return e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-20 pb-24",children:[e.jsxs("section",{className:"relative overflow-hidden",style:{minHeight:"440px"},children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"url('/static/equipador-hero.jpg')",backgroundSize:"cover",backgroundPosition:"62% 55%",filter:"brightness(1.08) contrast(1.05) saturate(1.1)"},"aria-hidden":"true"}),e.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, rgba(12,10,9,0.30) 0%, rgba(12,10,9,0.45) 40%, rgba(12,10,9,0.75) 75%, rgba(12,10,9,1) 100%)"},"aria-hidden":"true"}),e.jsxs("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 pt-14 pb-16 flex flex-col justify-end",style:{minHeight:"380px"},children:[e.jsx("p",{className:"text-[#e8ff4a] text-xs font-bold tracking-widest uppercase mb-3",children:"Comunidad escaladora"}),e.jsx("h1",{className:"font-display text-4xl sm:text-6xl font-bold text-white leading-tight mb-3",style:{textShadow:"0 2px 16px rgba(0,0,0,0.6)"},children:"Reseñas de escalada"}),e.jsx("p",{className:"text-stone-200 text-base sm:text-lg max-w-2xl leading-relaxed",style:{textShadow:"0 1px 8px rgba(0,0,0,0.7)"},children:"Cuando subes una reseña o un croquis, piensa en el equipador que abrió esa vía. Su trabajo merece ser descrito con respeto — condiciones reales, grado honesto, y el crédito que le corresponde."})]})]}),e.jsxs("section",{className:"max-w-7xl mx-auto px-4 sm:px-6 py-10",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-4 mb-8",children:[e.jsx("div",{className:"flex-1"}),l?e.jsxs("button",{onClick:()=>A(!0),className:"shrink-0 inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors text-sm",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4","aria-hidden":"true",children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Publicar reseña"]}):e.jsx(ne,{to:"/signup",className:"shrink-0 inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors text-sm",children:"Regístrate para publicar"})]}),J>0&&e.jsxs("div",{className:"mb-6 p-4 rounded-xl bg-orange-950/40 border border-orange-800/50 flex items-center gap-3",children:[e.jsx("span",{className:"text-orange-400 text-xl","aria-hidden":"true",children:"⚠️"}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-orange-300 font-semibold text-sm",children:[J," aviso",J>1?"s":""," de seguridad o acceso en la comunidad"]}),e.jsx("p",{className:"text-orange-500 text-xs",children:"Filtra por «Seguridad» o «Acceso» para verlos primero."})]})]}),w&&e.jsx("div",{className:"mb-10",children:e.jsx(S2,{onSaved:()=>{A(!1),U()},onCancel:()=>A(!1)})}),!x&&e.jsxs("p",{className:"flex items-center gap-2 mb-6 text-stone-500 text-sm",children:[e.jsx("span",{className:"text-[#e8ff4a] font-bold text-lg",children:v}),v===1?"reseña publicada":"reseñas publicadas",v!==p.length&&e.jsxs("span",{children:["de ",p.length," en total"]})]}),!l&&e.jsxs("div",{className:"mb-10 bg-stone-900 border border-[#e8ff4a]/20 rounded-3xl p-10 text-center",children:[e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-12 h-12 text-[#e8ff4a]/60 mx-auto mb-4","aria-hidden":"true",children:e.jsx("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})}),e.jsx("h2",{className:"font-display text-2xl font-bold text-white mb-3",children:"Las reseñas son para la comunidad"}),e.jsx("p",{className:"text-stone-400 mb-6 max-w-md mx-auto",children:"Créate una cuenta gratuita para leer y publicar reseñas, votar grados y compartir lo que sabes de cada vía."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(ne,{to:"/signup",className:"inline-flex items-center justify-center gap-2 px-8 py-3.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:"Crear cuenta gratis"}),e.jsx(ne,{to:"/login",className:"inline-flex items-center justify-center gap-2 px-8 py-3.5 rounded-full border border-stone-600 text-stone-300 hover:border-stone-400 hover:text-white transition-colors",children:"Ya tengo cuenta"})]})]}),l&&e.jsxs("div",{className:"flex flex-col gap-3 mb-8",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-4 h-4 text-stone-400 absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none","aria-hidden":"true",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("path",{d:"m21 21-4.35-4.35"})]}),e.jsx("input",{type:"search",placeholder:"Buscar por vía, escuela, sector, zona o municipio…",value:N,onChange:O=>_(O.target.value),"aria-label":"Buscar reseñas",className:"w-full pl-9 pr-4 py-2.5 bg-stone-900 border border-stone-700 rounded-xl text-white placeholder-stone-500 text-sm focus:outline-hidden focu
304s:border-[#e8ff4a]/50"})]}),e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsx("button",{onClick:()=>T("todos"),className:`px-3 py-1.5 rounded-full text-xs font-semibold border transition-colors ${k==="todos"?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"bg-stone-900 text-stone-400 border-stone-700 hover:border-stone-500"}`,children:"Todos"}),INFO_TYPES.map(O=>e.jsx("button",{onClick:()=>T(O.value),className:`px-3 py-1.5 rounded-full text-xs font-semibold border transition-colors ${k===O.value?`${O.bg} ${O.border} ${O.color}`:"bg-stone-900 text-stone-400 border-stone-700 hover:border-stone-500"}`,children:O.label},O.value))]}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:m2.map(O=>e.jsx("button",{onClick:()=>C(O),className:`px-3 py-2 rounded-xl text-xs font-semibold border transition-colors ${z===O?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"bg-stone-900 text-stone-400 border-stone-700 hover:border-stone-500"}`,children:O},O))})]}),l&&(x?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5","aria-busy":"true","aria-label":"Cargando reseñas",children:[...Array(6)].map((O,X)=>e.jsx("div",{className:"h-64 bg-stone-900 rounded-2xl animate-pulse border border-stone-800"},X))}):j?e.jsxs("div",{className:"text-center py-24",children:[e.jsx("p",{className:"text-stone-400 text-lg mb-4",children:"No se han podido cargar las reseñas."}),e.jsx("button",{onClick:U,className:"px-6 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:"Reintentar"})]}):r.length===0?e.jsxs("div",{className:"text-center py-24",children:[e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",className:"w-14 h-14 text-stone-700 mx-auto mb-4","aria-hidden":"true",children:e.jsx("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})}),e.jsx("p",{className:"text-stone-500 text-lg mb-3",children:N||z!=="Todos"||k!=="todos"?"No hay reseñas que coincidan con tu búsqueda.":"Aún no hay reseñas publicadas."}),N||z!=="Todos"||k!=="todos"?e.jsx("button",{onClick:()=>{_(""),C("Todos"),T("todos")},className:"text-[#e8ff4a] font-semibold hover:underline",children:"Quitar filtros →"}):e.jsx("button",{onClick:()=>A(!0),className:"text-[#e8ff4a] font-semibold hover:underline",children:"Sé el primero en reseñar →"})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5",children:r.map(O=>{const X=O.zone&&O.route_name?`${O.zone}::${O.route_name}`:O.id;return e.jsx(j2,{review:O,currentUserId:l==null?void 0:l.id,communityGrade:L[X],onUpdate:B=>d(Z=>Z.map(te=>te.id===B.id?{...te,...B}:te)),route_name:"maneras de vivir"},O.id)})}))]})]})}function nb({n:l,size:i="md"}){const r=i==="lg"?"w-6 h-6":"w-4 h-4";return e.jsx("div",{className:"flex gap-0.5","aria-label":`${l} de 5 estrellas`,children:[1,2,3,4,5].map(d=>e.jsx("svg",{viewBox:"0 0 16 16",className:`${r} ${d<=l?"fill-[#e8ff4a]":"fill-stone-700"}`,children:e.jsx("path",{d:"M8 1l1.8 3.6L14 5.3l-3 2.9.7 4.1L8 10.4l-3.7 1.9.7-4.1-3-2.9 4.2-.7z"})},d))})}function E2({value:l,onChange:i}){const[r,d]=b.useState(0);return e.jsx("div",{className:"flex gap-2",role:"group","aria-label":"Puntuación del intercambio",children:[1,2,3,4,5].map(m=>e.jsx("button",{type:"button",onClick:()=>i(m),onMouseEnter:()=>d(m),onMouseLeave:()=>d(0),"aria-label":`${m} estrella${m>1?"s":""}`,className:"focus:outline-none focus-visible:ring-2 focus-visible:ring-[#e8ff4a] rounded",children:e.jsx("svg",{viewBox:"0 0 24 24",className:`w-8 h-8 transition-colors ${(r||l)>=m?"fill-[#e8ff4a]":"fill-stone-700 hover:fill-[#e8ff4a]/50"}`,children:e.jsx("path",{d:"M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 17l-6.2 4.3 2.4-7.4L2 9.4h7.6z"})})},m))})}function z2({review:l}){var f,x,h,j,g,v,S,N,_,z,C;const i=(x=(f=l.expand)==null?void 0:f.reviewer)!=null&&x.avatar?D.files.getURL(l.expand.reviewer,l.expand.reviewer.avatar,{thumb:"60x60"}):null,r=((j=(h=l.expand)==null?void 0:h.reviewer)==null?void 0:j.name)||"Miembro",d=((v=(g=l.expand)==null?void 0:g.reviewee)==null?void 0:v.name)||"Anfitrión",m=((z=(_=(N=(S=l.expand)==null?void 0:S.exchange_request)==null?void 0:N.expand)==null?void 0:_.to_home)==null?void 0:z.title)||"Casa de la comunidad",p=l.created?new Date(l.created).toLocaleDateString("es-ES",{year:"numeric",month:"long"}):"";return e.jsxs("article",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6 hover:border-[#e8ff4a]/30 transition-colors",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[i?e.jsx("img",{src:i,alt:r,className:"w-10 h-10 rounded-full object-cover border border-stone-700"}):e.jsx("div",{className:"w-10 h-10 rounded-full bg-stone-800 border border-stone-700 flex items-center justify-center text-stone-400 font-bold text-sm",children:(C=r[0])==null?void 0:C.toUpperCase()}),e.jsxs("div",{children:[e.jsx("p",{className:"text-white font-semibold text-sm",children:r}),e.jsxs("p",{className:"text-stone-500 text-xs",children:["sobre ",d," · ",m]}
304)]})]}),e.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.jsx(nb,{n:l.rating||0}),e.jsx("span",{className:"text-stone-500 text-xs",children:p})]})]}),l.comment&&e.jsx("p",{className:"text-stone-300 text-sm leading-relaxed",children:l.comment})]})}function k2({onSaved:l}){const{user:i}=oa(),[r,d]=b.useState({reviewee_name:"",home_name:"",rating:0,comment:""}),[m,p]=b.useState({}),[f,x]=b.useState(!1),[h,j]=b.useState(!1),g=()=>{const S={};return r.reviewee_name.trim()||(S.reviewee_name="Indica el nombre del anfitrión."),r.rating===0&&(S.rating="Selecciona una puntuación."),r.comment.trim()||(S.comment="Escribe tu experiencia."),S},v=async S=>{var _;S.preventDefault();const N=g();if(Object.keys(N).length){p(N);return}x(!0);try{await D.collection("exchange_reviews").create({reviewer:i.id,rating:r.rating,comment:r.comment.trim()}),j(!0),l&&l()}catch(z){p({submit:((_=z==null?void 0:z.data)==null?void 0:_.message)||"No se pudo guardar. Inténtalo de nuevo."})}finally{x(!1)}};return h?e.jsxs("div",{className:"bg-stone-900 border border-[#e8ff4a]/30 rounded-2xl p-8 text-center",children:[e.jsx("div",{className:"text-4xl mb-3",children:"⭐"}),e.jsx("h3",{className:"font-bold text-white text-lg mb-2",children:"¡Gracias por compartir tu experiencia!"}),e.jsx("p",{className:"text-stone-400 text-sm",children:"Tu valoración ayuda a construir la confianza de la comunidad."})]}):e.jsxs("form",{onSubmit:v,className:"bg-stone-900 border border-stone-800 rounded-2xl p-6 space-y-5",children:[e.jsx("h3",{className:"font-display text-xl font-bold text-white",children:"Valorar un intercambio"}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-stone-300 text-sm font-medium mb-1",htmlFor:"rev-host",children:"Nombre del anfitrión"}),e.jsx("input",{id:"rev-host",type:"text",placeholder:"¿Con quién intercambiaste?",value:r.reviewee_name,onChange:S=>d(N=>({...N,reviewee_name:S.target.value})),className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors"}),m.reviewee_name&&e.jsx("p",{className:"text-red-400 text-xs mt-1",children:m.reviewee_name})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-stone-300 text-sm font-medium mb-1",htmlFor:"rev-home",children:"Casa / zona"}),e.jsx("input",{id:"rev-home",type:"text",placeholder:"¿En qué casa estuviste?",value:r.home_name,onChange:S=>d(N=>({...N,home_name:S.target.value})),className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-stone-300 text-sm font-medium mb-2",children:"Puntuación"}),e.jsx(E2,{value:r.rating,onChange:S=>d(N=>({...N,rating:S}))}),m.rating&&e.jsx("p",{className:"text-red-400 text-xs mt-1",children:m.rating})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-stone-300 text-sm font-medium mb-1",htmlFor:"rev-comment",children:"Tu experiencia"}),e.jsx("textarea",{id:"rev-comment",rows:4,placeholder:"Cuéntanos cómo fue el intercambio — la acogida, la casa, las escuelas cerca, lo que aprendiste…",value:r.comment,onChange:S=>d(N=>({...N,comment:S.target.value})),className:"w-full px-4 py-2.5 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 text-sm focus:outline-none focus:border-[#e8ff4a] transition-colors resize-none"}),m.comment&&e.jsx("p",{className:"text-red-400 text-xs mt-1",children:m.comment})]}),m.submit&&e.jsx("p",{className:"text-red-400 text-sm",children:m.submit}),e.jsx("button",{type:"submit",disabled:f,className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] active:scale-[0.98] transition-all disabled:opacity-60",children:f?"Guardando…":"Publicar valoración"})]})}function A2(){const{user:l}=oa(),[i,r]=b.useState([]),[d,m]=b.useState(!0),[p,f]=b.useState(!1),[x,h]=b.useState(0);b.useEffect(()=>{const g=new AbortController;
304return D.collection("exchange_reviews").getList(1,50,{sort:"-created",expand:"reviewer,reviewee,exchange_request.to_home",signal:g.signal}).then(v=>{if(r(v.items),v.items.length>0){const S=v.items.reduce((N,_)=>N+(_.rating||0),0)/v.items.length;h(Math.round(S*10)/10)}m(!1)}).catch(v=>{v!=null&&v.isAbort||m(!1)}),()=>g.abort()},[]);const j=()=>{f(!1),D.collection("exchange_reviews").getList(1,50,{sort:"-created",expand:"reviewer,reviewee,exchange_request.to_home"}).then(g=>{if(r(g.items),g.items.length>0){const v=g.items.reduce((S,N)=>S+(N.rating||0),0)/g.items.length;h(Math.round(v*10)/10)}}).catch(()=>{})};return e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-16",children:[e.jsx("section",{className:"bg-stone-900 border-b border-stone-800",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-16 text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 rounded-full px-4 py-1.5 text-[#e8ff4a] text-sm font-semibold mb-6",children:[e.jsx("svg",{viewBox:"0 0 16 16",className:"w-4 h-4 fill-[#e8ff4a]",children:e.jsx("path",{d:"M8 1l1.8 3.6L14 5.3l-3 2.9.7 4.1L8 10.4l-3.7 1.9.7-4.1-3-2.9 4.2-.7z"})}),"Valoraciones de intercambios reales"]}),e.jsx("h1",{className:"font-display text-5xl sm:text-6xl font-bold text-white mb-4",children:"La confianza de la comunidad"}),e.jsx("p",{className:"text-stone-400 text-lg max-w-2xl mx-auto leading-relaxed mb-8",children:"Cada valoración la escribe un escalador que ha vivido el intercambio. Aquí no hay reseñas falsas — solo experiencias reales entre personas que comparten la pasión por la roca."}),i.length>0&&e.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-6 mb-8",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-[#e8ff4a] font-display text-5xl font-bold",children:x}),e.jsx(nb,{n:Math.round(x),size:"lg"}),e.jsxs("p",{className:"text-stone-500 text-sm mt-1",children:[i.length," valoracion",i.length!==1?"es":""]})]})}),l?e.jsxs("button",{onClick:()=>f(!p),className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:[e.jsx("svg",{viewBox:"0 0 20 20",className:"w-5 h-5 fill-current",children:e.jsx("path",{d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"})}),p?"Cerrar":"Valorar mi intercambio"]}):e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(ne,{to:"/signup",className:"px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:"Únete y valora tu intercambio"}),e.jsx(ne,{to:"/login",className:"px-6 py-3 rounded-full border border-stone-600 text-stone-300 hover:border-white hover:text-white transition-colors",children:"Ya tengo cuenta"})]})]})}),e.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-12",children:[p&&l&&e.jsx("div",{className:"mb-10",children:e.jsx(k2,{onSaved:j})}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-12",children:[{icon:"🏠",title:"Solo intercambios reales",desc:"Solo pueden valorar miembros que hayan completado un intercambio en CLIMB & HOME."},{icon:"⭐",title:"5 estrellas de escalador a escalador",desc:"La puntuación refleja la acogida, la casa, la zona de escalada y la experiencia global."},{icon:"🔒",title:"Moderadas por la comunidad",desc:"Cualquier valoración que no respete las normas puede ser reportada y revisada."}].map(g=>e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl p-5 text-center",children:[e.jsx("div",{className:"text-3xl mb-2",children:g.icon}),e.jsx("h3",{className:"font-bold text-white text-sm mb-1",children:g.title}),e.jsx("p",{className:"text-stone-500 text-xs leading-relaxed",children:g.desc})]},g.title))}),d?e.jsx("div",{className:"space-y-4",children:[...Array(3)].map((g,v)=>e.jsx("div",{className:"h-32 bg-stone-900 rounded-2xl animate-pulse border border-stone-800"},v))}):i.length===0?e.jsxs("div",{className:"text-center py-20",children:[e.jsx("div",{className:"text-6xl mb-4",children:"⭐"}),e.jsx("h2",{className:"font-display text-3xl font-bold text-white mb-3",children:"Sé el primero en valorar"}),e.jsx("p",{className:"text-stone-400 max-w-md mx-auto mb-8",children:"Las valoraciones construyen la confianza de la comunidad. Cada intercambio que compartes anima a otros escaladores a dar el paso."}),!l&&e.jsx(ne,{to:"/signup",className:"inline-flex px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-bold hover:bg-[#f0ff70] transition-colors",children:"Unirme y valorar"})]}):e.jsx("div",{className:"space-y-4",children:i.map(g=>e.jsx(z2,{review:g},g.id))})]})]})}/**
305 * @license lucide-react v1.47.0 - ISC
306 *
307 * This source code is licensed under the ISC license.
308 * See the LICENSE file in the root directory of this source tree.
309 */const ob={name:"map",size:24,node:[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]};ob.node;const M2=Ie(ob);/**
310 * @license lucide-react v1.47.0 - ISC
311 *
312 * This source code is licensed under the ISC license.
313 * See the LICENSE file in the root directory of this source tree.
314 */const lb={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-
3145-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};lb.node;const T2=Ie(lb),L2={personal:"Experiencia personal",seguridad:"⚠️ Seguridad",acceso:"🚧 Acceso",condiciones:"🌦 Condiciones"};function em({rating:l}){return e.jsx("div",{className:"flex gap-0.5",children:[1,2,3,4,5].map(i=>e.jsx(bn,{className:"w-4 h-4",style:{color:i<=Math.round(l)?"#e8ff4a":"#44403c"},fill:i<=Math.round(l)?"#e8ff4a":"none"},i))})}function R2({schoolId:l,schoolName:i,currentUserId:r}){const[d,m]=b.useState(!1),[p,f]=b.useState(""),[x,h]=b.useState(""),[j,g]=b.useState(!1),[v,S]=b.useState(!1),N=async()=>{if(p.trim()){S(!0);try{await D.collection("duplicate_reports").create({type:"school",school_id:l,school_name:i,duplicate_of:p.trim(),reason:x.trim(),reported_by:r,status:"pending"}),g(!0)}catch{}S(!1)}};return r?j?e.jsx("p",{className:"text-xs text-stone-500 mt-2",children:"✓ Aviso enviado, gracias."}):e.jsx("div",{className:"mt-4",children:d?e.jsxs("div",{className:"bg-stone-800 border border-stone-700 rounded-xl p-4 flex flex-col gap-3 max-w-md",children:[e.jsx("p",{className:"text-sm font-semibold text-white",children:"¿Es un duplicado?"}),e.jsx("p",{className:"text-xs text-stone-400",children:"Dinos con qué otra escuela se podría fusionar. No se borrará nada automáticamente."}),e.jsx("input",{type:"text",value:p,onChange:_=>f(_.target.value),placeholder:"Nombre de la escuela original",className:"px-3 py-2 bg-stone-900 border border-stone-700 rounded-lg text-white text-sm placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50"}),e.jsx("textarea",{rows:2,value:x,onChange:_=>h(_.target.value),placeholder:"Motivo (opcional)",className:"px-3 py-2 bg-stone-900 border border-stone-700 rounded-lg text-white text-sm placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50 resize-none"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:N,disabled:v||!p.trim(),className:"flex-1 py-2 bg-[#e8ff4a] text-stone-900 font-bold rounded-lg text-sm disabled:opacity-50",children:v?"Enviando…":"Enviar aviso"}),e.jsx("button",{onClick:()=>m(!1),className:"px-4 py-2 bg-stone-700 text-white rounded-lg text-sm",children:"Cancelar"})]})]}):e.jsxs("button",{onClick:()=>m(!0),className:"flex items-center gap-1.5 text-xs text-stone-500 hover:text-stone-300 transition-colors",children:[e.jsx(T2,{className:"w-3.5 h-3.5"})," Reportar como duplicado"]})}):null}const q2={N:[315,360,0,45],NE:[0,90],E:[45,135],SE:[90,180],S:[135,225],SO:[180,270],SW:[180,270],O:[225,315],W:[225,315],NO:[270,360],NW:[270,360]};function D2(l){if(!l)return null;const i=l.toUpperCase().trim();return q2[i]||null}function O2(l,i,r){const d=Math.floor((Date.now()-new Date(new Date().getFullYear(),0,0))/864e5),m=23.45*Math.sin(360/365*(d-81)*Math.PI/180),p=(r-12)*15,f=l*Math.PI/180,x=m*Math.PI/180,h=p*Math.PI/180,j=Math.sin(f)*Math.sin(x)+Math.cos(f)*Math.cos(x)*Math.cos(h),g=Math.sqrt(1-j*j);if(g<.001)return null;const v=(Math.sin(x)-j*Math.sin(f))/(g*Math.cos(f));let S=Math.acos(Math.max(-1,Math.min(1,v)))*180/Math.PI;return p>0&&(S=360-S),S}function B2(l,i){if(!i)return!1;for(let r=0;r<i.length-1;r+=2){const d=i[r],m=i[r+1];if(d<=m){if(l>=d&&l<=m)return!0}else if(l>=d||l<=m)return!0}return!1}function P2({lat:l,lng:i,orientation:r}){const[d,m]=b.useState(null),[p,f]=b.useState(!0);if(b.useEffect(()=>{if(!l||!i)return;const T=new AbortController,w=`https://api.open-meteo.com/v1/forecast?latitude=${l}&longitude=${i}&hourly=temperature_2m,precipitation_probability,cloudcover,weathercode&forecast_days=1&timezone=auto`;return fetch(w,{signal:T.signal}).then(A=>A.json()).then(A=>{m(A),f(!1)}).catch(A=>{(A==null?void 0:A.name)!=="AbortError"&&f(!1)}),()=>T.abort()},[l,i]),!l||!i)return null;if(p)return e.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-stone-600 mt-1 px-1",children:[e.jsx("span",{className:"animate-pulse",children:"⛅"}),e.jsx("span",{children:"Cargando parte…"})]});if(!(d!=null&&d.hourly))return null;const h=new Date().getHours(),j=d.hourly.time.map((T,w)=>({hour:new Date(T).getHours(),temp:Math.round(d.hourly.temperature_2m[w]),rain:d.hourly.precipitation_probability[w],cloud:d.hourly.cloudcover[w],code:d.hourly.weathercode[w]})).filter(T=>T.hour>=h&&T.hour<=h+5);if(j.length===0)return null;const g=r?D2(r):null,v=j.filter(T=>{if(T.rain>50||T.cloud>85&&T.rain>30)return!1;if(r){if(T.cloud>60)return!0;const w=O2(l,i,T.hour);return w!==null?B2(w,g):!0}return T.rain<40}),S=Math.round(j.reduce((T,w)=>T+w.temp,0)/j.length),N=Math.max(...j.map(T=>T.rain)),_=Math.round(j.reduce((T,w)=>T+w.cloud,0)/j.length),z=N>50?"🌧":_>70?"⛅":_>30?"🌤":"☀️";let C,k;if(N>60)C="Lluvia probable — roca mojada",k="text-red-400";else if(N>30)C="Posible lluvia — revisa antes de salir",k="text-orange-400";else if(v.length>=3){const T=_>60?"Nublado pero seco":"Buenas condiciones";C=r?`${T}
314 · sol en la pared ~${v.length}h`:`${T} · ${S}°C`,k="text-emerald-400"}else r&&v.length<2&&_<60?(C=`Sin sol directo ahora · ${S}°C`,k="text-stone-400"):(C=`Aceptable · ${S}°C`,k="text-stone-300");return e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] select-none",children:[e.jsxs("span",{className:"flex items-center gap-1 text-stone-400",children:[z,e.jsx("span",{className:`font-semibold ${k}`,children:C})]}),e.jsx("span",{className:"text-stone-600",children:"·"}),e.jsxs("span",{className:"text-stone-500",children:[S,"°C"]}),N>5&&e.jsxs("span",{className:"text-stone-500",children:["💧",N,"%"]}),_>0&&e.jsxs("span",{className:"text-stone-500",children:["☁️",_,"%"]}),r&&e.jsxs("span",{className:"text-stone-600",children:["· Orientación ",r]})]})}function U2({sector:l,reviews:i,currentUserId:r,schoolId:d,zone:m}){var N,_;const[p,f]=b.useState(!1),x=l.name||l.zona||"Sector",h=i.filter(z=>(z.sector||"")===x),j=[...new Set(h.map(z=>z.route_name).filter(Boolean))],g=l.lat||(m==null?void 0:m.lat)||null,v=l.lng||(m==null?void 0:m.lng)||null,S=l.orientacion||l.orientation||(m==null?void 0:m.orientacion)||null;return e.jsxs("div",{className:"border border-stone-800 rounded-xl overflow-hidden",children:[e.jsxs("div",{className:"w-full flex items-center justify-between px-5 py-4 bg-stone-900 hover:bg-stone-800 transition-colors",children:[e.jsx("button",{onClick:()=>f(z=>!z),className:"flex-1 flex items-start gap-3 text-left min-w-0",children:e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"font-semibold text-white truncate block",children:x}),e.jsxs("span",{className:"text-xs text-stone-500 shrink-0",children:[h.length," reseña",h.length!==1?"s":""]}),g&&v&&e.jsx(P2,{lat:g,lng:v,orientation:S})]})}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0 ml-2",children:[d&&e.jsx(ne,{to:`/escuelas/${d}
314/sectores/${l.id}`,onClick:z=>z.stopPropagation(),className:"text-xs px-2.5 py-1 rounded-lg bg-stone-800 text-stone-400 hover:text-[#e8ff4a] hover:bg-stone-700 transition-colors border border-stone-700",children:"Ver sector →"}),e.jsx("button",{onClick:()=>f(z=>!z),children:p?e.jsx(Ko,{className:"w-4 h-4 text-stone-400"}):e.jsx(Ql,{className:"w-4 h-4 text-stone-400"})})]})]}),p&&e.jsx("div",{className:"bg-stone-950 px-5 py-4 flex flex-col gap-4",children:j.length>0?j.map(z=>{var q;const C=h.filter(H=>H.route_name===z),k=C.filter(H=>H.rating).length>0?C.reduce((H,F)=>H+(F.rating||0),0)/C.filter(H=>H.rating).length:0,T=C.filter(H=>H.grade).reduce((H,F)=>(H[F.grade]=(H[F.grade]||0)+1,H),{}),w=((q=Object.entries(T).sort((H,F)=>F[1]-H[1])[0])==null?void 0:q[0])||null,A=(m==null?void 0:m.zona)||(m==null?void 0:m.name)||"",L=A&&z?`${A}::${z}`:null;return e.jsxs("div",{className:"border-l-2 border-stone-800 pl-4",children:[e.jsxs("div",{className:"flex items-start gap-2 mb-2 flex-wrap",children:[e.jsx("span",{className:"font-medium text-white text-sm leading-tight",children:z}),w&&e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-stone-800 border border-stone-700 text-stone-300 text-xs font-mono font-bold shrink-0",children:w}),k>0&&e.jsx(em,{rating:k}),e.jsxs("span",{className:"text-xs text-stone-500 shrink-0",children:[C.length," reseña",C.length!==1?"s":""]})]}),L&&e.jsxs("div",{className:"mb-3 flex flex-col gap-2",children:[e.jsx(sb,{routeKey:L,referenceGrade:w,currentUserId:r,compact:!0}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx(tb,{routeKey:L,routeName:z,schoolName:m,sectorName:x,currentUserId:r}),e.jsx(Wu,{itemType:"route",itemKey:L,itemName:z,schoolName:m,sectorName:x,currentUserId:r})]})]}),C.map(H=>e.jsx(ib,{review:H,currentUserId:r},H.id))]},z)}):e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-500 text-sm",children:"Todavía no hay reseñas en este sector."}),l._osm&&e.jsxs("p",{className:"text-stone-600 text-xs mt-1",children:["Sector importado de OpenStreetMap — coordenadas: ",(N=l.lat)==null?void 0:N.toFixed(5),", ",(_=l.lng)==null?void 0:_.toFixed(5)]})]})})]})}function ib({review:l,currentUserId:i}){var h,j,g,v,S;const[r,d]=b.useState(!1),m=((j=(h=l.expand)==null?void 0:h.author)==null?void 0:j.id)===i||l.author===i,p=L2[l.info_type]||"Experiencia personal",f=l.info_type==="seguridad"||l.info_type==="acceso",x=async()=>{if(!(!i||m||r))try{await D.collection("review_reports").create({review_id:l.id,reported_by:i,reason:"duplicado_o_incorrecto",status:"pending"}),d(!0)}catch{}};return e.jsxs("div",{className:`rounded-lg p-3 mb-2 ${f?"bg-orange-950/20 border border-orange-800/30":"bg-stone-900"}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1",children:[e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium ${f?"bg-orange-900/40 text-orange-300":"bg-stone-800 text-stone-400"}`,children:p}),l.rating>0&&e.jsx(em,{rating:l.rating})]}),e.jsx("p",{className:"text-stone-300 text-sm leading-relaxed",children:l.review_text}),e.jsxs("div",{className:"flex items-center justify-between mt-2",children:[e.jsxs("span",{className:"text-xs text-stone-600",children:[((v=(g=l.expand)==null?void 0:g.author)==null?void 0:v.name)||"Escalador"," · ",(S=l.created)==null?void 0:S.slice(0,10)]}),!m&&i&&e.jsx("button",{onClick:x,disabled:r,className:"text-xs text-stone-600 hover:text-stone-400 transition-colors disabled:opacity-50",children:r?"✓ Reportado":"Reportar"})]})]})}function H2({emoji:l,label:i,value:r,accent:d=!1}){return!r&&r!==0?null:e.jsxs("div",{className:"flex items-start gap-2.5 min-w-0",children:[e.jsx("span",{className:"text-base leading-none mt-0.5 shrink-0","aria-hidden":"true",children:l}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-stone-500 text-[10px] uppercase tracking-widest leading-none mb-0.5",children:i}),e.jsx("p",{className:`text-sm font-semibold leading-snug ${d?"text-[#e8ff4a]":"text-stone-100"}`,children:r})]})]})}function V2({zone:l,homesCount:i,reviewsCount:r}){const d=l.roca||l.tipo_roca||null,m=l.orientacion||null,p=l.aproximacion?`${l.aproximacion} min`:null,f=l.num_vias||l.vias||null,x=l.ninos!=null?l.ninos?"Sí":"No":null,h=l.furgoneta!=null?l.furgoneta?"Posible":"Difícil":null,j=l.regulaciones||null,g=[{emoji:"☀️",label:"Orientación",value:m},{emoji:"🌡",label:"Mejor época",value:l.temporada},{emoji:"🪨",label:"Roca",value:d||(l.tipo?l.tipo.charAt(0).toUpperCase()+l.tipo.slice(1):null)},{emoji:"🧗",label:"Nivel / vías",value:l.nivel?f?`${f} vías · ${l.nivel}`:l.nivel:f?`${f} vías`:null},{emoji:"🚶",label:"Aproximación",value:p},{emoji:"👶",label:"Apto niños",value:x},{emoji:"🚐",label:"Furgoneta",value:h},{emoji:"⚠️",label:"Regulaciones",value:j},{emoji:"🏠",label:"Casas cercanas",value:i>0?`${i} en Climb & Home`:null,accent:!0}].filter(v=>v.value!==null&&v.value!==void 0);return g.length===0?null:e.jsxs("div",{className:"rounded-2xl border border-stone-700/60 bg-stone-900/70 overflow-hidden",children:[e.jsxs("div",{className:"px-5 py-3 border-b border-stone-800 flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-stone-500 font-semibold",children:"Ficha de la escuela"}),r>0&&e.jsxs("span",{className:"ml-auto text-[10px] text-stone-600",children:[r," reseña",r!==1?"s":""," de la comunidad"]})]}),e.jsx("div",{className:"p-5 grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-5",children:g.map(v=>e.jsx(H2,{...v},v.label))}),i===0&&e.jsxs("div",{className:"px-5 py-3 border-t border-stone-800 flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] text-stone-600",children:"Sin casas Climb & Home cerca aún —"}),e.jsx(ne,{to:"/dashboard",className:"text-[10px] text-[#e8ff4a] hover:underline",children:"¿Publicas la tuya?"})]})]})}function G2(){const{id:l}=Rr(),{user:i}=oa(),r=at.find(w=>w.id===l),[d,m]=b.useState(null),[p,f]=b.useState(!r),[x,h]=b.useState([]),[j,g]=b.useState([]),[v,S]=b.useState([]),[N,_]=b.useState(!0);b.useEffect(()=>{if(r)return;const w=new AbortController;
314return D.collection("community_schools").getOne(l,{signal:w.signal}).then(A=>{m(A),f(!1)}).catch(()=>f(!1)),()=>w.abort()},[l,r]);const z=r||d,C=b.useCallback(()=>{if(!z)return;const w=new AbortController,L=z.zona.replace(/"/g,'\\"');return Promise.all([D.collection("homes").getList(1,50,{filter:`climbing_areas ~ "${L}"`,sort:"-created",signal:w.signal}),D.collection("climbing_sectors").getFullList({filter:`school_name ~ "${L}"`,sort:"name",signal:w.signal}),D.collection("route_reviews").getFullList({filter:`zone ~ "${L}"`,sort:"-created",expand:"author",signal:w.signal}),D.collection("community_schools").getList(1,100,{filter:`is_sector=true && parent_school="${L}"`,sort:"zona",signal:w.signal}).catch(()=>({items:[]}))]).then(([q,H,F,U])=>{h(q.items);const J=H.map(Z=>({...Z,zona:Z.name})),O=(U.items||[]).map(Z=>({...Z,name:Z.zona,_osm:!0})),X=new Set(J.map(Z=>Z.name.toLowerCase())),B=O.filter(Z=>!X.has(Z.zona.toLowerCase()));g([...J,...B]),S(F),_(!1)}).catch(q=>{q!=null&&q.isAbort||_(!1)}),()=>w.abort()},[z]);b.useEffect(()=>C(),[C]);const k=v.filter(w=>{var A;return!((A=w.sector)!=null&&A.trim())});v.filter(w=>{var A;return(A=w.sector)==null?void 0:A.trim()});const T=v.filter(w=>w.rating).length>0?v.reduce((w,A)=>w+(A.rating||0),0)/v.filter(w=>w.rating).length:0;return i?p?e.jsx("main",{className:"min-h-screen bg-stone-950 pt-24 flex items-center justify-center",children:e.jsx("p",{className:"text-stone-500",children:"Cargando escuela…"})}):z?e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-20",children:[e.jsx("div",{className:"bg-stone-900 border-b border-stone-800",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-10 sm:py-14",children:[e.jsxs(ne,{to:"/routes",className:"inline-flex items-center gap-2 text-stone-400 hover:text-white text-sm mb-8 transition-colors",children:[e.jsx(Go,{className:"w-4 h-4"})," Volver a escuelas"]}),e.jsxs("div",{className:"flex flex-wrap items-start gap-3 mb-3",children:[e.jsx("h1",{className:"font-display text-4xl sm:text-6xl font-bold text-white leading-none",children:z.zona}),e.jsx(Wu,{itemType:"school",itemKey:`school::${z.zona}`,itemName:z.zona,currentUserId:i==null?void 0:i.id}),z.nivel&&e.jsx("span",{className:"self-start mt-1 sm:mt-3 text-sm px-3 py-1 rounded-full bg-[#e8ff4a]/10 text-[#e8ff4a] border border-[#e8ff4a]/20 font-medium shrink-0",children:z.nivel}),z._community&&e.jsx("span",{className:"self-start mt-1 sm:mt-3 text-xs px-2 py-1 rounded-full bg-stone-800 text-stone-400 border border-stone-700",children:"Aportada por la comunidad"})]}),e.jsxs("p",{className:"text-stone-400 text-sm flex items-center gap-1.5 mb-2",children:[e.jsx(ya,{className:"w-4 h-4 shrink-0"}),[z.municipio,z.region,z.pais].filter(Boolean).join(" · ")]}),T>0&&e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(em,{rating:T}),e.jsxs("span",{className:"text-stone-400 text-sm",children:[T.toFixed(1)," · ",v.length," reseña",v.length!==1?"s":""]})]}),z.resumen&&e.jsx("p",{className:"text-stone-300 text-base sm:text-lg leading-relaxed max-w-2xl mb-6",children:z.resumen}),e.jsx(V2,{zone:z,homesCount:x.length,reviewsCount:v.length}),e.jsx("div",{className:"mt-5 flex flex-wrap gap-3",children:e.jsxs(ne,{to:`/mapa?lat=${z.lat}&lng=${z.lng}&zoom=11`,className:"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-full bg-stone-800 border border-stone-700 text-stone-300 hover:border-[#e8ff4a]/50 hover:text-[#e8ff4a] transition-colors",children:[e.jsx(M2,{className:"w-3.5 h-3.5"})," Ver en el mapa"]})}),e.jsx(R2,{schoolId:l,schoolName:z.zona,currentUserId:i==null?void 0:i.id})]})}),e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-10 space-y-12",children:[e.jsxs("section",{children:[e.jsxs("h2",{className:"font-display text-3xl text-white mb-5 flex items-center gap-2",children:[e.jsx(gs,{className:"w-6 h-6 text-[#e8ff4a]"})," Casas cerca"]}),N?e.jsx("p",{className:"text-stone-500 text-sm",children:"Buscando casas…"}):x.length===0?e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl p-6 text-center",children:[e.jsxs("p",{className:"text-stone-400 text-sm mb-4",children:["Todavía no hay casas en CLIMB & HOME cerca de ",z.zona,"."]}),e.jsx(ne,{to:"/dashboard",className:"text-sm text-[#e8ff4a] hover:underline",children:"Publicar tu casa →"})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:x.map(w=>{var L;const A=(L=w.photos)!=null&&L[0]?D.files.getURL(w,w.photos[0],{thumb:"400x300"}):null;return e.jsxs(ne,{to:`/homes/${w.id}`,className:"bg-stone-900 border border-stone-800 rounded-xl overflow-hidden hover:border-[#e8ff4a]/40 transition-colors group",children:[A&&e.jsx("img",{src:A,alt:w.title,className:"w-full h-40 object-cover group-hover:opacity-90 transition-opacity"}),e.jsxs("div",{className:"p-4",children:[e.jsx("p",{className:"font-semibold text-white text-sm",children:w.title}),e.jsxs("p",{className:"text-stone-400 text-xs mt-1 flex items-center gap-1",children:[e.jsx(ya,{className:"w-3 h-3"}),w.location]}),e.jsxs("p",{className:"text-[#e8ff4a] text-xs mt-2",children:[w.cp_value," CP/noche"]})]})]},w.id)})})]}),e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsx("h2",{className:"font-display text-3xl text-white flex items-center gap-2",children:"Sectores y reseñas"}),i&&e.jsx(ne,{to:"/resenas",className:"text-sm text-[#e8ff4a] hover:underline",children:"+ Escribir reseña"})]}),N?e.jsx("p",{className:"text-stone-500 text-sm",children:"Cargando reseñas…"}):e.jsxs("div",{className:"flex flex-col gap-3",children:[j.map(w=>e.jsx(U2,{sector:w,reviews:v,currentUserId:i==null?void 0:i.id,schoolId:l,zone:z},w.id)),k.length>0&&e.jsxs("div",{className:"border border-stone-800 rounded-xl overflow-hidden",children:[e.jsx("div",{className:"px-5 py-4 bg-stone-900",children:e.jsx("p",{className:"font-semibold text-stone-400 text-sm",children:"Sin sector especificado"})}),e.jsx("div",{className:"bg-stone-950 px-5 py-4 flex flex-col gap-2",children:k.map(w=>e.jsxs("div",{className:"border-l-2 border-stone-800 pl-4 mb-3",children:[e.jsx("p",{className:"font-medium text-white text-sm mb-1",children:w.route_name}),e.jsx(ib,{review:w,currentUserId:i==null?void 0:i.id})]},w.id))})]}),v.length===0&&j.length===0&&e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl p-8 text-center",children:[e.jsxs("p",{className:"text-stone-400 text-sm mb-4",children:["Todavía no hay reseñas de ",z.zona," en la comunidad."]}),i?e.jsx(ne,{to:"/resenas",className:"text-sm text-[#e8ff4a] hover:underline",children:"Sé el primero en escribir una reseña →"}):e.jsx(ne,{to:"/login",className:"text-sm text-[#e8ff4a] hover:underline",children:"Regístrate para escribir la primera reseña →"})]})]})]})]})]}):e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-24 flex flex-col items-center justify-center text-center px-4",children:[e.jsx("p",{className:"text-stone-400 text-lg mb-6",children:"Escuela no encontrada."}),e.jsxs(ne,{to:"/routes",className:"text-[#e8ff4a] hover:underline flex items-center gap-2 text-sm",children:[e.jsx(Go,{className:"w-4 h-4"})," Volver a escuelas"]})]}):e.jsx("main",{className:"min-h-screen bg-stone-950 pt-24 flex items-center justify-center px-4",children:e.jsxs("div",{className:"flex flex-col items-center text-center max-w-sm",children:[e.jsx("div",{className:"w-20 h-20 rounded-full bg-stone-900 border border-stone-700 flex items-center justify-center mb-6",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"#e8ff4a",className:"w-10 h-10","aria-hidden":"true",children:[e.jsx("path",{d:"M3 19 L8 10 L13 19 Z"}),e.jsx("path",{d:"M11 19 L17 6 L23 19 Z"}),e.jsx("rect",{x:"3",y:"19",width:"20",height:"2",rx:"1",fill:"#e8ff4a"})]})}),e.jsx("h2",{className:"text-white font-display text-3xl mb-3",children:"Contenido para miembros"}),e.jsx("p",{className:"text-stone-400 text-base mb-8 leading-relaxed",children:"Las fichas de escuelas, sectores y reseñas son exclusivas para la comunidad. Regístrate gratis para acceder."}),e.jsx(ne,{to:"/signup",className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-bold text-base hover:bg-yellow-300 transition-colors mb-3",children:"Crear cuenta gratis"}),e.jsx(ne,{to:"/login",className:"text-stone-400 hover:text-white text-sm transition-colors",children:"Ya tengo cuenta — entrar"})]})})}const F2={personal:"Experiencia personal",seguridad:"⚠️ Seguridad",acceso:"🚧 Acceso",condiciones:"🌦 Condiciones"};function am({rating:l}){return e.jsx("div",{className:"flex gap-0.5",children:[1,2,3,4,5].map(i=>e.jsx(bn,{className:"w-4 h-4",style:{color:i<=Math.round(l)?"#e8ff4a":"#44403c"},fill:i<=Math.round(l)?"#e8ff4a":"none"},i))})}function rb({review:l,currentUserId:i}){var h,j,g,v,S;const[r,d]=b.useState(!1),m=((j=(h=l.expand)==null?void 0:h.author)==null?void 0:j.id)===i||l.author===i,p=F2[l.info_type]||"Experiencia personal",f=l.info_type==="seguridad"||l.info_type==="acceso",x=async()=>
314{if(!(!i||m||r))try{await D.collection("review_reports").create({review_id:l.id,reported_by:i,reason:"duplicado_o_incorrecto",status:"pending"}),d(!0)}catch{}};return e.jsxs("div",{className:`rounded-lg p-3 mb-2 ${f?"bg-orange-950/20 border border-orange-800/30":"bg-stone-900"}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1",children:[e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium ${f?"bg-orange-900/40 text-orange-300":"bg-stone-800 text-stone-400"}`,children:p}),l.rating>0&&e.jsx(am,{rating:l.rating})]}),e.jsx("p",{className:"text-stone-300 text-sm leading-relaxed",children:l.review_text}),e.jsxs("div",{className:"flex items-center justify-between mt-2",children:[e.jsxs("span",{className:"text-xs text-stone-600",children:[((v=(g=l.expand)==null?void 0:g.author)==null?void 0:v.name)||"Escalador"," · ",(S=l.created)==null?void 0:S.slice(0,10)]}),!m&&i&&e.jsx("button",{onClick:x,disabled:r,className:"text-xs text-stone-600 hover:text-stone-400 transition-colors disabled:opacity-50",children:r?"✓ Reportado":"Reportar"})]})]})}function $2({routeName:l,reviews:i,currentUserId:r}){const[d,m]=b.useState(!1),p=i.filter(f=>f.rating).length>0?i.reduce((f,x)=>f+(x.rating||0),0)/i.filter(f=>f.rating).length:0;return e.jsxs("div",{className:"border border-stone-800 rounded-xl overflow-hidden",children:[e.jsxs("button",{onClick:()=>m(f=>!f),className:"w-full flex items-center justify-between px-5 py-4 bg-stone-900 hover:bg-stone-800 transition-colors text-left",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"font-semibold text-white text-sm",children:l}),p>0&&e.jsx(am,{rating:p})]}),e.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[e.jsxs("span",{className:"text-xs text-stone-500",children:[i.length," reseña",i.length!==1?"s":""]}),d?e.jsx(Ko,{className:"w-4 h-4 text-stone-400"}):e.jsx(Ql,{className:"w-4 h-4 text-stone-400"})]})]}),d&&e.jsx("div",{className:"bg-stone-950 px-5 py-4 space-y-2",children:i.map(f=>e.jsx(rb,{review:f,currentUserId:r},f.id))})]})}function I2(){const{schoolId:l,sectorId:i}=Rr(),{user:r}=oa(),[d,m]=b.useState(null),[p,f]=b.useState(null),[x,h]=b.useState([]),[j,g]=b.useState(!0);b.useEffect(()=>{const _=at.find(z=>z.id===l);_?m(_):D.collection("community_schools").getOne(l).then(z=>m(z)).catch(()=>m(null))},[l]),b.useEffect(()=>{i&&D.collection("climbing_sectors").getOne(i).then(_=>f(_)).catch(()=>f(null))},[i]),b.useEffect(()=>{if(!p)return;const _=new AbortController;return D.collection("route_reviews").getFullList({filter:`sector = "${p.name}"`,sort:"-created",expand:"author",signal:_.signal}).then(z=>{h(z),g(!1)}).catch(z=>{z!=null&&z.isAbort||g(!1)}),()=>_.abort()},[p]);const v=[...new Set(x.map(_=>_.route_name).filter(Boolean))];x.filter(_=>{var z;return(z=_.route_name)==null?void 0:z.trim()});const S=x.filter(_=>{var z;return!((z=_.route_name)!=null&&z.trim())}),N=x.filter(_=>_.rating).length>0?x.reduce((_,z)=>_+(z.rating||0),0)/x.filter(_=>_.rating).length:0;return!p&&!j?e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-24 flex flex-col items-center justify-center text-center px-4",children:[e.jsx("p",{className:"text-stone-400 text-lg mb-6",children:"Sector no encontrado."}),e.jsxs(ne,{to:`/escuelas/${l}`,className:"text-[#e8ff4a] hover:underline flex items-center gap-2 text-sm",children:[e.jsx(Go,{className:"w-4 h-4"})," Volver a la escuela"]})]}):e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-20",children:[e.jsx("div",{className:"bg-stone-900 border-b border-stone-800",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-10 sm:py-14",children:[e.jsxs("nav",{className:"flex items-center gap-2 text-sm text-stone-500 mb-8",children:[e.jsx(ne,{to:"/routes",className:"hover:text-stone-300 transition-colors",children:"Escuelas"}),e.jsx("span",{children:"/"}),d?e.jsx(ne,{to:`/escuelas/${l}`,className:"hover:text-stone-300 transition-colors",children:d.zona}):e.jsx(ne,{to:`/escuelas/${l}`,className:"hover:text-stone-300 transition-colors",children:"Escuela"}),e.jsx("span",{children:"/"}),e.jsx("span",{className:"text-stone-300",children:(p==null?void 0:p.name)||"Sector"})]}),e.jsx("h1",{className:"font-display text-4xl sm:text-6xl font-bold text-white leading-none mb-3",children:(p==null?void 0:p.name)||"…"}),d&&e.jsxs("p",{className:"text-stone-400 text-sm flex items-center gap-1.5 mb-3",children:[e.jsx(ya,{className:"w-4 h-4 shrink-0"}
314),d.zona,[d.municipio,d.region].filter(Boolean).length>0?" · "+[d.municipio,d.region].filter(Boolean).join(" · "):""]}),N>0&&e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(am,{rating:N}),e.jsxs("span",{className:"text-stone-400 text-sm",children:[N.toFixed(1)," · ",x.length," reseña",x.length!==1?"s":""]})]}),e.jsxs("div",{className:"flex flex-wrap gap-3 mt-2",children:[e.jsxs(ne,{to:`/escuelas/${l}`,className:"inline-flex items-center gap-2 text-sm text-stone-400 hover:text-white transition-colors",children:[e.jsx(Go,{className:"w-4 h-4"})," Ver todos los sectores"]}),r&&e.jsx(ne,{to:"/resenas",className:"text-sm text-[#e8ff4a] hover:underline ml-auto",children:"+ Escribir reseña aquí"})]})]})}),e.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-10",children:j?e.jsx("p",{className:"text-stone-500 text-sm",children:"Cargando reseñas…"}):x.length===0?e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl p-10 text-center",children:[e.jsx("p",{className:"text-stone-400 mb-4",children:"Todavía no hay reseñas en este sector."}),r?e.jsx(ne,{to:"/resenas",className:"text-sm text-[#e8ff4a] hover:underline",children:"Sé el primero en escribir una reseña →"}):e.jsx(ne,{to:"/login",className:"text-sm text-[#e8ff4a] hover:underline",children:"Regístrate para escribir la primera reseña →"})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("h2",{className:"font-display text-2xl text-white mb-4",children:["Vías del sector — ",v.length," ruta",v.length!==1?"s":""]}),v.map(_=>{const z=x.filter(C=>C.route_name===_);return e.jsx($2,{routeName:_,reviews:z,currentUserId:r==null?void 0:r.id},_)}),S.length>0&&e.jsxs("div",{className:"border border-stone-800 rounded-xl overflow-hidden",children:[e.jsx("div",{className:"px-5 py-4 bg-stone-900",children:e.jsx("p",{className:"text-stone-400 text-sm font-semibold",children:"Sin vía especificada"})}),e.jsx("div",{className:"bg-stone-950 px-5 py-4 space-y-2",children:S.map(_=>e.jsx(rb,{review:_,currentUserId:r==null?void 0:r.id},_.id))})]})]})})]})}function Z2(){return e.jsx("main",{className:"min-h-screen bg-stone-950 pt-24 pb-20 px-4",children:e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsx("h1",{className:"font-display text-4xl font-bold text-white mb-2",children:"Términos y Condiciones de Uso"}),e.jsx("p",{className:"text-stone-400 text-sm mb-10",children:"Última actualización: septiembre 2026"}),e.jsxs("div",{className:"flex flex-col gap-10 text-stone-300 leading-relaxed",children:[e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"1. Quién somos"}),e.jsx("p",{children:"CLIMB & HOME es una plataforma de intercambio de viviendas entre escaladores, operada conforme a la normativa española y europea. La plataforma facilita el contacto entre miembros; no actúa como agencia de viajes ni presta servicios de alojamiento directamente."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"2. Aceptación"}),e.jsx("p",{children:"Al registrarte en CLIMB & HOME aceptas estos Términos y nuestra Política de Privacidad. Si no estás de acuerdo, no podrás utilizar la plataforma. El acceso a determinadas funciones requiere ser miembro registrado."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"3. Elegibilidad"}),e.jsx("p",{children:"Debes tener al menos 18 años para registrarte. Al crear una cuenta declaras que la información facilitada es veraz y que actuarás de buena fe en todos los intercambios."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"4. Uso de la plataforma"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1.5 ml-2",children:[e.jsx("li",{children:"Está prohibido publicar información falsa, engañosa o fraudulenta."}),e.jsx("li",{children:"Queda prohibido el uso comercial de la plataforma (subarrendamiento, alquiler vacacional remunerado, etc.)."}),e.jsx("li",{children:"Los intercambios son entre miembros particulares; CLIMB & HOME no garantiza el resultado de ningún acuerdo."}),e.jsx("li",{children:"Debes respetar los bienes e instalaciones de la vivienda que ocupes durante un intercambio."}),e.jsx("li",{children:"Las reseñas y comentarios deben ser honestos y no difamatorios."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"5. ClimbPoints"}),e.jsx("p",{children:"El sistema de ClimbPoints es una unidad de valor interna sin equivalente monetario. No son transferibles fuera de la plataforma ni canjeables por dinero. CLIMB & HOME se reserva el derecho de ajustar el sistema de ClimbPoints con previo aviso a los miembros."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"6. Responsabilidad y limitaciones"}),e.jsx("p",{children:"CLIMB & HOME actúa como intermediario entre miembros. No nos hacemos responsables de daños, pérdidas o accidentes ocurridos durante un intercambio. La práctica de la escalada conlleva riesgos inherentes; cada miembro asume la responsabilidad de su propia seguridad. Recomendamos que los miembros suscriban un seguro de responsabilidad civil y hogar antes de realizar cualquier intercambio."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"7. 
314Cancelaciones"}),e.jsx("p",{children:"Los intercambios pueden cancelarse por mutuo acuerdo. En caso de cancelación unilateral, la devolución de Climbpoints depende de las condiciones de cancelación que el anfitrión haya definido para su casa y que el solicitante acepta al confirmar la reserva. CLIMB & HOME no indemniza por cancelaciones salvo que se demuestre mala fe documentada."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"8. Propiedad intelectual"}),e.jsx("p",{children:"El contenido que publiques (fotos, croquis, descripciones) es tuyo. Al publicarlo en CLIMB & HOME nos concedes una licencia no exclusiva para mostrarlo en la plataforma. CLIMB & HOME no puede revenderlo ni cederlo a terceros sin tu consentimiento."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"9. Suspensión y cancelación de cuentas"}),e.jsx("p",{children:"Nos reservamos el derecho de suspender o eliminar cuentas que incumplan estos Términos, previo aviso siempre que sea posible. En casos de fraude o daño a otros miembros, la suspensión puede ser inmediata."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"10. Modificaciones"}),e.jsx("p",{children:"Podemos actualizar estos Términos ocasionalmente. Si los cambios son sustanciales, te lo notificaremos dentro de la plataforma con al menos 30 días de antelación. El uso continuado de la plataforma implica la aceptación de los nuevos términos."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"11. Legislación aplicable"}),e.jsx("p",{children:"Estos Términos se rigen por la legislación española. En caso de conflicto, ambas partes se someten a los juzgados y tribunales competentes de España, sin perjuicio de los derechos que como consumidor te ampara la normativa europea, en particular el Reglamento (UE) 2016/679 (RGPD) y la Directiva de servicios de la sociedad de la información."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"12. Contacto"}),e.jsxs("p",{children:["Para cualquier consulta sobre estos Términos puedes escribirnos a través de la sección"," ",e.jsx(ne,{to:"/ayuda",className:"text-[#e8ff4a] hover:underline",children:"Ayuda"}),"."]})]})]})]})})}function K2(){return e.jsx("main",{className:"min-h-screen bg-stone-950 pt-24 pb-20 px-4",children:e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsx("h1",{className:"font-display text-4xl font-bold text-white mb-2",children:"Política de Privacidad"}),e.jsx("p",{className:"text-stone-400 text-sm mb-10",children:"Última actualización: septiembre 2026 · Conforme al RGPD (UE) 2016/679"}),e.jsxs("div",{className:"flex flex-col gap-10 text-stone-300 leading-relaxed",children:[e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"1. Responsable del tratamiento"}),e.jsxs("p",{children:["El responsable del tratamiento de tus datos personales es ",e.jsx("strong",{children:"CLIMB & HOME"}),", con correo electrónico de contacto ",e.jsx("a",{href:"mailto:[email protected]",className:"text-[#e8ff4a] hover:underline",children:"[email protected]"}),". Puedes contactar con nosotros a través de ese correo o desde la sección ",e.jsx(ne,{to:"/ayuda",className:"text-[#e8ff4a] hover:underline",children:"Ayuda"})," para cualquier asunto relacionado con tu privacidad. La identificación completa del titular se facilitará a petición de cualquier usuario."]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"2. Qué datos recogemos"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1.5 ml-2",children:[e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Datos de registro:"})," nombre, correo electrónico, contraseña (almacenada cifrada)."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Datos de perfil:"})," ubicación, nivel de escalada, estilos de escalada, foto de perfil, bi
314o."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Datos de vivienda:"})," descripción, fotos, localización aproximada, disponibilidad."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Datos de actividad:"})," solicitudes de intercambio, reseñas, croquis y mensajes privados entre miembros."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Datos técnicos:"})," dirección IP, tipo de navegador y páginas visitadas, recogidos de forma anónima para mejorar la plataforma."]})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"3. Para qué usamos tus datos"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1.5 ml-2",children:[e.jsx("li",{children:"Gestionar tu cuenta y permitirte acceder a la plataforma."}),e.jsx("li",{children:"Facilitar los intercambios de vivienda entre miembros."}),e.jsx("li",{children:"Mostrar tu perfil a otros miembros de la comunidad."}),e.jsx("li",{children:"Mejorar la experiencia y funcionalidades de CLIMB & HOME."}),e.jsx("li",{children:"Cumplir con obligaciones legales aplicables."})]}),e.jsxs("p",{className:"mt-3",children:[e.jsx("strong",{className:"text-stone-100",children:"Nunca vendemos tus datos a terceros."})," No utilizamos tus datos con fines publicitarios externos."]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"4. Base legal del tratamiento"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1.5 ml-2",children:[e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Ejecución del contrato"})," (art. 6.1.b RGPD): para prestarte el servicio de intercambio de viviendas."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Consentimiento"})," (art. 6.1.a RGPD): para datos opcionales del perfil, fotos y contenido que publiques voluntariamente."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Interés legítimo"})," (art. 6.1.f RGPD): para mejorar la plataforma y prevenir el fraude."]})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"5. Cuánto tiempo guardamos tus datos"}),e.jsx("p",{children:"Conservamos tus datos mientras tu cuenta esté activa. Si eliminas tu cuenta, borraremos tus datos personales en un plazo máximo de 30 días, salvo que la ley nos obligue a conservarlos durante más tiempo (por ejemplo, datos fiscales o de seguridad). Los datos anonimizados (estadísticas de uso) pueden conservarse indefinidamente."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"6. Tus derechos (RGPD)"}),e.jsx("p",{className:"mb-3",children:"Como usuario tienes derecho a:"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1.5 ml-2",children:[e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Acceso:"})," saber qué datos tenemos sobre ti."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Rectificación:"})," corregir datos inexactos."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Supresión («derecho al olvido»):"})," solicitar que eliminemos tus datos."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Oposición:"})," oponerte al tratamiento de tus datos."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Limitación:"})," pedir que restrinjamos el tratamiento."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Portabilidad:"})," recibir tus datos en formato reutilizable."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-stone-100",children:"Retirar el consentimiento"})," en cualquier momento, sin que ello afecte a la licitud del tratamiento anterior."]})]}),e.jsxs("p",{className:"mt-3",children:["Puedes ejercer cualquiera de estos derechos escribiéndonos desde la sección ",e.jsx(ne,{to:"/ayuda",className:"text-[#e8ff4a] hover:underline",children:"Ayuda"}),". También puedes reclamar ante la ",e.jsx("strong",{className:"text-stone-100",children:"Agencia Esp
314añola de Protección de Datos (AEPD)"})," en ",e.jsx("a",{href:"https://www.aepd.es",target:"_blank",rel:"noopener noreferrer",className:"text-[#e8ff4a] hover:underline",children:"www.aepd.es"}),"."]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"7. Seguridad"}),e.jsx("p",{children:"Aplicamos medidas técnicas y organizativas para proteger tus datos: acceso restringido, contraseñas almacenadas con hash y revisiones periódicas de seguridad. Ningún sistema es infalible, pero tomamos tu seguridad muy en serio."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"8. Cookies"}),e.jsx("p",{children:"CLIMB & HOME no utiliza cookies de rastreo ni publicitarias de terceros. Para el funcionamiento de la sesión podemos usar almacenamiento local en tu navegador, estrictamente necesario para que puedas iniciar sesión."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"9. Transferencias internacionales"}),e.jsx("p",{children:"Tus datos se almacenan en servidores ubicados en Europa. Hacemos lo posible por mantener el tratamiento dentro del Espacio Económico Europeo (EEE) y no realizamos transferencias internacionales fuera del EEE de forma deliberada."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"10. Menores de edad"}),e.jsx("p",{children:"CLIMB & HOME no está dirigida a menores de 18 años. No recogemos conscientemente datos de menores. Si detectamos que un usuario es menor de edad, eliminaremos su cuenta de inmediato."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-[#e8ff4a] font-semibold text-lg mb-3",children:"11. Cambios en esta política"}),e.jsx("p",{children:"Si realizamos cambios sustanciales en esta Política, te lo notificaremos dentro de la plataforma con al menos 30 días de antelación antes de que entren en vigor."})]})]})]})})}const Y2=[{id:"aviso",label:"Aviso Legal"},{id:"terminos",label:"Términos de Uso"},{id:"privacidad",label:"Privacidad y RGPD"},{id:"cookies",label:"Cookies"},{id:"climbpoints",label:"Normas ClimbPoints"},{id:"cancelaciones",label:"Cancelaciones"},{id:"responsabilidades",label:"Responsabilidades"},{id:"contenido",label:"Contenido de usuarios"},{id:"baja",label:"Baja y derechos"}];function Bs({id:l,title:i,children:r}){return e.jsxs("section",{id:l,className:"scroll-mt-28 flex flex-col gap-5",children:[e.jsx("h2",{className:"font-display text-2xl text-white tracking-wide border-b border-stone-800 pb-3",children:i}),e.jsx("div",{className:"flex flex-col gap-3 text-stone-300 leading-relaxed text-sm",children:r})]})}function $e({title:l,children:i}){return e.jsxs("div",{children:[e.jsx("h3",{className:"text-[#e8ff4a] font-semibold text-sm mb-1.5",children:l}),i]})}function Le({children:l}){return e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-[#e8ff4a] mt-0.5 shrink-0",children:"—"}),e.jsx("span",{children:l})]})}function Q2(){const[l,i]=b.useState("aviso");return e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-20 pb-24",children:[e.jsx("div",{className:"bg-stone-900 border-b border-stone-800 px-4 py-10",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("p",{className:"text-[#e8ff4a] text-xs font-semibold tracking-widest uppercase mb-2",children:"Marco legal"}),e.jsx("h1",{className:"font-display text-4xl md:text-5xl text-white tracking-wide",children:"Legal · Climb & Home"}),e.jsx("p",{className:"text-stone-400 text-sm mt-3",children:"Última actualización: octubre 2026 · Derecho español y RGPD (UE) 2016/679"})]})}),e.jsxs("div",{className:"max-w-4xl mx-auto px-4 mt-8 flex flex-col md:flex-row gap-8",children:[e.jsx("nav",{className:"md:w-52 shrink-0",children:e.jsx("ul",{className:"flex md:flex-col gap-2 flex-wrap md:sticky md:top-28",children:Y2.map(r=>e.jsx("li",{children:e.jsx("a",{href:`#${r.id}`,onClick:()=>i(r.id),className:`block text-sm px-3 py-2 rounded-sm transition-colors ${l===r.id?"bg-[#e8ff4a] text-stone-950 font-semibold":"text-stone-400 hover:text-white hover:bg-stone-800"}`,children:r.label})},r.id))})}),e.jsxs("div",{className:"flex-1 flex flex-col gap-14",children:[e.jsxs(Bs,{id:"aviso",title:"1. Aviso Legal",children:[e.jsx($e,{title:"Titular de la plataforma",children:e.jsxs("p",{children:[e.jsx("strong",{className:"text-stone-100",children:"CLIMB & HOME"})," es una plataforma de intercambio de viviendas entre escaladores. La identificación completa del titular —nombre, NIF/CIF y domicilio— se facilitará a petición de cualquier usuario o autoridad competente escribiendo a ",e.jsx("a",{href:"mailto:[email protected]",className:"text-[#e8ff4a] hover:underline",children:"[email protected]"}),"."]})}),e.jsx($e,{title:"Actividad",children:e.jsx("p",{children:"Climb & Home actúa exclusivamente como intermediario técnico entre miembros. No presta servicios de alojamiento, no actúa como agencia de viajes ni como arrendador. Los acuerdos de intercambio se producen directamente entre miembros."})}),e.jsx($e,{title:"Legislación aplicable",children:e.jsxs("ul",{className:"flex flex-col gap-1 ml-1",children:[e.jsx(Le,{children:"Ley 34/2002 de Servicios de la Sociedad de la Información (LSSI)"}),e.jsx(Le,{children:"Reglamento (UE) 2016/679 — RGPD"}),e.jsx(Le,{children:"Ley Orgánica 3/2018 de Protección de Datos Personales (LOPDGDD)"}),e.jsx(Le,{children:"Real Decreto Legislativo 1/2007 — Texto Refundido de Consumidores y Usuarios"})]})})]}),e.jsxs(Bs,{id:"terminos",title:"2. Términos de Uso",children:[e.jsx($e,{title:"Aceptación",children:e.jsx("p",{children:"Al registrarte en Climb & Home aceptas estos Términos. El uso continuado de la plataforma 
314implica la aceptación de cualquier actualización, que se comunicará con al menos 30 días de antelación si es sustancial."})}),e.jsx($e,{title:"Elegibilidad",children:e.jsx("p",{children:"Debes tener al menos 18 años. Al registrarte declaras que la información facilitada es veraz y que actuarás de buena fe."})}),e.jsx($e,{title:"Conducta en la plataforma",children:e.jsxs("ul",{className:"flex flex-col gap-1 ml-1",children:[e.jsx(Le,{children:"Está prohibido publicar información falsa, engañosa o fraudulenta."}),e.jsx(Le,{children:"El uso comercial está prohibido: no se permite el subarrendamiento ni el alquiler vacacional remunerado a través de Climb & Home."}),e.jsx(Le,{children:"Los intercambios son acuerdos entre particulares; Climb & Home no garantiza su resultado."}),e.jsx(Le,{children:"Debes respetar los bienes e instalaciones de la vivienda durante el intercambio."}),e.jsx(Le,{children:"Las reseñas deben ser honestas y no difamatorias."})]})}),e.jsx($e,{title:"Suspensión y cancelación de cuentas",children:e.jsx("p",{children:"Nos reservamos el derecho de suspender o eliminar cuentas que incumplan estos Términos, con previo aviso siempre que sea posible. En casos de fraude o daño a otros miembros, la suspensión puede ser inmediata."})}),e.jsx($e,{title:"Propiedad intelectual del contenido publicado",children:e.jsx("p",{children:"El contenido que publiques (fotos, croquis, descripciones) es tuyo. Al publicarlo en Climb & Home nos concedes una licencia no exclusiva para mostrarlo en la plataforma. No podemos revenderlo ni cederlo a terceros sin tu consentimiento."})})]}),e.jsxs(Bs,{id:"privacidad",title:"3. Privacidad y RGPD",children:[e.jsx($e,{title:"Responsable del tratamiento",children:e.jsxs("p",{children:[e.jsx("strong",{className:"text-stone-100",children:"CLIMB & HOME"})," · ",e.jsx("a",{href:"mailto:[email protected]",className:"text-[#e8ff4a] hover:underline",children:"[email protected]"})]})}),e.jsx($e,{title:"Qué datos recogemos",children:e.jsxs("ul",{className:"flex flex-col gap-1 ml-1",children:[e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Registro:"})," nombre, correo electrónico, contraseña (almacenada cifrada)."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Perfil:"})," ubicación, nivel de escalada, estilos, foto, bio."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Vivienda:"})," descripción, fotos, localización aproximada, disponibilidad."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Actividad:"})," solicitudes de intercambio, reseñas, croquis, mensajes privados."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Técnicos:"})," IP y navegador, de forma anónima para mejorar la plataforma."]})]})}),e.jsx($e,{title:"Base legal del tratamiento (art. 6 RGPD)",children:e.jsxs("ul",{className:"flex flex-col gap-1 ml-1",children:[e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Ejecución del contrato"})," (art. 6.1.b): para prestarte el servicio."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Consentimiento"})," (art. 6.1.a): para datos opcionales del perfil y comunicaciones de marketing."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Interés legítimo"})," (art. 6.1.f): para mejorar la plataforma y prevenir el fraude."]})]})}),e.jsx($e,{title:"Cuánto tiempo guardamos tus datos",children:e.jsx("p",{children:"Mientras tu cuenta esté activa. Si eliminas tu cuenta, borraremos tus datos personales en un plazo máximo de 30 días, salvo obligación legal de conservación. Los datos anonimizados pueden conservarse indefinidamente."})}),e.jsx($e,{title:"Nunca vendemos tus datos",children:e.jsx("p",{children:"No utilizamos tus datos con fines publicitarios externos ni los cedemos a terceros salvo obligación legal."})}),e.jsx($e,{title:"Transferencias internacionales",children:e.jsx("p",{children:"Tus datos se almacenan en servidores en Europa. No realizamos transferencias fuera del Espacio Económico Europeo de forma deliberada."})}),e.jsx($e,{title:"Menores de edad",children:e.jsx("p",{children:"Climb & Home no está dirigid
314a a menores de 18 años. Si detectamos que un usuario es menor de edad, eliminaremos su cuenta de inmediato."})})]}),e.jsxs(Bs,{id:"cookies",title:"4. Política de Cookies",children:[e.jsx($e,{title:"Qué usamos",children:e.jsxs("p",{children:["Climb & Home ",e.jsx("strong",{className:"text-stone-100",children:"no utiliza cookies de rastreo ni publicitarias"})," de terceros. Para el funcionamiento de la sesión usamos almacenamiento local en tu navegador (localStorage), estrictamente necesario para que puedas iniciar sesión y mantener tu sesión activa."]})}),e.jsx($e,{title:"Cookies estrictamente necesarias",children:e.jsxs("ul",{className:"flex flex-col gap-1 ml-1",children:[e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Sesión de usuario:"})," almacena el token de autenticación en localStorage para mantenerte identificado. Se elimina al cerrar sesión."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Preferencias de interfaz:"})," estado del popup de lanzamiento (para no mostrarlo más de una vez por sesión). Se elimina al cerrar el navegador."]})]})}),e.jsx($e,{title:"No usamos",children:e.jsxs("ul",{className:"flex flex-col gap-1 ml-1",children:[e.jsx(Le,{children:"Google Analytics ni herramientas de analítica de terceros."}),e.jsx(Le,{children:"Píxeles de seguimiento de redes sociales."}),e.jsx(Le,{children:"Publicidad programática de ningún tipo."})]})}),e.jsx($e,{title:"¿Puedo desactivarlas?",children:e.jsx("p",{children:"Las cookies estrictamente necesarias no pueden desactivarse sin que la plataforma deje de funcionar. Puedes limpiar el almacenamiento local de tu navegador en cualquier momento, lo que equivaldrá a cerrar sesión."})})]}),e.jsxs(Bs,{id:"climbpoints",title:"5. Normas ClimbPoints",children:[e.jsx($e,{title:"Qué son",children:e.jsx("p",{children:"Los ClimbPoints (CP) son una unidad de valor interna de Climb & Home que facilita los intercambios de vivienda entre miembros. No tienen equivalente monetario, no son transferibles fuera de la plataforma y no pueden canjearse por dinero en ningún caso."})}),e.jsx($e,{title:"Cómo se obtienen",children:e.jsxs("ul",{className:"flex flex-col gap-1 ml-1",children:[e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"200 CP al registrarte"})," como nuevo miembro."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"300 CP al publicar tu primera casa"})," (solo la primera vez, condición de Socio Fundador mientras haya plazas)."]}),e.jsx(Le,{children:"CP adicionales al alojar a otros escaladores, según el valor de la casa y la duración de la estancia."})]})}
314),e.jsx($e,{title:"Límites y condiciones",children:e.jsxs("ul",{className:"flex flex-col gap-1 ml-1",children:[e.jsx(Le,{children:"Los CP no expiran mientras tu cuenta esté activa."}),e.jsx(Le,{children:"Si eliminas tu cuenta, los CP se cancelan sin compensación."}),e.jsx(Le,{children:"Climb & Home se reserva el derecho de ajustar el sistema de CP con previo aviso de 30 días."}),e.jsx(Le,{children:"El abuso del sistema (creación de cuentas falsas, intercambios ficticios) puede resultar en la suspensión de la cuenta y la anulación de los CP."})]})}),e.jsx($e,{title:"Distintivo Socio Fundador",children:e.jsxs("p",{children:["Las primeras 100 cuentas que publiquen una casa recibirán el distintivo permanente de ",e.jsx("strong",{className:"text-stone-100",children:"Socio Fundador"}),". Este distintivo es personal, intransferible y permanece en el perfil aunque el sistema de CP cambie en el futuro."]})})]}),e.jsxs(Bs,{id:"cancelaciones",title:"6. Política de Cancelaciones",children:[e.jsx($e,{title:"Cancelación por mutuo acuerdo",children:e.jsx("p",{children:"Cualquier intercambio puede cancelarse si ambas partes lo acuerdan. En ese caso, los CP implicados se devuelven a cada miembro en su totalidad."})}),e.jsxs($e,{title:"Cancelación unilateral",children:[e.jsx("p",{children:"Si una de las partes cancela sin acuerdo del otro miembro:"}),e.jsxs("ul",{className:"flex flex-col gap-1 ml-1 mt-2",children:[e.jsx(Le,{children:"Con más de 30 días de antelación: devolución completa de los CP al solicitante."}),e.jsx(Le,{children:"Entre 7 y 30 días: devolución del 50 % de los CP al solicitante."}),e.jsx(Le,{children:"Con menos de 7 días: los CP pueden no devolverse, a criterio de Climb & Home según las circunstancias."})]})]}),e.jsx($e,{title:"Causas de fuerza mayor",children:e.jsx("p",{children:"En caso de accidente, enfermedad grave documentada, catástrofe natural u otras causas de fuerza mayor debidamente acreditadas, Climb & Home valorará la devolución íntegra de los CP con independencia del plazo."})}),e.jsx($e,{title:"Climb & Home no indemniza",children:e.jsx("p",{children:"Climb & Home no indemniza económicamente por cancelaciones. La única compensación posible es la devolución de CP según los criterios anteriores."})})]}),e.jsxs(Bs,{id:"responsabilidades",title:"7. Responsabilidades",children:[e.jsx($e,{title:"Posición de Climb & Home",children:e.jsx("p",{children:"Climb & Home es un intermediario técnico. No es parte de los acuerdos de intercambio, no selecciona ni supervisa a los miembros y no garantiza la exactitud de la información publicada por los usuarios."})}),e.jsx($e,{title:"Daños durante un intercambio",children:e.jsxs("p",{children:["Climb & Home no asume responsabilidad por daños, pérdidas o accidentes ocurridos en la vivienda o durante la práctica de la escalada. ",e.jsx("strong",{className:"text-stone-100",children:"Recomendamos encarecidamente que todos los miembros suscriban un seguro de responsabilidad civil y hogar antes de realizar cualquier intercambio."})]})}),e.jsx($e,{title:"Escalada — riesgos inherentes",children:e.jsx("p",{children:"La práctica de la escalada conlleva riesgos inherentes. Cada miembro asume la responsabilidad de su propia seguridad y la de las personas a su cargo. Climb & Home no puede ser considerada responsable de accidentes relacionados con la práctica deportiva."})}),e.jsx($e,{title:"Información de terceros",children:e.jsx("p",{children:"Las escuelas de escalada, sectores y rutas publicadas en la plataforma —tanto las curadas como las aportadas por la comunidad— tienen carácter informativo. Las condiciones de acceso, apertura y seguridad de cada zona pueden cambiar. Verifica siempre las condiciones antes de escalar."})})]}),e.jsxs(Bs,{id:"contenido",title:"8. Contenido de Usuarios",children:[e.jsx($e,{title:"Propiedad del contenido",children:e.jsx("p",{children:"Todo el contenido que publiques (fotos, croquis, descripciones, reseñas, consejos) es de tu propiedad. Al publicarlo en Climb & Home nos concedes una licencia no exclusiva, gratuita y limitada al ámbito de la plataforma para mostrarlo a otros miembros."})}),e.jsx($e,{title:"Contenido prohibido",children:e.jsxs("ul",{className:"flex flex-col gap-1 ml-1",children:[e.jsx(Le,{children:"Información falsa o fraudulenta sobre viviendas, ubicaciones o identidad."}),e.jsx(Le,{children:"Fotografías o descripciones que vulneren derechos de terceros."}),e.jsx(Le,{children:"Contenido difamatorio, discriminatorio o que incite al odio."}),e.jsx(Le,{children:"Material con derechos de autor sin permiso del titular."}),e.jsx(Le,{children:"Spam, publicidad no solicitada o contenido comercial no autorizado."})]})}),e.jsx($e,{title:"Moderación",children:e.jsx("p",{children:"Climb & Home puede retirar contenido que incumpla estas normas, sin necesidad de aviso previo. Los miembros pueden reportar contenido inapropiado desde la propia plataforma."})}),e.jsx($e,{title:"Croquis y topos",children:e.jsx("p",{children:"Los croquis de escalada publicados llevan marca de agua visible. Al publicar un croquis declaras que tienes derecho a hacerlo (eres el autor o t
314ienes permiso del autor). Climb & Home no puede verificar la autoría de cada topo."})}),e.jsx($e,{title:"Reseñas de intercambio",children:e.jsx("p",{children:"Las valoraciones entre miembros deben reflejar experiencias reales. Está prohibido publicar valoraciones falsas, compradas o con fines de presión. Las valoraciones son públicas y pueden ser vistas por cualquier miembro."})})]}),e.jsxs(Bs,{id:"baja",title:"9. Baja y Ejercicio de Derechos",children:[e.jsx($e,{title:"Cómo darte de baja",children:e.jsxs("p",{children:["Puedes solicitar la eliminación de tu cuenta en cualquier momento desde ",e.jsx(ne,{to:"/perfil",className:"text-[#e8ff4a] hover:underline",children:"Mi Perfil"})," o escribiéndonos a ",e.jsx("a",{href:"mailto:[email protected]",className:"text-[#e8ff4a] hover:underline",children:"[email protected]"}),". Procesaremos la solicitud en un plazo máximo de 30 días."]})}),e.jsx($e,{title:"Qué ocurre al darte de baja",children:e.jsxs("ul",{className:"flex flex-col gap-1 ml-1",children:[e.jsx(Le,{children:"Se eliminan tus datos personales (nombre, correo, contraseña, foto, bio)."}),e.jsx(Le,{children:"Se eliminan tus casas publicadas y las solicitudes de intercambio activas."}),e.jsx(Le,{children:"Los ClimbPoints se cancelan sin compensación."}),e.jsx(Le,{children:"Las reseñas que hayas escrito pueden mantenerse de forma anonimizada para preservar la integridad del historial comunitario."}),e.jsx(Le,{children:"El distintivo Socio Fundador no puede transferirse a otra cuenta."})]})}),e.jsxs($e,{title:"Tus derechos RGPD (art. 15–22)",children:[e.jsxs("ul",{className:"flex flex-col gap-1 ml-1",children:[e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Acceso:"})," saber qué datos tenemos sobre ti."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Rectificación:"})," corregir datos inexactos desde tu perfil o por correo."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Supresión («derecho al olvido»):"})," solicitar la eliminación de tus datos."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Oposición:"})," oponerte al tratamiento, incluyendo el de marketing."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Limitación:"})," pedir que restrinjamos el tratamiento mientras se resuelve una disputa."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Portabilidad:"})," recibir tus datos en formato reutilizable (JSON o CSV)."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Retirar el consentimiento"})," en cualquier momento, sin efecto retroactivo."]})]}),e.jsxs("p",{className:"mt-3",children:["Ejerce cualquiera de estos derechos escribiéndonos a ",e.jsx("a",{href:"mailto:[email protected]",className:"text-[#e8ff4a] hover:underline",children:"[email protected]"})," o desde ",e.jsx(ne,{to:"/ayuda",className:"text-[#e8ff4a] hover:underline",children:"Ayuda"}),". Responderemos en un plazo máximo de 30 días."]}),e.jsxs("p",{className:"mt-2",children:["Si consideras que no hemos atendido correctamente tu solicitud, puedes reclamar ante la ",e.jsx("strong",{className:"text-stone-100",children:"Agencia Española de Protección de Datos (AEPD)"})," en ",e.jsx("a",{href:"https://www.aepd.es",target:"_blank",rel:"noopener noreferrer",className:"text-[#e8ff4a] hover:underline",children:"www.aepd.es"}),"."]})]}),e.jsxs($e,{title:"Checkboxes y consentimientos en formularios",children:[e.jsx("p",{children:"Al registrarte marcas dos casillas de forma independiente:"}),e.jsxs("ul",{className:"flex flex-col gap-1 ml-1 mt-2",children:[e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Aceptación de Términos y Privacidad"})," — obligatoria para usar la plataforma. Base legal: ejecución del contrato (art. 6.1.b RGPD)."]}),e.jsxs(Le,{children:[e.jsx("strong",{className:"text-stone-100",children:"Comunicaciones de la comunidad"})," — opcional. Puedes activarla o desactivarla desde tu perfil en cualquier momento. Base legal: consentimiento (art. 6.1.a RGPD)."]})]}
314),e.jsx("p",{className:"mt-2",children:"Ningún servicio esencial de Climb & Home está condicionado a la aceptación de comunicaciones de marketing."})]})]}),e.jsxs("div",{className:"border-t border-stone-800 pt-8 text-stone-500 text-xs leading-relaxed",children:[e.jsxs("p",{children:["Este documento tiene carácter informativo y no sustituye al asesoramiento jurídico profesional. Para consultas legales específicas, contacta con ",e.jsx("a",{href:"mailto:[email protected]",className:"text-[#e8ff4a] hover:underline",children:"[email protected]"}),"."]}),e.jsx("p",{className:"mt-2",children:"© 2026 Climb & Home · Todos los derechos reservados."})]})]})]})]})}/**
315 * @license lucide-react v1.47.0 - ISC
316 *
317 * This source code is licensed under the ISC license.
318 * See the LICENSE file in the root directory of this source tree.
319 */const cb={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};cb.node;const $l=Ie(cb);/**
320 * @license lucide-react v1.47.0 - ISC
321 *
322 * This source code is licensed under the ISC license.
323 * See the LICENSE file in the root directory of this source tree.
324 */const db={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};db.node;const J2=Ie(db);function ub(l){if(!l)return"";const i=Date.now()-new Date(l).getTime(),r=Math.floor(i/6e4);if(r<2)return"ahora";if(r<60)return`hace ${r} min`;const d=Math.floor(r/60);if(d<24)return`hace ${d}h`;const m=Math.floor(d/24);return m<30?`hace ${m}d`:new Date(l).toLocaleDateString("es-ES",{day:"numeric",month:"short"})}function X2({currentUserId:l,onSelect:i}){const[r,d]=b.useState(""),[m,p]=b.useState([]),[f,x]=b.useState(!1);return b.useEffect(()=>{if(r.trim().length<2){p([]);return}const h=new AbortController;x(!0);const j=setTimeout(()=>{D.collection("members").getList(1,8,{filter:`(name ~ "${r}" || email ~ "${r}") && id != "${l}"`,sort:"name",signal:h.signal}).then(g=>{p(g.items),x(!1)}).catch(()=>x(!1))},300);return()=>{clearTimeout(j),h.abort()}},[r,l]),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-stone-800 border border-stone-700 rounded-xl px-3 py-2 focus-within:border-[#e8ff4a]/50 transition-colors",children:[e.jsx(vs,{className:"w-4 h-4 text-stone-500 shrink-0"}),e.jsx("input",{type:"text",value:r,onChange:h=>d(h.target.value),placeholder:"Buscar escalador por nombre…",className:"bg-transparent text-white text-sm placeholder-stone-500 focus:outline-none w-full"})]}),(m.length>0||f)&&e.jsxs("div",{className:"absolute top-full mt-1 left-0 right-0 bg-stone-900 border border-stone-700 rounded-xl overflow-hidden z-10 shadow-xl",children:[f&&e.jsx("p",{className:"text-stone-500 text-xs px-4 py-3",children:"Buscando…"}),m.map(h=>e.jsxs("button",{onClick:()=>{i(h),d(""),p([])},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-stone-800 transition-colors text-left",children:[h.avatar?e.jsx("img",{src:D.files.getURL(h,h.avatar,{thumb:"40x40"}),alt:h.name,className:"w-8 h-8 rounded-full object-cover shrink-0 border border-stone-600"}):e.jsx("div",{className:"w-8 h-8 rounded-full bg-stone-700 flex items-center justify-center shrink-0",children:e.jsx(Fo,{className:"w-4 h-4 text-stone-400"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-white text-sm font-semibold",children:h.name}),h.location&&e.jsx("p",{className:"text-stone-400 text-xs",children:h.location})]})]},h.id))]})]})}function W2({conversations:l,selectedId:i,onSelect:r,unreadCounts:d}){return e.jsxs("div",{className:"flex flex-col gap-1",children:[l.length===0&&e.jsxs("div",{className:"text-center py-12 px-4",children:[e.jsx(eb,{className:"w-10 h-10 text-stone-700 mx-auto mb-3"}),e.jsx("p",{className:"text-stone-500 text-sm",children:"Ninguna conversación todavía."}),e.jsx("p",{className:"text-stone-600 text-xs mt-1",children:"Busca un escalador para empezar."})]}),l.map(m=>{const p=d[m.otherId]||0;return e.jsxs("button",{onClick:()=>r(m),className:`w-full flex items-center gap-3 px-4 py-3 rounded-xl transition-colors text-left ${i===m.otherId?"bg-[#e8ff4a]/10 border border-[#e8ff4a]/30":"hover:bg-stone-800/60 border border-transparent"}`,children:[m.otherAvatar?e.jsx("img",{src:m.otherAvatar,alt:m.otherName,className:"w-10 h-10 rounded-full object-cover shrink-0 border border-stone-700"}):e.jsx("div",{className:"w-10 h-10 rounded-full bg-stone-800 flex items-center justify-center shrink-0 border border-stone-700",children:e.jsx(Fo,{className:"w-5 h-5 text-stone-500"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center justify-between gap-1",children:[e.jsx("p",{className:`text-sm font-semibold truncate ${i===m.otherId?"text-[#e8ff4a]":"text-white"}`,children:m.otherName}),e.jsx("span",{className:"text-stone-600 text-xs shrink-0",children:ub(m.lastDate)})]}),e.jsx("p",{className:"text-stone-400 text-xs truncate mt-0.5",children:m.lastMessage})]}),p>0&&e.jsx("span",{className:"shrink-0 bg-[#e8ff4a] text-stone-950 text-xs font-bold w-5 h-5 rounded-full flex items-center justify-center",children:p})]},m.otherId)})]})}function e_({messages:l,currentUserId:i,otherMember:r,onMarkRead:d}){const m=b.useRef(null);if(b.useEffect(()=>{var f;(f=m.current)==null||f.scrollIntoView({behavior:"smooth"})},[l]),b.useEffect(()=>{const f=l.filter(x=>x.to_member===i&&!x.read);f.length>0&&d&&d(f.map(x=>x.id))},[l,i,d]),l.length===0)return e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 py-12 px-4",children:[e.jsx("div",{className:"w-14 h-14 roun
324ded-full bg-stone-800 flex items-center justify-center border border-stone-700",children:e.jsx($l,{className:"w-6 h-6 text-[#e8ff4a]"})}),e.jsx("p",{className:"text-stone-300 font-semibold",children:"Conversación privada"}),e.jsx("p",{className:"text-stone-500 text-sm text-center max-w-xs",children:"Solo vosotros dos podéis leer estos mensajes. Comparte el beta local, accesos secretos, temporadas…"})]});let p="";return e.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-4 flex flex-col gap-2",children:[l.map(f=>{const x=f.from_member===i,h=new Date(f.created).toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"}),j=h!==p;return p=h,e.jsxs("div",{children:[j&&e.jsxs("div",{className:"flex items-center gap-3 my-3",children:[e.jsx("div",{className:"flex-1 h-px bg-stone-800"}),e.jsx("span",{className:"text-stone-600 text-xs capitalize",children:h}),e.jsx("div",{className:"flex-1 h-px bg-stone-800"})]}),e.jsx("div",{className:`flex ${x?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:`max-w-[75%] px-4 py-2.5 rounded-2xl text-sm leading-relaxed ${x?"bg-[#e8ff4a] text-stone-950 rounded-br-sm font-medium":"bg-stone-800 text-stone-100 rounded-bl-sm border border-stone-700"}`,children:[e.jsx("p",{className:"whitespace-pre-wrap break-words",children:f.message}),e.jsx("p",{className:`text-xs mt-1 ${x?"text-stone-700 text-right":"text-stone-500"}`,children:ub(f.created)})]})})]},f.id)}),e.jsx("div",{ref:m})]})}function a_({onSend:l,disabled:i}){const[r,d]=b.useState(""),m=b.useRef(null),p=()=>{var h;const x=r.trim();x&&(l(x),d(""),(h=m.current)==null||h.focus())},f=x=>
324{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),p())};return e.jsxs("div",{className:"border-t border-stone-800 px-4 py-3 bg-stone-950",children:[e.jsxs("div",{className:"flex items-end gap-3",children:[e.jsx("textarea",{ref:m,rows:1,value:r,onChange:x=>{d(x.target.value),x.target.style.height="auto",x.target.style.height=Math.min(x.target.scrollHeight,120)+"px"},onKeyDown:f,placeholder:"Escribe tu mensaje privado… (Intro para enviar)",disabled:i,className:"flex-1 bg-stone-800 border border-stone-700 rounded-xl px-4 py-2.5 text-white text-sm placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a]/50 resize-none transition-colors disabled:opacity-50",style:{minHeight:"44px"}}),e.jsx("button",{onClick:p,disabled:i||!r.trim(),"aria-label":"Enviar mensaje",className:"shrink-0 w-11 h-11 rounded-xl bg-[#e8ff4a] text-stone-950 flex items-center justify-center hover:bg-[#f0ff70] transition-colors disabled:opacity-40",children:e.jsx(V0,{className:"w-4 h-4"})})]}),e.jsxs("p",{className:"text-stone-700 text-xs mt-2 flex items-center gap-1.5",children:[e.jsx($l,{className:"w-3 h-3"})," Solo visible para vosotros dos"]})]})}function t_(){const{user:l,authReady:i}=oa(),r=Za(),[d]=Yl(),[m,p]=b.useState([]),[f,x]=b.useState([]),[h,j]=b.useState(null),[g,v]=b.useState({}),[S,N]=b.useState(!0),[_,z]=b.useState(!1),[C,k]=b.useState({}),[T,w]=b.useState(!1),A=async X=>l?(await D.collection("private_messages").getList(1,500,{filter:`from_member = "${l.id}" || to_member = "${l.id}"`,sort:"created",expand:"from_member,to_member",signal:X})).items:void 0,L=(X,B)=>{var te,P;const Z={};for(const $ of X){const oe=$.from_member===B?$.to_member:$.from_member,de=$.from_member===B?(te=$.expand)==null?void 0:te.to_member:(P=$.expand)==null?void 0:P.from_member;Z[oe]||(Z[oe]={otherId:oe,otherName:(de==null?void 0:de.name)||"Escalador",otherAvatar:de!=null&&de.avatar?D.files.getURL(de,de.avatar,{thumb:"80x80"}):null,lastMessage:"",lastDate:"",messages:[]}),Z[oe].messages.push($),Z[oe].lastMessage=$.message,Z[oe].lastDate=$.created}return Object.values(Z).sort(($,oe)=>new Date(oe.lastDate)-new Date($.lastDate))},q=(X,B)=>{const Z={};for(const te of X)if(te.to_member===B&&!te.read){const P=te.from_member;Z[P]=(Z[P]||0)+1}return Z};b.useEffect(()=>{if(!i)return;if(!l){r("/login");return}const X=new AbortController;return N(!0),A(X.signal).then(B=>{if(!B)return;p(B);const Z=L(B,l.id);x(Z),k(q(B,l.id));const te=d.get("to");if(te){const P=Z.find($=>$.otherId===te);P?(j(P),w(!0)):D.collection("members").getOne(te,{signal:X.signal}).then($=>{const oe={otherId:$.id,otherName:$.name||"Escalador",otherAvatar:$.avatar?D.files.getURL($,$.avatar,{thumb:"80x80"}):null,lastMessage:"",lastDate:"",messages:[]};j(oe),w(!0)}).catch(()=>{})}N(!1)}).catch(()=>N(!1)),()=>X.abort()},[l,i]);const H=h?m.filter(X=>{const B=h.otherId;return X.from_member===l.id&&X.to_member===B||X.from_member===B&&X.to_member===l.id}):[],F=X=>{j(X),w(!0)},U=X=>{const B=f.find(Z=>Z.otherId===X.id);if(B)j(B);else{const Z={otherId:X.id,otherName:X.name||"Escalador",otherAvatar:X.avatar?D.files.getURL(X,X.avatar,{thumb:"80x80"}):null,lastMessage:"",lastDate:"",messages:[]};j(Z)}w(!0)},J=async X=>{if(!(!h||!l)){z(!0);try{const B=await D.collection("private_messages").create({from_member:l.id,to_member:h.otherId,message:X,read:!1}),Z={...B,expand:{from_member:{id:l.id,name:l.name,avatar:l.avatar},to_member:{id:h.otherId,name:h.otherName}}};p(te=>[...te,Z]),x(te=>{const P=te.findIndex($=>$.otherId===h.otherId);if(P>=0){const $=[...te];return $[P]={...$[P],lastMessage:X,lastDate:B.created},[$[P],...$.filter((oe,de)=>de!==P)]}return[{...h,lastMessage:X,lastDate:B.created},...te]})}catch(B){console.error(B)}z(!1)}},O=async X=>{for(const B of X)D.collection("private_messages").update(B,{read:!0}).catch(()=>{});p(B=>B.map(Z=>X.includes(Z.id)?{...Z,read:!0}:Z)),h&&k(B=>({...B,[h.otherId]:0}))};return i?l?e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-16 flex flex-col",children:[e.jsx("div",{className:"border-b border-stone-800 bg-stone-950/95 backdrop-blur-sm",children:e.jsx("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 py-5",children:e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx($l,{className:"w-4 h-4 text-[#e8ff4a]"}),e.jsx("span",{className:"text-[#e8ff4a] text-sm font-semibold tracking-wide uppercase",children:"Privado"})]}),e.jsx("h1",{className:"font-display text-2xl sm:text-3xl font-bold text-white",children:"Boca a Boca"}),e.jsx("p",{className:"text-stone-400 text-sm mt-0.5",children:"Comparte el beta secreto, accesos y temporadas solo con quien tú elijas"})]})})})}),e.jsxs("div",{className:"flex-1 max-w-6xl mx-auto w-full px-4 sm:px-6 py-6 flex gap-6",children:[e.jsxs("div",{className:`w-full md:w-80 lg:w-96 shrink-0 flex flex-col gap-4 ${T?"hidden md:flex":"flex"}`,children:[e.jsxs("div",{className:"p-4 rounded-2xl bg-stone-900 border border-stone-800",children:[e.jsx("p",{className:"text-stone-400 text-xs font-semibold uppercase tracking-wider mb-3",children:"Nueva conversación"}),e.jsx(X2,{currentUserId:l.id,onSelect:U})]}),e.jsxs("div",{className:"rounded-2xl bg-stone-900 border border-stone-800 overflow-hidden flex-1",children:[e.jsx("div",{className:"px-4 py-3 border-b border-stone-800",children:e.jsxs("p",{className:"text-stone-300 text-sm font-semibold",children:["Conversaciones",Object.values(C).reduce((X,B)=>
324X+B,0)>0&&e.jsxs("span",{className:"ml-2 bg-[#e8ff4a] text-stone-950 text-xs font-bold px-2 py-0.5 rounded-full",children:[Object.values(C).reduce((X,B)=>X+B,0)," nuevos"]})]})}),e.jsx("div",{className:"overflow-y-auto p-2",style:{maxHeight:"calc(100vh - 320px)"},children:S?e.jsx("div",{className:"flex flex-col gap-2 p-2",children:[...Array(3)].map((X,B)=>e.jsx("div",{className:"h-14 bg-stone-800 rounded-xl animate-pulse"},B))}):e.jsx(W2,{conversations:f,selectedId:h==null?void 0:h.otherId,onSelect:F,unreadCounts:C})})]})]}),e.jsx("div",{className:`flex-1 flex flex-col rounded-2xl overflow-hidden border border-stone-800 bg-stone-900 ${T?"flex":"hidden md:flex"}`,style:{minHeight:"calc(100vh - 220px)"},children:h?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-stone-800 bg-stone-900/80",children:[e.jsx("button",{onClick:()=>w(!1),className:"md:hidden p-1 text-stone-400 hover:text-white transition-colors","aria-label":"Volver",children:e.jsx(J2,{className:"w-5 h-5"})}),h.otherAvatar?e.jsx("img",{src:h.otherAvatar,alt:h.otherName,className:"w-9 h-9 rounded-full object-cover border border-stone-700"}):e.jsx("div",{className:"w-9 h-9 rounded-full bg-stone-800 flex items-center justify-center border border-stone-700",children:e.jsx(Fo,{className:"w-4 h-4 text-stone-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-white font-semibold text-sm",children:h.otherName}),e.jsxs("p",{className:"text-stone-500 text-xs flex items-center gap-1",children:[e.jsx($l,{className:"w-2.5 h-2.5"})," Mensaje privado"]})]})]}),e.jsx(e_,{messages:H,currentUserId:l.id,otherMember:h,onMarkRead:O}),e.jsx(a_,{onSend:J,disabled:_})]}):e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 px-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-stone-800 flex items-center justify-center border border-stone-700",children:e.jsx($l,{className:"w-7 h-7 text-[#e8ff4a]"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-white font-semibold text-lg",children:"El beta secreto"}),e.jsx("p",{className:"text-stone-400 text-sm mt-2 max-w-sm leading-relaxed",children:"Aquí puedes compartir información que no publicas en el mapa: accesos privados, temporadas óptimas, sectores vírgenes, contactos locales…"})]}),e.jsx("p",{className:"text-stone-600 text-xs",children:"Busca un escalador arriba o selecciona una conversación existente."})]})})]})]}):null:e.jsx("div",{className:"min-h-screen bg-stone-950 flex items-center justify-center",children:e.jsx("div",{className:"w-8 h-8 border-2 border-[#e8ff4a] border-t-transparent rounded-full animate-spin"})})}function s_(){const[l,i]=b.useState(""),[r,d]=b.useState("idle"),[m,p]=b.useState(""),f=async x=>{x.preventDefault();const h=l.trim().toLowerCase();if(!h||!/\S+@\S+\.\S+/.test(h)){p("Escribe un correo válido.");return}d("loading"),p("");try{await D.collection("members").requestPasswordReset(h),d("sent")}catch{d("sent")}};return e.jsx("main",{className:"min-h-screen bg-stone-950 flex items-center justify-center px-4 pt-16 pb-10",children:e.jsxs("div",{className:"w-full max-w-md",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"flex items-center justify-center mb-4",children:e.jsx("img",{src:"/static/logo-climb-home.jpg",alt:"CLIMB & HOME",className:"h-14 w-auto rounded-sm"})}),e.jsx("h1",{className:"font-display text-3xl font-bold text-white",children:"¿Olvidaste tu contraseña?"}),e.jsx("p",{className:"text-stone-400 mt-2 text-sm leading-relaxed",children:"Escribe tu correo y te enviamos un enlace para recuperar el acceso."})]}),e.jsx("div",{className:"bg-stone-900 rounded-2xl border border-stone-800 p-8",children:r==="sent"?e.jsxs("div",{className:"flex flex-col items-center gap-5 text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/30 flex items-center justify-center",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"#e8ff4a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-8 h-8","aria-hidden":"true",children:[e.jsx("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),e.jsx("polyline",{points:"22,6 12,13 2,6"})]})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-white font-bold text-xl mb-2",children:"Revisa tu correo"}),e.jsxs("p",{className:"text-stone-300 text-sm leading-relaxed",children:["Si existe una cuenta asociada a ",e.jsx("span",{className:"text-[#e8ff4a] font-semibold",children:l}),", recibirás en breve un enlace para restablecer tu contraseña."]}),e.jsx("p",{className:"text-stone-500 text-xs mt-3",children:"El enlace caduca en 30 minutos. Si no ves el correo, revisa la carpeta de spam."})]}),e.jsx("div",{className:"w-full h-px bg-stone-800"}),e.jsxs("div",{className:"flex flex-col gap-3 w-full",children:[e.jsx(ne,{to:"/login",className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-sm text-center hover:bg-[#f0ff70] transition-colors",children:"Volver al inicio de sesión"}),e.jsx("button",{onClick:()=>{d("idle"),i("")},className:"w-full py-3 rounded-xl border border-stone-700 text-stone-300 font-medium text-sm text-center hover:border-stone-500 hover:text-white transition-colors",children:"Intentar con otro correo"})]})]}):e.jsxs("form",{onSubmit:f,noValidate:!0,className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"reset-email",className:"block text-sm text-stone-300 font-medium mb-2",children:"Tu correo electrónico"}
324),e.jsx("input",{id:"reset-email",type:"email",value:l,onChange:x=>{i(x.target.value),p("")},placeholder:"[email protected]",autoComplete:"email",disabled:r==="loading",className:"w-full px-4 py-3 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a] transition-colors disabled:opacity-50"}),m&&e.jsx("p",{className:"text-red-400 text-xs mt-2",role:"alert",children:m})]}),e.jsx("div",{className:"bg-stone-800/60 border border-stone-700 rounded-xl p-4",children:e.jsxs("div",{className:"flex gap-3 items-start",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"#e8ff4a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-5 h-5 shrink-0 mt-0.5","aria-hidden":"true",children:[e.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),e.jsx("p",{className:"text-stone-400 text-xs leading-relaxed",children:"Por seguridad, siempre verás el mismo mensaje independientemente de si el correo está registrado o no. El enlace es de un solo uso y caduca en 30 minutos."})]})}),e.jsx("button",{type:"submit",disabled:r==="loading",className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-base hover:bg-[#f0ff70] active:scale-[0.98] focus-visible:ring-2 focus-visible:ring-[#e8ff4a] focus-visible:ring-offset-2 focus-visible:ring-offset-stone-900 transition-all disabled:opacity-50",children:r==="loading"?"Enviando…":"Enviar enlace de recuperación"}),e.jsx("div",{className:"text-center",children:e.jsx(ne,{to:"/login",className:"text-stone-400 text-sm hover:text-[#e8ff4a] transition-colors underline underline-offset-2",children:"← Volver al inicio de sesión"})})]})})]})})}function n_(){const[l]=Yl(),i=Za(),r=l.get("token")||"",[d,m]=b.useState(r?"ready":"invalid"),[p,f]=b.useState(""),[x,h]=b.useState(""),[j,g]=b.useState(!1),[v,S]=b.useState(""),N=async _=>{if(_.preventDefault(),S(""),p.length<8){S("La contraseña debe tener al menos 8 caracteres.");return}if(p!==x){S("Las contraseñas no coinciden.");return}m("saving");try{await D.collection("members").confirmPasswordReset(r,p,x),m("done"),setTimeout(()=>i("/login"),2500)}catch(z){m("ready"),(z==null?void 0:z.status)===400?S("El enlace ha caducado o ya fue utilizado. Solicita uno nuevo."):S("No ha sido posible cambiar la contraseña. Inténtalo de nuevo.")}};return d==="invalid"?e.jsx(Su,{children:e.jsxs("div",{className:"flex flex-col items-center gap-5 text-center py-4",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-red-500/10 border border-red-500/30 flex items-center justify-center",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-7 h-7","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-white font-bold text-lg mb-2",children:"Enlace no válido"}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed",children:"Este enlace de recuperación no es válido o ha caducado. Los enlaces tienen una validez de 30 minutos."})]}),e.jsx(ne,{to:"/recuperar-acceso",className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-sm text-center hover:bg-[#f0ff70] transition-colors",children:"Solicitar un nuevo enlace"}),e.jsx(ne,{to:"/login",className:"text-stone-500 text-xs hover:text-[#e8ff4a] transition-colors underline underline-offset-2",children:"Volver al inicio de sesión"})]})}):d==="done"?e.jsx(Su,{children:e.jsxs("div",{className:"flex flex-col items-center gap-5 text-center py-4",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/30 flex items-center justify-center",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"#e8ff4a",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"w-7 h-7","aria-hidden":"true",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-white font-bold text-xl mb-2",children:"¡Contraseña actualizada!"}),e.jsx("p",{className:"text-stone-300 text-sm",children:"Tu acceso está restablecido. Entrando a la sesión…"})]})]})}):e.jsxs(Su,{children:[e.jsxs("div",{className:"flex flex-col gap-1 mb-6",children:[e.jsx("h2",{className:"text-white font-bold text-xl",children:"Elige una nueva contraseña"}),e.jsx("p",{className:"text-stone-400 text-sm",children:"Mínimo 8 caracteres. Solo tú la conocerás."})]}),e.jsxs("form",{onSubmit:N,noValidate:!0,className:"flex flex-col gap-4",children:[e.jsx(Jx,{id:"pw1",label:"Nueva contraseña",value:p,onChange:_=>{f(_.target.value),S("")},show:j,onToggle:()=>g(_=>!_),hint:"Mínimo 8 caracteres",disabled:d==="saving"}),e.jsx(Jx,{id:"pw2",label:"Repite la contraseña",value:x,onChange:_=>{h(_.target.value),S("")},show:j,onToggle:()=>g(_=>!_),disabled:d==="saving"}),v&&e.jsx("p",{className:"text-red-400 text-xs",role:"alert",children:v}),e.jsxs("div",{className:"bg-stone-800/60 border border-stone-700 rounded-xl p-3 flex gap-3 items-start",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"#e8ff4a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4 shrink-0 mt-0.5","aria-hidden":"true",children:[e.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),e.jsx("p",{className:"text-stone-400 text-xs leading-relaxed",children:"Tu contraseña anterior queda anulada en este momento. Solo tú conocerás la nueva."})]}),e.jsx("button",{type:"submit",disabled:d==="saving",className:"w-full py-3 rounded-xl bg-[#e8ff4a] text-stone-950 font-bold text-base hover:bg-[#f0ff70] active:scale-[0.98] focus-visible:ring-2 focus-visible:ring-[#e8ff4a] focus-visible:ring-offset-2 focus-visible:ring-offset-stone-900 transition-all disabled:opacity-50",children:d==="saving"?"Guardando…":"Establecer nueva contraseña"})]})]})}function Su({children:l}){return e.jsx("main",{className:"min-h-screen bg-stone-950 flex items-center justify-center px-4 pt-16 pb-10",children:e.jsxs("div",{className:"w-full max-w-md",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"flex items-center justify-center mb-4",children:e.jsx("img",{src:"/static/logo-climb-home.jpg",alt:"CLIMB & HOME",className:"h-14 w-auto rounded-sm"})}),e.jsx("h1",{className:"font-display text-3xl font-bold text-white",children:"Recuperar acceso"}),e.jsx("p",{className:"text-stone-400 mt-1 text-sm",children:"CLIMB & HOME"})]}),e.jsx("div",{className:"bg-stone-900 rounded-2xl border border-stone-800 p-8",children:l})]})})}function Jx({id:l,label:i,value:r,onChange:d,show:m,onToggle:p,hint:f,disabled:x}){return e.jsxs("div",{children:[e.jsx("label",{htmlFor:l,className:"block text-sm text-stone-300 font-medium mb-1.5",children:i}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:l,type:m?"text":"password",value:r,onChange:d,disabled:x,autoComplete:"new-password",className:"w-full px-4 py-3 pr-12 rounded-xl bg-stone-800 border border-stone-700 text-white placeholder-stone-500 focus:outline-hidden focu
324s:border-[#e8ff4a] transition-colors disabled:opacity-50"}),e.jsx("button",{type:"button",onClick:p,"aria-label":m?"Ocultar contraseña":"Mostrar contraseña",className:"absolute right-3 top-1/2 -translate-y-1/2 text-stone-400 hover:text-[#e8ff4a] transition-colors p-1",children:m?e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-5 h-5",children:[e.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"}),e.jsx("path",{d:"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"}),e.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-5 h-5",children:[e.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]}),f&&e.jsx("p",{className:"text-stone-500 text-xs mt-1",children:f})]})}function o_(){const{user:l}=oa(),i=Za(),[r,d]=b.useState(null),[m,p]=b.useState(!0),[f,x]=b.useState(7),h=["[email protected]","[email protected]","[email protected]"].includes(l==null?void 0:l.email)||["1s8q8wzteyh2fiq","jefdvdav9a1knh5"].includes(l==null?void 0:l.id);if(b.useEffect(()=>{if(!l){i("/login");return}if(!h){i("/");return}},[l,h,i]),b.useEffect(()=>{if(!h)return;const g=new AbortController;async function v(){p(!0);try{const S=new Date;S.setDate(S.getDate()-f);const N=S.toISOString().slice(0,19)+"Z",z=(await D.collection("page_visits").getList(1,5e3,{filter:`created >= "${N}"`,sort:"-created",signal:g.signal})).items,C=z.length,k={};z.forEach(F=>{k[F.page]=(k[F.page]||0)+1});const T=Object.entries(k).sort((F,U)=>U[1]-F[1]).slice(0,10),w={};z.forEach(F=>{w[F.device]=(w[F.device]||0)+1});const A={};z.forEach(F=>{A[F.referrer]=(A[F.referrer]||0)+1});const L=Object.entries(A).sort((F,U)=>U[1]-F[1]).slice(0,8),q={};z.forEach(F=>{var J;const U=(J=F.created)==null?void 0:J.slice(0,10);U&&(q[U]=(q[U]||0)+1)});const H=Object.entries(q).sort((F,U)=>F[0].localeCompare(U[0]));d({total:C,pages:T,byDevice:w,refs:L,days:H})}catch(S){S!=null&&S.isAbort||d(null)}finally{p(!1)}}return v(),()=>g.abort()},[h,f]),!h)return null;const j=r?Math.max(...r.days.map(g=>g[1]),1):1;return e.jsx("div",{className:"min-h-screen bg-stone-950 text-stone-100 pt-20 pb-16 px-4",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"font-display text-4xl sm:text-5xl font-bold text-white mb-2",children:"Estadísticas de visitas"}),e.jsx("p",{className:"text-stone-400",children:"Solo visible para el administrador · CLIMB & HOME"})]}),e.jsx("div",{className:"flex gap-2 mb-8 flex-wrap",children:[7,14,30,90].map(g=>e.jsxs("button",{onClick:()=>x(g),className:`px-4 py-2 rounded-full text-sm font-semibold border transition-colors ${f===g?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"bg-stone-900 text-stone-300 border-stone-700 hover:border-stone-500"}`,children:["Últimos ",g," días"]},g))}),m?e.jsx("div",{className:"text-stone-400 text-center py-16",children:"Cargando estadísticas…"}):r?e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"bg-stone-900 rounded-2xl p-5 border border-stone-800",children:[e.jsx("div",{className:"text-3xl font-bold text-[#e8ff4a]",children:r.total}),e.jsx("div",{className:"text-stone-400 text-sm mt-1",children:"Visitas totales"})]}),e.jsxs("div",{className:"bg-stone-900 rounded-2xl p-5 border border-stone-800",children:[e.jsx("div",{className:"text-3xl font-bold text-white",children:r.pages.length}),e.jsx("div",{className:"text-stone-400 text-sm mt-1",children:"Páginas visitadas"})]}),e.jsxs("div",{className:"bg-stone-900 rounded-2xl p-5 border border-stone-800",children:[e.jsx("div",{className:"text-3xl font-bold text-white",children:r.byDevice.móvil||0}),e.jsx("div",{className:"text-stone-400 text-sm mt-1",children:"Desde móvil"})]}),e.jsxs("div",{className:"bg-stone-900 rounded-2xl p-5 border border-stone-800",children:[e.jsx("div",{className:"text-3xl font-bold text-white",children:r.byDevice.escritorio||0}),e.jsx("div",{className:"text-stone-400 text-sm mt-1",children:"Desde escritorio"})]})]}),r.days.length>0&&e.jsxs("div",{className:"bg-stone-900 rounded-2xl p-6 border border-stone-800",children:[e.jsx("h2",{className:"font-semibold text-white mb-4",children:"Visitas por día"}),e.jsx("div",{className:"flex items-end gap-1.5 h-32",children:r.days.map(([g,v])=>e.jsxs("div",{className:"flex flex-col items-center flex-1 min-w-0 gap-1",children:[e.jsx("div",{className:"w-full bg-[#e8ff4a]/80 rounded-t-sm transition-all",style:{height:`${Math.round(v/j*100)}%`,minHeight:4},title:`${g}: ${v} visitas`}),e.jsx("span",{className:"text-stone-600 text-[9px] rotate-45 origin-left hidden sm:block",children:g.slice(5)})]},g))})]}),e.jsxs("div",{className:"bg-stone-900 rounded-2xl p-6 border border-stone-800",children:[e.jsx("h2",{className:"font-semibold text-white mb-4",children:"Páginas más visitadas"}),e.jsx("div",{className:"space-y-3",children:r.pages.map(([g,v])=>e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex justify-between mb-1",children:[e.jsx("span",{className:"text-stone-200 text-sm font-medium truncate",children:g}),e.jsx("span",{className:"text-stone-400 text-sm ml-2 shrink-0",children:v})]}),e.jsx("div",{className:"h-1.5 bg-stone-800 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-[#e8ff4a] rounded-full",style:{width:`${Math.round(v/r.pages[0][1]*100)}%`}})})]})},g))})]}),r.refs.length>0&&e.jsxs("div",{className:"bg-stone-900 rounded-2xl p-6 border border-stone-800",children:[e.jsx("h2",{className:"font-semibold text-white mb-4",children:"De dónde llegan los visitantes"}),e.jsx("div",{className:"space-y-2",children:r.refs.map(([g,v])=>e.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-stone-800 last:border-0",children:[e.jsx("span",{className:"text-stone-300 text-sm",children:g}),e.jsx("span",{className:"text-[#e8ff4a] font-bold text-sm",children:v})]},g))})]}),e.jsxs("div",{className:"bg-stone-900 rounded-2xl p-6 border border-stone-800",children:[e.jsx("h2",{className:"font-semibold text-white mb-4",children:"Dispositivos"}),e.jsx("div",{className:"flex gap-6 flex-wrap",children:Object.entries(r.byDevice).map(([g,v])=>e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-2xl font-bold text-white",children:v}),e.jsx("div",{className:"text-stone-400 text-sm capitalize",children:g}),e.jsxs("div",{className:"text-stone-600 text-xs",children:[Math.round(v/r.total*100),"%"]})]},g))})]})]}):e.jsx("div",{className:"text-stone-400 text-center py-16",children:"No hay datos aún."})]})})}/**
325 * @license lucide-react v1.47.0 - ISC
326 *
327 * This source code is licensed under the ISC license.
328 * See the LICENSE file in the root directory of this source tree.
329 */const mb={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};mb.node;
329const l_=Ie(mb);/**
330 * @license lucide-react v1.47.0 - ISC
331 *
332 * This source code is licensed under the ISC license.
333 * See the LICENSE file in the root directory of this source tree.
334 */const pb={name:"arrow-left-right",size:24,node:[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]};pb.node;const tm=Ie(pb);/**
335 * @license lucide-react v1.47.0 - ISC
336 *
337 * This source code is licensed under the ISC license.
338 * See the LICENSE file in the root directory of this source tree.
339 */const hb={name:"chart-no-axes-column",size:24,node:[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],aliases:["bar-chart-2"]};hb.node;const sm=Ie(hb);/**
340 * @license lucide-react v1.47.0 - ISC
341 *
342 * This source code is licensed under the ISC license.
343 * See the LICENSE file in the root directory of this source tree.
344 */const fb={name:"gift",size:24,node:[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8",key:"1sqzm4"}],["path",{d:"M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5",key:"kc0143"}],["rect",{x:"3",y:"7",width:"18",height:"4",rx:"1",key:"1hberx"}]]};fb.node;const Jl=Ie(fb);/**
345 * @license lucide-react v1.47.0 - ISC
346 *
347 * This source code is licensed under the ISC license.
348 * See the LICENSE file in the root directory of this source tree.
349 */const xb={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};xb.node;const i_=Ie(xb);/**
350 * @license lucide-react v1.47.0 - ISC
351 *
352 * This source code is licensed under the ISC license.
353 * See the LICENSE file in the root directory of this source tree.
354 */const bb={name:"trending-up",size:24,node:[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]};bb.node;const r_=Ie(bb);/**
355 * @license lucide-react v1.47.0 - ISC
356 *
357 * This source code is licensed under the ISC license.
358 * See the LICENSE file in the root directory of this source tree.
359 */const gb={name:"smartphone",size:24,node:[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]};gb.node;const c_=Ie(gb);/**
360 * @license lucide-react v1.47.0 - ISC
361 *
362 * This source code is licensed under the ISC license.
363 * See the LICENSE file in the root directory of this source tree.
364 */const vb={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};vb.node;const Xx=Ie(vb);/**
365 * @license lucide-react v1.47.0 - ISC
366 *
367 * This source code is licensed under the ISC license.
368 * See the LICENSE file in the root directory of this source tree.
369 */const yb={name:"tablet",size:24,node:[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]};yb.node;const d_=Ie(yb);/**
370 * @license lucide-react v1.47.0 - ISC
371 *
372 * This source code is licensed under the ISC license.
373 * See the LICENSE file in the root directory of this source tree.
374 */const jb={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};jb.node;const _b=Ie(jb);/**
375 * @license lucide-react v1.47.0 - ISC
376 *
377 * This source code is licensed under the ISC license.
378 * See the LICENSE file in the root directory of this source tree.
379 */const Nb={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};Nb.node;const Ho=Ie(Nb);/**
380 * @license lucide-react v1.47.0 - ISC
381 *
382 * This source code is licensed under the ISC license.
383 * See the LICENSE file in the root directory of this source tree.
384 */const wb={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};wb.node;const Sb=Ie(wb);/**
385 * @license lucide-react v1.47.0 - ISC
386 *
387 * This source code is licensed under the ISC license.
388 * See the LICENSE file in the root directory of this source tree.
389 */const Cb={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};Cb.node;const Eb=Ie(Cb);/**
390 * @license lucide-react v1.47.0 - ISC
391 *
392 * This source code is licensed under the ISC license.
393 * See the LICENSE file in the root directory of this source tree.
394 */const zb={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};zb.node;Ie(zb);const Po=[{id:"primeros-pasos",title:"Primeros pasos",emoji:"🚀",intro:"Todo lo que necesitas saber para empezar a gestionar Climb & Home desde el panel de administración.",sections:[{title:"¿Qué es el panel de administración?",content:`El panel de administración es tu centro de control exclusivo para gestionar Climb & Home. Desde aquí puedes ver todos los miembros, casas, intercambios y estadísticas de la plataforma.
395
396Solo tú, como administrador, puedes acceder a él. El icono de gráfica en la barra de navegación te lleva directamente cuando estás conectado con tu cuenta [email protected].`},{title:"Las siete pestañas principales",content:`El panel está organizado en siete secciones accesibles desde la barra de pestañas superior:
397
398• **Resumen** — Vista general con las métricas más importantes, el gráfico de visitas y el embudo de conversión.
399• **Usuarios** — Lista de todos los miembros registrados.
400• **Casas** — Todas las casas publicadas en la plataforma.
401• **Intercambios** — Solicitudes de intercambio entre miembros.
402• **Climbpoints** — Control de puntos y miembros fundadores.
403• **Estadísticas** — Visitas, páginas más vistas, dispositivos y procedencia.
404• **Promociones** — Estado de la campaña «Primeros 100».
405• **Guía del administrador** — Este manual que estás leyendo.`},{title:"Filtro de periodo",content:"En la esquina superior derecha encontrarás botones para filtrar las métricas de visitas por periodo: 7 días, 14 días, 30 días o 90 días. Este filtro afecta al gráfico de visitas y las estadísticas de páginas visitadas, pero no al recuento de miembros, casas o intercambios (que son totales históricos)."}]},{id:"miembros",title:"Miembros",emoji:"👥",intro:"Gestión de los usuarios registrados en Climb & Home.",sections:[{title:"Ver todos los miembros",content:`En la pestaña **Usuarios** encontrarás la tabla completa de todos los miembros registrados, con su nombre, correo, localización, si son miembros fundadores y fecha de registro.
406
407Actualmente la plataforma tiene 7 miembros activos.`},{title:"¿Cómo resetear la contraseña de un miembro?",content:`Si un miembro olvida su contraseña y no puede acceder, el proceso actual es manual:
408
4091. El miembro puede usar el formulario de «Recuperar acceso» en /recuperar-acceso — esto guarda una solicitud de restablecimiento.
4102. Tú recibes la solicitud en la sección de incidencias (próximamente en el panel).
4113. Accede a la herramienta de administración avanzada (URL interna) y camb
411ia la contraseña directamente desde allí.
4124. Comunica la nueva contraseña temporal al miembro por mensaje privado (BocaBoca) o por correo externo.
413
414⚠️ Precaución: solo restablezcas contraseñas cuando hayas verificado la identidad del miembro.`},{title:"¿Cómo eliminar una cuenta?",content:`Para eliminar una cuenta de miembro:
415
4161. Accede a la herramienta de administración avanzada.
4172. Localiza al miembro por nombre o correo.
4183. Antes de eliminar, comprueba que no tiene casas publicadas activas ni intercambios pendientes.
4194. Si tiene casas, desactívalas o transfiere la titularidad primero.
4205. Elimina el registro.
421
422⚠️ Esta acción es irreversible. El miembro perderá todos sus datos, casas, reseñas e intercambios.`},{title:"Asignar badge de Miembro Fundador",content:`Cuando un miembro cumple los requisitos de la campaña «Primeros 100» (perfil completo con foto, localización y casa publicada verificada), puedes marcarle como fundador:
423
4241. Accede a la herramienta de administración avanzada.
4252. Localiza al miembro.
4263. Activa el campo «is_founder» a verdadero.
4274. Opcionalmente, registra el slug de la campaña en «founder_campaign».
428
429El badge «🧗 Miembro Fundador» aparecerá automáticamente en su perfil público.`},{title:"Consentimiento de marketing",content:"Cada miembro puede activar o desactivar el consentimiento para recibir novedades desde su perfil. En la pestaña **Usuarios** del panel puedes ver cuántos miembros lo tienen activado. Esta información es útil para campañas de comunicación."}]},{id:"casas",title:"Casas",emoji:"🏠",intro:"Control de los alojamientos publicados por los miembros.",sections:[{title:"Ver todas las casas",content:"En la pestaña **Casas** verás todas las casas publicadas con su título, propietario, localización y estado (disponible / no disponible). Haciendo clic en el nombre de la casa accedes directamente a su página pública."},{title:"¿Cómo verificar una casa?",content:`Actualmente la verificación es manual. Al revisar una casa comprueba:
430
4311. Que la descripción sea real y coherente con la localización.
4322. Que las fotos sean auténticas (puedes buscar la imagen en Google Imágenes).
4333. Que las áreas de escalada mencionadas sean reales y estén cerca de la localización indicada.
4344. Que la casa tenga coordenadas correctas en el mapa.
435
436Si algo es incorrecto, contacta al propietario por BocaBoca antes de tomar medidas.`},{title:"¿Qué hacer si una casa parece falsa?",content:`Si sospechas que una casa es falsa o engañosa:
437
4381. Revisa el perfil del propietario — ¿tiene foto, localización, bio?
4392. Busca las fotos de la casa en Google Imágenes para detectar imágenes robadas.
4403. Envía un mensaje privado al propietario pidiendo confirmación.
4414. Si no responde en 48h o confirmas el fraude, desactiva la casa desde la herramienta de administración avanzada (campo «available» a falso).
4425. Registra el incidente.
443
444⚠️ No elimines sin antes contactar — podría ser un error involuntario.`},{title:"Coordenadas del mapa",content:`Cada casa tiene coordenadas de latitud y longitud que se calculan automáticamente al publicarla. Si la ubicación en el mapa es incorrecta:
445
4461. Pide al propietario que edite su casa desde su panel y guarde de nuevo.
4472. Si el error persiste, corrígelo manualmente desde la herramienta de administración avanzada (campos «lat» y «lng»).
448
449Puedes obtener las coordenadas correctas desde Google Maps: clic derecho sobre el punto → «¿Qué hay aquí?».`}]},{id:"escuelas",title:"Escuelas y sectores de escalada",emoji:"🧗",intro:"Gestión de las escuelas de escalada y sus sectores en el mapa.",sections:[{title:"¿Cómo funciona el mapa de escuelas?",content:`El mapa muestra dos tipos de marcadores:
450• **Azules** — Casas de miembros publicadas.
451• **Clústeres de escuelas** — Agrupaciones de zonas de escalada organizadas por país y región.
452
453Las escuelas están definidas en el código del mapa y se actualizan con cada nueva versión de la plataforma. Actualmente hay más de 200 escuelas catalogadas en todo el mund
453o.`},{title:"¿Cómo añadir una nueva escuela?",content:`🚧 Próximamente — La gestión de escuelas desde el panel de administración está en desarrollo.
454
455Por ahora, para añadir una nueva escuela o corregir una existente, comunícalo para que se actualice en la próxima versión de la plataforma.`},{title:"¿Qué hacer si una escuela está duplicada?",content:`Si detectas que una escuela aparece duplicada en el mapa:
456
4571. Anota el nombre exacto y las coordenadas de ambas entradas.
4582. Decide cuál es la correcta (verifica en guidebooks o webs especializadas como thecrag.com o 27crags.com).
4593. Comunícalo para eliminar el duplicado en la próxima actualización.
460
461🚧 La edición directa de escuelas desde el panel está en desarrollo.`}]},{id:"mapa",title:"Mapa",emoji:"🗺️",intro:"El mapa es una de las funciones más potentes de Climb & Home para descubrir casas cerca de zonas de escalada.",sections:[{title:"¿Qué muestra el mapa?",content:`El mapa interactivo muestra:
462• **Casas de miembros** — marcadores azules con icono de casa. Al hacer clic se abre una ficha con foto, Climbpoints y enlace al detalle.
463• **Escuelas de escalada** — agrupadas en clústeres por zona. Al hacer zoom se separan en marcadores individuales.
464
465Los visitantes pueden filtrar entre casas y escuelas con los botones de la esquina superior.`},{title:"¿Por qué no aparece una casa en el mapa?",content:`Una casa puede no aparecer en el mapa por dos motivos:
466
4671. **Sin coordenadas** — Las coordenadas lat/lng son 0 o no se calcularon correctamente al publicar. Pide al propietario que edite y guarde de nuevo la casa.
4682. **No disponible** — Solo aparecen en el mapa las casas con «available» activado.`}]},{id:"intercambios",title:"Intercambios",emoji:"🔄",intro:"Las solicitudes de intercambio son el corazón de Climb & Home — aquí es donde se produce el valor real.",sections:[{title:"Cómo funciona el proceso de intercambio",content:`El proceso es entre miembros, sin intervención del administrador:
469
4701. Un miembro envía una solicitud a una casa (estado: **Pendiente**).
4712. El propietario la acepta o rechaza desde su panel (estado: **Aceptada** / **Rechazada**).
4723. A partir de ahí, los miembros se coordinan por BocaBoca (mensajería privada).
473
474Como administrador puedes ver el estado de todas las solicitudes en la pestaña **Intercambios**.`},{title:"¿Cómo devolver Climbpoints por un intercambio cancelado?",content:`🚧 Próximamente — La devolución automática de Climbpoints está en desarrollo.
475
476Por ahora, si un miembro solicita la devolución de Climbpoints por un intercambio que no se completó:
477
4781. Verifica el caso — comprueba el historial de solicitudes.
4792. Ajusta manualmente los Climbpoints del miembro desde la herramienta de administración avanzada (campo «friend_points»).
4803. Notifica al miembro por BocaBoca.`}]},{id:"climbpoints",title:"Climbpoints",emoji:"⭐",intro:"Los Climbpoints son la moneda interna de Climb & Home. Motivan a los miembros a participar y a mantener un perfil completo.",sections:[{title:"¿Cómo funcionan los Climbpoints?",content:`Los Climbpoints (CP) son puntos que los miembros acumulan y usan para solicitar intercambios. Actualmente se gestionan de forma manual para los miembros fundadores.
481
482El campo «friend_points» en cada miembro almacena el saldo actual.`},{title:"Conceder Climbpoints manualmente",content:`Para añadir Climbpoints a un miembro:
483
4841. Accede a la herramienta de administración avanzada.
4852. Localiza el miembro por nombre o correo.
4863. Edita el campo «friend_points» con el nuevo total.
4874. Guarda los cambios.
4885. Notifica al miembro por BocaBoca.
489
490⚠️ Introduce el total actualizado, no la cantidad a añadir. Si tiene 200 y quieres añadir 500, escribe 700.`},{title:"Conceder badge de Miembro Fundador y 500 CP",content:`Cuando un miembro cumple los requisitos de la campaña «Primeros 100»:
491
4921. Verifica que tiene perfil completo (foto, nombre, localización, bio).
4932. Verifica que tiene al menos una casa publicada y activa.
4943. En la herramienta de administración avanzada, activa «is_founder» a verdadero.
4954. Suma 500 al campo «friend_points».
4965. Actualiza «used_slots» en la campaña «founding-100» (incrementa en 1).
4976. Notifica al miembro: ya aparecerá el badge en su perfil.`}]},{id:"promociones",title:"Promociones",emoji:"🎁",intro:"Gestión de las campañas de captación y fidelización de miembros.",sections:[{title:"Campaña «Primeros 100»",content:`La campaña activa es «founding-100»: los primeros 100 miembros que cumplan los requisitos reciben 500 Climbpoints de bienvenida y el badge de Miembro Fundador.
498
499En la pestaña **Promociones** puedes ver el estado en tiempo real: plazas usadas, disponibles, total de CP concedidos y la barra de progreso.`},{title:"Actualizar los slots usados de la campaña",content:`Cada vez que concedes el badge de Miembro Fundador a alguien, debes actualizar manualmente el contador de slots usados:
500
5011. Accede a la herramienta de administración avanzada.
5022. Localiza la colección «campaigns» y el registro «founding-100».
5033. Incrementa «used_slots» en 1.
5044. Guarda.
505
506El panel reflejará el cambio automáticamente.`},{title:"Crear nuevas campañas",content:`🚧 Próximamente — La creación de campañas desde el panel está en desarrollo.
507
508Por ahora, para crear una nueva campaña (por ejemplo, una campaña de primavera con 200 CP por publicar una reseña) comunícalo para añadirla en la próxima actualización.`}]},{id:"resenas",title:"Reseñas y contenidos",emoji:"📝",intro:"Control de calida
508d de las reseñas, croquis y consejos publicados por los miembros.",sections:[{title:"Tipos de contenido generado por miembros",content:`Los miembros pueden publicar:
509• **Reseñas de vías** — en /resenas (visibles públicamente).
510• **Valoraciones de intercambios** — en /valoraciones.
511• **Croquis y topos** — en /croquis (borrosos para visitantes, completos para miembros).
512• **Consejos de escalada** — asociados a una casa.
513• **Biblioteca de la casa** — vías, fotos y rutas asociadas a una casa concreta.`},{title:"¿Qué hacer si hay una reseña problemática?",content:`Si recibes una queja sobre una reseña ofensiva, falsa o inapropiada:
514
5151. Lee la reseña en /resenas.
5162. Si es claramente ofensiva o falsa, elimínala desde la herramienta de administración avanzada (colección «route_reviews»).
5173. Si hay dudas, contacta al autor por BocaBoca para pedir aclaraciones.
5184. Notifica al miembro que realizó la queja del resultado.
519
520⚠️ Antes de eliminar, asegúrate de que realmente incumple las normas de la comunidad.`},{title:"Croquis y topos",content:`Los croquis subidos por los miembros son visibles en /croquis. Los visitantes no registrados ven las imágenes borrosas — solo los miembros registrados pueden verlos con claridad.
521
522Si un croquis está mal clasificado o tiene información incorrecta, el autor puede editarlo desde su panel. Si el autor ya no está activo, puedes eliminarlo desde la herramienta de administración avanzada.`}]},{id:"estadisticas",title:"Estadísticas",emoji:"📊",intro:"Interpretación de los datos de visitas y uso de la plataforma.",sections:[{title:"¿Cómo se registran las visitas?",content:`Cada vez que alguien accede a una página de Climb & Home, el sistema registra automáticamente:
523• La página visitada (Inicio, Casas, Mapa, etc.)
524• El tipo de dispositivo (móvil, escritorio, tablet)
525• El sitio de procedencia (Google, directo, otra web)
526• El país (próximamente — campo preparado pero aún sin datos)
527
528Las visitas del administrador también se registran — si necesitas datos limpios de verdaderos usuarios, ten esto en cuenta.`},{title:"Interpretar el embudo de conversión",content:`El embudo en la pestaña **Resumen** muestra cómo los visitantes se convierten en miembros activos:
529
530Visitantes → Miembros registrados → Casas publicadas → Solicitudes de intercambio → Intercambios confirmados
531
532Si hay muchos visitantes pero pocos registros, el problema está en el mensaje de captación. Si hay registros pero pocas casas, los miembros no están publicando — quizás el proceso es complicado o no ven suficiente comunidad.`},{title:"Páginas más visitadas — qué nos dicen",content:`Las páginas más visitadas son un indicador directo de lo que más interesa a tus usuarios:
533
534• Si **Mapa** tiene muchas visitas pero pocas en **Casas** → el mapa engancha pero la conversión a solicitud falla.
535• Si **Croquis** tiene muchas visitas → el contenido técnico atrae escaladores, una buena señal.
536• Si **Climbpoints** tiene pocas visitas → el sistema de puntos no está siendo descubierto.`}]},{id:"incidencias",title:"Incidencias",emoji:"⚠️",intro:"Guía de actuación para los problemas más habituales.",sections:[{title:"Un miembro olvida su contraseña",content:`1. El miembro puede ir a /recuperar-acceso e introducir su correo. Esto guarda una solicitud.
5372. Tú ves la solicitud en la herramienta de administración avanzada (colección «password_reset_requests»).
5383. Accede al registro del miembro y cambia su contraseña manualmente.
5394. Comunica la nueva contraseña temporal por un canal seguro (BocaBoca o correo externo).
5405. Pide al miembro que la cambie desde su perfil en cuanto entre.`},{title:"Una casa parece falsa o fraudulenta",content:`1. Busca las fotos de la casa en Google Imágenes (clic derecho → «Buscar imagen»).
5412. Verifica que la localización tenga sentido con las áreas de escalada mencionadas.
5423. Envía un mensaje al propietario por BocaBoca explicando la situación.
5434. Si no responde en 48h o confirmas el fraude, desactiva la casa (campo «available» a falso).
5445. Si es reincidente, considera eliminar la cuenta.`},{title:"Hay una reseña problemática",content:`1. Lee la reseña completa en contexto.
5452. Si incumple las normas (ofensas, información falsa, spam), elimín
545ala desde la herramienta de administración avanzada.
5463. Contacta al autor si es un error o malentendido — la mayoría se resuelven con un mensaje amable.
5474. Si el comportamiento es reiterado, considera bloquear la cuenta.`},{title:"Una escuela o ubicación en el mapa es incorrecta",content:`1. Confirma la ubicación correcta en fuentes fiables (thecrag.com, 27crags.com, guidebooks).
5482. Si es una casa, pide al propietario que edite y guarde de nuevo — las coordenadas se recalculan.
5493. Si es una escuela del catálogo, comunícalo para corregirlo en la próxima actualización.`},{title:"Un miembro quiere que le devuelvan Climbpoints",content:`1. Escucha el motivo — ¿hubo un intercambio que no se completó? ¿Un error técnico?
5502. Verifica consultando el historial de solicitudes en la pestaña **Intercambios**.
5513. Si la devolución es justa, ajusta manualmente «friend_points» en el registro del miembro.
5524. Documenta el ajuste anotando el motivo en algún lugar accesible (hoja de cálculo, nota interna).`},{title:"Hay un perfil duplicado del mismo miembro",content:`1. Confirma que realmente son el mismo miembro (mismo nombre, misma localización, correos similares).
5532. Pregunta al miembro cuál quiere conservar.
5543. Antes de eliminar el duplicado, verifica que no tiene casas o intercambios que haya que migrar.
5554. Elimina el perfil vacío o menos completo.`}]},{id:"seguridad",title:"Seguridad",emoji:"🔒",intro:"Buenas prácticas para mantener Climb & Home seguro.",sections:[{title:"Acceso al panel de administración",content:`El panel de administración solo es accesible con la cuenta [email protected]. Nadie más puede verlo.
556
557Buenas prácticas:
558• Usa una contraseña robusta y única para tu cuenta de administrador.
559• No compartas tu contraseña con nadie.
560• Si necesitas que otra persona gestione la plataforma, comunícalo para crear una cuenta de administrador separada.`},{title:"Datos personales de los miembros",content:`Los miembros han dado su consentimiento para que sus datos se usen dentro de la plataforma según la Política de Privacidad. Como administrador:
561
562• Trata los correos y datos personales con discreción.
563• No compartas información de miembros con terceros.
564• Si un miembro solicita la eliminación de sus datos (derecho al olvido RGPD), elimina su cuenta y todos sus contenidos.`},{title:"Herramienta de administración avanzada",content:`La herramienta de administración avanzada te permite editar directamente cualquier dato de la plataforma. Úsala con precaución:
565
566• Haz siempre una copia mental de lo que vas a cambiar antes de guardar.
567• Los cambios son inmediatos y pueden afectar a la experiencia de los miembros.
568• Nunca elimines un campo que no sepas exactamente qué hace.`}]},{id:"configuracion",title:"Configuración",emoji:"⚙️",intro:"Ajustes generales de la plataforma.",sections:[{title:"Publicar cambios en la web",content:"Cuando solicitas un cambio en el diseño o funcionalidad, los cambios se aplican en modo previsualización inmediatamente. Para que sean visibles al público general, necesitas hacer clic en **Publicar** desde el panel de control de la plataforma."},{title:"Cambiar textos o contenidos de la web",content:"Para cambiar cualquier texto, imagen o sección de la web (página de inicio, ayuda, términos, etc.), simplemente descríbelo en el chat y se aplicará el cambio."},{title:"Añadir nuevas funciones",content:`Climb & Home se actualiza continuamente. Para solicitar nuevas funciones:
569
5701. Descríbela en el chat con el máximo detalle posible.
5712. Indica qué problema resuelve o qué mejora aporta.
5723. La función se implementará, probará y publicará.
573
574Las funciones marcadas como 🚧 **Próximamente** en esta guía ya están planificadas.`}]}];function u_(l){if(!l.trim())return[];const i=l.toLowerCase(),r=[];for(const d of Po)for(const m of d.sections){const p=(m.title.toLowerCase().includes(i)?3:0)+(m.content.toLowerCase().includes(i)?1:0)+(d.title.toLowerCase().includes(i)?2:0);p>0&&r.push({chapter:d,section:m,score:p})}return r.sort((d,m)=>m.score-d.score).slice(0,8)}function m_({section:l,highlighted:i}){const[r,d]=b.useState(i);function m(f){return f.split(`
575`).map((x,h)=>{const j=x.split(/\*\*(.*?)\*\*/g);return e.jsx("p",{className:`${x.startsWith("•")?"ml-2":""} ${x.trim()?"mt-1":"mt-2"}`,children:j.map((g,v)=>v%2===1?e.jsx("strong",{className:"text-stone-100 font-semibold",children:g},v):g)},h)})}const p=l.content.includes("🚧 Próximamente");return e.jsxs("div",{className:`border rounded-xl overflow-hidden transition-all ${i?"border-[#e8ff4a]/40 bg-[#e8ff4a]/5":"border-stone-800 bg-stone-900"}`,children:[e.jsxs("button",{onClick:()=>d(f=>!f),className:"w-full flex items-center justify-between px-5 py-4 text-left hover:bg-stone-800/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[p&&e.jsx(Sb,{className:"w-4 h-4 text-stone-500 shrink-0"}),e.jsx("span",{className:`font-semibold text-sm ${i?"text-[#e8ff4a]":"text-stone-200"}`,children:l.title})]}),r?e.jsx(Ko,{className:"w-4 h-4 text-stone-400 shrink-0"}):e.jsx(Ql,{className:"w-4 h-4 text-stone-400 shrink-0"})]}),r&&e.jsx("div",{className:"px-5 pb-5 text-stone-400 text-sm leading-relaxed",children:m(l.content)})]})}function p_({chapter:l,activeSection:i}){return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("h2",{className:"text-white font-bold text-xl flex items-center gap-2",children:[e.jsx("span",{children:l.emoji})," ",l.title]}),e.jsx("p",{className:"text-stone-400 text-sm mt-1",children:l.intro})]}),e.jsx("div",{className:"space-y-2",children:l.sections.map((r,d)=>e.jsx(m_,{section:r,highlighted:r.title===i},d))})]})}function kb({initialChapter:l,initialSection:i,onClose:r}){const[d,m]=b.useState(l||Po[0].id),[p,f]=b.useState(""),[x,h]=b.useState([]),j=b.useRef(),g=Po.find(N=>N.id===d)||Po[0];function v(N){const _=N.target.value;
575f(_),h(u_(_))}function S(N,_){f(""),h([]),m(N)}return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 sm:px-6 py-4 border-b border-stone-800 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Zn,{className:"w-5 h-5 text-[#e8ff4a]"}),e.jsx("h1",{className:"font-display text-xl font-bold text-white",children:"Guía del administrador"})]}),r&&e.jsx("button",{onClick:r,className:"text-stone-400 hover:text-white transition-colors p-1",children:e.jsx(_t,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"px-4 sm:px-6 py-3 border-b border-stone-800 shrink-0",children:[e.jsxs("div",{className:"relative",children:[e.jsx(vs,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-stone-500"}),e.jsx("input",{ref:j,type:"text",value:p,onChange:v,placeholder:"Busca: cambiar Climbpoints, eliminar casa, bloquear usuario…",className:"w-full bg-stone-800 border border-stone-700 rounded-xl pl-9 pr-4 py-2.5 text-sm text-stone-200 placeholder-stone-500 focus:outline-hidden focus:border-[#e8ff4a]/50 transition-colors"})]}),p&&x.length>0&&e.jsx("div",{className:"mt-2 bg-stone-800 border border-stone-700 rounded-xl overflow-hidden",children:x.map(({chapter:N,section:_},z)=>e.jsxs("button",{onClick:()=>S(N.id,_.title),className:"w-full text-left px-4 py-3 hover:bg-stone-700 transition-colors border-b border-stone-700/50 last:border-0",children:[e.jsx("div",{className:"text-stone-200 text-sm font-medium",children:_.title}),e.jsxs("div",{className:"text-stone-500 text-xs",children:[N.emoji," ",N.title]})]},z))}),p&&x.length===0&&e.jsx("div",{className:"mt-2 text-stone-500 text-sm px-1",children:"No encontrado. Prueba con otras palabras."})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx("nav",{className:"hidden sm:flex flex-col w-52 shrink-0 border-r border-stone-800 overflow-y-auto py-3",children:Po.map(N=>e.jsxs("button",{onClick:()=>m(N.id),className:`flex items-center gap-2 text-left px-4 py-2.5 text-sm transition-colors ${d===N.id?"text-[#e8ff4a] bg-[#e8ff4a]/10 font-semibold":"text-stone-400 hover:text-stone-200 hover:bg-stone-800/50"}`,children:[e.jsx("span",{className:"text-base",children:N.emoji}),e.jsx("span",{className:"leading-tight",children:N.title})]},N.id))}),e.jsx("div",{className:"sm:hidden w-full absolute",style:{display:"none"}}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-4 sm:px-6 py-5",children:[e.jsx("div",{className:"sm:hidden flex gap-2 mb-5 overflow-x-auto pb-1",children:Po.map(N=>e.jsxs("button",{onClick:()=>m(N.id),className:`shrink-0 px-3 py-1.5 rounded-full text-xs font-semibold border transition-colors ${d===N.id?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"border-stone-700 text-stone-400 hover:border-stone-500"}`,children:[N.emoji," ",N.title]},N.id))}),e.jsx(p_,{chapter:g,activeSection:i})]})]})]})}function h_({open:l,onClose:i,chapter:r,section:d}){return l?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-xs",onClick:i}),e.jsx("div",{className:"relative w-full max-w-3xl h-[80vh] bg-stone-950 border border-stone-800 rounded-2xl flex flex-col overflow-hidden shadow-2xl",children:e.jsx(kb,{initialChapter:r,initialSection:d,onClose:i})})]}):null}function fn({chapter:l,section:i,label:r}){const[d,m]=b.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>m(!0),title:r||"Ayuda sobre esta sección",className:"inline-flex items-center gap-1 text-xs text-stone-500 hover:text-[#e8ff4a] transition-colors px-2 py-1 rounded-lg hover:bg-stone-800 border border-stone-800 hover:border-stone-600",children:[e.jsx(Zn,{className:"w-3 h-3"}),r||"?"]}),e.jsx(h_,{open:d,onClose:()=>m(!1),chapter:l,section:i})]})}const f_=["[email protected]","[email protected]"],x_=["1s8q8wzteyh2fiq","jefdvdav9a1knh5"];function fa({label:l,value:i,sub:r,accent:d,icon:m}){return e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5 flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("span",{className:"text-stone-400 text-sm leading-tight",children:l}),m&&e.jsx(m,{className:"w-4 h-4 text-stone-600 shrink-0"})]}),e.jsx("div",{className:`text-3xl font-display font-bold ${d?"text-[#e8ff4a]":"text-white"}`,children:i??"—"}),r&&e.jsx("div",{className:"text-stone-500 text-xs",children:r})]})}function b_({label:l,active:i,onClick:r,icon:d}){return e.jsxs("button",{onClick:r,className:`flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-semibold whitespace-nowrap transition-all ${i?"bg-[#e8ff4a] text-stone-950":"text-stone-400 hover:text-white hover:bg-stone-800"}`,children:[d&&e.jsx(d,{className:"w-4 h-4"}),l]})}function g_({data:l}){const{members:i,homes:r,requests:d,campaign:m,visits:p}=l,f=p.length,x=new Set(p.map(C=>{var k;return C.referrer+C.device+((k=C.page)==null?void 0:k.slice(0,5))})).size,h={};p.forEach(C=>{h[C.device]=(h[C.device]||0)+1});const j=Math.max(...p.reduce((C,k)=>{var A;const T=(A=k.created)==null?void 0:A.slice(0,10);if(!T)return C;const w=C.findIndex(L=>L[0]===T);return w>=0?C[w][1]++:C.push([T,1]),C},[]).map(C=>C[1]),1),g={};p.forEach(C=>{var T;
575const k=(T=C.created)==null?void 0:T.slice(0,10);k&&(g[k]=(g[k]||0)+1)});const v=Object.entries(g).sort((C,k)=>C[0].localeCompare(k[0])),S=d.filter(C=>C.status==="accepted").length,N=d.filter(C=>C.status==="pending").length,_=[{label:"Visitantes",value:f||p.length,color:"bg-stone-600"},{label:"Miembros",value:i.length,color:"bg-stone-500"},{label:"Casas publicadas",value:r.length,color:"bg-stone-400"},{label:"Solicitudes",value:d.length,color:"bg-[#e8ff4a]/60"},{label:"Intercambios confirmados",value:S,color:"bg-[#e8ff4a]"}],z=_[0].value||1;return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-4",children:[e.jsx(fa,{label:"Visitas / Sesiones",value:f,accent:!0,icon:sm,sub:"Páginas vistas en el periodo"}),e.jsx(fa,{label:"Visitantes únicos (est.)",value:x,icon:ut,sub:"Estimado por huella de sesión"}),e.jsx(fa,{label:"Nuevos miembros",value:i.length,icon:ut,sub:"Registros totales"}),e.jsx(fa,{label:"Casas publicadas",value:r.length,icon:gs,sub:"Alojamientos activos"}),e.jsx(fa,{label:"Solicitudes de intercambio",value:d.length,icon:tm,sub:`${N} pendientes`}),e.jsx(fa,{label:"Intercambios confirmados",value:S,icon:Ho,sub:"Estado: aceptado"})]}),v.length>0?e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h2",{className:"text-white font-semibold mb-4",children:"Evolución diaria de visitas"}),e.jsx("div",{className:"flex items-end gap-1 h-28",children:v.map(([C,k])=>e.jsxs("div",{className:"flex flex-col items-center flex-1 min-w-0 gap-1",title:`${C}: ${k}`,children:[e.jsx("div",{className:"w-full bg-[#e8ff4a]/80 rounded-t-xs transition-all",style:{height:`${Math.round(k/j*100)}%`,minHeight:3}}),e.jsx("span",{className:"text-stone-600 text-[8px] hidden sm:block",children:C.slice(5)})]},C))})]}):e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h2",{className:"text-white font-semibold mb-2",children:"Evolución diaria de visitas"}),e.jsx("p",{className:"text-stone-500 text-sm",children:"Aún no hay visitas registradas en este periodo."})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h2",{className:"text-white font-semibold mb-5",children:"Embudo de conversión"}),e.jsx("div",{className:"space-y-3",children:_.map(({label:C,value:k,color:T},w)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-32 text-stone-400 text-xs text-right shrink-0",children:C}),e.jsx("div",{className:"flex-1 bg-stone-800 rounded-full h-6 overflow-hidden",children:e.jsx("div",{className:`h-full ${T} rounded-full flex items-center justify-end pr-3 transition-all`,style:{width:`${Math.max(4,Math.round(k/z*100))}%`},children:e.jsx("span",{className:"text-xs font-bold text-stone-950",children:k})})}),w<_.length-1&&_[w+1].value>0&&k>0&&e.jsxs("div",{className:"text-stone-500 text-xs w-12 shrink-0",children:[Math.round(_[w+1].value/k*100),"%"]})]},C))})]}),m&&e.jsxs("div",{className:"bg-stone-900 border border-[#e8ff4a]/30 rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(Jl,{className:"w-5 h-5 text-[#e8ff4a]"}),e.jsx("h2",{className:"text-white font-semibold",children:"Promoción «Primeros 100»"}),e.jsx("span",{className:`ml-auto text-xs px-2 py-0.5 rounded-full font-semibold ${m.active?"bg-green-900 text-green-300":"bg-stone-800 text-stone-400"}`,children:m.active?"Activa":"Inactiva"})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-4",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-display font-bold text-[#e8ff4a]",children:[m.used_slots," / ",m.max_slots]}),e.jsx("div",{className:"text-stone-400 text-xs mt-1",children:"Miembros fundadores"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-3xl font-display font-bold text-white",children:i.filter(C=>C.is_founder).length}),e.jsx("div",{className:"text-stone-400 text-xs mt-1",children:"Casas fundadoras"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-3xl font-display font-bold text-white",children:m.used_slots*m.points}),e.jsx("div",{className:"text-stone-400 text-xs mt-1",children:"Climbpoints concedidos"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-3xl font-display font-bold text-white",children:m.max_slots-m.used_slots}),e.jsx("div",{className:"text-stone-400 text-xs mt-1",children:"Plazas disponibles"})]})]}),e.jsx("div",{className:"bg-stone-800 rounded-full h-3 overflow-hidden",children:e.jsx("div",{className:"h-full bg-[#e8ff4a] rounded-full transition-all",style:{width:`${Math.round(m.used_slots/m.max_slots*100)}%`}})}),e.jsxs("div",{className:"text-stone-500 text-xs mt-2 text-right",children:[Math.round(m.used_slots/m.max_slots*100),"% completado"]})]})]})}function v_({members:l}){const[i,r]=b.useState(l),[d,m]=b.useState(null),[p,f]=b.useState(null);b.useEffect(()=>{r(l)},[l]);const x=async h=>{if(p!==h.id){f(h.id);return}m(h.id);try{await D.collection("members").delete(h.id),r(j=>j.filter(g=>g.id!==h.id))}catch(j){alert("No se ha podido borrar: "+(j.message||j))}finally{m(null),f(null)}};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-4 mb-6",children:[e.jsx(fa,{label:"Total miembros",value:i.length,accent:!0,icon:ut}),e.jsx(fa,{label:"Miembros fundadores",value:i.filter(h=>h.is_founder).length,icon:Jl}),e.jsx(fa,{label:"Con consentimiento marketing",value:i.filter(h=>h.marketing_consent).length,icon:Ho})]}),e.jsx("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-stone-800",children:[e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3",children:"Nombre"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3 hidden sm:table-cell",children:"Correo"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3 hidden md:table-cell",children:"Localización"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3",children:"Fundador"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3 hidden sm:table-cell",children:"Registro"}),e.jsx("th",{className:"px-4 py-3"})]})}),e.jsx("tbody",{children:i.map(h=>{var j;return e.jsxs("tr",{className:"border-b border-stone-800/50 hover:bg-stone-800/30 transition-colors",children:[e.jsx("td",{className:"px-4 py-3 text-stone-200 font-medium",children:h.name||e.jsx("span",{className:"text-stone-500",children:"Sin nombre"})}),e.jsx("td",{className:"px-4 py-3 text-stone-400 hidden sm:table-cell",style:{wordBreak:"break-all",minWidth:"160px"},children:h.email}),e.jsx("td",{className:"px-4 py-3 text-stone-400 hidden md:table-cell",children:h.location||"—"}),e.jsx("td",{className:"px-4 py-3",children:h.is_founder?e.jsx("span",{className:"text-xs bg-[#e8ff4a]/20 text-[#e8ff4a] px-2 py-0.5 rounded-full font-semibold",children:"Fundador"}):e.jsx("span",{className:"text-stone-600",children:"—"})}),e.jsx("td",{className:"px-4 py-3 text-stone-500 hidden sm:table-cell",children:(j=h.created)==null?void 0:j.slice(0,10)}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("button",{onClick:()=>x(h),disabled:d===h.id,className:`text-xs px-3 py-1 rounded-full border transition-colors ${p===h.id?"bg-red-600 border-red-500 text-white font-bold":"border-stone-700 text-stone-500 hover:border-red-700 hover:text-red-400"}`,children:d===h.id?"Borrando…":p===h.id?"¿Seguro?":"Borrar"})})]}
575,h.id)})})]})})]})}function y_({members:l}){var m,p,f;const i=l.filter(x=>x.disponible_escalar&&x.lat&&x.lng),[r,d]=b.useState(null);if(r){const x=l.find(h=>h.id===r);return x?e.jsxs("div",{children:[e.jsx("button",{onClick:()=>d(null),className:"mb-6 px-4 py-2 bg-stone-800 hover:bg-stone-700 text-stone-300 rounded-lg text-sm font-medium transition-colors",children:"← Volver"}),e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:e.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[x.avatar&&e.jsx("img",{src:`https://pb.climbandhome.com/api/files/${x.collectionId}/${x.id}/${x.avatar}`,alt:x.name,className:"w-16 h-16 rounded-full object-cover bg-stone-800"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h2",{className:"text-2xl font-bold text-white",children:x.name||"Sin nombre"}),e.jsx("p",{className:"text-stone-400 text-sm mt-1",children:x.email}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[x.is_founder&&e.jsx("span",{className:"text-xs bg-[#e8ff4a]/20 text-[#e8ff4a] px-2 py-1 rounded-full font-semibold",children:"🧗 Fundador"}),x.disponible_escalar&&e.jsx("span",{className:"text-xs bg-green-900/40 text-green-300 px-2 py-1 rounded-full font-semibold",children:"🧗 Disponible para escalar"}),x.compañero_cordada&&e.jsx("span",{className:"text-xs bg-blue-900/40 text-blue-300 px-2 py-1 rounded-full font-semibold",children:"🤝 Compañero de cordada"})]})]})]})}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h3",{className:"text-lg font-bold text-white mb-4",children:"Información personal"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-400 text-sm",children:"Municipio"}),e.jsx("p",{className:"text-white font-medium",children:x.municipality||"—"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-400 text-sm",children:"Provincia / Región"}),e.jsx("p",{className:"text-white font-medium",children:x.province||"—"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-400 text-sm",children:"País"}),e.jsx("p",{className:"text-white font-medium",children:x.country_code||"—"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-400 text-sm",children:"Ubicación GPS"}),e.jsx("p",{className:"text-white font-medium",children:x.lat&&x.lng?`${x.lat.toFixed(4)}, ${x.lng.toFixed(4)}`:"—"})]})]})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h3",{className:"text-lg font-bold text-white mb-4",children:"Escalada"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-400 text-sm",children:"Nivel"}),e.jsx("p",{className:"text-white font-medium",children:x.climbing_level||"—"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-400 text-sm",children:"Estilos"}),e.jsx("p",{className:"text-white font-medium",children:((m=x.climbing_styles)==null?void 0:m.join(", "))||"—"})]}),e.jsxs("div",{className:"col-span-full",children:[e.jsx("p",{className:"text-stone-400 text-sm",children:"Zonas habituales"}),e.jsx("p",{className:"text-white font-medium",children:x.zonas_habituales||"—"})]})]})]}),x.bio&&e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h3",{className:"text-lg font-bold text-white mb-4",children:"Bio"}),e.jsx("p",{className:"text-stone-300 text-sm whitespace-pre-wrap",children:x.bio})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h3",{className:"text-lg font-bold text-white mb-4",children:"Participación en cordada"}),e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-stone-400",children:"Disponible como compañero"}),e.jsx("span",{className:x.compañero_cordada?"text-green-400":"text-stone-500",children:x.compañero_cordada?"✓ Sí":"✗ No"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-stone-400",children:"Disponible para escalar"}),e.jsx("span",{className:x.disponible_escalar?"text-green-400":"text-stone-500",children:x.disponible_escalar?"✓ Sí":"✗ No"})]})]})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h3",{className:"text-lg font-bold text-white mb-4",children:"Consentimientos"}),e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-stone-400",children:"Términos y condiciones"}),e.jsx("span",{className:"text-green-400",children:"✓ Aceptado"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-stone-400",children:"Marketing"}),e.jsx("span",{className:x.marketing_consent?"text-green-400":"text-stone-500",children:x.marketing_consent?"✓ Aceptado":"✗ No aceptado"})]})]})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h3",{className:"text-lg font-bold text-white mb-4",children:"Fechas"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-400",children:"Registro"}),e.jsx("p",{className:"text-white font-medium",children:((p=x.created)==null?void 0:p.slice(0,10))||"—"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-400",children:"Última actualización"}),e.jsx("p",{className:"text-white font-medium",children:((f=x.updated)==null?void 0:f.slice(0,10))||"—"})]})]})]})]})]}):(d(null),null)}return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-4 mb-6",children:[e.jsx(fa,{label:"Escaladores disponibles",value:i.length,accent:!0,icon:ut}),e.jsx(fa,{label:"Con ubicación GPS",value:i.filter(x=>x.lat&&x.lng).length,icon:ya}),e.jsx(fa,{label:"Total miembros",value:l.length,icon:ut})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden",children:[e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-stone-800",children:[e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3",children:"Nombre"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3 hidden sm:table-cell",children:"Correo"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3",children:"Zonas favoritas"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3 hidden md:table-cell",children:"Ubicación GPS"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3 hidden sm:table-cell",children:"Registro"})]})}),e.jsx("tbody",{children:i.map(x=>{var h;return e.jsxs("tr",{onClick:()=>d(x.id),className:"border-b border-stone-800/50 hover:bg-stone-800/30 transition-colors cursor-pointer",children:[e.jsx("td",{className:"px-4 py-3 text-stone-200 font-medium",children:x.name||e.jsx("span",{className:"text-stone-500",children:"Sin nombre"})}),e.jsx("td",{className:"px-4 py-3 text-stone-400 hidden sm:table-cell text-xs",style:{wordBreak:"break-all",minWidth:"140px"},children:x.email}),e.jsx("td",{className:"px-4 py-3 text-stone-300 text-xs",children:x.zonas_habituales||"—"}),e.jsx("td",{className:"px-4 py-3 text-stone-400 hidden md:table-cell text-xs",children:x.lat&&x.lng?`${x.lat.toFixed(3)}, ${x.lng.toFixed(3)}`:"—"}),e.jsx("td",{className:"px-4 py-3 text-stone-500 hidden sm:table-cell text-xs",children:(h=x.created)==null?void 0:h.slice(0,10)})]},x.id)})})]}),i.length===0&&e.jsx("div",{className:"px-4 py-8 text-center text-stone-500 text-sm",children:"Sin escaladores disponibles aún"})]})]})}function j_({homes:l,members:i,requests:r}){const d=p=>{const f=i.find(x=>x.id===p);return(f==null?void 0:f.name)||(f==null?void 0:f.email)||p},m=p=>{const f=r.filter(x=>x.to_home===p);return f.some(x=>x.status==="ongoing")?{label:"En curso",cls:"bg-blue-900/40 text-blue-300"}:f.some(x=>x.status==="preapproved")?{label:"Preaprobada",cls:"bg-purple-900/40 text-purple-300"}:f.some(x=>x.status==="pending")?{label:"Solicitud pendiente",cls:"bg-yellow-900/40 text-yellow-400"}:f.some(x=>x.status==="finished")?{label:"Finalizado",cls:"bg-stone-700 text-stone-400"}:null};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-4 mb-6",children:[e.jsx(fa,{label:"Casas publicadas",value:l.length,accent:!0,icon:gs}),e.jsx(fa,{label:"Disponibles ahora",value:l.filter(p=>p.available).length,icon:Ho}),e.jsx(fa,{label:"No disponibles",value:l.filter(p=>!p.available).length,icon:Eb})]}),e.jsx("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-stone-800",children:[e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3",children:"Casa"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3 hidden sm:table-cell",children:"Propietario"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3 hidden md:table-cell",children:"Localización"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3",children:"Disponibilidad"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3",children:"Intercambio"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3 hidden sm:table-cell",children:"Publicada"})]})}),e.jsx("tbody",{children:l.map(p=>{var x;const f=m(p.id);return e.jsxs("tr",{className:"border-b border-stone-800/50 hover:bg-stone-800/30 transition-colors",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs(ne,{to:`/homes/${p.id}`,className:"text-stone-200 font-medium hover:text-[#e8ff4a] flex items-center gap-1",children:[p.title,e.jsx(_b,{className:"w-3 h-3 opacity-50"})]})}),e.jsx("td",{className:"px-4 py-3 text-stone-400 hidden sm:table-cell",children:d(p.owner)}),e.jsx("td",{className:"px-4 py-3 text-stone-400 hidden md:table-cell",children:p.location||"—"}),e.jsx("td",{className:"px-4 py-3",children:p.available?e.jsx("span",{className:"text-xs bg-green-900/40 text-green-400 px-2 py-0.5 rounded-full",children:"Disponible"}):e.jsx("span",{className:"text-xs bg-stone-800 text-stone-400 px-2 py-0.5 rounded-full",children:"No disponible"})}),e.jsx("td",{className:"px-4 py-3",children:f?e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-semibold ${f.cls}`,children:f.label}):e.jsx("span",{className:"text-stone-600 text-xs",children:"—"})}),e.jsx("td",{className:"px-4 py-3 text-stone-500 hidden sm:table-cell",children:(x=p.created)==null?void 0:x.slice(0,10)})]}
575,p.id)})})]})})]})}function __({requests:l,homes:i,members:r}){const[d,m]=b.useState("all"),[p,f]=b.useState({}),[x,h]=b.useState({}),[j,g]=b.useState({}),[v,S]=b.useState({});b.useEffect(()=>{D.collection("exchange_notes").getFullList({sort:"created"}).then(w=>{const A={};w.forEach(L=>{A[L.exchange_id]||(A[L.exchange_id]=[]),A[L.exchange_id].push(L)}),f(A)}).catch(()=>{})},[]);const N=async w=>{const A=(x[w]||"").trim();if(A){g(L=>({...L,[w]:!0}));try{const L=await D.collection("exchange_notes").create({exchange_id:w,note:A,created_by:"admin"});f(q=>({...q,[w]:[...q[w]||[],L]})),h(q=>({...q,[w]:""}))}catch(L){console.error(L)}g(L=>({...L,[w]:!1}))}},_=async(w,A)=>{try{await D.collection("exchange_notes").delete(A),f(L=>({...L,[w]:(L[w]||[]).filter(q=>q.id!==A)}))}catch(L){console.error(L)}},z={pending:"bg-yellow-900/40 text-yellow-400",preapproved:"bg-purple-900/40 text-purple-300",ongoing:"bg-blue-900/40 text-blue-300",accepted:"bg-green-900/40 text-green-400",finished:"bg-stone-700 text-stone-300",declined:"bg-red-900/40 text-red-400"},C={pending:"Pendiente",preapproved:"Preaprobada",ongoing:"En curso",accepted:"Confirmada",finished:"Finalizada",declined:"Rechazada"},k=["all","pending","preapproved","ongoing","accepted","finished","declined"],T=d==="all"?l:l.filter(w=>w.status===d);return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-3 mb-6",children:[e.jsx(fa,{label:"Total",value:l.length,accent:!0,icon:tm}),e.jsx(fa,{label:"Pendientes",value:l.filter(w=>w.status==="pending").length,icon:Sb}),e.jsx(fa,{label:"Preaprobadas",value:l.filter(w=>w.status==="preapproved").length,icon:Ho}),e.jsx(fa,{label:"En curso",value:l.filter(w=>w.status==="ongoing").length,icon:Ho}),e.jsx(fa,{label:"Finalizadas",value:l.filter(w=>w.status==="finished").length,icon:Ho}),e.jsx(fa,{label:"Rechazadas",value:l.filter(w=>w.status==="declined").length,icon:Eb})]}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:k.map(w=>e.jsxs("button",{onClick:()=>m(w),className:`text-xs px-3 py-1.5 rounded-full font-medium transition-colors border ${d===w?"bg-[#e8ff4a] text-stone-900 border-[#e8ff4a]":"border-stone-700 text-stone-400 hover:border-stone-500"}`,children:[w==="all"?"Todas":C[w],w!=="all"&&e.jsxs("span",{className:"ml-1 opacity-60",children:["(",l.filter(A=>A.status===w).length,")"]})]},w))}),T.length===0?e.jsx("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-8 text-center text-stone-500",children:d==="all"?"Aún no hay solicitudes de intercambio.":`No hay solicitudes con estado "${C[d]}".`}):e.jsx("div",{className:"space-y-3",children:T.map(w=>{var H,F,U,J;const A=((H=w.expand)==null?void 0:H.from_member)||r.find(O=>O.id===w.from_member),L=((F=w.expand)==null?void 0:F.to_home)||i.find(O=>O.id===w.to_home),q=r.find(O=>O.id===(L==null?void 0:L.owner));return e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-4 sm:p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[e.jsx("span",{className:`text-xs px-2.5 py-1 rounded-full font-semibold ${z[w.status]||"bg-stone-800 text-stone-400"}`,children:C[w.status]||w.status}),e.jsxs("span",{className:"text-xs text-stone-500",children:["ID: ",e.jsx("span",{className:"font-mono text-stone-400",children:w.id})," · ",(U=w.created)==null?void 0:U.slice(0,10)]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-stone-800/50 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-stone-500 mb-1 uppercase tracking-wide",children:"Solicitante"}),e.jsx("p",{className:"text-stone-100 font-medium",children:(A==null?void 0:A.name)||w.from_member}),(A==null?void 0:A.email)&&e.jsx("p",{className:"text-stone-400 text-xs mt-0.5",children:A.email}),(A==null?void 0:A.location)&&e.jsx("p",{className:"text-stone-500 text-xs",children:A.location})]}),e.jsxs("div",{className:"bg-stone-800/50 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-stone-500 mb-1 uppercase tracking-wide",children:"Anfitrión"}),e.jsx("p",{className:"text-stone-100 font-medium",children:(q==null?void 0:q.name)||"—"}),(q==null?void 0:q.email)&&e.jsx("p",{className:"text-stone-400 text-xs mt-0.5",children:q.email}),(q==null?void 0:q.location)&&e.jsx("p",{className:"text-stone-500 text-xs",children:q.location})]})]}),e.jsxs("div",{className:"bg-stone-800/30 rounded-xl p-3 flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-stone-500 mb-1 uppercase tracking-wide",children:"Casa solicitada"}),e.jsx("p",{className:"text-stone-200 font-medium",children:(L==null?void 0:L.title)||w.to_home}),(L==null?void 0:L.location)&&e.jsxs("p",{className:"text-stone-400 text-xs",children:[L.location,L.country?`, ${L.country}`:""]}),(L==null?void 0:L.climbing_areas)&&e.jsx("p",{className:"text-stone-500 text-xs",children:L.climbing_areas})]}),L&&e.jsxs(ne,{to:`/homes/${w.to_home}`,className:"shrink-0 text-xs text-[#e8ff4a] hover:underline flex items-center gap-1 mt-1",children:["Ver casa ",e.jsx(_b,{className:"w-3 h-3"})]})]}),w.message&&e.jsxs("div",{className:"bg-stone-800/20 rounded-xl p-3 border border-stone-800",children:[e.jsx("p",{className:"text-xs text-stone-500 mb-1 uppercase tracking-wide",children:"Mensaje del solicitante"}),e.jsx("p",{className:"text-stone-300 text-sm leading-relaxed",children:w.message})]}),(w.date_from||w.date_to)&&e.jsxs("div",{className:"flex gap-4 text-sm",children:[w.date_from&&e.jsxs("span",{className:"text-stone-400",children:["Entrada: ",e.jsx("span",{className:"text-stone-200",children:w.date_from})]}),w.date_to&&e.jsxs("span",{className:"text-stone-400",children:["Salida: ",e.jsx("span",{className:"text-stone-200",children:w.date_to})]}),w.guests&&e.jsxs("span",{className:"text-stone-400",children:["Personas: ",e.jsx("span",{className:"text-stone-200",children:w.guests})]})]}),e.jsxs("div",{className:"border-t border-stone-800 pt-3",children:[e.jsxs("button",{onClick:()=>S(O=>({...O,[w.id]:!O[w.id]})),className:"flex items-center gap-2 text-xs text-stone-400 hover:text-stone-200 transition-colors",children:[e.jsx("span",{className:"text-base",children:"📋"}),"Notas internas / incidencias",((J=p[w.id])==null?void 0:J.length)>0&&e.jsx("span",{className:"bg-[#e8ff4a] text-stone-950 text-[10px] font-bold px-1.5 py-0.5 rounded-full",children:p[w.id].length}),e.jsx("span",{className:"ml-1",children:v[w.id]?"▲":"▼"})]}),v[w.id]&&e.jsxs("div",{className:"mt-3 space-y-2",children:[(p[w.id]||[]).length===0&&e.jsx("p",{className:"text-xs text-stone-600 italic",children:"Sin notas aún."}),(p[w.id]||[]).map(O=>{var X;return e.jsxs("div",{className:"bg-stone-800/40 rounded-lg p-3 flex items-start justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-stone-200 text-sm leading-relaxed",children:O.note}),e.jsx("p",{className:"text-stone-600 text-xs mt-1",children:(X=O.created)==null?void 0:X.slice(0,16).replace("T"," ")})]}),e.jsx("button",{onClick:()=>_(w.id,O.id),className:"shrink-0 text-stone-600 hover:text-red-400 transition-colors text-xs",title:"Eliminar nota",children:"✕"})]},O.id)}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx("input",{type:"text",value:x[w.id]||"",onChange:O=>h(X=>({...X,[w.id]:O.target.value})),onKeyDown:O=>O.key==="Enter"&&N(w.id),placeholder:"Añadir nota o incidencia…",className:"flex-1 bg-stone-800 border border-stone-700 rounded-lg px-3 py-2 text-sm text-stone-100 placeholder-stone-600 focus:outline-hidden focu
575s:border-[#e8ff4a]"}),e.jsx("button",{onClick:()=>N(w.id),disabled:j[w.id]||!(x[w.id]||"").trim(),className:"bg-[#e8ff4a] text-stone-950 font-semibold text-xs px-3 py-2 rounded-lg hover:bg-[#d4eb3a] disabled:opacity-40 transition-colors",children:j[w.id]?"…":"Guardar"})]})]})]})]},w.id)})})]})}function N_(){const[l,i]=b.useState([]),[r,d]=b.useState(!1),[m,p]=b.useState(null);b.useEffect(()=>{D.collection("pending_emails").getList(1,50,{sort:"-created"}).then(g=>i(g.items)).catch(()=>{})},[m]);const f=async()=>{d(!0),p(null);const g=l.filter(N=>N.status==="pending");let v=0,S=0;for(const N of g)try{await D.collection("pending_emails").update(N.id,{status:"queued_manual"}),v++}catch{S++}p({sent:v,failed:S,note:"Cola marcada — ejecuta el script de envío desde el servidor para completar el envío."}),d(!1)},x=l.filter(g=>g.status==="pending"||g.status==="queued_manual"),h=l.filter(g=>g.status==="sent"),j=l.filter(g=>g.status==="error");return e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-4 border-b border-stone-800 flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-semibold",children:"Cola de correos automáticos"}),e.jsxs("p",{className:"text-stone-500 text-xs mt-0.5",children:[x.length," pendiente(s) · ",h.length," enviado(s) · ",j.length," error(es)"]})]}),x.length>0&&e.jsx("button",{onClick:f,disabled:r,className:"px-4 py-2 rounded-full bg-[#e8ff4a] text-stone-950 text-sm font-bold hover:bg-[#f0ff70] disabled:opacity-50 transition-colors",children:r?"Procesando…":`Enviar ${x.length} correo(s) pendiente(s)`})]}),m&&e.jsx("div",{className:"px-6 py-3 bg-stone-800/50 border-b border-stone-800 text-sm text-stone-300",children:m.note}),e.jsxs("div",{className:"divide-y divide-stone-800",children:[l.length===0&&e.jsx("p",{className:"px-6 py-4 text-stone-500 text-sm",children:"No hay correos en cola."}),l.map(g=>e.jsxs("div",{className:"px-6 py-3 flex items-center gap-4 flex-wrap",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-stone-200 text-sm font-medium truncate",children:[g.to_name," ",e.jsxs("span",{className:"text-stone-500 font-normal",children:["· ",g.to_email]})]}),e.jsx("p",{className:"text-stone-500 text-xs",children:g.subject})]}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-semibold shrink-0 ${g.status==="sent"?"bg-green-900/50 text-green-400":g.status==="error"?"bg-red-900/50 text-red-400":"bg-stone-700 text-stone-400"}`,children:g.status==="sent"?"✓ Enviado":g.status==="error"?"✗ Error":"⏳ Pendiente"}),g.sent_at&&e.jsx("span",{className:"text-stone-600 text-xs shrink-0",children:new Date(g.sent_at).toLocaleDateString("es-ES")})]},g.id))]})]})}function w_({members:l,campaign:i}){const r=l.filter(h=>h.founder_bonus_at),d=(i==null?void 0:i.max_slots)||100,m=(i==null?void 0:i.points)||500,p=Math.max(0,d-r.length),f=Math.min(100,Math.round(r.length/d*100)),x=[...l].sort((h,j)=>(j.cp_balance||0)-(h.cp_balance||0));return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[e.jsx(fa,{label:"Promociones entregadas",value:r.length,accent:!0,icon:Jl,sub:`de ${d} plazas`}),e.jsx(fa,{label:"Plazas restantes",value:p,icon:ut,sub:p===0?"Cupo completo":"disponibles"}),e.jsx(fa,{label:"CP repartidos",value:r.length*m,icon:bn,sub:`${m} CP por fundador`}),e.jsx(fa,{label:"Total miembros",value:l.length,icon:ut,sub:"registrados"})]}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h2",{className:"text-white font-semibold",children:"Promoción de lanzamiento — 500 CP fundador"}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-semibold ${p>0?"bg-green-900 text-green-300":"bg-stone-700 text-stone-400"}`,children:p>0?"Activa":"Cupo lleno"})]}),e.jsx("div",{className:"bg-stone-800 rounded-full h-4 overflow-hidden mb-2",children:e.jsx("div",{className:"h-full bg-[#e8ff4a] rounded-full transition-all",style:{width:`${f}%`}})}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsxs("span",{className:"text-[#e8ff4a] font-bold",children:["Entregadas: ",r.length," / ",d]}),e.jsxs("span",{className:"text-stone-400",children:["Plazas restantes: ",p]})]})]}),e.jsx(N_,{}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden",children:[e.jsx("div",{className:"px-4 py-3 border-b border-stone-800",children:e.jsx("h3",{className:"text-white font-semibold",children:"Todos los miembros — saldo de Climbpoints"})}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-stone-800",children:[e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3",children:"Nombre"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3 hidden sm:table-cell",children:"Correo"}),e.jsx("th",{className:"text-center text-stone-400 font-medium px-4 py-3",children:"Saldo CP"}),e.jsx("th",{className:"text-center text-stone-400 font-medium px-4 py-3",children:"500 CP fundador"}),e.jsx("th",{className:"text-left text-stone-400 font-medium px-4 py-3 hidden md:table-cell",children:"Fecha asignación"})]})}),e.jsx("tbody",{children:x.map(h=>e.jsxs("tr",{className:"border-b border-stone-800/50 hover:bg-stone-800/30",children:[e.jsx("td",{className:"px-4 py-3 text-stone-200 font-medium",children:h.name||"—"}),e.jsx("td",{className:"px-4 py-3 text-stone-400 hidden sm:table-cell",children:h.email}),e.jsxs("td",{className:"px-4 py-3 text-center",children:[e.jsx("span",{className:"text-[#e8ff4a] font-bold",children:h.cp_balance||0}),e.jsx("span",{className:"text-stone-500 text-xs ml-1",children:"CP"})]}),e.jsx("td",{className:"px-4 py-3 text-center",children:h.founder_bonus_at?e.jsx("span",{className:"inline-flex items-center gap-1 bg-[#e8ff4a]/10 text-[#e8ff4a] text-xs px-2 py-0.5 rounded-full font-semibold",children:"✓ Recibidos"}):e.jsx("span",{className:"text-stone-600 text-xs",children:"—"})}),e.jsx("td",{className:"px-4 py-3 text-stone-500 text-xs hidden md:table-cell",children:h.founder_bonus_at?new Date(h.founder_bonus_at).toLocaleDateString("es-ES",{day:"2-digit",month:"short",year:"numeric"}):"—"})]}
575,h.id))})]})})]})]})}function S_({visits:l}){const i=l.length,r={};l.forEach(g=>{r[g.page]=(r[g.page]||0)+1});const d=Object.entries(r).sort((g,v)=>v[1]-g[1]).slice(0,12),m={};l.forEach(g=>{m[g.device]=(m[g.device]||0)+1});const p={};l.forEach(g=>{p[g.referrer]=(p[g.referrer]||0)+1});const f=Object.entries(p).sort((g,v)=>v[1]-g[1]).slice(0,10),x={};l.forEach(g=>{const v=g.country||"Desconocido";x[v]=(x[v]||0)+1});const h=Object.entries(x).sort((g,v)=>v[1]-g[1]).slice(0,10),j={móvil:c_,escritorio:Xx,tablet:d_};return i===0?e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-10 text-center",children:[e.jsx(sm,{className:"w-10 h-10 text-stone-700 mx-auto mb-3"}),e.jsx("p",{className:"text-stone-400",children:"Aún no hay visitas registradas en este periodo."}),e.jsx("p",{className:"text-stone-600 text-sm mt-1",children:"Las visitas se registran automáticamente en cuanto alguien entra a la web."})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:Object.entries(m).map(([g,v])=>{const S=j[g]||Xx;return e.jsx(fa,{label:g.charAt(0).toUpperCase()+g.slice(1),value:v,sub:`${Math.round(v/i*100)}% del total`,icon:S},g)})}),e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h2",{className:"text-white font-semibold mb-4",children:"Páginas más visitadas"}),e.jsx("div",{className:"space-y-3",children:d.map(([g,v])=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-stone-400 text-xs w-40 truncate shrink-0",children:g}),e.jsx("div",{className:"flex-1 bg-stone-800 rounded-full h-2 overflow-hidden",children:e.jsx("div",{className:"h-full bg-[#e8ff4a] rounded-full",style:{width:`${Math.round(v/d[0][1]*100)}%`}})}),e.jsx("span",{className:"text-stone-400 text-sm w-8 text-right shrink-0",children:v})]},g))})]}),f.length>0&&e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h2",{className:"text-white font-semibold mb-4",children:"De dónde llegan"}),e.jsx("div",{className:"divide-y divide-stone-800",children:f.map(([g,v])=>e.jsxs("div",{className:"flex justify-between items-center py-2.5",children:[e.jsx("span",{className:"text-stone-300 text-sm truncate",children:g||"Directo"}),e.jsx("span",{className:"text-[#e8ff4a] font-bold text-sm ml-4 shrink-0",children:v})]},g))})]}),h.length>0&&e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-6",children:[e.jsx("h2",{className:"text-white font-semibold mb-4",children:"Países de procedencia"}),e.jsx("div",{className:"divide-y divide-stone-800",children:h.map(([g,v])=>e.jsxs("div",{className:"flex justify-between items-center py-2.5",children:[e.jsx("span",{className:"text-stone-300 text-sm",children:g}),e.jsx("span",{className:"text-white font-semibold text-sm ml-4",children:v})]},g))})]})]})}function C_({campaign:l,members:i}){if(!l)return e.jsx("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-10 text-center text-stone-400",children:"No hay campañas activas."});const r=i.filter(m=>m.is_founder),d=Math.round((l.used_slots||0)/l.max_slots*100);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-stone-900 border border-[#e8ff4a]/30 rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx(Jl,{className:"w-6 h-6 text-[#e8ff4a]"}),e.jsx("h2",{className:"text-white font-bold text-lg",children:l.title}),e.jsx("span",{className:`ml-auto text-xs px-2 py-1 rounded-full font-semibold ${l.active?"bg-green-900 text-green-300":"bg-stone-800 text-stone-400"}`,children:l.active?"Activa":"Inactiva"})]}),e.jsx("p",{className:"text-stone-400 text-sm mb-6",children:l.subtitle}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[e.jsxs("div",{className:"bg-stone-800 rounded-xl p-4 text-center",children:[e.jsxs("div",{className:"text-2xl font-display font-bold text-[#e8ff4a]",children:[l.used_slots," / ",l.max_slots]}),e.jsx("div",{className:"text-stone-400 text-xs mt-1",children:"Miembros fundadores"})]}),e.jsxs("div",{className:"bg-stone-800 rounded-xl p-4 text-center",children:[e.jsx("div",{className:"text-2xl font-display font-bold text-white",children:r.length}),e.jsx("div",{className:"text-stone-400 text-xs mt-1",children:"Casas fundadoras"})]}),e.jsxs("div",{className:"bg-stone-800 rounded-xl p-4 text-center",children:[e.jsx("div",{className:"text-2xl font-display font-bold text-white",children:(l.used_slots||0)*l.points}),e.jsxs("div",{className:"text-stone-400 text-xs mt-1",children:[l.points," CP concedidos"]})]}),e.jsxs("div",{className:"bg-stone-800 rounded-xl p-4 text-center",children:[e.jsx("div",{className:"text-2xl font-display font-bold text-white",children:l.max_slots-(l.used_slots||0)}),e.jsx("div",{className:"text-stone-400 text-xs mt-1",children:"Plazas disponibles"})]})]}),e.jsx("div",{className:"bg-stone-800 rounded-full h-4 overflow-hidden mb-1",children:e.jsx("div",{className:"h-full bg-[#e8ff4a] rounded-full transition-all",style:{width:`${d}%`}})}),e.jsxs("div",{className:"flex justify-between text-xs text-stone-500 mb-6",children:[e.jsxs("span",{children:[d,"% completado"]}),e.jsxs("span",{children:[l.starts_at," → ",l.ends_at]})]}),e.jsxs("div",{className:"border-t border-stone-700 pt-4",children:[e.jsx("h3",{className:"text-stone-300 font-semibold text-sm mb-2",children:"Condiciones"}),e.jsx("p",{className:"text-stone-500 text-sm",children:l.conditions})]})]}),r.length>0&&e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-stone-800 flex items-center justify-between",children:[e.jsx("h3",{className:"text-white font-semibold",children:"Miembros fundadores confirmados"}),e.jsx("span",{className:"text-[#e8ff4a] font-bold",children:r.length})]}),e.jsx("div",{className:"divide-y divide-stone-800",children:r.map(m=>e.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-stone-200 font-medium",children:m.name||"Sin nombre"}),e.jsx("div",{className:"text-stone-500 text-xs",children:m.email})]}),e.jsxs("span",{className:"text-[#e8ff4a] font-bold text-sm",children:["+",l.points," CP"]})]},m.id))})]})]})}const Wx={spam:"Spam o publicidad",incorrect:"Información incorrecta",offensive:"Contenido ofensivo",safety:"Problema de seguridad real",illegal_content:"Contenido ilegal / fotos inapropiadas",other:"Otro"};function E_({report:l,onRefresh:i}){var k,T,w;const[r,d]=b.useState(!1),[m,p]=b.useState([]),[f,x]=b.useState(""),[h,j]=b.useState(!1),[g,v]=b.useState([]),[S,N]=b.useState(!1),_=async()=>
575{try{const A=await D.collection("community_schools").getFullList({sort:"name"});p(A)}catch{}},z=async()=>{try{await D.collection("duplicate_reports").update(l.id,{status:"dismissed"}),i()}catch{}},C=async()=>{if(!f)return;j(!0);const A=[],L=m.find(U=>U.id===f);if(!L){j(!1);return}let q=null;l.school_id&&(q=m.find(U=>U.id===l.school_id)),q||(q=m.find(U=>{var J,O;return((J=U.name)==null?void 0:J.toLowerCase())===((O=l.school_name)==null?void 0:O.toLowerCase())&&U.id!==f}));const H=(q==null?void 0:q.name)||l.school_name,F=L.name;try{const U=await D.collection("climbing_sectors").getFullList({filter:`school_name="${H}"`});for(const O of U)await D.collection("climbing_sectors").update(O.id,{school_name:F});A.push(`✓ ${U.length} sector${U.length!==1?"es":""} migrado${U.length!==1?"s":""}`);const J=await D.collection("route_reviews").getFullList({filter:`zone="${H}"`});for(const O of J)await D.collection("route_reviews").update(O.id,{zone:F});A.push(`✓ ${J.length} reseña${J.length!==1?"s":""} migrada${J.length!==1?"s":""}`);try{const O=await D.collection("climbing_routes").getFullList({filter:`school_id="${(q==null?void 0:q.id)||""}"`});for(const X of O)await D.collection("climbing_routes").update(X.id,{school_id:f});A.push(`✓ ${O.length} ruta${O.length!==1?"s":""} migrada${O.length!==1?"s":""}`)}catch{}try{const O=await D.collection("topos").getFullList({filter:`zone="${H}"`});for(const X of O)await D.collection("topos").update(X.id,{zone:F});O.length>0&&A.push(`✓ ${O.length} croquis migrado${O.length!==1?"s":""}`)}catch{}q&&(await D.collection("community_schools").update(q.id,{name:`[FUSIONADA] ${q.name}`,merged_into:f}).catch(()=>{}),A.push("✓ Escuela duplicada marcada como fusionada")),await D.collection("duplicate_reports").update(l.id,{status:"resolved"}),A.push("✓ Aviso marcado como resuelto"),v(A),N(!0),setTimeout(i,1500)}catch(U){A.push(`⚠️ Error: ${(U==null?void 0:U.message)||"desconocido"}`),v(A)}j(!1)};return e.jsxs("div",{className:"bg-stone-900 border border-yellow-900/40 rounded-xl p-5 mb-3 space-y-3",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-yellow-400 text-xs font-bold uppercase tracking-wide",children:"Posible duplicado"}),e.jsxs("p",{className:"text-white font-semibold mt-1",children:["«",l.school_name,"»"]}),e.jsxs("p",{className:"text-stone-400 text-sm",children:["Podría ser lo mismo que: ",e.jsxs("span",{className:"text-white",children:["«",l.duplicate_of,"»"]})]}),l.reason&&e.jsxs("p",{className:"text-stone-400 text-sm italic mt-1",children:["«",l.reason,"»"]})]}),e.jsxs("p",{className:"text-stone-500 text-xs",children:["Reportado por ",((T=(k=l.expand)==null?void 0:k.reported_by)==null?void 0:T.name)||"—"," · ",(w=l.created)==null?void 0:w.slice(0,10)]}),S?e.jsx("div",{className:"space-y-1",children:g.map((A,L)=>e.jsx("p",{className:"text-green-400 text-xs",children:A},L))}):r?e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-stone-300 font-semibold",children:"¿Qué escuela conservar como la oficial?"}),e.jsx("p",{className:"text-xs text-stone-500",children:"Los sectores, vías y reseñas de la duplicada pasarán a la escuela que elijas. La duplicada quedará marcada como fusionada pero no se borrará."}),e.jsxs("select",{value:f,onChange:A=>x(A.target.value),className:"w-full px-3 py-2 bg-stone-800 border border-stone-700 rounded-lg text-white text-sm focus:outline-hidden focus:border-[#e8ff4a]/50",children:[e.jsx("option",{value:"",children:"— Escuela canónica a conservar —"}),m.filter(A=>{var L;return!((L=A.name)!=null&&L.startsWith("[FUSIONADA]"))}).map(A=>e.jsx("option",{value:A.id,children:A.name},A.id))]}),g.length>0&&e.jsx("div",{className:"space-y-1",children:g.map((A,L)=>e.jsx("p",{className:"text-xs text-stone-400",children:A},L))}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:C,disabled:!f||h,className:"flex-1 py-2 bg-green-700 hover:bg-green-600 text-white font-bold text-sm rounded-lg transition-colors disabled:opacity-40",children:h?"Fusionando…":"Confirmar fusión"}),e.jsx("button",{onClick:()=>{d(!1),v([])},className:"px-4 py-2 bg-stone-700 hover:bg-stone-600 text-white text-sm rounded-lg transition-colors",children:"Cancelar"})]})]}):e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsx("button",{onClick:()=>{d(!0),_()},className:"px-4 py-2 bg-[#e8ff4a] text-stone-900 font-bold text-sm rounded-lg hover:bg-yellow-300 transition-colors",children:"Fusionar escuelas"}),e.jsx("button",{onClick:z,className:"px-4 py-2 bg-stone-700 hover:bg-stone-600 text-white text-sm rounded-lg transition-colors",children:"Descartar"})]})]})}function z_({dupeReports:l,onRefresh:i}){const r=(l||[]).filter(m=>m.status==="pending"),d=(l||[]).filter(m=>m.status!=="pending");return!r.length&&!d.length?null:e.jsxs("div",{className:"mt-10",children:[e.jsx("h3",{className:"font-display text-xl text-white mb-4",children:"Posibles duplicados de escuelas"}),e.jsx("p",{className:"text-stone-500 text-sm mb-4",children:"Avisos enviados por la comunidad. Nada se borra automáticamente — tú decides si fusionar o descartar."}),r.length===0&&e.jsx("p",{className:"text-stone-500 text-sm",children:"No hay avisos pendientes."}),r.map(m=>e.jsx(E_,{report:m,onRefresh:i},m.id)),d.length>0&&e.jsxs("details",{className:"mt-2",children:[e.jsxs("summary",{className:"text-stone-500 text-xs cursor-pointer hover:text-stone-300",children:["Ver ",d.length," resuelto",d.length!==1?"s":""]}),e.jsx("div",{className:"mt-2 space-y-2",children:d.map(m=>e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-lg px-4 py-3 flex justify-between items-center",children:[e.jsxs("span",{className:"text-stone-400 text-sm",children:["«",m.school_name,"» → «",m.duplicate_of,"»"]}),e.jsx("span",{className:"text-xs text-stone-600",children:m.status})]},m.id))})]})]})}function k_(){const[l,i]=b.useState([]),[r,d]=b.useState(!0),[m,p]=b.useState(""),[f,x]=b.useState({}),[h,j]=b.useState(null),[g,v]=b.useState(null),S=async()=>{d(!0);
575try{const q=await D.collection("community_schools").getFullList({sort:"zona",perPage:500});i(q)}catch{}d(!1)};b.useEffect(()=>{S()},[]);const N=q=>(q||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),_=N(m),z=l.filter(q=>!_||N(q.zona).includes(_)||N(q.name).includes(_)||N(q.pais).includes(_)||N(q.region).includes(_)),C=z.filter(q=>{var H,F;return!q.is_sector&&!((H=q.zona)!=null&&H.startsWith("[FUSIONADA]"))&&!((F=q.name)!=null&&F.startsWith("[FUSIONADA]"))}),k=z.filter(q=>q.is_sector===!0),T=z.filter(q=>(q.zona||q.name||"").startsWith("[FUSIONADA]"));async function w(q){x(H=>({...H,[q]:!0}));try{await D.collection("community_schools").delete(q),v("Escuela eliminada"),j(null),await S()}catch{v("No se ha podido eliminar (puede tener contenido asociado)")}x(H=>({...H,[q]:!1})),setTimeout(()=>v(null),4e3)}const A=({school:q})=>{const H=q.zona||q.name||"(sin nombre)",F=H.startsWith("[FUSIONADA]");return e.jsxs("div",{className:`flex items-center gap-3 px-4 py-3 border-b border-stone-800/60 hover:bg-stone-900/40 transition-colors ${F?"opacity-50":""}`,children:[e.jsx(ya,{className:"w-4 h-4 text-stone-600 shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-white text-sm font-semibold truncate",children:H}),e.jsxs("p",{className:"text-stone-500 text-xs truncate",children:[q.pais||"",q.region?` · ${q.region}`:"",q.lat?` · ${q.lat}, ${q.lng}`:""]})]}),q.is_sector&&e.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-stone-800 text-stone-400 border border-stone-700 shrink-0",children:"sector"}),h===q.id?e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsxs("span",{className:"text-xs text-amber-400 flex items-center gap-1",children:[e.jsx(l_,{className:"w-3.5 h-3.5"})," ¿Eliminar?"]}),e.jsx("button",{onClick:()=>w(q.id),disabled:f[q.id],className:"px-2.5 py-1 bg-red-600 hover:bg-red-500 text-white text-xs rounded-lg font-semibold transition-colors disabled:opacity-50",children:f[q.id]?"…":"Sí, borrar"}),e.jsx("button",{onClick:()=>j(null),className:"px-2.5 py-1 bg-stone-700 hover:bg-stone-600 text-white text-xs rounded-lg transition-colors",children:"Cancelar"})]}):e.jsx("button",{onClick:()=>j(q.id),className:"shrink-0 p-1.5 text-stone-600 hover:text-red-400 hover:bg-red-900/30 rounded-lg transition-colors","aria-label":`Eliminar ${H}`,title:"Eliminar esta escuela",children:e.jsx(q4,{className:"w-4 h-4"})})]})},L=at.length+C.length;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[e.jsxs("h2",{className:"font-display text-2xl text-white",children:["Escuelas",e.jsxs("span",{className:"text-stone-500 text-base font-sans font-normal ml-2",children:["(",L," en total)"]})]}),e.jsx("div",{className:"relative max-w-xs w-full",children:e.jsx("input",{type:"text",placeholder:"Buscar por nombre o país…",value:m,onChange:q=>p(q.target.value),className:"w-full bg-stone-900 border border-stone-700 rounded-xl pl-4 pr-3 py-2 text-sm text-white placeholder-stone-500 focus:outline-none focus:border-[#e8ff4a]/50"})})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[e.jsx(fa,{label:"Total escuelas",value:L,accent:!0,icon:ya,sub:"estáticas + comunidad"}),e.jsx(fa,{label:"Base propia",value:at.length,icon:ya,sub:"escuelas verificadas"}),e.jsx(fa,{label:"Aportadas comunidad",value:C.length,icon:ut,sub:"añadidas por miembros"}),e.jsx(fa,{label:"Sectores importados",value:k.length,icon:ya,sub:"subdivisiones"})]}),g&&e.jsx("div",{className:"px-4 py-3 rounded-xl bg-stone-800 border border-stone-700 text-sm text-stone-200",children:g}),r?e.jsx("p",{className:"text-stone-500 text-center py-12",children:"Cargando…"}):e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-stone-800 bg-stone-900/80",children:[e.jsxs("h3",{className:"text-white font-semibold text-sm",children:["Escuelas activas — ",C.length]}),e.jsx("p",{className:"text-stone-500 text-xs mt-0.5",children:"Añadidas por miembros o importadas desde fuentes externas. Puedes eliminar las que no cumplan la política de la plataforma."})]}),C.length===0?e.jsxs("p",{className:"text-stone-600 text-sm text-center py-8",children:["No hay escuelas activas",_?" con ese filtro":""]}):C.map(q=>e.jsx(A,{school:q},q.id))]}),k.length>0&&e.jsxs("details",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden",children:[e.jsxs("summary",{className:"px-4 py-3 cursor-pointer text-stone-400 text-sm font-semibold hover:text-white transition-colors",children:["Sectores importados — ",k.length," (expandir)"]}),k.map(q=>e.jsx(A,{school:q},q.id))]}),e.jsxs("details",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden",children:[e.jsxs("summary",{className:"px-4 py-3 cursor-pointer text-stone-400 text-sm font-semibold hover:text-white transition-colors",children:["Base propia verificada — ",at.length," escuelas (expandir)"]}),at.filter(q=>{if(!_)return!0;const H=F=>(F||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();return H(q.zona).includes(_)||H(q.pais).includes(_)||H(q.continente).includes(_)}).map((q,H)=>e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-stone-800/60 hover:bg-stone-900/40 transition-colors",children:[e.jsx(ya,{className:"w-4 h-4 text-stone-600 shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-white text-sm font-semibold truncate",children:q.zona}),e.jsxs("p",{className:"text-stone-500 text-xs truncate",children:[q.pais,q.continente?` · ${q.continente}`:"",q.lat?` · ${q.lat}, ${q.lng}`:" · sin coordenadas"]})]}),e.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-stone-800 text-stone-500 border border-stone-700 shrink-0",children:"base propia"})]},H))]}),T.length>0&&e.jsxs("details",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden",children:[e.jsxs("summary",{className:"px-4 py-3 cursor-pointer text-stone-500 text-sm font-semibold hover:text-stone-300 transition-colors",children:["Fusionadas / archivadas — ",T.length," (expandir)"]}),T.map(q=>e.jsx(A,{school:q},q.id))]})]})]})}function A_({reports:l,dupeReports:i,onRefresh:r}){const[d,m]=b.useState({}),p=l.filter(g=>
575g.status!=="hidden"&&g.status!=="dismissed"),f=l.filter(g=>g.status==="hidden"||g.status==="dismissed");async function x(g){m(v=>({...v,[g.id]:!0}));try{await D.collection("route_reviews").update(g.review,{hidden:!0}),await D.collection("review_reports").update(g.id,{status:"hidden"}),r()}catch(v){console.error(v)}m(v=>({...v,[g.id]:!1}))}async function h(g){m(v=>({...v,[g.id]:!0}));try{await D.collection("review_reports").update(g.id,{status:"dismissed"}),r()}catch(v){console.error(v)}m(v=>({...v,[g.id]:!1}))}async function j(g){m(v=>({...v,[g.id]:!0}));try{await D.collection("route_reviews").update(g.review,{hidden:!1}),await D.collection("review_reports").update(g.id,{status:"dismissed"}),r()}catch(v){console.error(v)}m(v=>({...v,[g.id]:!1}))}return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"font-display text-2xl text-white",children:"Cola de moderación"}),e.jsxs("span",{className:"bg-red-600 text-white text-sm font-bold px-3 py-1 rounded-full",children:[p.length," pendientes"]})]}),p.length===0&&e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-12 text-center",children:[e.jsx("div",{className:"text-4xl mb-3",children:"✅"}),e.jsx("p",{className:"text-stone-400",children:"No hay reseñas pendientes de moderar."})]}),p.map(g=>{var v,S,N,_,z,C,k,T,w,A,L;return e.jsxs("div",{className:`rounded-2xl p-6 space-y-4 border ${g.reason==="illegal_content"?"bg-red-950 border-red-800":"bg-stone-900 border-red-900/40"}`,children:[e.jsxs("div",{className:"flex flex-wrap gap-2 items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:`font-bold text-sm uppercase tracking-wide ${g.reason==="illegal_content","text-red-400"}`,children:g.reason==="illegal_content"?"🚨 CONTENIDO PROHIBIDO":"Reseña reportada"}),e.jsx("p",{className:"text-white font-semibold mt-1",children:((S=(v=g.expand)==null?void 0:v.review)==null?void 0:S.route_name)||g.review}),e.jsxs("p",{className:"text-stone-400 text-sm",children:[(_=(N=g.expand)==null?void 0:N.review)==null?void 0:_.zone," · ",(C=(z=g.expand)==null?void 0:z.review)==null?void 0:C.sector]}),((T=(k=g.expand)==null?void 0:k.review)==null?void 0:T.photos)&&g.expand.review.photos.length>0&&e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:g.expand.review.photos.map((q,H)=>e.jsx("img",{src:`https://pb.climbandhome.com/api/files/route_reviews/${g.expand.review.id}/${q}`,alt:`Foto ${H+1}`,className:"w-20 h-20 object-cover rounded border border-stone-700"},H))})]}),e.jsx("span",{className:`text-xs px-2 py-1 rounded font-semibold ${g.reason==="illegal_content"?"bg-red-900 text-red-200":"bg-red-900/60 text-red-300"}`,children:Wx[g.reason]||g.reason})]}),g.details&&e.jsxs("p",{className:`text-sm rounded-lg p-3 italic ${g.reason==="illegal_content"?"bg-red-900/40 text-red-200":"bg-stone-800 text-stone-300"}`,children:["«",g.details,"»"]}),e.jsxs("div",{className:"text-stone-500 text-xs flex flex-wrap gap-4",children:[e.jsxs("span",{children:["Reportado por: ",e.jsx("span",{className:"text-stone-300",children:((A=(w=g.expand)==null?void 0:w.reviewer)==null?void 0:A.name)||"—"})]}),e.jsxs("span",{children:["Fecha: ",(L=g.created)==null?void 0:L.slice(0,10)]})]}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{onClick:()=>x(g),disabled:d[g.id],className:"bg-red-700 hover:bg-red-600 text-white text-sm px-4 py-2 rounded-lg transition-colors disabled:opacity-50",children:"Ocultar reseña"}),e.jsx("button",{onClick:()=>h(g),disabled:d[g.id],className:"bg-stone-700 hover:bg-stone-600 text-white text-sm px-4 py-2 rounded-lg transition-colors disabled:opacity-50",children:"Descartar reporte"})]})]},g.id)}),f.length>0&&e.jsxs("details",{children:[e.jsxs("summary",{className:"cursor-pointer text-stone-500 text-sm hover:text-stone-300 transition-colors",children:["Ver ",f.length," reportes resueltos"]}),e.jsx("div",{className:"mt-4 space-y-3",children:f.map(g=>{var v,S,N;return e.jsxs("div",{className:"bg-stone-900/50 border border-stone-800 rounded-xl p-4 flex justify-between items-center gap-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-stone-300 text-sm truncate",children:((S=(v=g.expand)==null?void 0:v.review)==null?void 0:S.route_name)||g.review}),e.jsxs("p",{className:"text-stone-500 text-xs",children:[Wx[g.reason]||g.reason," · ",(N=g.created)==null?void 0:N.slice(0,10)]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[g.status==="hidden"&&e.jsx("button",{onClick:()=>j(g),disabled:d[g.id],className:"text-xs px-3 py-1 bg-stone-700 hover:bg-stone-600 text-stone-300 rounded-lg transition-colors disabled:opacity-50",children:"Restaurar"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${g.status==="hidden"?"bg-red-900/40 text-red-400":"bg-stone-700 text-stone-400"}`,children:g.status==="hidden"?"Oculta":"Descartado"})]})]},g.id)})})]}),e.jsx(z_,{dupeReports:i,onRefresh:r})]})}function M_(){const[l,i]=b.useState([]),[r,d]=b.useState(!0),[m,p]=b.useState("all"),[f,x]=b.useState(null),[h,j]=b.useState({});b.useEffect(()=>{const _=new AbortController;return D.collection("guides").getFullList({sort:"-created",signal:_.signal}).then(z=>{i(z),d(!1)}).catch(z=>{z!=null&&z.isAbort||d(!1)}),()=>_.abort()},[]);async function g(_,z){x(_);try{const C=h[_]||"";await D.collection("guides").update(_,{status:z,admin_notes:C}),i(k=>k.map(T=>T.id===_?{...T,status:z,admin_notes:C}:T))}catch(C){console.error(C)}x(null)}const v={pending:{label:"Pendiente",color:"text-yellow-400 bg-yellow-400/10 border-yellow-400/20"},approved:{label:"Verificado",color:"text-green-400 bg-green-400/10 border-green-400/20"},rejected:{label:"Rechazado",color:"text-red-400 bg-red-400/10 border-red-400/20"},needs_docs:{label:"Pide docs",color:"text-orange-400 bg-orange-400/10 border-orange-400/20"}},S=m==="all"?l:l.filter(_=>_.status===m),N={all:l.length,pending:0,approved:0,rejected:0,needs_docs:0};return l.forEach(_=>{N[_.status]!==void 0&&N[_.status]++}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-6 flex-wrap gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-stone-100",children:"Guías profesionales"}),e.jsx("p",{className:"text-xs text-stone-500 mt-0.5",children:"Revisión de solicitudes de verificación"})]}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:[["all","Todos"],["pending","Pendientes"],["approved","Verificados"],["needs_docs","Piden docs"],["rejected","Rechazados"]].map(([_,z])=>e.jsxs("button",{onClick:()=>p(_),className:`px-3 py-1.5 rounded-full text-xs font-medium transition-colors border ${m===_?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"bg-stone-800 text-stone-400 border-stone-700 hover:border-stone-500"}`,children:[z," ",N[_]>0&&e.jsx("span",{className:"ml-1 opacity-70",children:N[_]})]},_))})]}),r?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsx("div",{className:"w-6 h-6 border-2 border-[#e8ff4a] border-t-transparent roun
575ded-full animate-spin"})}):S.length===0?e.jsx("div",{className:"text-center py-16 text-stone-500",children:m==="all"?"Aún no hay solicitudes de guías.":"Sin solicitudes en este estado."}):e.jsx("div",{className:"space-y-4",children:S.map(_=>{const z=v[_.status]||v.pending,C=Array.isArray(_.certification_doc)?_.certification_doc:_.certification_doc?[_.certification_doc]:[];return e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap mb-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-stone-100",children:_.name}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full border ${z.color}`,children:z.label})]}),_.email&&e.jsx("p",{className:"text-xs text-stone-500 mt-0.5",children:_.email}),_.zones&&e.jsxs("p",{className:"text-xs text-stone-400 mt-0.5",children:["📍 ",_.zones]}),_.certification_type&&e.jsxs("p",{className:"text-xs text-stone-400",children:["🎓 ",_.certification_type]}),_.experience_years>0&&e.jsxs("p",{className:"text-xs text-stone-500",children:[_.experience_years," años de experiencia"]}),e.jsx("p",{className:"text-xs text-stone-600 mt-0.5",children:new Date(_.created).toLocaleDateString("es-ES")})]}),C.length>0&&e.jsx("div",{className:"flex gap-2 flex-wrap",children:C.map((k,T)=>e.jsxs("a",{href:D.files.getURL(_,k),target:"_blank",rel:"noopener noreferrer",className:"text-xs bg-stone-800 hover:bg-stone-700 text-stone-300 border border-stone-700 px-3 py-1.5 rounded-lg transition-colors",children:["📄 Ver doc ",C.length>1?T+1:""]},T))})]}),_.bio&&e.jsx("p",{className:"text-xs text-stone-400 leading-relaxed mb-3 bg-stone-800/50 rounded-lg p-3 line-clamp-3",children:_.bio}),e.jsxs("div",{className:"space-y-2 mb-3",children:[e.jsx("label",{className:"block text-xs text-stone-500",children:"Notas / mensaje al guía"}),e.jsx("textarea",{rows:2,value:h[_.id]??(_.admin_notes||""),onChange:k=>j(T=>({...T,[_.id]:k.target.value})),placeholder:"Motivo de rechazo, documentación adicional necesaria…",className:"w-full bg-stone-800 border border-stone-700 rounded-lg px-3 py-2 text-xs text-stone-300 placeholder-stone-600 focus:outline-none focus:border-[#e8ff4a]/50 resize-none"})]}),e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[_.status!=="approved"&&e.jsx("button",{onClick:()=>g(_.id,"approved"),disabled:f===_.id,className:"px-3 py-1.5 bg-green-600 hover:bg-green-500 disabled:opacity-50 text-white text-xs font-medium rounded-lg transition-colors",children:"✓ Verificar"}),_.status!=="needs_docs"&&e.jsx("button",{onClick:()=>g(_.id,"needs_docs"),disabled:f===_.id,className:"px-3 py-1.5 bg-orange-600 hover:bg-orange-500 disabled:opacity-50 text-white text-xs font-medium rounded-lg transition-colors",children:"📄 Pedir documentación"}),_.status!=="rejected"&&e.jsx("button",{onClick:()=>g(_.id,"rejected"),disabled:f===_.id,className:"px-3 py-1.5 bg-red-900 hover:bg-red-800 disabled:opacity-50 text-red-300 text-xs font-medium rounded-lg transition-colors",children:"✗ Rechazar"})]})]},_.id)})})]})}const T_=[{id:"resumen",label:"Resumen",icon:i_},{id:"usuarios",label:"Usuarios",icon:ut},{id:"escaladores",label:"🧗 Escaladores",icon:ut},{id:"casas",label:"Casas",icon:gs},{id:"escuelas",label:"Escuelas",icon:ya},{id:"intercambios",label:"Intercambios",icon:tm},{id:"climbpoints",label:"Climbpoints",icon:bn},{id:"estadisticas",label:"Estadísticas",icon:sm},{id:"promociones",label:"Promociones",icon:Jl},{id:"moderacion",label:"🚨 Moderación",icon:bn},{id:"guias_pro",label:"🪪 Guías",icon:ut},{id:"guia",label:"📖 Guía",icon:Zn}],L_=[7,14,30,90];function R_(){const{user:l,authReady:i}=oa(),r=Za(),[d,m]=b.useState("resumen"),[p,f]=b.useState(30),[x,h]=b.useState(!0),[j,g]=b.useState({members:[],homes:[],requests:[],campaign:null,visits:[],reports:[],dupeReports:[]}),v=x_.includes(l==null?void 0:l.id)||f_.includes(l==null?void 0:l.email);b.useEffect(()=>{if(i){if(!l){r("/login");return}if(!v){r("/");return}}},[i,l,v,r]);const S=b.useCallback(async N=>{h(!0);try{const _=new Date;_.setDate(_.getDate()-p);const z=_.toISOString().slice(0,19)+"Z",[C,k,T,w,A,L,q]=await Promise.all([D.collection("members").getFullList({sort:"created",signal:N}),D.collection("homes").getFullList({sort:"-created",signal:N}
575),D.collection("exchange_requests").getFullList({sort:"-created",expand:"from_member,to_home",signal:N}).catch(()=>[]),D.collection("campaigns").getList(1,1,{filter:'slug = "founding-100"',signal:N}).catch(()=>({items:[]})),D.collection("page_visits").getFullList({filter:`created >= "${z}"`,sort:"-created",batch:500,signal:N}).catch(H=>(console.warn("page_visits error:",H),[])),D.collection("review_reports").getFullList({sort:"-created",expand:"reviewer,review",signal:N}).catch(()=>[]),D.collection("duplicate_reports").getFullList({sort:"-created",expand:"reported_by",signal:N}).catch(()=>[])]);g({members:C,homes:k,requests:T,campaign:w.items[0]||null,visits:Array.isArray(A)?A:A.items||[],reports:L,dupeReports:q})}catch(_){_!=null&&_.isAbort||console.error(_)}finally{h(!1)}},[p]);return b.useEffect(()=>{if(!v)return;const N=new AbortController;return S(N.signal),()=>N.abort()},[v,S]),v?e.jsx("div",{className:"min-h-screen bg-stone-950 text-stone-100 pt-20 pb-16",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-4xl sm:text-5xl font-bold text-white",children:"Panel de administración"}),e.jsx("p",{className:"text-stone-500 text-sm mt-1",children:"Climb & Home · Solo visible para el administrador"})]}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:L_.map(N=>e.jsxs("button",{onClick:()=>f(N),className:`px-3 py-1.5 rounded-full text-xs font-semibold border transition-colors ${p===N?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"bg-stone-900 text-stone-400 border-stone-700 hover:border-stone-500"}`,children:[N," días"]},N))})]}),e.jsx("div",{className:"flex gap-2 mb-8 overflow-x-auto pb-1 -mx-1 px-1",children:T_.map(N=>e.jsx(b_,{label:N.label,active:d===N.id,onClick:()=>m(N.id),icon:N.icon},N.id))}),x?e.jsx("div",{className:"flex items-center justify-center py-24",children:e.jsx(r_,{className:"w-8 h-8 text-stone-700 animate-pulse"})}):e.jsxs(e.Fragment,{children:[d==="resumen"&&e.jsx(g_,{data:j}),d==="usuarios"&&e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-end mb-4",children:e.jsx(fn,{chapter:"miembros",label:"Ayuda: Miembros"})}),e.jsx(v_,{members:j.members})]}),d==="escaladores"&&e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-end mb-4",children:e.jsx(fn,{chapter:"escaladores",label:"Ayuda: Escaladores"})}),e.jsx(y_,{members:j.members})]}),d==="casas"&&e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-end mb-4",children:e.jsx(fn,{chapter:"casas",label:"Ayuda: Casas"})}),e.jsx(j_,{homes:j.homes,members:j.members,requests:j.requests})]}),d==="intercambios"&&e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-end mb-4",children:e.jsx(fn,{chapter:"intercambios",label:"Ayuda: Intercambios"})}),e.jsx(__,{requests:j.requests,homes:j.homes,members:j.members})]}),d==="climbpoints"&&e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-end mb-4",children:e.jsx(fn,{chapter:"climbpoints",label:"Ayuda: Climbpoints"})}),e.jsx(w_,{members:j.members,campaign:j.campaign})]}),d==="estadisticas"&&e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-end mb-4",children:e.jsx(fn,{chapter:"estadisticas",label:"Ayuda: Estadísticas"})}),e.jsx(S_,{visits:j.visits})]}),d==="promociones"&&e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-end mb-4",children:e.jsx(fn,{chapter:"promociones",label:"Ayuda: Promociones"})}),e.jsx(C_,{campaign:j.campaign,members:j.members})]}),d==="escuelas"&&e.jsx(k_,{}),d==="moderacion"&&e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-end mb-4",children:e.jsx(fn,{chapter:"incidencias",label:"Ayuda: Moderación"})}),e.jsx(A_,{reports:j.reports,dupeReports:j.dupeReports,onRefresh:()=>{const N=new AbortController;S(N.signal)}})]}),d==="guias_pro"&&e.jsx(M_,{}),d==="guia"&&e.jsx("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl overflow-hidden",style:{minHeight:"70vh"},children:e.jsx(kb,{})})]})]})}):null}const q_=[{icon:e.jsxs("svg",{viewBox:"0 0 40 40",width:"32",height:"32",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M20 4C12.3 4 6 10.3 6 18c0 10.5 14 22 14 22s14-11.5 14-22c0-7.7-6.3-14-14-14z",fill:"#e8ff4a",opacity:"0.12",stroke:"#e8ff4a",strokeWidth:"1.8"}),e.jsx("circle",{cx:"20",cy:"18",r:"5",fill:"#e8ff4a",opacity:"0.85"})]}),title:"Las casas siempre están vacías cuando escalamos",body:"Cada fin de semana, cada puente, cada semana de vacaciones — los escaladores nos vamos. La furgo, el coche, el tren. Y mientras estamos en la roca, nuestra casa se queda vacía. Simultáneamente, otros escaladores están haciendo exactamente lo mismo, pero en otro sitio. CLIMB & HOME conecta esas dos realidades: tu casa vacía y la casa vacía de alguien que escala donde tú quieres ir."},{icon:e.jsxs("svg",{viewBox:"0 0 40 40",width:"32",height:"32",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M10 20h20M20 10v20",stroke:"#e8ff4a",strokeWidth:"2",strokeLinecap:"round"}),e.jsx("circle",{cx:"20",cy:"20",r:"13",stroke:"#e8ff4a",strokeWidth:"1.8",opacity:"0.5"})]}),title:"Intercambio, no mercado",body:"No pagas noches — las intercambias. Abres tu casa cuando te vas a escalar, y tienes la puerta abierta cuando tú viajas. Los Climbpoints son el equilibrio: quien más ofrece, más puede recibir. Sin inflación de temporada, sin intermediarios que se quedan el margen."},{icon:e.jsxs("svg",{viewBox:"0 0 40 40",width:"32",height:"32",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"14",r:"5",fill:"#e8ff4a",opacity:"0.15",stroke:"#e8ff4a",strokeWidth:"1.8"}),e.jsx("circle",{cx:"28",cy:"14",r:"5",fill:"#e8ff4a",opacity:"0.15",stroke:"#e8ff4a",strokeWidth:"1.8"}),e.jsx("circle",{cx:"20",cy:"27",r:"5",fill:"#e8ff4a",opacity:"0.15",stroke:"#e8ff4a",strokeWidth:"1.8"}),e.jsx("path",{d:"M17 14h6M14.5 19.5l3 5M25.5 19.5l-3 5",stroke:"#e8ff4a",strokeWidth:"1.5",strokeLinecap:"round"})]}),title:"La confianza ya existe en la roca",body:"En la escalada ya sabes lo que es fiarte de alguien de verdad, no de palabra. Si confías en esa persona en una pared, también puedes confiar en que va a cuidar tu casa. No hace falta construir esa confianza desde cero — en la comunidad escaladora ya está. Nosotros solo le damos una forma."},{icon:e.jsxs("svg",{viewBox:"0 0 40 40",width:"32",height:"32",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M7 33V21L20 8l13 13v12H7z",fill:"#e8ff4a",opacity:"0.12",stroke:"#e8ff4a",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("rect",{x:"15",y:"24",width:"10",height:"9",rx:"1.5",fill:"#e8ff4a",opacity:"0.8"})]}),title:"Llegas a una casa, sales con un guía",body:"Cuando llegas a casa de un escalador local no solo tienes una cama — tienes acceso a sus guías, sus croquis, sus reseñas de los sectores que conoce de memoria. El anfitrión lleva años escalando ahí y está orgulloso de compartirlo: cuál es el mejor sector para la tarde, cuál evitar con lluvia, qué vía no te puedes perder aunque solo tengas un día. Eso no se compra, no se googlea. Solo se consigue quedándote en su casa."}];function D_(){return e.jsxs("main",{className:"min-h-screen bg-stone-950 pt-20",lang:"es",children:[e.jsxs("section",{className:"relative overflow-hidden px-4 py-24 sm:py-36",children:[e.jsx("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:"url('/static/manifesto-hero.jpg')",backgroundSize:"cover",backgroundPosition:"center 65%"},"aria-hidden":"true"}),e.jsx("div",{className:"pointer-events-none absolute inset-0",style:{background:"linear-gradient(to bottom, rgba(12,10,9,0.55) 0%, rgba(12,10,9,0.48) 50%, rgba(12,10,9,0.85) 100%)"},"aria-hidden":"true"}),e.jsxs("div",{className:"relative max-w-3xl mx-auto text-center",children:[e.jsx("h1",{className:"font-display text-3xl sm:text-4xl lg:text-5xl font-bold text-white leading-tight tracking-tight mb-8",style:{textShadow:"0 2px 24px rgba(0,0,0,0.7)"},children:"Escaladores que abren su puerta."}),e.jsx("p",{className:"text-stone-100 text-lg sm:text-xl leading-relaxed max-w-2xl mx-auto",style:{textShadow:"0 1px 12px rgba(0,0,0,0.8)"},children:"Nos vamos a escalar. Nuestra casa se queda vacía. Otros escaladores hacen lo mismo en otra parte del mundo. Esto empezó como una conversación en la base de una vía — y aquí sigue."})]})]}),e.jsx("section",{className:"px-4 pb-16 sm:pb-24",children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[e.jsx("p",{className:"text-stone-300 text-lg leading-relaxed text-center",children:"Los escaladores dejamos nuestro hogar siempre que podemos. Simultáneamente, otros escaladores están haciendo lo mismo — pero en otro sitio. ¿Dónde mejor alojarse que en esas casas que se quedan vacías?"}),e.jsx("p",{className:"text-stone-500 text-base leading-relaxed text-center mt-6",children:"No hace falta explicarlo mucho más. Si escalas, ya lo entiendes."})]})}),e.jsx("section",{className:"px-4 py-16 sm:py-24 border-t border-stone-800/60",children:e.jsxs("div",{className:"max-w-5xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-white",children:"Por qué funciona"}),e.jsx("p",{className:"text-stone-500 text-sm mt-3",children:"Cuatro verdades que aprendimos escalando."})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-px bg-stone-800/40 rounded-2xl overflow-hidden border border-stone-800",children:q_.map(l=>e.jsxs("div",{className:"bg-stone-950 p-8 sm:p-10 hover:bg-stone-900/50 transition-colors",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#e8ff4a]/8 border border-[#e8ff4a]/20 flex items-center justify-center mb-5",children:l.icon}),e.jsx("h3",{className:"text-white font-bold text-lg leading-snug mb-3",children:l.title}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed",children:l.body})]}
575,l.title))})]})}),e.jsx("section",{className:"px-4 py-16 sm:py-24 border-t border-stone-800/60",children:e.jsx("div",{className:"max-w-3xl mx-auto",children:e.jsxs("div",{className:"rounded-2xl border border-[#e8ff4a]/20 bg-[#e8ff4a]/5 p-8 sm:p-12 text-center",children:[e.jsx("span",{className:"inline-block text-3xl mb-4","aria-hidden":"true",children:"🧗"}),e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-white mb-6",children:"Detrás de CLIMB & HOME"}),e.jsx("p",{className:"text-stone-300 text-base leading-relaxed mb-5 max-w-xl mx-auto",children:"Somos escaladores del norte de España. No somos una startup ni una empresa de tecnología — somos personas que llevan años durmiendo en furgos y casas de amigos cerca de la roca, y que decidieron convertir eso en algo más grande."}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed mb-5 max-w-lg mx-auto",children:"Gestionamos la comunidad, mantenemos la plataforma y seguimos escalando. Si tienes una idea, un problema o simplemente quieres presentarte, puedes escribirnos directamente."}),e.jsx("a",{href:"mailto:[email protected]",className:"inline-block text-[#e8ff4a] font-bold text-sm hover:underline mb-8",children:"[email protected]"}),e.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:e.jsx(ne,{to:"/signup",className:"inline-flex items-center justify-center gap-2 px-7 py-3.5 rounded-full bg-[#e8ff4a] text-stone-950 font-bold text-sm hover:bg-[#f0ff70] transition-colors focus:outline-hidden focus-visible:ring-2 focus-visible:ring-[#e8ff4a]",children:"Unirme a la comunidad"})})]})})}),e.jsx("div",{className:"border-t border-stone-800 py-8 px-4 text-center",children:e.jsxs("p",{className:"text-stone-600 text-xs",children:["© 2026 CLIMB & HOME —"," ",e.jsx(ne,{to:"/terminos",className:"hover:text-stone-400 transition-colors",children:"Términos"})," · ",e.jsx(ne,{to:"/privacidad",className:"hover:text-stone-400 transition-colors",children:"Privacidad"})," · ",e.jsx("a",{href:"mailto:[email protected]",className:"hover:text-stone-400 transition-colors",children:"Contacto"})]})})]})}function O_({review:l,onClose:i}){const r="★".repeat(l.rating)+"☆".repeat(5-l.rating);return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:i,role:"dialog","aria-modal":"true","aria-label":"Únete para interactuar",children:[e.jsx("div",{className:"absolute inset-0 bg-stone-950/80 backdrop-blur-sm"}),e.jsxs("div",{className:"relative w-full max-w-md bg-stone-900 border border-stone-700 rounded-3xl overflow-hidden shadow-2xl",onClick:d=>d.stopPropagation(),children:[e.jsxs("div",{className:"p-5 border-b border-stone-800 select-none pointer-events-none","aria-hidden":"true",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-stone-100 text-sm",children:l.route_name}),e.jsxs("div",{className:"text-xs text-stone-500",children:[l.zone,l.sector?` · ${l.sector}`:""]})]}),e.jsx("span",{className:"text-[#e8ff4a] text-xs",children:r})]}),l.review_text&&e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed line-clamp-2 blur-[3px]",children:l.review_text})]}),e.jsxs("div",{className:"p-6 text-center",children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 flex items-center justify-center mx-auto mb-4",children:e.jsxs("svg",{viewBox:"0 0 24 24",width:"22",height:"22",fill:"none",stroke:"#e8ff4a",strokeWidth:"1.8",strokeLinecap:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"9",cy:"7",r:"4"}),e.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75"})]})}),e.jsx("h2",{className:"font-display text-2xl tracking-wide text-white mb-2",children:t("comunidad.join_title")}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed mb-6",children:t("comunidad.join_de
575sc")}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(ne,{to:"/signup",className:"w-full py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-semibold text-sm hover:bg-[#f0ff70] transition-colors",onClick:i,children:t("buttons.create_account")}),e.jsx(ne,{to:"/login",className:"w-full py-3 rounded-full border border-stone-700 text-stone-300 text-sm font-semibold hover:border-stone-500 hover:text-white transition-colors",onClick:i,children:t("auth.already_have_account")})]}),e.jsx("button",{onClick:i,className:"mt-4 text-xs text-stone-600 hover:text-stone-400 transition-colors",children:t("buttons.close")})]})]})]})}function B_({review:l,onGuestClick:i}){var d,m,p,f,x,h;const r="★".repeat(l.rating)+"☆".repeat(5-l.rating);return e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5 flex flex-col gap-3 hover:border-stone-600 transition-colors cursor-pointer",onClick:i,role:"button",tabIndex:0,onKeyDown:j=>j.key==="Enter"&&(i==null?void 0:i()),"aria-label":`Ver reseña de ${l.route_name}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-stone-100 text-sm leading-tight",children:l.route_name}),e.jsxs("div",{className:"text-xs text-stone-500 mt-0.5",children:[l.zone,l.sector?` · ${l.sector}`:""]})]}),e.jsx("span",{className:"text-[#e8ff4a] text-xs tracking-tight shrink-0",children:r})]}),l.review_text&&e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed line-clamp-3",children:l.review_text}),e.jsxs("div",{className:"flex items-center gap-2 mt-auto pt-1 border-t border-stone-800",children:[(m=(d=l.expand)==null?void 0:d.author)!=null&&m.avatar?e.jsx("img",{src:D.files.getURL(l.expand.author,l.expand.author.avatar,{thumb:"40x40"}),alt:l.expand.author.name,className:"w-6 h-6 rounded-full object-cover"}):e.jsx("div",{className:"w-6 h-6 rounded-full bg-stone-700 flex items-center justify-center text-xs font-bold text-stone-300",children:(((f=(p=l.expand)==null?void 0:p.author)==null?void 0:f.name)||"?")[0].toUpperCase()}),e.jsx("span",{className:"text-xs text-stone-500",children:((h=(x=l.expand)==null?void 0:x.author)==null?void 0:h.name)||"Escalador"}),l.grade&&e.jsx("span",{className:"ml-auto text-xs font-mono text-stone-500",children:l.grade}),e.jsx("span",{className:"ml-auto text-xs text-stone-600 hover:text-stone-400 transition-colors",children:"Interactuar →"})]})]})}function P_({topo:l}){var r;const i=(r=l.image)!=null&&r[0]?D.files.getURL(l,l.image[0],{thumb:"400x300"}):null;return e.jsxs("div",{className:"group relative overflow-hidden rounded-2xl bg-stone-900 border border-stone-800 hover:border-stone-600 transition-all",children:[i?e.jsxs("div",{className:"aspect-[4/3] overflow-hidden",children:[e.jsx("img",{src:i,alt:l.route_name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500 blur-sm group-hover:blur-sm",style:{filter:"blur(6px)"}}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("div",{className:"bg-stone-950/80 backdrop-blur-xs rounded-xl px-3 py-1.5 text-xs text-stone-300 flex items-center gap-1.5",children:[e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"currentColor",className:"shrink-0",children:e.jsx("path",{d:"M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2zm3 6V3a3 3 0 1 0-6 0v4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z"})}),"Ver en detalle — solo miembros"]})})]}):e.jsx("div",{className:"aspect-[4/3] bg-stone-800 flex items-center justify-center",children:e.jsx("svg",{viewBox:"0 0 48 48",width:"48",height:"48",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M10 36 L24 12 L38 36 Z",stroke:"#e8ff4a",strokeWidth:"1.5",strokeLinejoin:"round",fill:"none",opacity:"0.4"})})}),e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"font-semibold text-stone-100 text-sm truncate",children:l.route_name}),e.jsxs("div",{className:"text-xs text-stone-500 mt-0.5 truncate",children:[l.zone,l.sector?` · ${l.sector}`:""]}),l.grade&&e.jsx("div",{className:"mt-2 inline-block text-xs font-mono bg-stone-800 text-stone-300 px-2 py-0.5 rounded-md",children:l.grade})]})]})}const U_=[{nombre:"Siurana",pais:"España",id:"cat01",emoji:"🪨",descripcion:"Caliza proyectada en lo alto de un acantilado. Referencia mundial de la deportiva dura."}
575,{nombre:"Kalymnos",pais:"Grecia",id:"gre01",emoji:"🌊",descripcion:"Caliza tufa sobre el Egeo. La isla de la escalada por excelencia del Mediterráneo."},{nombre:"Arco",pais:"Italia",id:"ita01",emoji:"☀️",descripcion:"Sol garantizado, todos los niveles, ambiente único. El clásico europeo."},{nombre:"Fontainebleau",pais:"Francia",id:"fra01",emoji:"🌲",descripcion:"La meca del bloque. Arenisca perfecta en el bosque a las puertas de París."},{nombre:"Yosemite",pais:"EEUU",id:"usa01",emoji:"🏔️",descripcion:"El valle más icónico del mundo. Granito en estado puro, historia de la escalada en cada pared."},{nombre:"El Chaltén",pais:"Argentina",id:"sam01",emoji:"🌬️",descripcion:"Patagonia salvaje. Torres de granito que salen del viento y entran en la leyenda."}];function H_(){const{user:l}=oa(),{t:i}=Lt(),r=Za(),[d,m]=b.useState({reviews:0,topos:0,members:0,homes:0}),[p,f]=b.useState([]),[x,h]=b.useState([]),[j,g]=b.useState(!0),[v,S]=b.useState(null);return b.useEffect(()=>{const N=new AbortController;return Promise.all([D.collection("route_reviews").getList(1,6,{sort:"-created",expand:"author",filter:"hidden=false || hidden=null",signal:N.signal}).catch(()=>({items:[],totalItems:0})),D.collection("topos").getList(1,6,{sort:"-created",expand:"author",signal:N.signal}).catch(()=>({items:[],totalItems:0})),D.collection("members").getList(1,1,{signal:N.signal}).catch(()=>({totalItems:0})),D.collection("homes").getList(1,1,{filter:"available=true",signal:N.signal}).catch(()=>({totalItems:0}))]).then(([_,z,C,k])=>{f(_.items),h(z.items),m({reviews:_.totalItems,topos:z.totalItems,members:C.totalItems,homes:k.totalItems}),g(!1)}),()=>N.abort()},[]),e.jsxs("div",{className:"min-h-screen bg-stone-950 text-stone-100",children:[v&&e.jsx(O_,{review:v,onClose:()=>S(null)}),e.jsxs("section",{className:"relative pt-32 pb-20 px-4 overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.04]",style:{backgroundImage:"linear-gradient(#e8ff4a 1px, transparent 1px), linear-gradient(90deg, #e8ff4a 1px, transparent 1px)",backgroundSize:"60px 60px"}}),e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[600px] h-[400px] rounded-full bg-[#e8ff4a]/5 blur-3xl"})]}),e.jsxs("div",{className:"relative max-w-4xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full border border-stone-700 bg-stone-900/60 text-xs text-stone-400 mb-8 font-medium tracking-wider uppercase",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#e8ff4a] animate-pulse"}),i("comunidad.badge")]}),e.jsxs("h1",{className:"font-display text-4xl sm:text-5xl lg:text-6xl tracking-wider text-white leading-none mb-6",children:[i("comunidad.hero_title"),e.jsx("br",{}),e.jsx("span",{className:"text-[#e8ff4a]",children:i("comunidad.hero_subtitle")})]}),e.jsx("p",{className:"text-stone-400 text-lg sm:text-xl max-w-2xl mx-auto leading-relaxed mb-10",children:i("comunidad.hero_desc")}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[e.jsx(ne,{to:"/signup",className:"px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 text-sm font-semibold hover:bg-[#f0ff70] transition-colors",children:i("comunidad.join_cta")}),e.jsx(ne,{to:"/croquis",className:"px-6 py-3 rounded-full border border-stone-600 text-stone-300 text-sm font-semibold hover:border-stone-400 hover:text-white transition-colors",children:i("comunidad.view_topos")}),e.jsx(ne,{to:"/nosotros",className:"px-6 py-3 rounded-full border border-stone-700 text-stone-400 text-sm font-semibold hover:border-stone-500 hover:text-stone-300 transition-colors",children:i("comunidad.about_us")})]})]})]}),e.jsx("section",{className:"py-16 px-4",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs("div",{className:"flex items-end justify-between mb-8 gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-4xl tracking-wide text-white",children:"RESEÑAS RECIENTES"}),e.jsx("p",{className:"text-stone-500 text-sm mt-1",children:"Lo que la comunidad cuenta de las vías"})]}),e.jsx(ne,{to:"/resenas",className:"text-sm text-[#e8ff4a] hover:underline shrink-0",children:"Ver todas →"})]}),p.length===0?e.jsxs("div",{className:"text-center py-12 text-stone-600",children:[e.jsx("p",{className:"text-lg",children:"Participa y deja una reseña"}),e.jsx(ne,{to:"/resenas",className:"mt-4 inline-block text-sm text-[#e8ff4a] hover:underline",children:"Ir a reseñas →"})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:p.map(N=>e.jsx(B_,{review:N,onGuestClick:l?()=>r("/resenas"):()=>S(N)},N.id))})]})}),e.jsx("section",{className:"py-16 px-4 bg-stone-900/30 border-y border-stone-800/40",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs("div",{className:"flex items-end justify-between mb-8 gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-4xl tracking-wide text-white",children:"CROQUIS"}),e.jsx("p",{className:"text-stone-500 text-sm mt-1",children:"Planos y topos aportados por la comunidad"})]}),e.jsx(ne,{to:"/croquis",className:"text-sm text-[#e8ff4a] hover:underline shrink-0",children:"Ver todos →"})]}),x.length===0?e.jsxs("div",{className:"text-center py-12 text-stone-600",children:[e.jsx("p",{className:"text-lg",children:"Comparte y sube tus croquis"}),e.jsx(ne,{to:"/dashboard",className:"mt-4 inline-block text-sm text-[#e8ff4a] hover:underline",children:"Subir el primero →"})]}):e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:x.map(N=>e.jsx(P_,{topo:N},N.id))}),e.jsxs("div",{className:"mt-8 p-4 rounded-xl bg-stone-900 border border-stone-800 flex flex-col sm:flex-row items-center gap-4 text-center sm:text-left",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 flex items-center justify-center shrink-0",children:e.jsx("svg",{viewBox:"0 0 20 20",width:"18",height:"18",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M10 2a2 2 0 0 1 2 2v4H8V4a2 2 0 0 1 2-2zm3 6V4a3 3 0 1 0-6 0v4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2z",fill:"#e8ff4a",opacity:"0.7"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-stone-300 text-sm font-medium",children:"Los croquis completos son exclusivos para miembros registrados."}),e.jsx("p",{className:"text-stone-500 text-xs mt-0.5",children:"Regístrate gratis para acceder a todos los croquis y contribuir con los tuyos."})]}),e.jsx(ne,{to:"/signup",className:"shrink-0 px-5 py-2 rounded-full bg-[#e8ff4a] text-stone-950 text-sm font-semibold hover:bg-[#f0ff70] transition-colors",children:"Registrarse gratis"})]})]})}),e.jsx("section",{className:"py-16 px-4",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs("div",{className:"flex items-end justify-between mb-8 gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-4xl tracking-wide text-white",children:"DESTINOS QUE MERECE LA PENA"}),e.jsx("p",{className:"text-stone-500 text-sm mt-1",children:"619 escuelas en el catálogo — estas no te las puedes perder"})]}),e.jsx(ne,{to:"/routes",className:"text-sm text-[#e8ff4a] hover:underline shrink-0",children:"Ver todas →"})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:U_.map(N=>e.jsx(ne,{to:`/escuelas/${N.id}`,className:"group block bg-stone-900 border border-stone-800 rounded-2xl p-5 hover:border-stone-600 hover:bg-stone-900/80 transition-all",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"text-2xl",children:N.emoji}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"font-display text-xl tracking-wide text-white group-hover:text-[#e8ff4a] transition-colors",children:N.nombre}),e.jsx("span",{className:"text-xs text-stone-500",children:N.pais}
575)]}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed mt-1.5 line-clamp-2",children:N.descripcion})]})]})},N.id))}),e.jsx("div",{className:"mt-8 text-center",children:e.jsxs(ne,{to:"/mapa",className:"inline-flex items-center gap-2 px-6 py-3 rounded-full border border-stone-700 text-stone-300 text-sm font-semibold hover:border-stone-500 hover:text-white transition-colors",children:[e.jsxs("svg",{viewBox:"0 0 20 20",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",children:[e.jsx("path",{d:"M12.586 4.586a2 2 0 1 1 2.828 2.828l-7.07 7.07A6 6 0 0 1 1 10a6 6 0 0 1 6-6 6 6 0 0 1 4.243 1.757l1.343-1.17z",strokeLinejoin:"round"}),e.jsx("circle",{cx:"10",cy:"10",r:"8",strokeLinecap:"round"})]}),"Explorar el mapa completo"]})})]})}),e.jsx("section",{className:"py-16 px-4 border-t border-stone-800/40",children:e.jsx("div",{className:"max-w-3xl mx-auto",children:e.jsxs("div",{className:"bg-stone-900 border border-stone-800 rounded-3xl p-8 sm:p-12 text-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 w-64 h-32 rounded-full bg-[#e8ff4a]/8 blur-3xl pointer-events-none","aria-hidden":"true"}),e.jsxs("h2",{className:"font-display text-4xl sm:text-5xl tracking-wide text-white mb-4 relative",children:["TU EXPERIENCIA",e.jsx("br",{}),e.jsx("span",{className:"text-[#e8ff4a]",children:"VALE PARA TODOS."})]}),e.jsx("p",{className:"text-stone-400 leading-relaxed mb-8 max-w-lg mx-auto",children:"Cada beta que compartes, cada reseña que escribes y cada casa que ofreces hace la comunidad más rica. Forma parte de algo que se construye entre todos."}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-3",children:[e.jsx(ne,{to:"/signup",className:"w-full sm:w-auto px-8 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-semibold text-sm hover:bg-[#f0ff70] transition-colors",children:"Unirse a la comunidad — gratis"}),e.jsx(ne,{to:"/nosotros",className:"w-full sm:w-auto px-8 py-3 rounded-full border border-stone-700 text-stone-300 text-sm font-semibold hover:border-stone-500 hover:text-white transition-colors",children:"Quiénes somos"})]})]})})})]})}const Ab=[{value:"deportiva",label:"Deportiva"},{value:"tradicional",label:"Clásica / Trad"},{value:"bloque",label:"Bloque"},{value:"alpinismo",label:"Alpinismo"},{value:"via_ferrata",label:"Vía ferrata"},{value:"hielo",label:"Hielo y mixta"},{value:"multivias",label:"Multivías"}],Ou=[{value:"principiante",label:"Principiante",range:"5a–6a"},{value:"intermedio",label:"Intermedio",range:"6a–7a"},{value:"avanzado",label:"Avanzado",range:"7a–8a"},{value:"experto",label:"Experto",range:"8a+"}];function Cu(l){return l?new Date(l).toLocaleDateString("es-ES",{day:"numeric",month:"short",year:"numeric"}):""}function V_({nivel:l}){const i={principiante:"bg-sky-900/40 text-sky-300 border-sky-800/50",intermedio:"bg-emerald-900/40 text-emerald-300 border-emerald-800/50",avanzado:"bg-amber-900/40 text-amber-300 border-amber-800/50",experto:"bg-red-900/40 text-red-300 border-red-800/50"},r=Ou.find(d=>d.value===l);return r?e.jsxs("span",{className:`text-xs px-2 py-0.5 rounded-full border font-medium ${i[l]||"bg-stone-800 text-stone-400 border-stone-700"}`,children:[r.label," · ",r.range]}):null}function G_({post:l,currentUserId:i,onDelete:r}){var f,x,h,j,g;const d=(x=(f=l.expand)==null?void 0:f.author)!=null&&x.avatar?D.files.getURL(l.expand.author,l.expand.author.avatar,{thumb:"80x80"}):null,m=((j=(h=l.expand)==null?void 0:h.author)==null?void 0:j.name)||"Escalador",p=l.author===i;return e.jsxs("article",{className:"bg-stone-900 border border-stone-800 rounded-2xl p-5 flex flex-col gap-4 hover:border-stone-700 transition-colors",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"shrink-0 w-10 h-10 rounded-full bg-stone-800 overflow-hidden border border-stone-700",children:d?e.jsx("img",{src:d,alt:m,className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-stone-500 font-bold text-sm",children:(g=m[0])==null?void 0:g.toUpperCase()})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-stone-100 font-semibold text-sm leading-tight truncate",children:m}),e.jsx("p",{className:"text-stone-500 text-xs mt-0.5",children:Cu(l.created)})]}),p&&e.jsx("button",{onClick:()=>r(l.id),className:"text-stone-600 hover:text-red-400 transition-colors text-xs px-2 py-1 rounded-lg hover:bg-red-900/20","aria-label":"Eliminar publicación",children:"✕"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("span",{className:"flex items-center gap-1.5 bg-stone-800 border border-stone-700 rounded-full px-3 py-1 text-xs font-semibold text-stone-200",children:[e.jsx("svg",{viewBox:"0 0 16 16",className:"w-3 h-3 fill-[#e8ff4a]","aria-hidden":"true",children:e.jsx("path",{d:"M8 1C5.2 1 3 3.2 3 6c0 3.8 5 9 5 9s5-5.2 5-9c0-2.8-2.2-5-5-5zm0 6.8C6.7 7.8 5.8 6.9 5.8 5.8S6.7 3.8 8 3.8s2.2.9 2.2 2-1 2-2.2 2z"})}),l.zona]}),(l.fecha_desde||l.fecha_hasta)&&e.jsxs("span",{className:"text-xs text-stone-400 bg-stone-800/50 rounded-full px-3 py-1 border border-stone-800",children:[l.fecha_desde&&Cu(l.fecha_desde),l.fecha_desde&&l.fecha_hasta&&" → ",l.fecha_hasta&&Cu(l.fecha_hasta)]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.nivel&&e.jsx(V_,{nivel:l.nivel}),(l.modalidades||[]).map(v=>{const S=Ab.find(N=>N.value===v);return S?e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-[#e8ff4a]/10 text-[#e8ff4a] border border-[#e8ff4a]/20 font-medium",children:S.label},v):null})]}),l.mensaje&&e.jsx("p",{className:"text-stone-300 text-sm leading-relaxed",children:l.mensaje}),i&&i!==l.author&&e.jsx("div",{className:"pt-1 border-t border-stone-800",children:e.jsxs(ne,{to:`/bocaboca?to=${l.author}`,className:"inline-flex items-center gap-2 text-xs font-semibold text-[#e8ff4a] hover:text-white transition-colors",children:[e.jsx("svg",{viewBox:"0 0 16 16",className:"w-3.5 h-3.5 fill-current","aria-hidden":"true",children:e.jsx("path",{d:"M14 1H2C1.4 1 1 1.4 1 2v9c0 .6.4 1 1 1h2v3l3-3h7c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1z"})}),"Contactar por mensaje privado"]})})]})}function F_(){const{user:l}=oa(),i=Za(),[r,d]=b.useState([]),[m,p]=b.useState(!0),[f,x]=b.useState(!1),[h,j]=b.useState(""),[g,v]=b.useState(""),[S,N]=b.useState(!1),[_,z]=b.useState({zona:"",fecha_desde:"",fecha_hasta:"",nivel:"",modalidades:[],mensaje:""});b.useEffect(()=>{const A=new AbortController;return D.collection("cordada_posts").getFullList({sort:"-created",expand:"author",signal:A.signal}).then(L=>{d(L),p(!1)}).catch(L=>{L!=null&&L.isAbort||p(!1)}),()=>A.abort()},[]);const C=A=>z(L=>({...L,modalidades:L.modalidades.includes(A)?L.modalidades.filter(q=>q!==A):[...L.modalidades,A]})),k=async A=>
575{if(A.preventDefault(),!l){i("/login");return}if(_.zona.trim()){N(!0);try{const L={author:l.id,zona:_.zona.trim(),fecha_desde:_.fecha_desde||null,fecha_hasta:_.fecha_hasta||null,nivel:_.nivel,modalidades:_.modalidades,mensaje:_.mensaje.trim()},q=await D.collection("cordada_posts").create(L,{expand:"author"});d(H=>[q,...H]),z({zona:"",fecha_desde:"",fecha_hasta:"",nivel:"",modalidades:[],mensaje:""}),x(!1)}catch{}N(!1)}},T=async A=>{try{await D.collection("cordada_posts").delete(A),d(L=>L.filter(q=>q.id!==A))}catch{}},w=r.filter(A=>!(h&&!A.zona.toLowerCase().includes(h.toLowerCase())||g&&A.nivel!==g));return e.jsxs("div",{className:"min-h-screen bg-[#0c0a09] text-stone-100",children:[e.jsxs("section",{className:"relative pt-32 pb-16 px-4 overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:e.jsx("div",{className:"absolute top-20 right-1/4 w-64 h-64 rounded-full bg-[#e8ff4a]/5 blur-3xl"})}),e.jsxs("div",{className:"max-w-4xl mx-auto relative",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-[#e8ff4a]/10 border border-[#e8ff4a]/20 rounded-full px-4 py-1.5 mb-6",children:[e.jsx("svg",{viewBox:"0 0 16 16",className:"w-3.5 h-3.5 fill-[#e8ff4a]","aria-hidden":"true",children:e.jsx("path",{d:"M8 1l1.5 3.5L13 5l-2.5 2.5.5 3.5L8 9.5 5 11l.5-3.5L3 5l3.5-.5z"})}),e.jsx("span",{className:"text-[#e8ff4a] text-xs font-semibold uppercase tracking-widest",children:"Comunidad"})]}),e.jsxs("h1",{className:"font-display text-5xl sm:text-6xl lg:text-7xl tracking-wide text-white mb-4",children:["BUSCO",e.jsx("br",{}),e.jsx("span",{className:"text-[#e8ff4a]",children:"CORDADA"})]}),e.jsx("p",{className:"text-stone-400 text-lg max-w-2xl leading-relaxed mb-8",children:"Tienes días libres y quieres escalar, pero te falta compañero. Publica aquí tu zona, fechas y nivel — otro escalador de la comunidad puede ser tu cordada."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[l?e.jsxs("button",{onClick:()=>x(A=>!A),className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-semibold text-sm hover:bg-[#f0ff70] transition-colors",children:[e.jsx("svg",{viewBox:"0 0 16 16",className:"w-4 h-4 fill-current","aria-hidden":"true",children:e.jsx("path",{d:"M8 1v14M1 8h14",stroke:"currentColor",strokeWidth:"2",fill:"none"})}),f?"Cancelar":"Publicar búsqueda"]}):e.jsx(ne,{to:"/signup",className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[#e8ff4a] text-stone-950 font-semibold text-sm hover:bg-[#f0ff70] transition-colors",children:"Crear cuenta gratis para publicar"}),e.jsx(ne,{to:"/comunidad",className:"inline-flex items-center gap-2 px-6 py-3 rounded-full border border-stone-700 text-stone-300 text-sm font-semibold hover:border-stone-500 hover:text-white transition-colors",children:"← Comunidad"})]})]})]}),f&&l&&e.jsx("section",{className:"px-4 pb-10",children:e.jsx("div",{className:"max-w-4xl mx-auto",children:e.jsxs("form",{onSubmit:k,className:"bg-stone-900 border border-[#e8ff4a]/30 rounded-2xl p-6 flex flex-col gap-5",children:[e.jsx("h2",{className:"text-stone-100 font-semibold text-base",children:"Nueva búsqueda de cordada"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"cordada-zona",className:"block text-xs text-stone-400 mb-1.5 font-medium",children:["Zona o escuela ",e.jsx("span",{className:"text-[#e8ff4a]",children:"*"})]}),e.jsx("input",{id:"cordada-zona",required:!0,value:_.zona,onChange:A=>z(L=>({...L,zona:A.target.value})),placeholder:"Ej: Atxarte, Siurana, Rodellar…",className:"w-full bg-stone-800 border border-stone-700 rounded-xl px-3 py-2 text-sm text-stone-100 placeholder-stone-600 focus:outline-hidden focus:border-[#e8ff4a]"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"cordada-desde",className:"block text-xs text-stone-400 mb-1.5 font-medium",children:"Desde"}),e.jsx("input",{id:"cordada-desde",type:"date",value:_.fecha_desde,onChange:A=>z(L=>({...L,fecha_desde:A.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-xl px-3 py-2 text-sm text-stone-100 focus:outline-hidden focu
575s:border-[#e8ff4a]"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"cordada-hasta",className:"block text-xs text-stone-400 mb-1.5 font-medium",children:"Hasta"}),e.jsx("input",{id:"cordada-hasta",type:"date",value:_.fecha_hasta,onChange:A=>z(L=>({...L,fecha_hasta:A.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-xl px-3 py-2 text-sm text-stone-100 focus:outline-hidden focus:border-[#e8ff4a]"})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-stone-400 mb-2 font-medium",children:"Nivel aproximado"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Ou.map(A=>e.jsxs("button",{type:"button",onClick:()=>z(L=>({...L,nivel:L.nivel===A.value?"":A.value})),className:`px-3 py-1.5 rounded-full text-xs font-semibold border transition-all ${_.nivel===A.value?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"border-stone-700 text-stone-400 hover:border-stone-500"}`,children:[A.label," ",e.jsx("span",{className:"opacity-60",children:A.range})]},A.value))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-stone-400 mb-2 font-medium",children:"Modalidad"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Ab.map(A=>e.jsx("button",{type:"button",onClick:()=>C(A.value),className:`px-3 py-1.5 rounded-full text-xs font-semibold border transition-all ${_.modalidades.includes(A.value)?"bg-[#e8ff4a]/20 text-[#e8ff4a] border-[#e8ff4a]/40":"border-stone-700 text-stone-400 hover:border-stone-500"}`,children:A.label},A.value))})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"cordada-mensaje",className:"block text-xs text-stone-400 mb-1.5 font-medium",children:"Mensaje (opcional)"}),e.jsx("textarea",{id:"cordada-mensaje",value:_.mensaje,onChange:A=>z(L=>({...L,mensaje:A.target.value})),placeholder:"Cuéntanos un poco más sobre lo que buscas…",rows:3,className:"w-full bg-stone-800 border border-stone-700 rounded-xl px-3 py-2 text-sm text-stone-100 placeholder-stone-600 focus:outline-hidden focus:border-[#e8ff4a] resize-none"})]}),e.jsx("button",{type:"submit",disabled:S,className:"self-start px-6 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-semibold text-sm hover:bg-[#f0ff70] transition-colors disabled:opacity-50",children:S?"Publicando…":"Publicar búsqueda"})]})})}),e.jsx("section",{className:"px-4 pb-20",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-8",children:[e.jsx("input",{value:h,onChange:A=>j(A.target.value),placeholder:"Filtrar por zona…",className:"flex-1 bg-stone-900 border border-stone-800 rounded-xl px-4 py-2.5 text-sm text-stone-100 placeholder-stone-600 focus:outline-hidden focus:border-[#e8ff4a]"}),e.jsxs("select",{value:g,onChange:A=>v(A.target.value),className:"bg-stone-900 border border-stone-800 rounded-xl px-4 py-2.5 text-sm text-stone-300 focus:outline-hidden focus:border-[#e8ff4a]",children:[e.jsx("option",{value:"",children:"Todos los niveles"}),Ou.map(A=>e.jsx("option",{value:A.value,children:A.label},A.value))]})]}),m?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx("div",{className:"w-8 h-8 border-2 border-[#e8ff4a]/30 border-t-[#e8ff4a] rounded-full animate-spin","aria-label":"Cargando"})}):w.length===0?e.jsxs("div",{className:"text-center py-20",children:[e.jsx("div",{className:"text-5xl mb-4","aria-hidden":"true",children:"🧗"}),e.jsx("p",{className:"text-stone-400 text-lg font-medium mb-2",children:"Aún no hay búsquedas publicadas"}),e.jsx("p",{className:"text-stone-500 text-sm mb-6",children:"Sé el primero en publicar — seguro que alguien de la comunidad está buscando lo mismo."}),!l&&e.jsx(ne,{to:"/signup",className:"inline-block px-6 py-2.5 rounded-full bg-[#e8ff4a] text-stone-950 font-semibold text-sm hover:bg-[#f0ff70] transition-colors",children:"Crear cuenta gratis"})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:w.map(A=>e.jsx(G_,{post:A,currentUserId:l==null?void 0:l.id,onDelete:T},A.id))})]})})]})}const $_={escalada_deportiva:"Escalada deportiva",escalada_clasica:"Escalada clásica",alpinismo:"Alpinismo",boulder:"Boulder",via_ferrata:"Vía ferrata",senderismo:"Senderismo",barranquismo:"Barranquismo",esqui_montana:"Esquí de montaña"};function I_({guide:l}){var d,m;const i=l.avatar?D.files.getURL(l,l.avatar):null,r=Array.isArray(l.activities)?l.activities:[];return e.jsx(ne,{to:`/guias/${l.id}`,className:"block bg-stone-900 border border-stone-800 rounded-lg p-5 hover:border-[#e8ff4a]/40 transition-all group",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-14 h-14 roun
575ded-full bg-stone-800 shrink-0 overflow-hidden",children:i?e.jsx("img",{src:i,alt:l.name,className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-stone-500 text-xl font-bold",children:((m=(d=l.name)==null?void 0:d[0])==null?void 0:m.toUpperCase())||"G"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-stone-100 group-hover:text-[#e8ff4a] transition-colors",children:l.name}),e.jsx("span",{className:"text-xs bg-[#e8ff4a]/10 text-[#e8ff4a] border border-[#e8ff4a]/20 px-2 py-0.5 rounded-full font-medium",children:"✓ Verificado"})]}),l.zones&&e.jsxs("p",{className:"text-sm text-stone-400 mt-0.5 truncate",children:["📍 ",l.zones]}),l.experience_years>0&&e.jsxs("p",{className:"text-xs text-stone-500 mt-0.5",children:[l.experience_years," años de experiencia"]}),r.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[r.slice(0,3).map(p=>e.jsx("span",{className:"text-xs bg-stone-800 text-stone-400 px-2 py-0.5 rounded-full",children:$_[p]||p},p)),r.length>3&&e.jsxs("span",{className:"text-xs text-stone-500",children:["+",r.length-3]})]})]})]})})}function Z_(){const{user:l}=oa();Za();const[i,r]=b.useState([]),[d,m]=b.useState(!0),[p,f]=b.useState(null);return b.useEffect(()=>{const x=new AbortController;return m(!0),D.collection("guides").getFullList({sort:"name",signal:x.signal}).then(h=>r(h)).catch(h=>{h!=null&&h.isAbort||console.error(h)}).finally(()=>m(!1)),()=>x.abort()},[]),b.useEffect(()=>{if(!l)return;const x=new AbortController;return D.collection("guides").getFirstListItem(`member="${l.id}"`,{signal:x.signal,$cancelKey:"myguide"}).then(h=>f(h)).catch(()=>f(null)),()=>x.abort()},[l]),e.jsxs("div",{className:"min-h-screen bg-[#0c0a09] text-stone-100",children:[e.jsx("div",{className:"border-b border-stone-800 bg-stone-950",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-12 md:py-16",children:[e.jsxs("div",{className:"max-w-2xl",children:[e.jsx("p",{className:"text-xs uppercase tracking-widest text-[#e8ff4a] font-medium mb-3",children:"Directorio de guías"}),e.jsx("h1",{className:"font-display text-4xl md:text-5xl text-stone-100 leading-tight mb-4",children:"GUÍAS PROFESIONALES"}),e.jsx("p",{className:"text-stone-400 text-base leading-relaxed",children:"Escaladores y montañeros locales con titulación oficial verificados. Conocen el terreno, hablan tu idioma y acompañan desde la vía más accesible hasta el proyecto desado."})]}),e.jsx("div",{className:"mt-8 flex flex-wrap gap-3",children:l?p?e.jsx(ne,{to:"/dashboard",className:"bg-stone-800 hover:bg-stone-700 text-stone-100 px-5 py-2.5 rounded-lg text-sm font-medium transition-colors",children:"Mi perfil de guía →"}):e.jsx(ne,{to:"/guias/registro",className:"bg-[#e8ff4a] hover:bg-[#d4eb3a] text-stone-950 px-5 py-2.5 rounded-lg text-sm font-bold transition-colors",children:"Registrarme como guía"}):e.jsx(ne,{to:"/signup",className:"bg-[#e8ff4a] hover:bg-[#d4eb3a] text-stone-950 px-5 py-2.5 rounded-lg text-sm font-bold transition-colors",children:"Registrarme para ver guías"})})]})}),e.jsx("div",{className:"max-w-5xl mx-auto px-4 py-10",children:l?d?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx("div",{className:"w-6 h-6 border-2 border-[#e8ff4a] border-t-transparent rounded-full animate-spin"})}):i.length===0?e.jsxs("div",{className:"text-center py-20 max-w-md mx-auto",children:[e.jsx("div",{className:"text-5xl mb-4",children:"🪨"}),e.jsx("h2",{className:"text-xl font-semibold text-stone-200 mb-3",children:"Aún no hay guías verificados"}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed mb-6",children:"Sé el primero en registrarte como guía profesional y conecta con escaladores que viajan a tu zona."}),e.jsx(ne,{to:"/guias/registro",className:"inline-block bg-[#e8ff4a] text-stone-950 px-5 py-2.5 rounded-lg text-sm font-bold hover:bg-[#d4eb3a] transition-colors",children:"Registrarme como guía"})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:i.map(x=>e.jsx(I_,{guide:x},x.id))}):e.jsxs("div",{className:"text-center py-20 max-w-md mx-auto",children:[e.jsx("div",{className:"text-5xl mb-4",children:"🧗"}),e.jsx("h2",{className:"text-xl font-semibold text-stone-200 mb-3",children:"Solo para la comunidad"}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed mb-6",children:"El directorio de guías está disponible para miembros de Climb & Home. El registro es gratuito."}),e.jsxs("div",{className:"flex gap-3 justify-center",children:[e.jsx(ne,{to:"/signup",className:"bg-[#e8ff4a] text-stone-950 px-5 py-2.5 rounded-lg text-sm font-bold hover:bg-[#d4eb3a] transition-colors",children:"Crear cuenta"}),e.jsx(ne,{to:"/login",className:"bg-stone-800 text-stone-100 px-5 py-2.5 rounded-lg text-sm font-medium hover:bg-stone-700 transition-colors",children:"Iniciar sesión"})]})]})}),l&&e.jsx("div",{className:"border-t border-stone-800 bg-stone-950 mt-8",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-12",children:[e.jsx("h2",{className:"text-lg font-semibold text-stone-300 mb-6",children:"¿Cómo funciona?"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6",children:[{n:"01",t:"Te registras como guía",d:"Rellenas tu perfil, indicas tus zonas y actividades, y adjuntas tu titulación oficial."},{n:"02",t:"Revisamos tu documentación",d:"El equipo de Climb & Home verifica tu titulación antes de que aparezcas en el directorio."},{n:"03",t:"Conectas con viajeros",d:"Una vez verificado, los escaladores que viajan a tu zona pueden contactarte directamente."}].map(x=>e.jsxs("div",{className:"flex gap-4",children:[e.jsx("span",{className:"font-display text-2xl text-[#e8ff4a]/40 shrink-0",children:x.n}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-stone-200 mb-1",children:x.t}),e.jsx("p",{className:"text-xs text-stone-500 leading-relaxed",children:x.d})]})]},x.n))})]})})]})}const e0=["Iniciación","Intermedio","Avanzado","Experto"],K_=["Deportiva","Clásica","Búlder","Montaña","Vía ferrata","BTT","Senderismo"];function Y_({member:l,size:i=10}){const r=l!=null&&l.avatar?D.files.getURL(l,l.avatar,{thumb:"60x60"}):null,d=((l==null?void 0:l.name)||"?").charAt(0).toUpperCase();return r?e.jsx("img",{src:r,alt:l.name,className:`w-${i} h-${i} rounded-full object-cover border-2 border-stone-700`}):e.jsx("div",{className:`w-${i} h-${i} rounded-full bg-stone-700 flex items-center justify-center text-stone-300 font-bold text-lg border-2 border-stone-600`,children:d})}function Q_({user:l}){const[i,r]=b.useState([]),[d,m]=b.useState(!0),[p,f]=b.useState(""),[x,h]=b.useState(""),[j,g]=b.useState(!1),[v,S]=b.useState({zona:"",fecha_desde:"",fecha_hasta:"",nivel:"",modalidades:[],mensaje:""}),[N,_]=b.useState(!1);b.useEffect(()=>{const w=new AbortController;return D.collection("cordada_posts").getFullList({filter:'cerrado = false || cerrado = ""',sort:"-created",expand:"author",signal:w.signal}).then(A=>{r(A),m(!1)}).catch(()=>m(!1)),()=>w.abort()},[]);const z=w=>S(A=>({...A,modalidades:A.modalidades.includes(w)?A.modalidades.filter(L=>L!==w):[...A.modalidades,w]})),C=async w=>{if(w.preventDefault(),!!v.zona.trim()){_(!0);try{const A=await D.collection("cordada_posts").create({...v,author:l.id}),L=await D.collection("cordada_posts").getOne(A.id,{expand:"author"});r(q=>[L,...q]),S({zona:"",fecha_desde:"",fecha_hasta:"",nivel:"",modalidades:[],mensaje:""}),g(!1)}catch{}finally{_(!1)}}},k=async w=>{await D.collection("cordada_posts").delete(w),r(A=>A.filter(L=>L.id!==w))},T=i.filter(w=>
575(!p||(w.zona||"").toLowerCase().includes(p.toLowerCase()))&&(!x||w.nivel===x));return e.jsxs("div",{children:[l?e.jsxs("div",{className:"mb-8",children:[e.jsx("button",{onClick:()=>g(w=>!w),className:"inline-flex items-center gap-2 bg-[#e8ff4a] text-stone-900 font-semibold px-5 py-2.5 rounded-lg hover:bg-[#d4eb2a] transition-colors text-sm",children:j?"✕ Cancelar":"+ Publicar búsqueda de cordada"}),j&&e.jsxs("form",{onSubmit:C,className:"mt-4 bg-stone-800 border border-stone-700 rounded-xl p-5 space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Zona o escuela *"}),e.jsx("input",{value:v.zona,onChange:w=>S(A=>({...A,zona:w.target.value})),placeholder:"p.ej. Atxarte, Siurana, Mallorca…",required:!0,className:"w-full bg-stone-900 border border-stone-600 rounded-lg px-3 py-2 text-sm text-stone-100 focus:border-[#e8ff4a] outline-hidden"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Nivel aproximado"}),e.jsxs("select",{value:v.nivel,onChange:w=>S(A=>({...A,nivel:w.target.value})),className:"w-full bg-stone-900 border border-stone-600 rounded-lg px-3 py-2 text-sm text-stone-100 focus:border-[#e8ff4a] outline-hidden",children:[e.jsx("option",{value:"",children:"Cualquier nivel"}),e0.map(w=>e.jsx("option",{value:w,children:w},w))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Desde"}),e.jsx("input",{type:"date",value:v.fecha_desde,onChange:w=>S(A=>({...A,fecha_desde:w.target.value})),className:"w-full bg-stone-900 border border-stone-600 rounded-lg px-3 py-2 text-sm text-stone-100 focus:border-[#e8ff4a] outline-hidden"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Hasta"}),e.jsx("input",{type:"date",value:v.fecha_hasta,onChange:w=>S(A=>({...A,fecha_hasta:w.target.value})),className:"w-full bg-stone-900 border border-stone-600 rounded-lg px-3 py-2 text-sm text-stone-100 focus:border-[#e8ff4a] outline-hidden"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-2",children:"Modalidad"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:K_.map(w=>e.jsx("button",{type:"button",onClick:()=>z(w),className:`px-3 py-1 rounded-full text-xs font-medium border transition-colors ${v.modalidades.includes(w)?"bg-[#e8ff4a] text-stone-900 border-[#e8ff4a]":"border-stone-600 text-stone-400 hover:border-stone-400"}`,children:w},w))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"Mensaje (opcional)"}),e.jsx("textarea",{value:v.mensaje,onChange:w=>S(A=>({...A,mensaje:w.target.value})),rows:3,placeholder:"Cuéntanos más sobre lo que buscas…",className:"w-full bg-stone-900 border border-stone-600 rounded-lg px-3 py-2 text-sm text-stone-100 focus:border-[#e8ff4a] outline-hidden resize-none"})]}),e.jsx("button",{type:"submit",disabled:N,className:"bg-[#e8ff4a] text-stone-900 font-semibold px-6 py-2.5 rounded-lg hover:bg-[#d4eb2a] transition-colors text-sm disabled:opacity-50",children:N?"Publicando…":"Publicar"})]})]}):e.jsxs("div",{className:"mb-8 p-4 bg-stone-800 border border-stone-700 rounded-xl text-center",children:[e.jsx("p",{className:"text-stone-400 text-sm mb-3",children:"Regístrate para publicar tu búsqueda de cordada"}),e.jsx(ne,{to:"/registro",className:"inline-block bg-[#e8ff4a] text-stone-900 font-semibold px-5 py-2 rounded-lg text-sm hover:bg-[#d4eb2a] transition-colors",children:"Crear cuenta gratis"})]}),e.jsxs("div",{className:"flex flex-wrap gap-3 mb-6",children:[e.jsx("input",{value:p,onChange:w=>f(w.target.value),placeholder:"Filtrar por zona…",className:"bg-stone-800 border border-stone-700 rounded-lg px-3 py-2 text-sm text-stone-100 focus:border-[#e8ff4a] outline-hidden flex-1 min-w-[160px]"}),e.jsxs("select",{value:x,onChange:w=>h(w.target.value),className:"bg-stone-800 border border-stone-700 rounded-lg px-3 py-2 text-sm text-stone-300 focus:border-[#e8ff4a] outline-hidden",children:[e.jsx("option",{value:"",children:"Todos los niveles"}),e0.map(w=>e.jsx("option",{value:w,children:w}
575,w))]})]}),d?e.jsx("div",{className:"text-center py-16 text-stone-500",children:"Cargando…"}):T.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("p",{className:"text-4xl mb-3",children:"🧗"}),e.jsx("p",{className:"text-stone-400",children:"Todavía no hay búsquedas publicadas. ¡Sé el primero!"})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:T.map(w=>{var q;const A=(q=w.expand)==null?void 0:q.author,L=Array.isArray(w.modalidades)?w.modalidades:typeof w.modalidades=="string"?JSON.parse(w.modalidades||"[]"):[];return e.jsxs("div",{className:"bg-stone-800 border border-stone-700 rounded-xl p-5 flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Y_,{member:A,size:10}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-semibold text-stone-100 text-sm",children:(A==null?void 0:A.name)||"Miembro"}),e.jsx("p",{className:"text-[#e8ff4a] font-medium text-sm mt-0.5",children:w.zona})]}),(l==null?void 0:l.id)===w.author&&e.jsx("button",{onClick:()=>k(w.id),className:"text-stone-500 hover:text-red-400 text-xs transition-colors",children:"✕"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[w.fecha_desde&&e.jsxs("span",{className:"bg-stone-700 px-2 py-0.5 rounded-full text-stone-300",children:["📅 ",w.fecha_desde,w.fecha_hasta?` → ${w.fecha_hasta}`:""]}),w.nivel&&e.jsxs("span",{className:"bg-stone-700 px-2 py-0.5 rounded-full text-stone-300",children:["📊 ",w.nivel]}),L.map(H=>e.jsx("span",{className:"bg-stone-700 px-2 py-0.5 rounded-full text-stone-300",children:H},H))]}),w.mensaje&&e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed",children:w.mensaje}),l&&A&&l.id!==w.author&&e.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[e.jsx(ne,{to:`/bocaboca?to=${w.author}`,className:"inline-flex items-center gap-1.5 bg-[#e8ff4a] text-stone-900 font-semibold px-4 py-2 rounded-lg text-xs hover:bg-[#d4eb2a] transition-colors",children:"🧗 Quiero escalar contigo"}),e.jsx(ne,{to:`/perfil/${w.author}`,className:"text-xs text-stone-400 hover:text-stone-200 transition-colors",children:"Ver perfil"})]})]},w.id)})})]})}function J_({user:l}){const[i,r]=b.useState([]),[d,m]=b.useState(!0),[p,f]=b.useState("");b.useEffect(()=>{const h=new AbortController;return D.collection("guides").getFullList({filter:'status = "verified"',sort:"-created",signal:h.signal}).then(j=>{r(j),m(!1)}).catch(()=>m(!1)),()=>h.abort()},[]);const x=i.filter(h=>!p||(h.zonas||"").toLowerCase().includes(p.toLowerCase())||(h.nombre||"").toLowerCase().includes(p.toLowerCase()));return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-6 p-4 bg-stone-800/60 border border-stone-700 rounded-xl text-sm text-stone-400",children:["Los guías profesionales de Climb & Home han sido verificados con titulación oficial. Si eres guía y quieres aparecer aquí,"," ",e.jsx(ne,{to:"/guias/registro",className:"text-[#e8ff4a] hover:underline",children:"solicita tu verificación"}),"."]}),e.jsx("input",{value:p,onChange:h=>f(h.target.value),placeholder:"Filtrar por zona o nombre…",className:"w-full max-w-sm bg-stone-800 border border-stone-700 rounded-lg px-3 py-2 text-sm text-stone-100 focus:border-[#e8ff4a] outline-hidden mb-6"}),d?e.jsx("div",{className:"text-center py-16 text-stone-500",children:"Cargando…"}):x.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("p",{className:"text-4xl mb-3",children:"🪪"}),e.jsx("p",{className:"text-stone-400 mb-2",children:"Todavía no hay guías verificados en la plataforma."}),e.jsx(ne,{to:"/guias/registro",className:"text-[#e8ff4a] text-sm hover:underline",children:"¿Eres guía profesional? Regístrate →"})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:x.map(h=>e.jsxs("div",{className:"bg-stone-800 border border-stone-700 rounded-xl p-5",children:[e.jsx("div",{className:"flex items-start justify-between gap-3 mb-3",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{className:"font-semibold text-stone-100",children:h.nombre}),e.jsx("span",{className:"text-[10px] bg-[#e8ff4a]/20 text-[#e8ff4a] px-2 py-0.5 rounded-full font-medium border border-[#e8ff4a]/30",children:"✓ Verificado"})]}),e.jsx("p",{className:"text-stone-400 text-sm",children:h.zonas})]})}),h.actividades&&e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:(h.actividades||"").split(",").map(j=>e.jsx("span",{className:"text-xs bg-stone-700 px-2 py-0.5 rounded-full text-stone-300",children:j.trim()}
575,j))}),h.idiomas&&e.jsxs("p",{className:"text-xs text-stone-500 mb-3",children:["🌐 ",h.idiomas]}),h.experiencia&&e.jsx("p",{className:"text-stone-400 text-sm mb-4 line-clamp-2",children:h.experiencia}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[h.email&&e.jsxs("a",{href:`mailto:${h.email}`,className:"text-[#e8ff4a] hover:underline",children:["✉ ",h.email]}),h.telefono&&e.jsxs("a",{href:`tel:${h.telefono}`,className:"text-stone-400 hover:text-stone-200",children:["📞 ",h.telefono]}),h.web&&e.jsx("a",{href:h.web,target:"_blank",rel:"noopener noreferrer",className:"text-stone-400 hover:text-stone-200",children:"🌐 Web"})]})]},h.id))})]})}function X_(){const{user:l}=oa(),[i,r]=b.useState("cordada");return e.jsxs("div",{className:"min-h-screen bg-stone-950 text-stone-100",children:[e.jsxs("div",{className:"bg-gradient-to-b from-stone-900 to-stone-950 border-b border-stone-800 px-4 py-12 text-center",children:[e.jsx("h1",{className:"font-display text-4xl sm:text-5xl text-[#e8ff4a] uppercase tracking-wide mb-3",children:"Encuentra compañero"}),e.jsx("p",{className:"text-stone-400 max-w-lg mx-auto text-sm leading-relaxed",children:"La escalada necesita compañero. Aquí puedes buscar quién escala en la misma zona que tú, o encontrar un guía profesional que conozca el terreno."})]}),e.jsx("div",{className:"border-b border-stone-800 px-4",children:e.jsxs("div",{className:"max-w-4xl mx-auto flex gap-1 pt-2",children:[e.jsx("button",{onClick:()=>r("cordada"),className:`px-5 py-3 text-sm font-medium rounded-t-lg transition-colors ${i==="cordada"?"bg-stone-800 text-[#e8ff4a] border-b-2 border-[#e8ff4a]":"text-stone-400 hover:text-stone-200"}`,children:"🧗 Busco cordada"}),e.jsx("button",{onClick:()=>r("guias"),className:`px-5 py-3 text-sm font-medium rounded-t-lg transition-colors ${i==="guias"?"bg-stone-800 text-[#e8ff4a] border-b-2 border-[#e8ff4a]":"text-stone-400 hover:text-stone-200"}`,children:"🪪 Guías profesionales"})]})}),e.jsx("div",{className:"max-w-4xl mx-auto px-4 py-8",children:i==="cordada"?e.jsx(Q_,{user:l}):e.jsx(J_,{user:l})})]})}const W_=[{value:"escalada_deportiva",label:"Escalada deportiva"},{value:"escalada_clasica",label:"Escalada clásica"},{value:"alpinismo",label:"Alpinismo"},{value:"boulder",label:"Boulder"},{value:"via_ferrata",label:"Vía ferrata"},{value:"senderismo",label:"Senderismo"},{value:"barranquismo",label:"Barranquismo"},{value:"esqui_montana",label:"Esquí de montaña"}];function eN(){const{user:l}=oa(),i=Za(),[r,d]=b.useState(null),[m,p]=b.useState(!0),[f,x]=b.useState(!1),[h,j]=b.useState(""),[g,v]=b.useState(!1),[S,N]=b.useState({name:"",email:"",bio:"",zones:"",activities:[],languages:"",experience_years:"",certification_type:"",phone:"",website:"",instagram:""}),[_,z]=b.useState(null);b.useEffect(()=>{if(!l){i("/login");return}const T=new AbortController;return D.collection("guides").getFirstListItem(`member="${l.id}"`,{signal:T.signal,$cancelKey:"myguidereg"}).then(w=>{d(w),p(!1)}).catch(()=>{N(w=>({...w,name:l.name||"",email:l.email||""})),p(!1)}),()=>T.abort()},[l]);function C(T){N(w=>({...w,activities:w.activities.includes(T)?w.activities.filter(A=>A!==T):[...w.activities,T]}))}async function k(T){if(T.preventDefault(),j(""),!_){j("Adjunta tu documento de titulación para continuar.");return}if(!S.zones.trim()){j("Indica al menos una zona donde ofreces tus servicios.");return}if(S.activities.length===0){j("Selecciona al menos una actividad.");return}x(!0);try{const w=new FormData;w.append("member",l.id),w.append("name",S.name),w.append("email",S.email),w.append("bio",S.bio),w.append("zones",S.zones),S.activities.forEach(A=>w.append("activities",A)),w.append("languages",S.languages),w.append("experience_years",S.experience_years||0),w.append("certification_type",S.certification_type),w.append("phone",S.phone),w.append("website",S.website),w.append("instagram",S.instagram),w.append("status","pending"),w.append("certification_doc",_),await D.collection("guides").create(w),v(!0)}catch(w){j("No se ha podido enviar la solicitud. Comprueba los datos e inténtalo de nuevo."),console.error(w)}finally{x(!1)}}return l?m?e.jsx("div",{className:"min-h-screen bg-[#0c0a09] flex items-center justify-center",children:e.jsx("div",{className:"w-6 h-6 border-2 border-[#e8ff4a] border-t-transparent roun
575ded-full animate-spin"})}):r?e.jsx("div",{className:"min-h-screen bg-[#0c0a09] text-stone-100 flex items-center justify-center px-4",children:e.jsxs("div",{className:"max-w-md text-center",children:[e.jsx("div",{className:"text-4xl mb-4",children:r.status==="approved"?"✅":r.status==="rejected"?"❌":r.status==="needs_docs"?"📄":"⏳"}),e.jsxs("h2",{className:"text-xl font-semibold mb-3",children:[r.status==="approved"&&"Perfil verificado",r.status==="pending"&&"Solicitud en revisión",r.status==="rejected"&&"Solicitud rechazada",r.status==="needs_docs"&&"Documentación pendiente"]}),e.jsxs("p",{className:"text-stone-400 text-sm mb-6",children:[r.status==="approved"&&"Tu perfil de guía ya está visible en el directorio.",r.status==="pending"&&"Estamos revisando tu documentación. Te avisaremos en cuanto tengamos novedades.",r.status==="rejected"&&(r.admin_notes||"Tu solicitud no ha sido aprobada. Contacta con nosotros para más información."),r.status==="needs_docs"&&(r.admin_notes||"Necesitamos documentación adicional para completar la verificación.")]}),e.jsx(ne,{to:"/guias",className:"text-[#e8ff4a] text-sm underline",children:"← Ver directorio de guías"})]})}):g?e.jsx("div",{className:"min-h-screen bg-[#0c0a09] text-stone-100 flex items-center justify-center px-4",children:e.jsxs("div",{className:"max-w-md text-center",children:[e.jsx("div",{className:"text-5xl mb-4",children:"📬"}),e.jsx("h2",{className:"text-2xl font-display mb-3",children:"SOLICITUD ENVIADA"}),e.jsx("p",{className:"text-stone-400 text-sm leading-relaxed mb-6",children:"Hemos recibido tu solicitud y documentación. El equipo de Climb & Home la revisará y te confirmaremos la verificación en cuanto podamos. Solo aparecerás en el directorio cuando esté aprobada."}),e.jsx(ne,{to:"/guias",className:"inline-block bg-[#e8ff4a] text-stone-950 px-5 py-2.5 rounded-lg text-sm font-bold hover:bg-[#d4eb3a] transition-colors",children:"Ver directorio de guías"})]})}):e.jsx("div",{className:"min-h-screen bg-[#0c0a09] text-stone-100",children:e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-10",children:[e.jsx(ne,{to:"/guias",className:"text-stone-500 text-sm hover:text-stone-300 transition-colors mb-6 inline-block",children:"← Directorio de guías"}),e.jsx("h1",{className:"font-display text-4xl mb-2",children:"REGISTRO COMO GUÍA"}),e.jsx("p",{className:"text-stone-400 text-sm mb-8 leading-relaxed",children:"Completa tu perfil y adjunta tu titulación oficial. Revisaremos la documentación antes de publicar tu perfil en el directorio. El proceso suele tardar entre 24 y 72 horas."}),e.jsxs("form",{onSubmit:k,className:"space-y-6",children:[e.jsxs("section",{className:"bg-stone-900 rounded-xl p-5 border border-stone-800 space-y-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-stone-300 uppercase tracking-wider",children:"Datos personales"}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",htmlFor:"g-name",children:"Nombre completo *"}),e.jsx("input",{id:"g-name",required:!0,value:S.name,onChange:T=>N(w=>({...w,name:T.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-lg px-3 py-2.5 text-sm text-stone-100 placeholder-stone-600 focus:outline-none focus:border-[#e8ff4a]/50",placeholder:"Tu nombre y apellidos"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",htmlFor:"g-email",children:"Correo de contacto"}),e.jsx("input",{id:"g-email",type:"email",value:S.email,onChange:T=>N(w=>({...w,email:T.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-lg px-3 py-2.5 text-sm text-stone-100 placeholder-stone-600 focus:outline-none focus:border-[#e8ff4a]/50",placeholder:"[email protected]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",htmlFor:"g-phone",children:"Teléfono (opcional)"}),e.jsx("input",{id:"g-phone",value:S.phone,onChange:T=>N(w=>({...w,phone:T.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-lg px-3 py-2.5 text-sm text-stone-100 placeholder-stone-600 focus:outline-none focus:border-[#e8ff4a]/50",placeholder:"+34 600 000 000"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",htmlFor:"g-bio",children:"Presentación"}),e.jsx("textarea",{id:"g-bio",rows:4,value:S.bio,onChange:T=>N(w=>({...w,bio:T.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-lg px-3 py-2.5 text-sm text-stone-100 placeholder-stone-600 focus:outline-none focus:border-[#e8ff4a]/50 resize-none",placeholder:"Cuéntanos quién eres, cuánto llevas en esto y qué tipo de salidas ofreces…"})]})]}),e.jsxs("section",{className:"bg-stone-900 rounded-xl p-5 border border-stone-800 space-y-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-stone-300 uppercase tracking-wider",children:"Zonas y actividades"}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",htmlFor:"g-zones",children:"Zonas donde trabajas *"}),e.jsx("input",{id:"g-zones",required:!0,value:S.zones,onChange:T=>N(w=>({...w,zones:T.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-lg px-3 py-2.5 text-sm text-stone-100 placeholder-stone-600 focus:outline-none focus:border-[#e8ff4a]/50",placeholder:"Ej: Siurana, Montserrat, Pirineos, Valle de Aosta…"}),e.jsx("p",{className:"text-xs text-stone-600 mt-1",children:"Separa las zonas con comas. Puedes incluir destinos internacionales."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-2",children:"Actividades que guías *"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:W_.map(T=>e.jsx("button",{type:"button",onClick:()=>C(T.value),className:`px-3 py-1.5 rounded-full text-xs font-medium transition-colors border ${S.activities.includes(T.value)?"bg-[#e8ff4a] text-stone-950 border-[#e8ff4a]":"bg-stone-800 text-stone-400 border-stone-700 hover:border-stone-500"}`,children:T.label},T.value))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",htmlFor:"g-langs",children:"Idiomas"}),e.jsx("input",{id:"g-langs",value:S.languages,onChange:T=>N(w=>({...w,languages:T.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-lg px-3 py-2.5 text-sm text-stone-100 placeholder-stone-600 focus:outline-none focus:border-[#e8ff4a]/50",placeholder:"Español, inglés, francés…"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",htmlFor:"g-exp",children:"Años de experiencia"}),e.jsx("input",{id:"g-exp",type:"number",min:"0",max:"60",value:S.experience_years,onChange:T=>N(w=>({...w,experience_years:T.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-lg px-3 py-2.5 text-sm text-stone-100 placeholder-stone-600 focus:outline-none focus:border-[#e8ff4a]/50",placeholder:"10"})]})]})]}),e.jsxs("section",{className:"bg-stone-900 rounded-xl p-5 border border-stone-800 space-y-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-stone-300 uppercase tracking-wider",children:"Titulación oficial"}),e.jsx("p",{className:"text-xs text-stone-500 leading-relaxed",children:"Solo aparecerás en el directorio si verificamos tu titulación. Adjunta el documento que acredite tu condición de guía profesional habilitado (UIAGM, Guía de montaña, Técnico de escalada, u otro reconocido en tu país)."}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",htmlFor:"g-cert-type",children:"Tipo de titulación"}),e.jsx("input",{id:"g-cert-type",value:S.certification_type,onCh
575ange:T=>N(w=>({...w,certification_type:T.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-lg px-3 py-2.5 text-sm text-stone-100 placeholder-stone-600 focus:outline-none focus:border-[#e8ff4a]/50",placeholder:"Ej: Guía UIAGM, Técnico Deportivo Escalada, Guía de Barrancos…"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-2",htmlFor:"g-doc",children:"Documento acreditativo *"}),e.jsxs("label",{htmlFor:"g-doc",className:"flex items-center gap-3 bg-stone-800 border border-dashed border-stone-600 rounded-lg px-4 py-4 cursor-pointer hover:border-[#e8ff4a]/40 transition-colors",children:[e.jsx("span",{className:"text-2xl",children:"📄"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-stone-300",children:_?_.name:"Seleccionar documento"}),e.jsx("p",{className:"text-xs text-stone-600",children:"PDF, JPG o PNG — máx. 10 MB"})]})]}),e.jsx("input",{id:"g-doc",type:"file",accept:".pdf,.jpg,.jpeg,.png",className:"sr-only",onChange:T=>{var w;return z(((w=T.target.files)==null?void 0:w[0])||null)}})]})]}),e.jsxs("section",{className:"bg-stone-900 rounded-xl p-5 border border-stone-800 space-y-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-stone-300 uppercase tracking-wider",children:"Presencia online (opcional)"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",htmlFor:"g-web",children:"Web"}),e.jsx("input",{id:"g-web",value:S.website,onChange:T=>N(w=>({...w,website:T.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-lg px-3 py-2.5 text-sm text-stone-100 placeholder-stone-600 focus:outline-none focus:border-[#e8ff4a]/50",placeholder:"https://…"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-stone-400 mb-1",htmlFor:"g-ig",children:"Instagram"}),e.jsx("input",{id:"g-ig",value:S.instagram,onChange:T=>N(w=>({...w,instagram:T.target.value})),className:"w-full bg-stone-800 border border-stone-700 rounded-lg px-3 py-2.5 text-sm text-stone-100 placeholder-stone-600 focus:outline-none focus:border-[#e8ff4a]/50",placeholder:"@usuario"})]})]})]}),h&&e.jsx("div",{className:"bg-red-950/50 border border-red-800 rounded-lg px-4 py-3 text-sm text-red-300",children:h}),e.jsx("button",{type:"submit",disabled:f,className:"w-full bg-[#e8ff4a] hover:bg-[#d4eb3a] disabled:opacity-50 text-stone-950 font-bold py-3 rounded-lg text-sm transition-colors",children:f?"Enviando solicitud…":"Enviar solicitud de verificación"}),e.jsx("p",{className:"text-xs text-stone-600 text-center leading-relaxed",children:"Nadie podrá ver tu perfil como guía hasta que Climb & Home haya revisado y aprobado tu documentación."})]})]})}):null}const aN={escalada_deportiva:"Escalada deportiva",escalada_clasica:"Escalada clásica",alpinismo:"Alpinismo",boulder:"Boulder",via_ferrata:"Vía ferrata",senderismo:"Senderismo",barranquismo:"Barranquismo",esqui_montana:"Esquí de montaña"};function tN(){var g,v,S;const{id:l}=Rr(),{user:i}=oa(),[r,d]=b.useState(null),[m,p]=b.useState(!0),[f,x]=b.useState(!1);b.useEffect(()=>{if(!l)return;const N=new AbortController;return D.collection("guides").getOne(l,{signal:N.signal}).then(_=>{d(_),p(!1)}).catch(_=>{_!=null&&_.isAbort||(x(!0),p(!1))}),()=>N.abort()},[l]);const h=r!=null&&r.avatar?D.files.getURL(r,r.avatar):null,j=Array.isArray(r==null?void 0:r.activities)?r.activities:[];return i?m?e.jsx("div",{className:"min-h-screen bg-[#0c0a09] flex items-center justify-center",children:e.jsx("div",{className:"w-6 h-6 border-2 border-[#e8ff4a] border-t-transparent rounded-full animate-spin"})}):f||!r?e.jsx("div",{className:"min-h-screen bg-[#0c0a09] text-stone-100 flex items-center justify-center px-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-xl font-semibold mb-3",children:"Guía no encontrado"}),e.jsx(ne,{to:"/guias",className:"text-[#e8ff4a] text-sm underline",children:"← Directorio de guías"})]})}):e.jsx("div",{className:"min-h-screen bg-[#0c0a09] text-stone-100",children:e.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-10",children:[e.jsx(ne,{to:"/guias",className:"text-stone-500 text-sm hover:text-stone-300 transition-colors mb-6 inline-block",children:"← Directorio de guías"}),e.jsxs("div",{className:"flex items-start gap-5 mb-8",children:[e.jsx("div",{className:"w-20 h-20 rounded-full bg-stone-800 shrink-0 overflow-hidden",children:h?e.jsx("img",{src:h,alt:r.name,className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-stone-500 text-3xl font-bold",children:((v=(g=r.name)==null?void 0:g[0])==null?void 0:v.toUpperCase())||"G"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[e.jsx("h1",{className:"font-display text-3xl text-stone-100",children:(S=r.name)==null?void 0:S.toUpperCase()}),e.jsx("span",{className:"text-xs bg-[#e8ff4a]/10 text-[#e8ff4a] border border-[#e8ff4a]/20 px-2 py-0.5 rounded-full font-medium",children:"✓ Guía verificado"})]}),r.zones&&e.jsxs("p",{className:"text-stone-400 text-sm mb-2",children:["📍 ",r.zones]}),r.experience_years>0&&e.jsxs("p",{className:"text-xs text-stone-500",children:[r.experience_years," años de experiencia"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"md:col-span-2 space-y-6",children:[r.bio&&e.jsxs("section",{className:"bg-stone-900 rounded-xl p-5 border border-stone-800",children:[e.jsx("h2",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wider mb-3",children:"Sobre mí"}),e.jsx("p",{className:"text-stone-300 text-sm leading-relaxed whitespace-pre-line",children:r.bio})]}),j.length>0&&e.jsxs("section",{className:"bg-stone-900 rounded-xl p-5 border border-stone-800",children:[e.jsx("h2",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wider mb-3",children:"Actividades"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:j.map(N=>e.jsx("span",{className:"text-xs bg-stone-800 text-stone-300 border border-stone-700 px-3 py-1 rounded-full",children:aN[N]||N},N))})]}),r.certification_type&&e.jsxs("section",{className:"bg-stone-900 rounded-xl p-5 border border-stone-800",children:[e.jsx("h2",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wider mb-3",children:"Titulación verificada"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-[#e8ff4a] text-xl",children:"✓"}),e.jsx("p",{className:"text-stone-300 text-sm",children:r.certification_type})]}),e.jsx("p",{className:"text-xs text-stone-600 mt-2",children:"Documento revisado y verificado por el equipo de Climb & Home."})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("section",{className:"bg-stone-900 rounded-xl p-5 border border-stone-800",children:[e.jsx("h2",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wider mb-3",children:"Contacto"}),e.jsxs("div",{className:"space-y-2",children:[r.email&&e.jsxs("a",{href:`mailto:${r.email}`,className:"flex items-center gap-2 text-sm text-stone-300 hover:text-[#e8ff4a] transition-colors",children:[e.jsx("span",{children:"✉️"})," ",r.email]}),r.phone&&e.jsxs("a",{href:`tel:${r.phone}`,className:"flex items-center gap-2 text-sm text-stone-300 hover:text-[#e8ff4a] transition-colors",children:[e.jsx("span",{children:"📞"})," ",r.phone]}),r.website&&e.jsxs("a",{href:r.website,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-stone-300 hover:text-[#e8ff4a] transition-colors",children:[e.jsx("span",{children:"🌐"})," Web"]}),r.instagram&&e.jsxs("a",{href:`https://instagram.com/${r.instagram.replace("@","")}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-stone-300 hover:text-[#e8ff4a] transition-colors",children:[e.jsx("span",{children:"📸"})," ",r.instagram]})]})]}),r.languages&&e.jsxs("section",{className:"bg-stone-900 rounded-xl p-5 border border-stone-800",children:[e.jsx("h2",{className:"text-xs font-semibold text-stone-500 uppercase tracking-wider mb-2",children:"Idiomas"}),e.jsx("p",{className:"text-stone-300 text-sm",children:r.languages})]})]})]})]})}):e.jsx("div",{className:"min-h-screen bg-[#0c0a09] text-stone-100 flex items-center justify-center px-4",children:e.jsxs("div",{className:"text-center max-w-sm",children:[e.jsx("div",{className:"text-4xl mb-4",children:"🔒"}),e.jsx("h2",{className:"text-xl font-semibold mb-3",children:"Solo para miembros"}),e.jsx("p",{className:"text-stone-400 text-sm mb-6",children:"Los perfiles de guías son visibles para la comunidad Climb & Home."}),e.jsxs("div",{className:"flex gap-3 justify-center",children:[e.jsx(ne,{to:"/signup",className:"bg-[#e8ff4a] text-stone-950 px-5 py-2.5 rounded-lg text-sm font-bold",children:"Crear cuenta"}),e.jsx(ne,{to:"/login",className:"bg-stone-800 text-stone-100 px-5 py-2.5 rounded-lg text-sm font-medium",children:"Iniciar sesión"})]})]})})}
575function sN(l){const i={"/":"Inicio","/homes":"Casas","/mapa":"Mapa","/routes":"Escuelas","/croquis":"Croquis","/resenas":"Reseñas","/valoraciones":"Valoraciones","/climbpoints":"Climbpoints","/dashboard":"Mi Panel","/perfil":"Perfil","/ayuda":"Ayuda","/login":"Iniciar sesión","/signup":"Registro","/terminos":"Términos","/privacidad":"Privacidad","/bocaboca":"Mensajes","/admin":"Admin","/estadisticas":"Admin"};return l.startsWith("/homes/")?"Detalle de casa":l.startsWith("/escuelas/")?"Detalle de escuela":i[l]||l}function nN(){const l=navigator.userAgent;return/Mobi|Android/i.test(l)?"móvil":/Tablet|iPad/i.test(l)?"tablet":"escritorio"}async function oN(){try{const l=await fetch("https://ipapi.co/json/",{signal:AbortSignal.timeout(3e3)});return l.ok&&(await l.json()).country_name||"Desconocido"}catch{return"Desconocido"}}function lN(){const l=It();b.useEffect(()=>{let i=!1;const r=sN(l.pathname),d=nN(),m=document.referrer?new URL(document.referrer).hostname:"directo";return oN().then(p=>{i||D.collection("page_visits").create({page:r,device:d,referrer:m,country:p}).catch(()=>{})}),()=>{i=!0}},[l.pathname])}function iN(){return e.jsxs("main",{className:"min-h-screen bg-stone-950 flex flex-col items-center justify-center gap-4 pt-16",children:[e.jsx("h1",{className:"font-display text-5xl font-bold text-white",children:"404"}),e.jsx("p",{className:"text-stone-400 text-lg",children:"Página no encontrada"}),e.jsx(ne,{to:"/",className:"text-[#e8ff4a] hover:underline",children:"Volver al inicio"})]})}function rN(){return lN(),null}function cN(){const[l,i]=b.useState(!1);return e.jsx(Rj,{children:e.jsx(Tj,{children:e.jsxs(Mj,{children:[e.jsx(rN,{}),e.jsx(Zj,{externalOpen:l,onClose:()=>i(!1)}),e.jsx(Ij,{onLogoClick:()=>i(!0)}),e.jsxs(Cy,{children:[e.jsx(ia,{path:"/",element:e.jsx(e4,{onWelcomeOpen:()=>i(!0)})}),e.jsx(ia,{path:"/homes",element:e.jsx(n4,{})}),e.jsx(ia,{path:"/homes/:id",element:e.jsx(u4,{})}),e.jsx(ia,{path:"/routes",element:e.jsx(p4,{})}),e.jsx(ia,{path:"/mapa",element:e.jsx(S4,{})}),e.jsx(ia,{path:"/climbpoints",element:e.jsx(wy,{to:"/ayuda",replace:!0})}),e.jsx(ia,{path:"/dashboard",element:e.jsx(Q4,{})}),e.jsx(ia,{path:"/perfil",element:e.jsx(M4,{})}),e.jsx(ia,{path:"/login",element:e.jsx(X4,{})}),e.jsx(ia,{path:"/signup",element:e.jsx(s2,{})}),e.jsx(ia,{path:"/ayuda",element:e.jsx(l2,{})}),e.jsx(ia,{path:"/croquis",element:e.jsx(u2,{})}),e.jsx(ia,{path:"/resenas",element:e.jsx(C2,{})}),e.jsx(ia,{path:"/valoraciones",element:e.jsx(A2,{})}),e.jsx(ia,{path:"/escuelas/:id",element:e.jsx(G2,{})}),e.jsx(ia,{path:"/escuelas/:schoolId/sectores/:sectorId",element:e.jsx(I2,{})}),e.jsx(ia,{path:"/terminos",element:e.jsx(Z2,{})}),e.jsx(ia,{path:"/privacidad",element:e.jsx(K2,{})}),e.jsx(ia,{path:"/legal",element:e.jsx(Q2,{})}),e.jsx(ia,{path:"/bocaboca",element:e.jsx(t_,{})}),e.jsx(ia,{path:"/recuperar-acceso",element:e.jsx(s_,{})}),e.jsx(ia,{path:"/reset-password",element:e.jsx(n_,{})}),e.jsx(ia,{path:"/estadisticas",element:e.jsx(o_,{})}),e.jsx(ia,{path:"/admin",element:e.jsx(R_,{})}),e.jsx(ia,{path:"/nosotros",element:e.jsx(D_,{})}),e.jsx(ia,{path:"/comunidad",element:e.jsx(H_,{})}),e.jsx(ia,{path:"/cordada",element:e.jsx(F_,{})}),e.jsx(ia,{path:"/companero",element:e.jsx(X_,{})}),e.jsx(ia,{path:"/guias",element:e.jsx(Z_,{})}),e.jsx(ia,{path:"/guias/registro",element:e.jsx(eN,{})}),e.jsx(ia,{path:"/guias/:id",element:e.jsx(tN,{})}),e.jsx(ia,{path:"*",element:e.jsx(iN,{})})]})]})})})}const dN=new URL(document.baseURI).pathname.replace(/\/$/,"");S1.createRoot(document.getElementById("root")).render(e.jsx(b.StrictMode,{children:e.jsx(ij,{basename:dN,children:e.jsx(cN,{})})}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.